locked
few basic question about jquery RRS feed

  • Question

  • User264732274 posted

    1) what differnce between onload() and .ready() ?

    2)  what is difference between live() , delegate() and bind() ?

    3) different types of local storage in html5?

    4) what is the difference between local storage and web storage?

    5) what is difference between jquery vs JQuery Mobile?

    6) what is DOM and tell me few DOM objects name ?

    thanks

    Thursday, February 4, 2016 10:38 AM

Answers

  • User-474980206 posted

    unload() is a browser event that fire after the document, and it children load (images, frames). load means fetched, and parsed, but not necessarily displayed. $.ready() is a jQuery event that fires as close to the browser dom ready event as possible (not all browsers support dom ready). dom ready mean the document has been parsed, not not displayed, and children may not even be fetched yet. also read works like a promise, 

    .live is obsolete, and replaced by .on(). live uses event bubbling to the body, then via the passed selector, fires the event. this allows binding events to object they may be replaced. .bind() binds to a dom element event. it has also been replaced by .on(), which has a syntax for both cases.

    local storage is when the browser keeps site specific data locally (no expiration date). web storage is the old name for this, before it became a W3C standard. there are a couple types:

        web storage api  - most browsers (IE 8+). this is name/value pair using the localStorage object.
        indexed database storage - (chrome, safari, i.e. 10+). here the browser hosts a sql database you access via indexDB object.

    jQuery is a light weight library that supports dom manipulation and ajax. jQuery mobile is a UI library, built on top of jQuery, that allows designing pages for mobile browser that look more like an real "app". Its best used with mobile only sites. 

    the dom is browser's document object model. its the html parsed into a tree. its very similar to xml model. it starts with the document object. It mostly made up of nodeLists or nodes (elements). 

    var inputs = document.getElementsByTagName("INPUT");
    var html = document.body.innerHTML;
    var nodes = document.body.childNodes;

     

     

       

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 4, 2016 4:23 PM

All replies

  • User-474980206 posted

    unload() is a browser event that fire after the document, and it children load (images, frames). load means fetched, and parsed, but not necessarily displayed. $.ready() is a jQuery event that fires as close to the browser dom ready event as possible (not all browsers support dom ready). dom ready mean the document has been parsed, not not displayed, and children may not even be fetched yet. also read works like a promise, 

    .live is obsolete, and replaced by .on(). live uses event bubbling to the body, then via the passed selector, fires the event. this allows binding events to object they may be replaced. .bind() binds to a dom element event. it has also been replaced by .on(), which has a syntax for both cases.

    local storage is when the browser keeps site specific data locally (no expiration date). web storage is the old name for this, before it became a W3C standard. there are a couple types:

        web storage api  - most browsers (IE 8+). this is name/value pair using the localStorage object.
        indexed database storage - (chrome, safari, i.e. 10+). here the browser hosts a sql database you access via indexDB object.

    jQuery is a light weight library that supports dom manipulation and ajax. jQuery mobile is a UI library, built on top of jQuery, that allows designing pages for mobile browser that look more like an real "app". Its best used with mobile only sites. 

    the dom is browser's document object model. its the html parsed into a tree. its very similar to xml model. it starts with the document object. It mostly made up of nodeLists or nodes (elements). 

    var inputs = document.getElementsByTagName("INPUT");
    var html = document.body.innerHTML;
    var nodes = document.body.childNodes;

     

     

       

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 4, 2016 4:23 PM
  • User264732274 posted

    this is not very clear u said "unload() is a browser event that fire after the document, and it children load (images, frames). load means fetched, and parsed, but not necessarily displayed. $.ready() is a jQuery event that fires as close to the browser dom ready event as possible (not all browsers support dom ready). dom ready mean the document has been parsed, not not displayed, and children may not even be fetched yet. also read works like a promise, "

    i asked about onload not unload.

    still not very clear the difference between js onload() and jquery .ready() ?

    if possible explain with example. thanks

    Thursday, February 4, 2016 6:18 PM