JQuery

Zyxware default image1
| 2 min read
The preventDefault() method is used to stop any element form behaving its default behaviour. For example, if we have a hyperlink linked to a particular location. Using preventDefault() function we can restrict it from navigating to it the by a custom location in our javascript. You can use the method isDefaultPrevented to know whether this method was ever called (on that event object).
Zyxware default image3
| 2 min read
In this article, I am mentioning about how the height of an image can be changed depending on which browser is been used by the user. In one of our Drupal sites, the height of the images displayed in a gallery was shown different in different browsers. So we have set the height of the images displayed in the gallery by detecting the browser been used using the '$.browser' property in jQuery.
Zyxware default image4
| 2 min read
In Drupal I have faced a problem while using . Some jQuery functions are available only in some versions. For example thejQuery pluginsre is jQuery function on It is added in the version 1.7 of jQuery only. So while adding this function to my site I have faced the problem with the plugin because the version of jQuery available in my site was 1.5.
Zyxware default image2
| 3 min read
While working on a wordpress site I came across a problem to customize the file upload button in Contact Form 7 plugin. I tried a few tweaks using CSS to customize the button but no luck. Later I found a trick using CSS and jQuery which is explained below. In my previous article "How to display location of an user in a mail send using Contact Form 7 plugin by passing the IP address in a Wordpress Site?", I have explained about Contact Form 7 plugin.
Zyxware default image2
| 6 min read
Fullcalendar is a jQuery plugin which gives a full-sized calendar with drag-and-drop and with many other features. Events can be dragged on to the calendar and can be resized. It uses AJAX to dynamically load the events on the fly. In this article I will explain how to enable the fullcalendar with different options and loading events dynamically from the database.
Zyxware default image3
| 7 min read
Recently I ran into the problem of mouseovers on touch devices. In short, they doesn't exist. I had just created a layout of four images which listed at the centre of the home page as like our zyxware website. And if you check the site on mouseover the image it will expand and while clicking the image it will go to the link added. But the problem is the mouse over wont work on the touch mobile devices.
Zyxware default image2
| 1 min read
We had just completed switching our site from Windows IIS MySQL PHP to LAMP environment. As the deployment was via git, we downloaded project files with the ftp credentials and deployed the site via git. However, the 'sites/default/files' folder were of some GBs in size. We only had ftp credentials and was unable to get a compressed copy due to certain reasons. What we did to resolve the problem was use wget command to copy files recursively.
Zyxware default image1
| 2 min read
I have a number of affiliate links in my page. The affiliate links are generated dynamically and so, I don't know the number of affiliate links generated in the current page. I had a requirement to open all affiliate links simultaneously upon clicking on a search all link in my page. Initially, I was not aware of the jQuery each function. So, I placed all the affiliate links in a particular div and used the size function to get the number of 'a' tags inside that div and used a 'for loop' to iterate through the 'a' tags and applied the behavior. However, after that I found there is an each function in jQuery, which can be used to itereate through all the elements with a particular identity.
Zyxware default image3
| 3 min read
On one of our recent Drupal projects we came across an issue where the file browse button was not triggering the file selection dialog in IE10 in Windows 8. The problem was diagnosed to be the result of jquery not getting the click event from the button. The site was using jquery 1.44 and this problem is supposed to be fixed in later versions of jquery.
Zyxware default image1
| 2 min read
This is an article which describes how to resize the content of a page (images, texts etc) automatically after changing the window size (especially a pop-up window). There are some third party tools which will let us do the same thing but we will be looking at how this can be done using only jQuery. Read on to know how to resize the content of a page automatically after resizing the browser window using jQuery.
Zyxware default image4
| 2 min read
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.