Archive for January, 2017

Tipsy: a jQuery Plugin for Tooltips

Tipsy is a jQuery plugin that creates a Facebook like tooltip effect generated from an anchor tag’s title attribute. It’s easy to use, really lightweight, and super customizable. One of the coolest things about the plugin is that it allows you to specify the so-called “center of gravity” of the tooltips, or where each individual […]
Read the rest of this entry »

Caching Elements in jQuery

If you cache your jQuery elements, it means that you store an element as a variable so that you can re-use that element without your jQuery having to re-query the DOM in search of it every time you want to apply some code to that element. It’s not always necessary, but in cases where you […]
Read the rest of this entry »

Show/Hide HTML Elements Using jQuery

jQuery’s .show() and .hide() methods can be used to show or hide any HTML elements on a page. Usually, the methods are used as the results of a trigger event (for example, if an item is either hidden or shown based on a click event) or used with a timer function so that something hides […]
Read the rest of this entry »

jQuery’s .children() Method

Just like in CSS, it’s possible to use jQuery to select the children of an element and apply jQuery to them. This can be done using jQuery’s .children() method. The method works pretty much like any other jQuery method — to select all of the children of an element, use the parent element as the […]
Read the rest of this entry »

5 Useful jQuery Snippets

1. Back to Top Button $('a.top').click(function(){ $(document.body).animate({scrollTop : 0},800); return false; }); This code can be used to create a smooth, simple back to top button — a trendy and functional item to have on any website. Just make sure you use this HTML code or something similar (with the a tag having a class […]
Read the rest of this entry »

jQuery’s .click() Method

With jQuery, it’s super easy to make something happen as a result of something else being clicked using the .click() method. All you need to do is pass a function through the .click() method. The .click() method will be the trigger event (make sure you use a selector to indicate which HTML element being clicked […]
Read the rest of this entry »

Responsive Menu
Add more content here...