Posted on December 5, 2011 at 1:07pm
There a several different methods you can use in order to clone a JavaScript object. In this article, we will be taking a look at the most efficient way you can clone a JavaScript object using the jQuery framework. If you’re thinking of using the clone() function, think again. The clone() function will only clone … Continue reading →
Posted on October 17, 2011 at 2:14pm
Scrolling to the top of your page using a nice, smooth animation is easy with jQuery. All you need to do is use a few small lines of code and you can add a nice, professional, “scroll to top” link in your footer. You can even check out this feature on our website by clicking … Continue reading →
Posted on October 15, 2011 at 5:41am
If you’re wondering how to change an elements class with jQuery, there are a few of different methods of doing this that I would recommend. The first way you can do it is, rather than completely changing the class of the element, you can add a new class to it using jQuery’s addClass() function. Take … Continue reading →
Posted on October 14, 2011 at 2:42am
Emptying/resetting/clearing out the input fields of a web form with jQuery can be done with one small line of code. I’ve seen a few different ways of doing this that make things a little bit more complex than they need to be, so with this article I will show you the quickest, easiest, and most … Continue reading →
Posted on October 13, 2011 at 12:19pm
Testing to see if an element exists with jQuery is simple. Considering a huge part of JavaScript is determined by boolean values (true or false), we can use the length property to get a true or false return from any element we want. Check out the example below. It doesn’t get any more straightforward than that. I … Continue reading →
Posted on October 13, 2011 at 4:17am
That’s a whole lot of checks. In this article I will show you a quick and easy way to find out if a checkbox has been checked on your page. Please note that the prop() function I am using in this example is a bit newer in jQuery so you should always make sure your … Continue reading →
Posted on October 13, 2011 at 3:24am
Testing if an element is hidden or not with jQuery is very easy. This is especially useful for coders who are developing scripts that use the show() and hide() jQuery functions. So how do you do it? Take a look at the code below for an example of how to properly test for hidden elements. … Continue reading →