Categories
WordPress

Make your WordPress site faster with lazy load plugins

Lots of images in a site can take much time to load. For each and every request there is another HTTP request and requires more times to wait, causes pages load slowly. Here we have put together a collection of lazy loading plugins for images with options and settings. List of lazy load plugins: Advanced […]

Categories
Javascript

Difference between call and apply in JavaScript

One of the very common thing which confuse you while writing JavaScript is knowing when to use “call” and when to use “apply”. Let’s look at following example: var person1 = {name: ‘John’, age: 52, size: ‘2X’}; var person2 = {name: ‘Jane’, age: 26, size: ‘5X’}; var sayHello = function(){ alert(‘Hello, ‘ + this.name); }; […]

Categories
jQuery

.empty() vs .remove() vs .detach() – jQuery

jQuery provides various methods to remove elements from DOM i.e. .empty(), .remove() and .detach(). So lets find out the difference between jQuery .empty(), .remove() and .detach() method. .empty(): jQuery .empty() method removes all the child element of the matched element where remove() method removes set of matched elements from DOM. $( “.content” ).empty(); remove(): jQuery […]

Categories
jQuery

jQuery post() Method – load data from the server

jQuery post() Method loads data from the server using a HTTP POST request. Syntax: $(selector).post(URL, data, function(data,status,xhr), dataType) Example of jQuery post(): $.post( “ajax-master.php”, function( data ) { $( “#result” ).html( data ); }); The above example fetches the requested HTML snippet and inserts it on the page based on ID. Read also: Abort Ajax […]

Categories
Technology

Building the Ultimate Landing Page

A good landing page is the cornerstone of online marketing campaigns, and since it is usually the first area users learn about new products and services. It has to be well executed. However, leaving a good first impression is not easy. Everything has to look and feel right. In this brief guide, Toptal Freelance Software […]

Categories
Technology

A Design Workflow Tutorial for Developers: Deliver Better UI/UX On Time

Design workflow is tricky thing when it comes to UI and UX. Follow the tricks and tips in this tutorial to deliver better UI/UX on time. Without sacrificing the quality of the user interface and user experience what UX developer does to ensure the product they have built is delivered in a timely manner? The […]

Categories
jQuery

Enable or disable an input field with jQuery

Using jQuery prop() method you can enable or disable a form element. From jQuery 1.6+ you can use jQuery prop() method. You can enable or disable an elements on a page dynamically with jQuery by setting their attributes accordingly. For jQuery 1.5 and below the .prop() function doesn’t exist, but .attr() method does similar thing. […]

Categories
jQuery

Difference between jQuery.extend and jQuery.fn.extend

There is a significant difference between using jQuery extend() with passing one argument and doing it with two or more arguments. Basically, jQuery.extend() merge the contents of two or more objects into the first object. $.extend() is used to extend any object with additional functions but $.fn.extend() is used to extend the $.fn object, which […]

Categories
jQuery

Get selected text from drop down list in jQuery

jQuery select elements typically have two values which you want to access. First thing is that there is the value that you can get i.e. $( “#selectID” ).val(); And the second thing is the text value of the select box. Using the following select box you can get the text which is selected. Get selected […]

Categories
jQuery

jQuery clone – create a deep copy of matched elements

The jQuery clone() Method creates a deep run time copy of set of matched DOM Elements  to another location in the DOM elements and select the clones. This is very useful for run time copies of the elements to another location in the DOM elements. Syntax: $(selector).clone(true|false) true: specifies the event handlers which should be […]