Tag: jquery

Jquery noconflict

In WordPress, jquery is configured not to define the $ variable since it may conflict with other libraries.
You are therefore encouraged to use jQuery(document).ready(…

But we are all creatures of habit and thus may prefer to use $. So simply add this line at the top of your js file / script tag

if (typeof($) == ‘undefined’) $ = jQuery.noConflict(); // added by Imran@cselian.com to use in wordpress

Posting Geolocation in php using Ajax

This is my first time using jquery ajax and the geolocation library. Also, using cookies.

You can see it in action here: som/geo

And the source code here: gist.github.com/ImranCS/a14c0c7f736fc3364f8a
Hope the code is self explanatory.
Read more »