Latest jQuery Code Snippets

Popular / Snippets

PennyBreed created a Page  -  Mar 12, 2014

This custom selector will match element attribute values, with case-insensitivity.

sean created a Page  -  May 22, 2013

This is a simple example using Push and Popstate. This practice is becoming more common throughout sites such as Twitter and Facebook for changing a URL within the address bar without reloading another page. Typically this allows users to bookmark or share URLs when sites are using some type of infinite scroll.

ProIcons created a Page  -  Mar 14, 2013
376 

scrollAppend Appends results as you scroll - original made by Hawkee (2012)

Hawkee created a Page  -  Feb 21, 2013

This will take a string of keywords and wrap a highlight span around each word. It takes two inputs: keywords and element:

Hawkee created a Page  -  Feb 12, 2013

This uses jQuery to convert an HTML string containing < code > tags into language specific CodeMirror containers. This supports a "lang" attribute to indicate the CodeMirror mode for each code block. Here is some example input:

Hawkee created a Page  -  Apr 16, 2012

This will automatically append the next page of results as you continue to scroll down a page.

Hawkee created a Page  -  Mar 22, 2012

This widget lets you search for users to @mention in your posts. It works very much like Facebook and Google+ in that it supports users with spaces in their name. It writes to a hidden field with the user ID's formatted in this way: @ [12345] while showing @username in the input box. You can save the encoded string for easier parsing at display time.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.