Included snippets

Type Shortcut Title
HTML jq script tag and $(document).ready() shortcut
HTML jqscript script tag with jQuery src
HTML jqscriptcdngoogle script tag using Google's CDN
HTML jqscriptcdnms script tag using Microsoft's CDN
HTML jqscriptmin script tag and $(document).ready() shortcut
HTML jqscriptuicdngoogle script tag for jQuery UI 1.7.2 using Google's CDN
HTML jqscriptvalidatecdnms script tag for jQuery validation plugin using Microsoft's CDN
JavaScript func javascript: anonymous function
JavaScript jqafter Insert content after each of the matched elements.
JavaScript jqajax $.ajax() template
JavaScript jqajaxaspnetwebservice $.ajax() template for calling ASP.NET WebService/PageMethod
JavaScript jqappend Append the content to the selected element(s)
JavaScript jqappendto Append the content to the selected element(s)
JavaScript jqattrget Retrieve attribute value from element
JavaScript jqattrremove Remove attribute from element
JavaScript jqattrset Set attribute value on element(s)
JavaScript jqattrsetfn Set attribute value on element(s) using function
JavaScript jqattrsetobj Set attribute values on element(s) using object values
JavaScript jqbefore Insert content before each of the matched elements.
JavaScript jqbind bind(eventName, function)
JavaScript jqbindwithdata bind(eventName, data, function)
JavaScript jqblur blur()
JavaScript jqchange change()
JavaScript jqclassadd Add a class to the selected elements
JavaScript jqclassremove Remove a class to the selected elements
JavaScript jqclasstoggle Toggle a class on the selected elements
JavaScript jqclasstoggle Toggle a class on the selected elements
JavaScript jqclick click()
JavaScript jqclone Clone matched DOM Elements and select the clones.
JavaScript jqclonewithevents Clone matched DOM Elements, and all their event handlers, and select the clones.
JavaScript jqcssget Return a style property on the first matched element.
JavaScript jqcssset Set a single style property to a value on all matched elements.
JavaScript jqcsssetobj Set a key/value object as style properties to all matched elements.
JavaScript jqdataget Retrieve data value from element
JavaScript jqdataremove Remove data value from element
JavaScript jqdataset Set data value on element(s)
JavaScript jqdie die(eventName)
JavaScript jqdieall die()
JavaScript jqdiefn die(functionName)
JavaScript jqdr $(document).ready()
JavaScript jqdrs $(document).ready() shortcut
JavaScript jqeachelement $(selector).each() template
JavaScript jqempty Remove all child nodes from the set of matched elements.
JavaScript jqfadein Effects: fadeIn()
JavaScript jqfadeinfull Effects: fadeIn(speed, callback)
JavaScript jqfadeout Effects: fadeOut()
JavaScript jqfadeoutfull Effects: fadeOut(speed, callback)
JavaScript jqfadeto Effects: fadeTo(speed, opacity)
JavaScript jqfadetofull Effects: fadeTo(speed, opacity, callback)
JavaScript jqfocus focus()
JavaScript jqget $.get() template
JavaScript jqgetjson $.getJSON() template
JavaScript jqgetscript $.getScript() template
JavaScript jqhasclass Check if selected elements contain class
JavaScript jqheightget Gets the height of the first matched element.
JavaScript jqheight Sets the height of the first matched element.
JavaScript jqhide Effects: hide()
JavaScript jqhidefull Effects: hide(speed, callback)
JavaScript jqhover hover()
JavaScript jqhtmlget Retrieve HTML content from element(s)
JavaScript jqhtmlset Set the HTML content for selected element(s)
JavaScript jqinnerheight Gets the inner height of the first matched element.
JavaScript jqinnerwidth Gets the inner width of the first matched element.
JavaScript jqinsertafter Insert all of the matched elements after another, specified, set of elements.
JavaScript jqinsertbefore Insert all of the matched elements before another, specified, set of elements
JavaScript jqkeydown keydown()
JavaScript jqkeypress keypress()
JavaScript jqkeyup keyup()
JavaScript jqlive live(eventName, function)
JavaScript jqloadget Ajax: load() with GET
JavaScript jqloadpost Ajax: load() with POST
JavaScript jqmousedown mousedown()
JavaScript jqmouseenter mouseenter()
JavaScript jqmouseleave mouseleave()
JavaScript jqmousemove mousemove()
JavaScript jqmouseout mouseout()
JavaScript jqmouseover mouseover()
JavaScript jqmouseup mouseup()
JavaScript jqoffset Get the current offset of the first matched element, in pixels, relative to the document.
JavaScript jqoffsetparent Returns a jQuery collection with the positioned parent of the first matched element.
JavaScript jqone one(eventName, function)
JavaScript jqonewithdata one(eventName, data, function)
JavaScript jqouterheight Gets the outer height of the first matched element.
JavaScript jqouterwidth Gets the outer width of the first matched element.
JavaScript jqplugin plugin template
JavaScript jqposition Gets the top and left position of an element relative to its offset parent.
JavaScript jqpost $.post() template
JavaScript jqprepend Prepend the content to the selected element(s)
JavaScript jqprependto Prepend the content to the selected element(s)
JavaScript jqremove Removes all matched elements from the DOM.
JavaScript jqremoveexp Removes all matched elements from the DOM.
JavaScript jqreplaceall Replaces the elements matched by the specified selector with the matched elements.
JavaScript jqreplacewith Replaces all matched elements with the specified HTML or DOM elements.
JavaScript jqresize resize()
JavaScript jqscroll scroll()
JavaScript jqscrollleftget Gets the scroll left offset of the first matched element.
JavaScript jqscrollleftset Sets the scroll left offset of the first matched element.
JavaScript jqscrolltopget Gets the scroll top offset of the first matched element.
JavaScript jqscrolltopset Sets the scroll top offset of the first matched element.
JavaScript jqselect select()
JavaScript jqselecttrigger select() (trigger)
JavaScript jqshow Effects: show()
JavaScript jqshowfull Effects: show(speed, callback)
JavaScript jqslidedown Effects: slideDown()
JavaScript jqslidedownfull Effects: slideDown(speed, callback)
JavaScript jqslideup Effects: slideUp()
JavaScript jqslideupfull Effects: slideUp(speed, callback)
JavaScript jqsubmit submit()
JavaScript jqsubmittrigger submit() (trigger)
JavaScript jqtextget Retrieve text content from element(s)
JavaScript jqtextset Set the text content for selected element(s)
JavaScript jqtoggle toggle()
JavaScript jqtogglemore toggle() (with more functions)
JavaScript jqtogglevis Effects: toggle()
JavaScript jqtogglevisfull Effects: toggle(speed, callback)
JavaScript jqtogglevis Effects: toggle(switch)
JavaScript jqtrigger trigger(eventName)
JavaScript jqtriggerhandler triggerHandler(eventName)
JavaScript jqtriggerhandlerwithdata triggerHandler(eventName, data)
JavaScript jqtriggerwithdata trigger(eventName, data)
JavaScript jqunbind unbind(eventName)
JavaScript jqunbindall unbind()
JavaScript jqunbindfn unbind(functionName)
JavaScript jqunload unload()
JavaScript jqvalget Retrieve value from element(s)
JavaScript jqvalset Set the value for selected element(s)
JavaScript jqwidthget Gets the width of the first matched element.
JavaScript jqwidthset Sets the width of the first matched element.
JavaScript jqwrap Wrap each matched element with the specified HTML content.
JavaScript jqwrapall Wrap all the elements in the matched set into a single wrapper element.
JavaScript jqwrapinner Wrap the inner child contents of each matched element (including text nodes) with an HTML structure.

Last edited Nov 30, 2009 at 4:07 AM by johnsheehan, version 2

Comments

kasim Feb 7, 2012 at 11:05 PM 
Very useful,
Great job.

Can someone Update with new snippets?

eljoker2k Dec 21, 2011 at 9:10 PM 
great work thanks so much

joey2008 Mar 25, 2011 at 8:12 PM 
In Visual Studio, use Ctrl+K & Ctrl+X to bring up the snippet selector. It's context sensitive, so in code files you'll get .NET/MVC selectors, in web files HTML and
(if in a section within script tags) JavaScript/jQuery selectors. Also check out http://msdn.microsoft.com/en-us/library/wy5tazc9.aspx for info on
Code Snippets Manager, which you can add to Tools menu via the Customize option.

ice6 Oct 13, 2010 at 12:46 PM 
thank you so much!
I really appreciate your great work.
It makes my work more efficient!

clueless Jul 20, 2010 at 11:56 AM 
Hi John, i downloaded your installer and tried to find out how i can user your code snippets. Unfortunately i was unable to find it out. If you could add a few lines like: install software (run msi-file), add reference to webproject, .... - this would be really helpfull to others to make use of your contribution.
Thanks best wisches.

icyflash Dec 1, 2009 at 12:09 AM 
Good work