Calculates the time in hh:mm:ss between two dates
Usage: var past = new Date('1/1/2013'); var now = new Date();
var lapsed = past.lapsed(now);
Avoid history back when is pressed backspace key in number imput
Track user interactions with html forms
You can put the user's cursor inside a text box or put focus on select box as soon as your page is loaded. This helps ensure that visitors do not 'overlook' an important form item on your site and this snippet only uses one line of code!
Link and button to allow user to reload browser page.
How would you validate the number of days in a given month?
jQuery Validate is used in ASP.Net MVC 4. As it is checking only en-US as a default you may have problems with different cultures for decimal inputs and dates (I had to try for minutes to find a accepted date format. I don't want to see how my customers would react). The decimal has been converted from the accepted 9.90 to 990,00 by the controller.
Show alternative views of your page, depending on a hashtag
For side by side ULs that become too wide on small screens/devices. The following script let you merge or unmerge ULs depending on the size of the screen/device.
Works with jQuery
Assuming that by empty means "has no properties of its own"
This is a really basic skeleton template for jQuery plugins. It provides a callback function which can be called anywhere in your plugin with base.success(); This will return the current element, but you can pass anything you like back by changing the base.$el value passed to the function to whatever you like.
this code is active is an image is missing it will just not display the misisng image
Configure settings for all external links on your site.
Features: * Open external links in new window or tab * Add "nofollow" * Set link title * Set link icon * Set classes (for your own styling) * Set no-icon class * SEO friendly