Setting boundaries for google map with more markers using jQuery
For a project I'm currently working on I had to display more markers in one google map. No problem at all, but only if all of them are placed in one city. You can just set up default level for the city and display as many markers as you want. In my case I had to display latest markers, which were saved all over the country. One would say no problem at all, just use default zoom level for the country and display the markers. What if 10 latest markers were placed in one city though? It would look stupid if they would be displayed covering each other. Additionally we do not want to use an onload event, therefore, we will use jQuery in this example. For this kind of problem google came up with a pretty nice solution.
Class for retrieving region, city and geolocation
For one of the social platforms I was creating I had to provide profile display according to the location from which the request was made. There are plenty services in the internet, which provide you an accurate database, which will translate IP address into region, city and geographical lengths. I didn't want to spend any money for this kind of service, so I decided to find a free solution for this task. However, none of the services existing in the internet provides you 100% accuracy, the one that I've found locates my IP correctly. It would be nice, if you could give me some feedback, if this class is working for you as good as it works for me. This example requires URL file-access to be enabled on your server, because we will request the XML data through URL call. In this example we will also use SimpleXMLElement class, which should be enable by default in PHP5, to translate our XML file into an object. We will then recurse received object into a suitable array.
Simple roll over gallery with jQuery
My girlfriend just asked me to redo her blog. Besides new design, she wanted me to give the users possibility to preview her images simply by rolling over the thumbnails and showing the original version right above them. The power of libraries such ThickBox or LightBox give you the possibility to display pictures in hundreds of different ways, but none of them supported the way in which I wanted to accomplish it. I know that there are tons of examples in the internet, which can probably do it better, but I just wanted to share with you, how you can do it in a simple and unobtrusive way using jQuery, which is probably already included in your site (and almost all sites I created:).
Simple drop down menu with jQuery
I recently was looking at the online documentation of jQuery and I've found a really nice event listener, which helps you to provide interaction with the user. I'm writing about it, because couple weeks ago I've found myself trying to provide a drop down menu using jQuery. I was playing around with mouseover and mouseout effects, but I couldn't really find the right way to display my drop down menus. The solution is simpler than I thought. Here is how I've done that.
jQuery – show / hide button with AJAX functionality
Recently I had to provide a really simple and easy solution for showing and hiding some information, which should be triggered on users' click. I didn't have to think for a long time, how I will solve this problem and the framework I choose was obviously jQuery. In this example I will show you, how to trigger AJAX request and load some data into a div container and toggle between functions called every other click.