In this article, we'll compare Drupal 9 vs Drupal 10. We'll also cover some of the key differences between these two versions.
JQuery
Jmscroll is a simple jQuery infinite scroll plugin which observes the scroll event and loads the next set of content If it available. It is a another type of Philip Klauzinski's jscroll Plugin. We can use this jQuery Plugin for various variety type of scrolling sites.
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).
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.
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.
We have a Drupal 7 website, which is using an old version of jquery by default.But we need to write a custom module which uses some features only present in latest jquery.
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.
In order to add a new jQuery or multiple javaScript/CSS to the Drupal site, it is better to use hook_library rather than using drupal_add_css/drupal_add_js multiple times. It is helpful if we are using the javaScript/CSS in multiple pages.
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.
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.
In one of form that I created it need some client side dynamic behavior. I did that in a javascript and used JQuery. But it did not worked. I thought that JQuery did not work in CiviCRM.
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.
One of our Drupal projects required the value of a text field to be changed according to the country selected in a particular select field. This is a common situation encountered by web developers when working on HTML. This can be easily achieved using jQuery. Read on to know more
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.
Defect density could be defined as the value of the total defects which are known to the size of the software product calculated. i.e. Defect Density= Total defects/Size
For better understanding, consider the following example.
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.
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.
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.
Many a times Drupal users face the problem of not being able to access the php variables in jquery function . One way of accessing this variables is using ajax but this causes time delay in sending requests.This time delay can be minimized using drupal.settings.If you are not sure how to tackle this problem then read on.
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.