How to Create a Tab

Jquery has already made a tab function that’s very easy to use. But if you have problem using such function and you’re considering of other function to achieve the same output, you can try my own jquery tab function. To call: Add the tab and its contents:

How to Create a Lightbox

To make it easy for me to create lightbox for any web development projects, I made the simple lightbox function that you can I can easily add and call. Step 1: Copy the scripts below to your javascript file. Step 2: Create the contents of your lightbox, e.g: Step 3: Call the lightbox function. Where […]

How to Create a JQuery Function

If you want to add JavaScript and/or JQuery functionality, and you want to easily reuse the codes in your future projects, it would be better to put in in a JQuery plugin. In other words, you will create a new JQuery plugin that you can reuse or share to other web developers. Also, putting your […]

How to Make Tables Sortable Using JQuery

Step 1:  Add these two jquery functions. [code] jQuery.fn.sortTable = (function(sortableRows){ table = $jx(this); $rows = ”; for($i in sortableRows) { $rows = $rows + sortableRows[$i]; if (sortableRows[$i+1] != null) { $rows = $rows + ‘, ‘; } } $jx($rows) .wrapInner(‘<span title=”sort this column”/>’) .each(function(){ var th = $jx(this), thIndex = th.index(), inverse = false; […]

How to Create a Class in Javascript

There are so many ways to create a class in JavaScript, but this one is the easiest and simplest for me. [code] var Person = { init: function(nameParam) { this.name = nameParam; }, printName: function() { console.log(‘Name: ‘+ this.name); } }; var me = Object.create(Person);  // <== one level of inheritance me.init(‘Edesa’); me.printName(); [/code]