JSFiddle

Guljar's public fiddles

  • sacv280r

    jQuery 3.3.1, HTML, CSS, JavaScript

  • 43xwku7y

    jQuery 1.4.4, HTML, CSS, JavaScript

  • moment time diff

    jQuery 3.3.1, HTML, CSS, JavaScript

  • edbgx3hz

    No-Library (pure JS), HTML, CSS, JavaScript

  • chaneLrk

    Mootools 1.4.5, HTML, CSS, JavaScript

  • y5zqehdc

    No-Library (pure JS), HTML, CSS, JavaScript

  • Moment JS, UTC to Local time

    jQuery 2.1.0, HTML, CSS, JavaScript

  • 7wq29jgo

    jQuery 1.4.2, HTML, CSS, JavaScript

  • w967bdjp

    jQuery 1.4.2, HTML, CSS, JavaScript

  • jogqutLw

    No-Library (pure JS), HTML, CSS, JavaScript

  • jreh827g

    No-Library (pure JS), HTML, CSS, JavaScript

  • wvt5dhgz

    No-Library (pure JS), HTML, CSS, JavaScript

  • tuje4vyh

    jQuery 1.9.1, HTML, CSS, JavaScript

  • 91rmpxLn

    jQuery 3.3.1, HTML, CSS, JavaScript

  • 8n4o6yb9

    jQuery 3.3.1, HTML, CSS, JavaScript

  • json object difference

    No-Library (pure JS), HTML, CSS, JavaScript

  • y3s8zn1L

    No-Library (pure JS), HTML, CSS, JavaScript

  • Generic deep diff between two objects

    In response to Stack Overflow "Generic deep diff between two objects" question.

  • jQuery.on() sample

    http://api.jquery.com/on/ "Delegated events have the advantage that they can process events from descendant elements that are added to the document at a later time. By picking an element that is guaranteed to be present at the time the delegated event handler is attached, you can use delegated events to avoid the need to frequently attach and remove event handlers. This element could be the container element of a view in a Model-View-Controller design, for example, or document if the event handler wants to monitor all bubbling events in the document. The document element is available in the head of the document before loading any other HTML, so it is safe to attach events there without waiting for the document to be ready. In addition to their ability to handle events on descendant elements not yet created, another advantage of delegated events is their potential for much lower overhead when many elements must be monitored. On a data table with 1,000 rows in its tbody, this example attaches a handler to 1,000 elements: $( "#dataTable tbody tr" ).on( "click", function() { alert( $( this ).text() ); }); A delegated-events approach attaches an event handler to only one element, the tbody, and the event only needs to bubble up one level (from the clicked tr to tbody): $( "#dataTable tbody" ).on( "click", "tr", function() { alert( $( this ).text() ); }); Attaching many delegated event handlers near the top of the document tree can degrade performance. Each time the event occurs, jQuery must compare all selectors of all attached events of that type to every element in the path from the event target up to the top of the document. For best performance, attach delegated events at a document location as close as possible to the target elements. Avoid excessive use of document or document.body for delegated events on large documents. jQuery can process simple selectors of the form tag#id.class very quickly when they are used to filter delegated events. So, "#myForm", "a.external", and "button" are all fast selectors. Delegated events that use more complex selectors, particularly hierarchical ones, can be several times slower--although they are still fast enough for most applications. Hierarchical selectors can often be avoided simply by attaching the handler to a more appropriate point in the document. For example, instead of $( "body" ).on( "click", "#commentForm .addNew", addComment ) use $( "#commentForm" ).on( "click", ".addNew", addComment ).

  • jQuery.on() sample

    http://api.jquery.com/on/ "Delegated events have the advantage that they can process events from descendant elements that are added to the document at a later time. By picking an element that is guaranteed to be present at the time the delegated event handler is attached, you can use delegated events to avoid the need to frequently attach and remove event handlers. This element could be the container element of a view in a Model-View-Controller design, for example, or document if the event handler wants to monitor all bubbling events in the document. The document element is available in the head of the document before loading any other HTML, so it is safe to attach events there without waiting for the document to be ready. In addition to their ability to handle events on descendant elements not yet created, another advantage of delegated events is their potential for much lower overhead when many elements must be monitored. On a data table with 1,000 rows in its tbody, this example attaches a handler to 1,000 elements: $( "#dataTable tbody tr" ).on( "click", function() { alert( $( this ).text() ); }); A delegated-events approach attaches an event handler to only one element, the tbody, and the event only needs to bubble up one level (from the clicked tr to tbody): $( "#dataTable tbody" ).on( "click", "tr", function() { alert( $( this ).text() ); }); Attaching many delegated event handlers near the top of the document tree can degrade performance. Each time the event occurs, jQuery must compare all selectors of all attached events of that type to every element in the path from the event target up to the top of the document. For best performance, attach delegated events at a document location as close as possible to the target elements. Avoid excessive use of document or document.body for delegated events on large documents. jQuery can process simple selectors of the form tag#id.class very quickly when they are used to filter delegated events. So, "#myForm", "a.external", and "button" are all fast selectors. Delegated events that use more complex selectors, particularly hierarchical ones, can be several times slower--although they are still fast enough for most applications. Hierarchical selectors can often be avoided simply by attaching the handler to a more appropriate point in the document. For example, instead of $( "body" ).on( "click", "#commentForm .addNew", addComment ) use $( "#commentForm" ).on( "click", ".addNew", addComment ).