game mobile 12guns yoyo chat quan legging hoi fa theme wordpress chuyen vo chong winplay tai winplay download winplay game winplay winplay online cach tri mun nhanh nhat cach tri mun ruoi cach tri mun tot nhat

Easiest “check all” with jQuery

January 13th, 2011 | posted in Blog, Tips & Tricks, jQuery | No Comments »

The jquery code:

<script type="text/javascript">
$(function () {
    $('.checkall').click(function () {
        $('.chk').attr('checked', this.checked);
    });
});
</script>

The html:

<input type="checkbox" class="checkall"/>
<input type="checkbox" value="1" class="chk"/>
<input type="checkbox" value="2" class="chk"/>
<input type="checkbox" value="3" class="chk"/>
<input type="checkbox" value="4" class="chk"/>

5 jQuery Performance Tips

February 13th, 2010 | posted in Blog, jQuery | 3 Comments »

In the world of Web 2.0 applications, speed is one of the most important things to take in mind. Every such web application often uses a large amount of JavaScript code which is run in the users’ browser. Of course using a JavaScript library is essential to speed up the development of these applications, but using it the wrong way exponentially decreases the execution speed of the code, so the application becomes very slow and unusable.

I’ve put together 5 performance tips for the most used JavaScript library, jQuery. Read the rest of this entry »

Delete a table row with jQuery

December 8th, 2009 | posted in Blog, jQuery | 3 Comments »

I will explain, shortly, how to delete a table row with jQuery Ajax post method. We will need some basic HTML example structure like the following:

<table>
    <tr>
<td class='one'>Text</td>
        <td class='two'>Some more text</td>
        <td class='action'><a style='cursor:pointer'>delete</a></td>
   </tr>
   <tr>
        <td class='one'>Text 2</td>
        <td class='two'>Some more text 2</td>
        <td class='action'><a style='cursor:pointer'>delete</a></td>
   </tr>
</table>

And you want to create a click event that deletes a row from a table, and in the same time sends a post or get request to a server that updates the database, deletes the row, you can do this with jQuery like this:

Read the rest of this entry »