SambucaJS – jQuery plugin
Small jquery plugin that adds some functionality to jquery, eg: Check if an item is empty Check whether an item exists Take a parameter in the querystring of the current Web page. /*! * jQuery…
Small jquery plugin that adds some functionality to jquery, eg: Check if an item is empty Check whether an item exists Take a parameter in the querystring of the current Web page. /*! * jQuery…
Implement a functionality for a textbox to allow only numbers in jQuery: $(‘.only-digits’).on(‘keypress’, function (e) { if ((e.keyCode < 48) || (e.keyCode > 57)) { return false; } }); Remains the problem that you can…
With a small snippet of jQuery code you can detect whether the user is viewing the site from a mobile device. The script can be downloaded from http://detectmobilebrowsers.com/download/jquery or copied from below: var isMobile =…
To check if an item is present in the DOM using jQuery, it is sufficient to use the length property, like this: if ($(‘#myElement’).length) { // Exists } else { // Not Exists } Or…
A small plugin for jQuery, by Sam Sehnert, that checks whether elements are within the user visible viewport of a web browser. Only accounts for vertical position, not horizontal. (function ($) { /** * Copyright…