Showing posts with label position. Show all posts
Showing posts with label position. Show all posts

Thursday, February 12, 2015

Smooth Scroll Using jQuery

Smooth Scroll Using jQuery Code:


$(function() {
  $('a[href*=#]:not([href=#])').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
      if (target.length) {
        $('html,body').animate({
          scrollTop: target.offset().top
        }, 1000);
        return false;
      }
    }
  });
});

Saturday, November 9, 2013

Get Latitude Longitude using Area Zip in PHP

<?php

function getLnt($zip){
$url = "http://maps.googleapis.com/maps/api/geocode/json?address=
".urlencode($zip)."&sensor=false";
$result_string = file_get_contents($url);
$result = json_decode($result_string, true);
$result1[]=$result['results'][0];
$result2[]=$result1[0]['geometry'];
$result3[]=$result2[0]['location'];
return $result3[0];
}

$val = getLnt($zip);
echo "Latitude: ".$val['lat']."<br>";
echo "Longitude: ".$val['lng']."<br>";

?>


Friday, April 19, 2013

Get County from User Lat Long

In Mobile application how the server knows about the posted device country and response then as per the location.

Get the current location of the device and use google map api to get user location. Get location from the ipaddress is a worth thing now. because all the internet user use proxy network.

PHP:

<?php

$cur_lat =$_REQUEST['lat'];
$cur_lon = $_REQUEST['lon'];

Wednesday, February 13, 2013

Disable Page Scroll on jQueryMobile Popup opens

when JQM popup open, and you dont want to scroll page then try this code.

Disable scroll.
$( ".popup").live({
                      popupbeforeposition: function(event, ui) {
                        $("body").on("touchmove", false);
                      }
});

After close popup release scroll.
$( ".popup" ).live({
                      popupafterclose: function(event, ui) {
                        $("body").unbind("touchmove");
                      }
});

Monday, June 18, 2012

Can't able to view positions in the 1.6, 1.7 and 2.5??

I am able to view the positions in the 1.5 version of Joomla but in the 1.6 and later version the position is not display by appending ?tp=1 after URL.

I thought is there any other syntax in the new joomla to view positions. but no. new joomla has disable the position from the back-end for the security.  if the developer want to view the position they are able to enable that setting.

For enable. just follow below steps.