Change Page Title on Focus Out Using jQuery

It is a good idea to change the page title to something catchy when the user moves to a different tab to catch his attention. This can help to get the user to come back your website. So in this post, let’s find out how to change the title of the page when user moves […]
Read the rest of this entry »

Top Tips for Optimizing Your jQuery Selectors

When your jQuery runs slow as a result of poorly organized or clunky code, it can really negatively affect your users' experience. One easy way to optimize your jQuery and to help avoid slow-running code is to make sure that the selectors are constructed as well as they possibly can be. To make sure your […]
Read the rest of this entry »

Using Method Chaining in jQuery

When you use method chaining in jQuery, it ensures that you never have to use the same selector more than once. Over-using a selector can seriously slow down your code, as every time you call on a selector you're forcing the browser to go looking for it. By combining or "chaining" multiple methods, you can […]
Read the rest of this entry »

Disable Links with jQuery

jQuery's built in preventDefault() method is a great way to prevent the default functionality of an element from occurring. It's probably most commonly used to disable links. Maybe you want a certain link only to work under certain conditions (like for example, you only want it clicked if the user is on a desktop sized […]
Read the rest of this entry »

Quick Tip: How to Load jQuery Conditionally

Many developers like to link to an externally hosted jQuery library, like for example Google's jQuery library (http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js), but the problem with linking to an external jQuery library is that they can be a bit unreliable. If for some reason there are any issues with the server, the script may not be able to be […]
Read the rest of this entry »

jQuery Prefixes: jQuery vs. $

It's a really common practice in jQuery to use the dollar sign ($) prefix with your methods, like this: $(document).ready(function(){ $(#myDiv).slideUp(); }) The above code would make the div with the ID #myDiv slide up when the page loads. But that's not the only way to write that function. Sometimes you might see it written […]
Read the rest of this entry »

Responsive Menu
Add more content here...