This is a small article on how we can detect an Operating System (WIndows, Linux, Mac etc) using jQuery. For this first we need to download a plugin from here. Download this file (the name will be jquery.client.js) and copy and paste it in your custom module.
One of our Drupal clients wanted to make the current image of the slideshow in a page as the background of other pages. It is possible to achieve this effect using a combination of jQuery and Ajax. Read on to know how to make the current image of slideshow in a page as the background of related pages in a Drupal site.
When developing a website we might often come across situations where we have to limit the entry into each text fields to a certain type. One of the common scenarios we run into when developing Drupal websites is to limit text fields to accept only numbers as its input. If you want to know how to limit a text field to accept only numbers as input then read on to find out more.
AJAX is now widely used in web development to make the user interfaces simpler and faster. We may use AJAX to load images after page load in order to increase performance. However if you want to have a lightbox popup with the full image bound to an image loaded by AJAX then you might run into problems. You will find that even after linking the JS, CSS files and adding the rel="lightbox" attribute to the images it might not work.
Colorbox can be used to display content pop-ups. By default, the popup's height and width will be exactly the same as that of the original content. But there may be times, when you want to load the content as per the screen height. This can be done easily using jQuery.
A large number of websites on the web today have some kind of slideshow in them and they are probably using a library like jQuery to create the slide effect. When there are 10 images cycling in a slideshow, you might want to shuffle the order of the slideshow a bit. If you have a slideshow in your Drupal website and want to know how to change the order of the slideshow on every pageload then continue reading to know more.
On one of the Drupal projects we had recently worked on, the client wanted us track the last active tab. We had used the Drupal Quicktab module to create the tabs. However we noticed that the quicktab cookie used to track the last active tab is not persisting after closing and reopening the browser. If you are facing the same scenario in your Drupal site and want to know the solution then continue reading.
We were testing our newly implemented modal popup for a login functionality. It was working pretty good in Firefox, Opera, and Chrome but not in IE8. When attempts to login by clicking on a login link the login modal was not appearing in IE8. Firebug said nothing, but jquery-1.7.2.min.js in IE showed the following error: