JQuery


From Docunext Technology Wiki

Jump to: navigation, search

Contents

My Experience with jQuery

So far I really like jQuery. I'm using it and a pagination extension to scroll through table rows. It can do way more than that though.

I'm using jQuery in an few open source projects I'm working on: PBooks, PhunkyBB, Established Sites and YoDNSConf.

jQuery Examples

Document

The helpful document ready setup:

$(document).ready(function() {
// Do stuff here...
});

Selectors

$("#mydiv").css("color","red");

AJAX

Example from PBooks:

$.ajax({
    type: "POST",
    url: "x--invoice-paid",
    data: {
        'invoice_number': invoice_number,
        'entry_id': entry_id
    },
    success: function (res){
        $("#p_"+invoice_number).replaceWith("Paid");
    }
});

Anonymous / Lambda Functions

Anonymous functions, aka lambda functions, are a big part of Javascript and jQuery uses them very well.


Events

I'm still figuring these out...

jQuery Extensions and Plugins

External Links

Personal tools