Category «jQuery»

jQuery.removeData() in jQuery

jQuery.removeData(): Remove a previously-stored piece of data. The jQuery.removeData() method allows us to remove values that were previously set using jQuery.data(). When called with the name of a key, jQuery.removeData() deletes that particular value; when called with no arguments, all values are removed. Example : <!DOCTYPE html> <html> <head> <style> div { margin:2px; color:blue; } …

jQuery.unique() in jQuery

jQuery.unique( array ) : Create a copy of an array of DOM elements with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or number The $.unique() function searches through an array of objects, forming a new array that does not contain duplicate objects. This function only works on …

jQuery.trim() in jQuery

jQuery.trim() function is used to remove  the white space from the beginning and end of a string Example: Removes the two white spaces at the start and at the end of the string. <!DOCTYPE html> <html> <head> <script src=”/scripts/jquery-1.4.js”></script> </head> <body> <button>Show Trim Example</button> <script> $(“button”).click(function () { var str = ” lots of spaces before …

:checkbox selector in jQuery

$(‘:checkbox’) is equivalent to $(‘[type=checkbox]’). As with other pseudo-class selectors (those that begin with a “:”) it is recommended to precede it with a tag name or some other selector; otherwise, the universal selector (“*”) is implied. In other words, the bare $(‘:checkbox’) is equivalent to $(‘*:checkbox’), so $(‘input:checkbox’) should be used instead. <script> var …

:checked Selector in jQuery for checkbox and radio button

: checked selector is use to check status of checkbox and radio button. <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <title>:checked Selector Example in jQuery</title> <style> div { color: red; } </style> <script src=”https://code.jquery.com/jquery-1.10.2.js”></script> </head> <body>   <form> <p> <input type=”checkbox” name=”checkedSelector” value=”1″ checked=”checked”>   <input type=”checkbox” name=”checkedSelector” value=”2″> <input type=”checkbox” name=”checkedSelector” value=”3″ checked>   …

.ajaxError() in jQuery

.ajaxError() – jQuery API Description: Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. version added: 1.0.ajaxError( handler(event, XMLHttpRequest, ajaxOptions, thrownError) ) handler(event, XMLHttpRequest, ajaxOptions, thrownError)The function to be invoked. Whenever an Ajax request completes with an error, jQuery triggers the ajaxError event. Any and all …

.ajaxComplete() in JQuery

.ajaxComplete() – jQuery API Description: Register a handler to be called when Ajax requests complete. This is an Ajax Event. version added: 1.0.ajaxComplete( handler(event, XMLHttpRequest, ajaxOptions) ) handler(event, XMLHttpRequest, ajaxOptions)The function to be invoked. Whenever an Ajax request completes, jQuery triggers the ajaxComplete event. Any and all handlers that have been registered with the .ajaxComplete() …

ajaxComplete() in jQuery

.ajaxComplete() : This jQuery mthod is used to register a handler to be called when Ajax requests completed. Whenever an Ajax request completes, jQuery triggers the ajaxComplete event and all handlers that have been registered with the .ajaxComplete() method are executed at this time. Syntax : $(document).ajaxComplete( ) Example  <html> <head> <title>ajaxComplete() Example</title> <link href=”Content/bootstrap.css” rel=”stylesheet” …

.ajaxError() in jQuery

.ajaxError() – jQuery API Description: Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. Whenever an Ajax request completes with an error, jQuery triggers the ajaxError event. Any and all handlers that have been registered with the .ajaxError() method are executed at this time. To observe …

Introduction of AngularJS

AngularJS is an open source web application framework. It was originally developed in 2009 by Misko Hevery and Adam Abrons. It is now maintained by Google. Its latest version is 1.4.3. Definition of AngularJS as put by its official documentation is as follows − Features AngularJS is a powerful JavaScript based development framework to create RICH Internet …