Tag Archives for jquery

stopPropagation and preventDefault jQuery Methods

Simple demo of stopPropagation() and preventDefault() jQuery methods. Often these two methods are used together. And, often their function and use is confused or used when not needed thanks to copy and paste.

Posted in jquery, Web development | Comments Off

Using jQuery Datepicker and Dialog Box To Select Date Range

Using a jquery datepicker in a jquery dialog box to select a date range is a handy, slick way of having users input dates. Date handling and validation in forms when input by the user can be tricky at best. Here a modal dialog box will be used to allow the user to select a [...]

Posted in jquery, Web development | Also tagged , 1 Comment

Targeting Dynamic Element IDs with jQuery

When elements are added dynamically through a scripting language (usually by a database pull) they can have sequential identifiers in one or more of their attributes. For this example, a series of checkboxes that, when checked, will populate an input box by matching up the numeric portion of the id attribute. To make the matching [...]

Posted in jquery | Also tagged 1 Comment

Using jQuery Autocomplete When Remote Source JSON Does Not Contain ‘Label’ or ‘Value’ Fields

If the jQuery autocomplete plugin uses a remote datasource, the autocomplete expects it to return json data with a ‘label’ and/or a ‘value’ field. If you return one, either ‘label’ or ‘value’, the autocomplete uses it for both the suggestion menu and the value of the input box. If you return both, it uses the [...]

Posted in jquery | Also tagged 2 Comments

Position jQuery UI Dialog Relative to Link or Page Element

Demonstration of positioning a jQuery UI dialog relative to a link or radio buttons. Question from stackoverflow.com. It could be adapted to position under or next to any element on a page. It would work nicely as a form field hint dialog or help dialog. Two demos are below. One for a single element and [...]

Posted in jquery | Also tagged 1 Comment