Home
Search results “Jquery selector not style”
jQuery #id selector
 
10:53
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-id-selector.html In this video we will discuss 1. What are jQuery selectors 2. Different selectors in jQuery 3. #id selector in jquery What are jQuery selectors One of the most important concept in jQuery is selectors. jQuery selectors allow you to select and manipulate HTML elements. Different selectors in jQuery jQuery selectors allow you to select html elements in the DOM by 1. Element ID 2. Element Tag Name 3. Element Class Name 4. Element attribute 5. Element Attribute values and many more Id selector in jquery To find an HTML element by ID, use the jQuery #id selector Example : The following example finds button with ID button1 and attaches the click event handler. [html] [head] [title][/title] [script src="jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('#button1').click(function () { alert('jQuery Tuorial'); }); }); [/script] [/head] [body] [input id="button1" type="button" value="Click Me" /] [/body] [/html] Changes the background colour of the button to yellow $(document).ready(function () { $('#button1').css('background-color', 'yellow'); }); Important points to remember about jQuery #id selector 1. jQuery #id selector uses the JavaScript document.getElementById() function 2. jQuery #id selector is the most efficient among all jQuery selectors. If you know the id of an element that you want to find, then always use the #id selector. 3. HTML element IDs must be unique on the page. jQuery #id selector returns only the first element, if you have 2 or more elements with the same ID. [html] [head] [title][/title] [script src="jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('#button1').css('background-Color', 'yellow'); }); [/script] [/head] [body] [input id="button1" type="button" value="Click Me" /] [input id="button1" type="button" value="Click Button" /] [/body] [/html] 4. JavaScript's document.getElementById() function throws an error if the element with the given id is not found, where as jQuery #id selector will not throw an error. To check if an element is returned by the #id selector use length property. [html] [head] [title][/title] [script src="jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { if ($('#button1').length ] 0) { alert('Element found') } else { alert('Element not found') } }); [/script] [/head] [body] [input id="button1" type="button" value="Click Me" /] [/body] [/html] 5. JavaScript's document.getElementById() and jQuery(#id) selector are not the same. document.getElementById() returns a raw DOM object where as jQuery('#id') selector returns a jQuery object that wraps the DOM object and provides jQuery methods. This is the reason you are able to call jQuery methods like css(), click() on the object returned by jQuery. To get the underlying DOM object from a jQuery object write $('#id')[0] 6. document.getElementById() is faster than jQuery('#id') selector. Use document.getElementById() over jQuery('#id') selector unless you need the extra functionality provided by the jQuery object.
Views: 148213 kudvenkat
jQuery Element Selector
 
11:54
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-element-selector.html In this video we will discuss jQuery Element Selector, i.e selecting elements by tag name. To select the elements by tag name use jQuery Element Selector Syntax : $(element) $('td') // Selects all td elements $('div a') // Select all anchor elements that are descendants of div element $('div, span, a') // Selects all div, span and anchor elements Alerts the total count of td elements on the page [script type="text/javascript"] $(document).ready(function () { alert($('td').length); }); [/script] Selects all the tr elements on the page and changes their background colour to red [script type="text/javascript"] $(document).ready(function () { $('tr').css('background-Color', 'red'); }); [/script] Alerts the HTML content of the table [script type="text/javascript"] $(document).ready(function () { alert($('table').html()); }); [/script] Alerts the HTML content of each table row [script type="text/javascript"] $(document).ready(function () { $('table tr').each(function () { alert($(this).html()); }); }); [/script] Select and changes the background colour of all the div, span and anchor elements [script type="text/javascript"] $(document).ready(function () { $('div, span, a').css('background-Color', 'yellow'); }); [/script] Select all anchor elements that are descendants of div element [html] [head] [title][/title] [script src="jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('div a').css('background-Color', 'yellow'); }); [/script] [/head] [body] [div] [a href="http://pragimtech.com"]PragimTech[/a] [/div] [br /] [a href="http://microsoft.com"]Microsoft[/a] [/body] [/html] Changes the background color of even rows to gray and odd rows to yellow in both the tables. [script type="text/javascript"] $(document).ready(function () { $('tr:even').css('background-Color', 'gray'); $('tr:odd').css('background-Color', 'yellow'); }); [/script] To change the background color of even rows to gray and odd rows to yellow just for one of the table, use #id selector along with element selector. [script type="text/javascript"] $(document).ready(function () { $('#table1 tr:even').css('background-Color', 'gray'); $('#table1 tr:odd').css('background-Color', 'yellow'); }); [/script]
Views: 128824 kudvenkat
jQuery class selector
 
10:57
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-class-selector.html In this video we will discuss jQuery class selector i.e selecting elements using their class name Syntax : $('.class') jQuery class selectors uses JavaScript's native getElementsByClassName() function if the browser supports it. $('.small') // Selects all elements with class small $('.small,.big') // Selects all elements with class small or big $('div.small,.big') // Selects div elements with class small and any element with class big Selects all elements with class "small" and sets 5px solid red border [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('.small').css('border', '5px solid red'); }); [/script] [/head] [body] [span class="small"] Span 1 [/span] [br /][br /] [div class="small"] Div 1 [/div] [br /] [span class="big"] Span 2 [/span] [p class="big"]This is a paragraph[/p] [/body] [/html] Selects all elements with class "small" or "big" and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('.small, .big').css('border', '5px solid red'); }); [/script] Selects all elements with class "small" and all span elements with class "big" and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('.small, span.big').css('border', '5px solid red'); }); [/script] Selects all elements with class small that are nested in a an element with id=div2 and sets 5px solid red border [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('#div2 .small').css('border', '5px solid red'); }); [/script] [/head] [body] [div id="div1" class="small"] DIV 1 [/div] [br /] [div id="div2"] Div 2 [br /] [div class="small"] DIV 3 [/div] [br /] [span class="small"] SPAN [/span] [/div] [/body] [/html] Selects all elements with class small and sets 5px solid red border. Notice div1 has 2 classes - small and big. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('.small').css('border', '5px solid red'); }); [/script] [/head] [body] [div class="small big"] DIV 1 [/div] [br /] [div class="small"] DIV 2 [/div] [/body] [/html] Selects all elements that has both the classes - small and big. There should be no space between the class names. [script type="text/javascript"] $(document).ready(function () { $('.small.big').css('border', '5px solid red'); }); [/script] If you have a space between the two class names then we are trying to find descendants, i.e. find elements with class big that are descendants of an element with class small. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('.small .big').css('border', '5px solid red'); }); [/script] [/head] [body] [div class="small big"] DIV 1 [/div] [br /] [div class="small"] DIV 2 [div class="big"] DIV 3 [/div] [/div] [/body] [/html] Another way to selects all elements that has both the classes - small and big is by using filter method. But this approach is slower because it will first create a list of objects with class "small" and then removes elements that does not have class "big" [script type="text/javascript"] $(document).ready(function () { $('.small').filter('.big').css('border', '5px solid red'); }); [/script]
Views: 100967 kudvenkat
jquery tutorials for beginners - 15 - jquery not selector
 
04:14
For all my tutorials go to: http://websofttutorials.com/ In this tutorial i will teach you about jquery not selector
Views: 4268 websofttutorials
jQuery selected selector
 
07:41
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/04/jquery-selected-selector.html In this video we will discuss jQuery :selected selector. To select all checked checkboxes or radio buttons, we use :checked selector. To select all selected options of a select element use :selected selector. How to get selected option from single select dropdown in jquery : We want to get the selected option text and value Replace < with LESSTHAN symbol and > with GREATERTHAN symbol. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#selectCountries').change(function () { var selectedOption = $('#selectCountries option:selected'); $('#divResult').html('Value = ' + selectedOption.val() + ', Text = ' + selectedOption.text()); }); }); </script> </head> <body style="font-family:Arial"> Country: <select id="selectCountries"> <option selected="selected" value="USA">United States</option> <option value="IND">India</option> <option value="UK">United Kingdom</option> <option value="CA">Canada</option> <option value="AU">Australia</option> </select> <br /><br /> <div id="divResult"></div> </body> </html> How to get all selected options from multi select dropdown in jquery : We want to get all the selected options text and value. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#selectCountries').change(function () { var selectedOptions = $('#selectCountries option:selected'); if (selectedOptions.length > 0) { var resultString = ''; selectedOptions.each(function () { resultString += 'Value = ' + $(this).val() + ', Text = ' + $(this).text() + '<br/>'; }); $('#divResult').html(resultString); } }); }); </script> </head> <body style="font-family:Arial"> <select id="selectCountries" multiple="multiple"> <option selected="selected" value="USA">United States</option> <option value="IND">India</option> <option value="UK">United Kingdom</option> <option value="CA">Canada</option> <option value="AU">Australia</option> </select> <br /><br /> <div id="divResult"></div> </body> </html> Please note : Hold down the CTRL key, to select more than one item.
Views: 73369 kudvenkat
JQuery Tutorial - jquery selectors - selecting classes and ids
 
02:22
In this JQuery Tutorial , lets learn how to select dom elements by class or id selector. Ask questions at http://www.lswebapps.com/forums Visit website at http://www.lswebapps.com Twitter Url https://twitter.com/LSWebApps Facebook Page https://www.facebook.com/LSWebApps Please like, comment and subscribe if you find the videos useful. LSWAT - LS WEB APPS TUTORIALS
Views: 177 Lamin Sanneh
jQuery Tutorial 20: nth-child selector
 
07:53
Learn what is nth-child() selector is in jQuery and how it really works!
Views: 1837 codedamn
How to Use Bootstrap Select Plugin with Ajax Jquery PHP
 
14:18
In this video we have make stylish multiple select dropdown list box by using Bootstrap Select plugin with feature like selection of multiple option, search textbox under dropdown. For Source Code and online Demo - http://www.webslesson.info/2017/04/multiple-select-option-by-using-bootstrap-select-plugin-in-php-ajax.html
Views: 17124 Webslesson
jQuery case insensitive attribute selector
 
09:03
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-case-insensitive-attribute.html In this video we will discuss, how to write a jQuery case-insensitive attribute value selector. Let us understand this with an example. The following example, only selects DIV 1. This is because jQuery attribute value selector is case-sensitive. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('div[title="DivTitle"]').css('border', '3px solid red'); }); [/script] [/head] [body] [div title="DivTitle"] DIV 1 [/div] [br /] [div title="DIVTITLE"] DIV 2 [/div] [br /] [div title="divtitle"] DIV 3 [/div] [/body] [/html] Use the following code to make the jQuery attribute value selector case-insensitive [script type="text/javascript"] $(document).ready(function () { $('div[title]').filter(function () { return $(this).attr('title').toLowerCase() == 'divtitle'; }).css('border', '3px solid red'); }); [/script] The above script should select all the 3 divs. Now let us look at an example of making attribute contains selector [name*="value"], case-insensitive. The following example, selects only DIV 1 element. This is because the attribute contains selector is case-sensitive. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('div[title*="Div"]').css('border', '3px solid red'); }); [/script] [/head] [body] [div title="DivTitle1"] DIV 1 [/div] [br /] [div title="DIVTITLE2"] DIV 2 [/div] [br /] [div title="divtitle3"] DIV 3 [/div] [/body] [/html] To make attribute contains selector case-insensitive, use filter() method and regular expression as shown below. [script type="text/javascript"] $(document).ready(function () { $('div[title]').filter(function () { return (/Div/i).test($(this).attr('title')); }).css('border', '3px solid red'); }); [/script] OR [script type="text/javascript"] $(document).ready(function () { $('div[title]').filter(function () { return RegExp('Div','i').test($(this).attr('title')); }).css('border', '3px solid red'); }); [/script] The above script should select all the 3 divs. Visual Studio Keyboard Shortcuts Convert Selected Text to Upper Case - CTRL + SHIFT + U Convert Selected Text to Lower Case - CTRL + U
Views: 72339 kudvenkat
Top 3 Don't-Need-jQuery
 
21:49
You don’t NEED jQuery today. Let’s look at the three things you totally can accomplish without dropping in the jQuery library on your app or site. $.ajax(), $().ready() and the jQuery DOM selector. This is DevTips with David. document.querySelector() https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector https://caniuse.com/#feat=queryselector DOMContentLoaded https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded https://caniuse.com/#feat=domcontentloaded fetch() https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch https://caniuse.com/#feat=fetch CodePen used in the video https://codepen.io/devtips/pen/VXbqqo jQuery pushed Web 2.0 forward. But today the web has caught up. It wasn’t trivial to query the DOM ten years ago. jQuery solved that. It also has a handy wait-for-the-DOM-to-load call. And it had handy features such as toggles for checkboxes, making AJAX requests (which are asynchronous JavaScript calls to other resources such as other JavaScript or XML or HTML documents), picking up form values, changing styles, or manipulate the DOM. If you wanted to build something slightly more advanced back in the days, you almost needed jQuery. Today, you don't. jQuery did things well. But I see people use it still and its fine. It just bugs me that today they could just as well NOT drop in that pretty big library, if all they want to do is either DOM selection, AJAX XHR fetching or waiting for the document to load.
Views: 33866 DevTips
HTML and CSS Tutorial 10 :  Link hover, focus, visited, and active selectors
 
06:08
. Visit Our Friends @ Stone River E-Learning for Additional Tutorials - http://bit.ly/1fjsXTn Coupon 20% Off HTML & CSS for Beginners - http://bit.ly/1MmuYfw
Views: 26806 mybringback
jQuery checked selector
 
10:35
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-checked-selector.html In this video we will discuss the jQuery :checked selector. The :checked selector selects all checked checkboxes or radio buttons. Let us understand this with an example. Selects all checked radio button elements $('input[type="radio"]:checked') Example : When you click the submit button without selecting any radio button, "No radio button checked" message should be displayed. When you click the submit button after a radio button is checked, then a message stating "Male is checked" or "Female is checked" should be displayed. Replace < with LESSTHAN symbol and > with GREATERTHAN symbol. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#btnSubmit').click(function () { var result = $('input[type="radio"]:checked'); if (result.length > 0) { $('#divResult').html(result.val() + " is checked"); } else { $('#divResult').html("No radio button checked"); } }); }); </script> </head> <body style="font-family:Arial"> Gender : <input type="radio" name="gender" value="Male">Male <input type="radio" name="gender" value="Female">Female <br /><br /> <input id="btnSubmit" type="submit" value="submit" /> <br /><br /> <div id="divResult"> </div> </body> </html> Selects all checked checkbox elements $('input[type="checkbox"]:checked') Example : When you click the submit button without checking any checkbox, "No checkbox checked" message should be displayed. When you click the submit button after checking a checkbox, then a message stating the number of checkboxes checked and their values should be displayed. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#btnSubmit').click(function () { var result = $('input[type="checkbox"]:checked'); if (result.length > 0) { var resultString = result.length + " checkboxe(s) checked<br/>"; result.each(function () { resultString += $(this).val() + "<br/>"; }); $('#divResult').html(resultString); } else { $('#divResult').html("No checkbox checked"); } }); }); </script> </head> <body style="font-family:Arial"> Skills : <input type="checkbox" name="skills" value="JavaScript" />JavaScript <input type="checkbox" name="skills" value="jQuery" />jQuery <input type="checkbox" name="skills" value="C#" />C# <input type="checkbox" name="skills" value="VB" />VB <br /><br /> <input id="btnSubmit" type="submit" value="submit" /> <br /><br /> <div id="divResult"> </div> </body> </html>
Views: 92364 kudvenkat
How to Use Class Selector in jQuery - jQuery Tutorial
 
05:20
he .class selector selects all elements with the specific class. The class refers to the class attribute of an HTML element. The class attribute is used to set a particular style for several HTML elements. Note: Do not start a class attribute with a number. It may cause problems in some browsers jQuery selectors allow you to select and manipulate HTML element(s). jQuery selectors are used to "find" (or select) HTML elements based on their name, id, classes, types, attributes, values of attributes and much more. It's based on the existing CSS Selectors, and in addition, it has some own custom selectors jquery class Selector jquery multiple class selector, jquery find by class name, jquery class selector each, get element by class javascript, jquery class object, jquery id selector, jquery get class of element with multiple classes, jquery get all elements with class, jquery multiple attribute selectors, jquery select multiple elements with same class, jquery find multiple elements, jquery multiple id selectors, css multiple classes selector, jquery select two class names, jquery multiple select dropdown, jquery select multiple options, jquery multiple class selector, jquery find each, jquery get child element by class, jquery find by id, jquery first child
Views: 62 Soft-All
jQuery add event handler to dynamically created element
 
09:15
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/04/jquery-add-event-handler-to-dynamically.html In this video we will discuss, how to add event handlers to dynamically created elements. Let us understand this with an example. The following example, allows us to dynamically create new list item (li), attach a click event handler and add it to the unordered list (ul). This happens when you click "Add a New List Item" button. The problem with this approach is that we are binding a click event handler to every list item. This means if you have 500 list items, then there will be 500 event handlers in the memory and this may negatively affect the performance of your application. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('li').on('click', function () { $(this).fadeOut(500); }); $('#btnAdd').on('click', function () { var newListItem = $('<li>New List Item</li>').on('click', function () { $(this).fadeOut(500); }); $('ul').append(newListItem); }); }); </script> </head> <body style="font-family:Arial"> <input id="btnAdd" type="button" value="Add a New List Item" /> <ul> <li>List Item</li> <li>List Item</li> </ul> </body> </html> A better way of doing the same from a performance standpoint is shown below. In this example, the click event handler is attached to the listitem (li) parent element (ul). Even if you have 500 list items, there is only one click event handler in memory. So how does this work 1. When you click on a list item (li), the event gets bubbled up to its parent (ul) as the list item (li) does not have an event handler 2. The bubbled event is handled by the the parent (ul) element, as it has a click event handler. 3. When a new list item is added dynamicaly, you don't have to add the click event handler to it. Since the newly created list item (li) is added to the same parent element (ul), the click event of this list item also gets bubbled upto the same parent and will be handled by it. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('ul').on('click', 'li', function () { $(this).fadeOut(500); }); $('#btnAdd').on('click', function () { $('ul').append('<li>New List Item</li>'); }); }); </script> </head> <body style="font-family:Arial"> <input id="btnAdd" type="button" value="Add a New List Item" /> <ul> <li>List Item</li> <li>List Item</li> </ul> </body> </html>
Views: 57172 kudvenkat
jQuery disabled selector
 
04:29
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/04/jquery-disabled-selector.html In this video we will discuss 1. jQuery disabled selector 2. jQuery enabled selector 3. Where you can find jquery selectors documentation Selects all disabled elements $(':disabled') Selects all disabled elements and sets a 3px solid red border [html] [head] [title][/title] [script src="jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $(':disabled').css('border', '3px solid red'); }); [/script] [/head] [body style="font-family:Arial"] [table] [tr] [td]First Name [/td] [td][input type="text" disabled="disabled" /][/td] [/tr] [tr] [td]Last Name [/td] [td][input type="text" disabled="disabled" /][/td] [/tr] [tr] [td]Email [/td] [td][input type="text" /][/td] [/tr] [tr] [td]Gender [/td] [td] [select id="selectGender" disabled="disabled"] [option value="Male"]Male[/option] [option value="Female"]Female[/option] [/select] [/td] [/tr] [tr] [td]Comments[/td] [td][textarea][/textarea][/td] [/tr] [tr] [td colspan="2"] [input type="submit" value="Submit" disabled="disabled"/] [/td] [/tr] [/table] [/body] [/html] Selects all input elements that are disabled and sets a 3px solid red border [script type="text/javascript"] $(document).ready(function () { $('input:disabled').css('border', '3px solid red'); }); [/script] Selects all input elements with type=text that are disabled and sets a 3px solid red border [script type="text/javascript"] $(document).ready(function () { $('input[type="text"]:disabled').css('border', '3px solid red'); }); [/script] Selects all enabled elements $(':enabled') Selects all enabled textarea elements and sets a 3px solid red border [script type="text/javascript"] $(document).ready(function () { $('textarea:enabled').css('border', '3px solid red'); }); [/script] Where can you find jquery selectors documentation https://api.jquery.com/category/selectors
Views: 51958 kudvenkat
jQuery attribute value selector
 
08:48
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-attribute-value-selector.html In this video we will discuss Attribute Equals Selector [name="value"] Attribute Not Equal Selector [name!="value"] Attribute Contains Selector [name*="value"] Attribute Contains Word Selector [name~="value"] Attribute Contains Prefix Selector [name|="value"] Attribute Starts With Selector [name^="value"] Attribute Ends With Selector [name$="value"] This is continuation to Part 7, please watch Part 7 before proceeding. $('[title="div1Title"]') // Selects all elements that have title attribute value equal to div1Title $('[title!="div1Title"]') // Selects all elements that have title attribute value not equal to div1Title $('[title*="Title"]') // Selects all elements that have title attribute value containing the given substring - Title $('[title~="mySpan"]') // Selects all elements that have title attribute value containing the given word - mySpan, delimited by spaces $('[title|="myTitle"]') // Selects all elements that have title attribute value equal to myTitle or starting with myTitle followed by a hyphen (-) $('[title^="div"]') // Selects all elements that have title attribute value starting with div $('[title$="Heading"]') // Selects all elements that have title attribute value ending with Heading Selects all elements that have title attribute value equal to div1Title and sets 5px solid red border [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('[title="div1Title"]').css('border', '5px solid red'); }); [/script] [/head] [body] [div title="div1Title"] DIV 1 [/div] [br /] [div title="div2Title"] DIV 2 [/div] [p title="myTitle-paragraph"] This is a paragraph [/p] [p title="myTitleHeading"] This is a paragraph [/p] [span title="div1Title"] SAPN 1 [/span] [br /][br /] [span title="mySpan Heading"] SPAN 2 [/span] [/body] [/html] Selects all div elements that have title attribute value not equal to div1Title and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('div[title!="div1Title"]').css('border', '5px solid red'); }); [/script] THIS IS $('div[title!="div1Title"]').css('border', '5px solid red'); EQUIVALENT TO $('div:not([title="div1Title"])').css('border', '5px solid red'); Selects all elements that have title attribute value containing the given substring - Title, and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('[title*="Title"]').css('border', '5px solid red'); }); [/script] Selects all elements that have title attribute value containing the given word - mySpan, delimited by spaces, and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('[title~="mySpan"]').css('border', '5px solid red'); }); [/script] Selects all elements that have title attribute value equal to myTitle or starting with myTitle followed by a hyphen (-) and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('[title|="myTitle"]').css('border', '5px solid red'); }); [/script] Selects all elements that have title attribute value starting with div and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('[title^="div"]').css('border', '5px solid red'); }); [/script] Selects all elements that have title attribute value ending with Heading and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('[title$="Heading"]').css('border', '5px solid red'); }); [/script]
Views: 82814 kudvenkat
Jquery Selectors Tutorials in Hindi - Part 2
 
36:51
Jquery Selectors: In this video you will learn about basic selectors of Jquery. jQuery selectors allow you to select and manipulate HTML elements based on their name, id, classes, types, attributes, values of attributes and much more. Check Part 1 here: https://youtu.be/qdXpqqIQPXw You will learn about : * Selector this Selector Element Selector Multiple Element Selector #id Selector Class Selector :first Selector :last Selector eq() Selector gt() Selector lt() Selector odd even Selector not Selector header Selector contains Selector attribute Selector :input Selector :text Selector :password Selector :button Selector :submit Selector :reset Selector :file Selector :enabled Selector :disabled Selector :selected Selector ---------------------------------------- ******************************** Learn Video Editing (Complete Course with Easy Explanation) https://www.instamojo.com/jpwebtutorials/learn-professional-video-editing-in-just-1-d/?discount=klpyh2n9gt9re Support me on Social Media: Blog: http://www.jpwebtutorials.com/ Google Plus : https://plus.google.com/+jpwebtutorials Facebook Page : https://www.facebook.com/jpwebtutorials Twitter: https://twitter.com/jpwebtutorials Youtube: https://www.youtube.com/jpwebtutorials Email : [email protected]
Views: 2750 JP Web
jQuery checked selector
 
11:19
In this video we will discuss the jQuery :checked selector. The :checked selector selects all checked check-boxes or radio buttons. Let us understand this with an example.  Selects all checked radio button elements $('input[type="radio"]:checked') Example : When you click the submit button without selecting any radio button, "No radio button checked" message should be displayed.    When you click the submit button after a radio button is checked, then a message stating "Male is checked" or "Female is checked" should be displayed.  Note: Angle tags removed because it's not accepting while upload this content.   html head      title /title      script src="jquery-1.11.2.js" /script      script type="text/javascript"         $(document).ready(function () {             $('#btnSubmit').click(function () {                 var result = $('input[type="radio"]:checked');                 if (result.length 0) {                     $('#divResult').html(result.val() + " is checked");                 }                 else {                     $('#divResult').html("No radio button checked");                 }             });         });      /script /head body style="font-family:Arial"     Gender :      input type="radio" name="gender" value="Male" Male      input type="radio" name="gender" value="Female" Female      br / br /      input id="btnSubmit" type="submit" value="submit" /      br / br /      div id="divResult"      /div /body /html Selects all checked checkbox elements $('input[type="checkbox"]:checked') Example : When you click the submit button without checking any checkbox, "No checkbox checked" message should be displayed.    When you click the submit button after checking a checkbox, then a message stating the number of checkboxes checked and their values should be displayed.    html head      title /title      script src="jquery-1.11.2.js" /script      script type="text/javascript"         $(document).ready(function () {             $('#btnSubmit').click(function () {                 var result = $('input[type="checkbox"]:checked');                 if (result.length 0) {                     var resultString = result.length + " checkboxe(s) checked br/ ";                     result.each(function () {                         resultString += $(this).val() + " br/ ";                     });                     $('#divResult').html(resultString);                 }                 else {                     $('#divResult').html("No checkbox checked");                 }             });         });      /script /head body style="font-family:Arial"     Skills :      input type="checkbox" name="skills" value="JavaScript" / JavaScript      input type="checkbox" name="skills" value="jQuery" / jQuery      input type="checkbox" name="skills" value="C#" / C#      input type="checkbox" name="skills" value="VB" / VB      br / br /      input id="btnSubmit" type="submit" value="submit" /      br / br /      div id="divResult"      /div /body /html
Views: 102 JQuery
9. Gün - JQuery Dersleri 9 - Submit selector
 
06:02
Çalışma dosyalarını indirmek için linke tıklayınız: http://siberakademi.net/lesson/1199/jquery-dersleri-9--submit-selector.html NOT: KANALIMIZDA Kİ TÜM DERSLER SİBERAKADEMİ.NET TE MEVCUTTUR Facebook Linki: https://www.facebook.com/siberakademi.net/
Views: 1424 Oğuzhan Memiş
jQuery input vs input
 
06:29
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/jquery-input-vs-input.html In this video we will discuss the difference between $(input) and $(:input) selectors $(:input) selects all input, textarea, select and button elements where as $(input) just selects elements with an input tag. The following is the HTML used in the examples. Replace < with LESSTHAN symbol and > with GREATERTHAN Symbol. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> </head> <body style="font-family:Arial"> First Name : <input type="text" value="John" /> <br /><br /> Last Name : <input type="text" value="Major" /> <br /><br /> Gender : <input type="radio" name="gender" checked="checked" value="Male">Male <input type="radio" name="gender" value="Female">Female <br /><br /> Skills : <input type="checkbox" name="skills" checked="checked" value="JavaScript" />JavaScript <input type="checkbox" name="skills" checked="checked" value="jQuery" />jQuery <input type="checkbox" name="skills" value="C#" />C# <br /><br /> Country: <select> <option selected="selected" value="USA">USA</option> <option value="India">India</option> <option value="UK">UK</option> </select> <br /><br /> Summary : <br /> <textarea>I am a Senior Dot Net Developer with 10 years experience</textarea> <br /><br /> <input type="submit" value="submit" /> </body> </html> Now we want to get the text value from all the textboxes. On this page we have 2 textboxes 1. First Name 2. Last Name jQuery code to get textbox value using $(input) <script type="text/javascript"> $(document).ready(function () { $('input[type="text"]').each(function () { alert($(this).val()); }); }); </script> jQuery code to get textbox value using $(:input) <script type="text/javascript"> $(document).ready(function () { $(':input[type="text"]').each(function () { alert($(this).val()); }); }); </script> Which one is better for performance $('input[type="text"]') or $(':input[type="text"]') $('input[type="text"]') is better for performance over $(':input[type="text"]'). This is because $(':input[type="text"]') needs to scan all input elements, textarea, select etc, where as $('input[type="text"]') scans only input elements. So if you want to find elements with an input tag, it is always better to use $('input[type="text"]') over $(':input[type="text"]')
Views: 83559 kudvenkat
How to Use the jQuery Function to Select Elements
 
08:03
Watch the full Introduction to jQuery course: https://code.tutsplus.com/courses/introduction-to-jquery?ec_promo=tuts_youtube&ec_unit=description&ec_topic=code Web developers have had to overcome a lot of obstacles. Probably the biggest hurdle that we've faced is the browser itself. Not only have we had to work around the incompatibilities of various browsers, but even at the best of times, we've been faced with hard-to-use, low-level APIs like the Document Object Model (DOM) and XmlHttpRequest. Many libraries have been created to work around these problems, but one in particular has stood the test of time and has become the de facto standard: jQuery. In fact, jQuery is so popular that you would be hard pressed to find a website that doesn't use it! The jQuery function $() is the gateway to the whole jQuery library. In this short video from my course Introduction to jQuery, I'll show you how to use the jQuery function to select elements.
Views: 366 Envato Tuts+
jQuery video tutorial 10 - jQuery CSS Method
 
11:07
jQuery CSS() Method: The jQuery CSS() method is used to set one or more CSS style(s) to the selected HTML element(s). It is also used to get the value of a CSS style applied to the selected HTML element(s). Setting the single CSS style or property: Syntax: $(selector).css(“css-property”,”value”); It helps us to select any html element(s) targeted by the given selector and apply the given CSS property. Ex: $(“#firstp”).css(“background-color”,”red”); It selects any html element(s) whose id attribute value is set to firstp and applies the CSS property background color to red . Setting multiple CSS styles or properties: Syntax: $(selector).css({“css-property1”:”value1”,” css-property2”:”value2”,….}); It helps us to select any html element(s) targeted by the given selector and apply the given set of CSS properties. Ex: $(“#firstp”).css({“background-color”:”green”,”color”:”white”}); It selects any html element(s) whose id attribute value is set to firstp and applies the CSS properties background color green and text color white . Getting the value of a single CSS style or property: Syntax: $(selector).css(“css property”); It helps us to select any html element(s) targeted by the given selector and return the value of a given CSS property. Ex: alert($(“#firstp”).css(“background-color”)); It selects any html element(s) whose id attribute value is set to firstp and returns the value of background-color CSS property. The current implementation of the CSS() method in jQuery allows us to set multiple CSS properties to the selected HTML element(s), but only allows us to get one CSS property at a time. ======================================================== Follow the link for next video: https://youtu.be/HpRdrhCq158 Follow the link for previous video: https://youtu.be/UvMuWgBzIHc ========= For more benefits & Be up to date =================== Subscribe to the channel: https://www.youtube.com/chidrestechtu... Like the Facebook fan page: https://www.facebook.com/ManjunathChidre Visit to Chidre's Tech Tutorials website: http://www.chidrestechtutorials.com ========================================================
How to show and hide content using select dropdown box using Jquery
 
06:28
Step 1 : First hide your content which you want to hide by using style="display: none;" and also set id id="mobileno_textbox" Step 2 : call function in select box code like onchange="fun_showtextbox()" Step 3 : create function fun_showtextbox() in your js file function fun_showtextbox() { var select_status=$('#messagetype').val(); /* if select personal from select box then show my text box */ if(select_status == 'Personal') { $('#mobileno_textbox').show();// By using this id you can show your content } else { $('#mobileno_textbox').hide();// otherwise hide } } Note : * must be sure your jquery.min.js is included first https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js I created this video with the YouTube Video Editor (http://www.youtube.com/editor) -~-~~-~~~-~~-~- Please watch: "how to change php version in godaddy within 1 minute" https://www.youtube.com/watch?v=UTjF2A3xvsE -~-~~-~~~-~~-~-
Views: 3343 Shinerweb
jQuery 9 - Selectors - Attribute value selector
 
17:05
jQuery Attribute Value selector: Attribute Equals Selector : [name = “value”]. Attribute Not Equal Selector : [name != “value”]. Attribute Contains Selector : [name *= “value”]. Attribute Contains Word Selector : [name ~= “value”]. Attribute Contains Prefix Selector : [name |= “value”]. Attribute Starts with Selector : [name ^= “value”]. Attribute Ends with Selector : [name $= “value”]. ankpro ankpro training Asp.net MVC C# C sharp Bangalore Rajajinagar Selenium Coded UI Mobile automation testing Mobile testing JQuery JavaScript .Net Components of the .Net framework Hello World Literal Keywords Variable Data types Operators Branching Loops Arrays ArrayList Strings String Builder Structures Enums Functions Classes Inheritance Polymorphism Properties Indexers Events Nested Classes Delegates Anonymous methods Labda expressions Abstract classes Exception Handling Linq Interfaces Extension methods Anonymous types Generics Collections Garbage Collection Reflection Attributes Input and output statements Type casting Partial Methods Partial Classes Boxing and Unboxing Var vs Dynamic vs Object using Static. Auto property initializer. Dictionary Initializer. nameof Expression. New way for Exception filters. await in catch and finally block. Null – Conditional Operator. Expression – Bodied Methods Easily format strings – String interpolation Parameterless constructors in structs. Creating a custom exceptions class.
Views: 150 Ankpro Training
JQuery Tutorial 20 - Select Element and change Style using css method
 
03:40
http://www.aspnettutorialonline.blogspot.com http://www.jqueryexamplecode.blogspot.com https://www.facebook.com/Aspnettutorialonline/ http://javainterviewquestionsbook.blogspot.com jquery tutorial step by step jquery tutorial free download jquery tutorial with examples jquery tutorial point jquery tutorial jquery tutorial for beginners with examples jquery tutorial for beginners with examples free download jquery tutorial with examples jquery tutorial for beginners with examples jquery tutorial for beginners with examples free download jquery tutorial for beginners with examples free download for java jquery tutorial for beginners with examples jquery tutorial for beginners with examples step by step jquery tutorial for beginners with examples asp.net pdf jquery tutorial for beginners with examples video free download jquery tutorial for beginners with examples pdf free download for php jquery examples with source code jquery examples with code and demo jquery examples pdf jquery examples with code jquery examples tutorial jquery examples w3schools jquery examples in php dollar jquery jquery learn jquery tutorial jquery function example jquery basics jquery tutorial for beginners learn jquery fast jquery eq jquery tutorial step by step pdf step by step guide to jquery jquery ajax step by step jquery mysql tutorial jquery smarty tutorial jquery codeigniter jquery beginner tutorial jquery examples ajax interview questions and answers types of jquery selectors jquery interview questions and answers for freshers pdf free download jquery interview questions and answers for experienced in java jquery interview questions and answers for experienced in php jquery interview questions and answers for freshers pdf jquery interview questions and answers for 2 years experienced jquery interview questions and answers for experienced
Views: 1125 Ranga Rajesh Kumar
jQuery & querySelector - Supercharged
 
01:21
Surma shows you the influence jQuery had over the web, especially the ability to find elements with a CSS selector. This came to be known as querySelector and querySelectorAll. You can use querySelector in all browsers, and it’s even supported by DevTools - neat! If you have questions or suggestions, hit us up on Twitter! Surma → https://twitter.com/DasSurma Subscribe to the Chrome channel → http://bit.ly/ChromeDevs1
jQuery 7 - Selectors - Class selector
 
08:57
jQuery Class selector: Selecting Elements by css Class Name. jQuery class selectors uses JavaScript’s native getElementsByClassName() function if the browser supports it. Syntax :$(‘.class’) Examples $(‘.small’) // selects all elements with class small. $(‘.small, .big’) // selects all elements with class small or big. ankpro ankpro training Asp.net MVC C# C sharp Bangalore Rajajinagar Selenium Coded UI Mobile automation testing Mobile testing JQuery JavaScript .Net Components of the .Net framework Hello World Literal Keywords Variable Data types Operators Branching Loops Arrays ArrayList Strings String Builder Structures Enums Functions Classes Inheritance Polymorphism Properties Indexers Events Nested Classes Delegates Anonymous methods Labda expressions Abstract classes Exception Handling Linq Interfaces Extension methods Anonymous types Generics Collections Garbage Collection Reflection Attributes Input and output statements Type casting Partial Methods Partial Classes Boxing and Unboxing Var vs Dynamic vs Object using Static. Auto property initializer. Dictionary Initializer. nameof Expression. New way for Exception filters. await in catch and finally block. Null – Conditional Operator. Expression – Bodied Methods Easily format strings – String interpolation Parameterless constructors in structs. Creating a custom exceptions class.
Views: 134 Ankpro Training
jQuery add or remove class
 
15:46
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/04/jquery-add-or-remove-class.html In this video we will discuss 1. How to check if an element has a css class 2. How to add or remove css classes 3. How to toggle css classes hasClass - Returns true if an element has the specified class otherwise false addClass - Adds one or more specified classes. To add multiple classes separate them with a space. removeClass - Removes one or multiple or all classes. To remove multiple classes separate them with a space. To remove all classes, don't specify any class name. toggleClass - Toggles one or more specified classes. If the element has the specified class then it is removed, if the class is not present then it is added. Replace < with LESSTHAN symbol and > with GREATERTHAN symbol <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <style> .boldClass { font-weight: bold; } .italicsClass { font-style: italic; } .colorClass { color: red; } </style> <script type="text/javascript"> $(document).ready(function () { $('#btn1').click(function () { $('p').addClass('colorClass'); }); $('#btn2').click(function () { $('p').removeClass('colorClass'); }); $('#btn3').click(function () { $('p').addClass('colorClass italicsClass'); }); $('#btn4').click(function () { $('p').removeClass('colorClass italicsClass'); }); $('#btn5').click(function () { $('p').addClass('colorClass italicsClass boldClass'); }); $('#btn6').click(function () { $('p').removeClass(); }); }); </script> </head> <body style="font-family:Arial"> <p>Pragim Technologies</p> <table> <tr> <td> <input id="btn1" style="width:250px" type="button" value="Add Color Class" /> </td> <td> <input id="btn2" style="width:250px" type="button" value="Remove Color Class" /> </td> </tr> <tr> <td> <input id="btn3" style="width:250px" type="button" value="Add Color and Italics Classes" /> </td> <td> <input id="btn4" style="width:250px" type="button" value="Remove Color and Italics Classes" /> </td> </tr> <tr> <td> <input id="btn5" style="width:250px" type="button" value="Add Color, Italics & Bold Classes" /> </td> <td> <input id="btn6" style="width:250px" type="button" value="Remove All Classes" /> </td> </tr> </table> </body> </html>
Views: 46647 kudvenkat
jQuery Tutorial: Add Active Class to Navigation Menu Item Based on URL
 
13:38
In this jQuery tutorial, you'll learn how to use the jQuery addClass method to add an active class to a navigation menu item based on the URL of the current page. Here's the special discount link for Rob's course: http://www.johnmorrisonline.com/coupon-code-for-the-complete-web-developer-course-on-udemy/?utm_campaign=ytZ9lCqK_VrEE Get the source code in the Code Snippets section here: http://www.johnmorrisonline.com/web-developer-resources/ Training Center: http://www.johnmorrisonline.com/training Subscribe on YouTube: http://youtube.com/johnmorrisonline Subscribe on SoundCloud: http://soundcloud.com/johnmorrisonline Subscribe on iTunes: http://goo.gl/RggnXW -~-~~-~~~-~~-~- Please watch: "Ryan Carson: How to Get an IT Job WITHOUT a College Degree" https://www.youtube.com/watch?v=wxetW3hmPd0 -~-~~-~~~-~~-~-
Views: 23003 John Morris
Is jQuery Dead? Should You Still Use It?
 
11:12
Is jQuery dead in 2018? Should you still use it? In this video I discuss why or why not you should use jQuery! Please watch all the way to the end to get some more information on what to do! ___ LEARNING TO CODE? CHECK OUT THESE COURSES! (SOME ARE AFFILIATE) THE WEB DEVELOPER BOOTCAMP (GREAT FOR BEGINNERS) — http://bit.ly/2zP4alw THE ADVANCED WEB DEVELOPER BOOTCAMP — http://bit.ly/2h53MYg THE ULTIMATE VUE JS 2 COURSE - http://bit.ly/2CTvsvx ANGULAR 4 - http://bit.ly/2AG0IdP CHECK OUT THIS COURSE - Angular 5 - The Complete Guide - http://bit.ly/2sCMxWm CHECK OUT MY AMAZON STORE - https://www.amazon.com/shop/programwitherik REACT FOR BEGINNERS - http://bit.ly/2BctxOE ES6 - http://bit.ly/2iF4YT3 LEARN NODE - http://bit.ly/2jKLYpE ___ JOIN MY FACEBOOK GROUP AND START LEARNING CODE — https://www.facebook.com/groups/190277791450732/ ___ GET THE FIRST CHAPTER OF MY NEW BOOK Vue.js in Action! SIGN UP HERE! — https://goo.gl/UmemSS GET MY LAST BOOK EMBER.JS COOKBOOK! — https://goo.gl/LEIdSc GET MY NEW BOOK VUE.JS IN ACTION - https://goo.gl/qohSPs ___ Links https://syntax.fm/ https://github.com/nefe/You-Dont-Need-jQuery#query-selector ___ MY WEBSITE — http://www.programwitherik.com MY TWITTER — http://www.twitter.com/erikch MY FACEBOOK — http://www.facebook.com/programwitherik
Views: 8028 Program With Erik
#67: The CSS :not() Selector
 
04:53
In todays video I show you a very good use case for the CSS3 :not() selector. I hope you like it! http://codepen.io/martinwolf/pen/vGgYOo
Views: 526 Martin Wolf
NoteToSelf: jQuery .css() Method Adds Inline Styles
 
09:37
When using jQuery's .css() method, you may run into confusing scenarios where your rendered styles do not match what you are expecting. This video uses a simple example of how jQuery's .css() method writes inline styles in an HTML div element. Do to the specificity of an inline style, the outer styles will be overridden. Furthermore, this video will show you how you can easily remove the inline style by passing an empty string to the .css() method.
Views: 97 jalbao
Country Selector With Flag Using jQuery
 
05:55
Support Donate for me: https://www.patreon.com/codetube Follow me: https://www.facebook.com/mycodetube/ https://plus.google.com/+kautubecodeghazali My Social Media: https://www.facebook.com/tghazalipidie https://www.twitter.com/tghazalipidie Thank you very much for watching my new video on this channel Code Tube. You can contribute to this channel by giving support, make the subtitle, or comments that are supportive.
Views: 5501 Code Tube
Dropdown Select and Search Using jQuery and Bootstrap
 
07:52
How to Dropdown Select and Search Using jQuery and Bootstrap
Views: 39832 Code Tube
Descendant Selectors: jQuery
 
14:09
http://technotip.com/2016/descendant-selectors-jquery/ Video tutorial illustrating the syntax of Descendant selectors. jQuery Video Tutorial List: http://technotip.com/2514/jquery-tutorial-list/
Views: 1006 Satish B
jQuery selected selector -  DropDownlist
 
07:37
In this video we will discuss jQuery :selected selector. To select all checked checkboxes or radio buttons, we use :checked selector. To select all selected options of a select element use :selected selector. How to get selected option from single select dropdown in jquery : We want to get the selected option text and value Note: Angle tags removed because it's not accepting while upload this content. html head title /title script src="jquery-1.11.2.js" /script script type="text/javascript" $(document).ready(function () { $('#selectCountries').change(function () { var selectedOption = $('#selectCountries option:selected'); $('#divResult').html('Value = ' + selectedOption.val() + ', Text = ' + selectedOption.text()); }); }); /script /head body style="font-family:Arial" Country: select id="selectCountries" option selected="selected" value="USA" United States /option option value="IND" India /option option value="UK" United Kingdom /option option value="CA" Canada /option option value="AU" Australia /option /select br / br / div id="divResult" /div /body /html How to get all selected options from multi-select dropdown in jquery : We want to get all the selected options text and value. html head title /title script src="jquery-1.11.2.js" /script script type="text/javascript" $(document).ready(function () { $('#selectCountries').change(function () { var selectedOptions = $('#selectCountries option:selected'); if (selectedOptions.length 0) { var resultString = ''; selectedOptions.each(function () { resultString += 'Value = ' + $(this).val() + ', Text = ' + $(this).text() + ' br/ '; }); $('#divResult').html(resultString); } }); }); /script /head body style="font-family:Arial" select id="selectCountries" multiple="multiple" option selected="selected" value="USA" United States /option option value="IND" India /option option value="UK" United Kingdom /option option value="CA" Canada /option option value="AU" Australia /option /select br / br / div id="divResult" /div /body /html Please note : Hold down the CTRL key, to select more than one item.
Views: 201 JQuery
:nth-child(n) pseudo class selector in HTML and CSS
 
06:14
Hi guys in this video i have discussed the :nth-child(n ) pseudo class used in HTML and CSS. Adding this pseudo class to a selector (say element selector X) would select element X only if it’s the nth child of its parent. Hope you like it. Like us on Facebook at https://www.facebook.com/Lets-Create-With-HTML-And-CSS-1264488093673620/?ref=bookmarks Follow us on Google+ : https://plus.google.com/u/0/b/108110722760465393248/108110722760465393248
jquery floating div
 
13:36
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/05/jquery-floating-div.html In this video we will discuss, how to create floating div using jQuery. We want the div element in the sidebar to be floating and always visible as we scroll down the page. Example : In this example we are using position() and scrollTop() functions. The object returned by position() function has top and left properties, which can be used to know the current top and left positions (coordinates). We are using this function to find the top position of the div element that we want to keep floating as we scroll down. To get the current vertical position of the scroll bar, we are using scrollTop() function. As we scroll and when the current vertical position of the scroll bar becomes GREATER THAN the top position of the div element, then we want the div element to start floating. To do this set position style to fixed. A fixed position element is positioned relative to the browser window. So as you scroll down it will be floating in the browser window. If the current vertical position of the scroll bar becomes LESS THAN the top position of the div element, then we don't want the div element to float, so we set position style to relative. A relative position element is positioned relative to itself. So if you set position to relative and top to 0, it will continue to stay where it is without floating. <html> <head> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { var floatingDiv = $("#divfloating"); var floatingDivPosition = floatingDiv.position(); $(window).scroll(function () { var scrollPosition = $(window).scrollTop(); if (scrollPosition >= floatingDivPosition.top) { floatingDiv.css({ 'position': 'fixed', 'top' : 3 }); } else { floatingDiv.css({ 'position': 'relative', 'top' : 0 }); } }); }); </script> </head> <body style="font-family:Arial;"> <table align="center" border="1" style="border-collapse:collapse"> <tr> <td style="width:500px"> Main Page Content </td> <td style="width:150px; vertical-align:top"> Side panel content <br /><br /> <div id="divfloating" style="background-color:silver; width:150px; height:150px"> Floating Div - Keeps floating as you scroll down the page </div> </td> </tr> </table> </body> </html>
Views: 29880 kudvenkat
Select values of checkbox group with jquery
 
12:22
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/select-values-of-checkbox-group-with.html In this video we will discuss, how to select values of checked checkboxes that are in different groups using jQuery. Along the way, we will also discuss how to pass a variable to jquery selector. If you have just one group of checkboxes on your page, to get all the checked checkboxes you can use $('input[type="checkbox"]:checked'). However, if you have more than one checkbox group, then $('input[type="checkbox"]:checked') is going to select all checked checkboxes from both the checkbox groups. If you prefer to get checked checkboxes from a specific checkbox group, depending on which button you have clicked, you can use $('input[name="skills"]:checked') or $('input[name="cities"]:checked'). This will ensure that the checked checkboxes from only the skills or cities checkbox group are selected. Replace < with LESSTHAN symbol and > with GREATERTHAN symbol. At the moment to get the checked checkboxes values, we are using a button click event. You can also use the click event of the checkbox to do this. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('input[name="skills"]').click(function () { getSelectedCheckBoxes('skills'); }); $('input[name="cities"]').click(function () { getSelectedCheckBoxes('cities'); }); var getSelectedCheckBoxes = function (groupName) { var result = $('input[name="' + groupName + '"]:checked'); if (result.length > 0) { var resultString = result.length + " checkboxe(s) checked<br/>"; result.each(function () { resultString += $(this).val() + "<br/>"; }); $('#div' + groupName).html(resultString); } else { $('#div' + groupName).html("No checkbox checked"); } }; }); </script> </head> <body style="font-family:Arial"> Skills : <input type="checkbox" name="skills" value="JavaScript" />JavaScript <input type="checkbox" name="skills" value="jQuery" />jQuery <input type="checkbox" name="skills" value="C#" />C# <input type="checkbox" name="skills" value="VB" />VB <br /><br /> Preferred Cities : <input type="checkbox" name="cities" value="New York" />New York <input type="checkbox" name="cities" value="New Delhi" />New Delhi <input type="checkbox" name="cities" value="London" />London <br /><br /> Selected Skills:<br /> <div id="divskills"></div> <br /> Selected Cities:<br /> <div id="divcities"></div> </body> </html>
Views: 90277 kudvenkat
Multiple Selection Dropdown with Select2
 
14:14
How to install and use Select2 The jQuery replacement for select boxes. Download code: https://github.com/ImagineDesignDevelop/select2_tutorial
Views: 8680 Carlos Baston
jQuery selectable filter
 
13:29
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/07/jquery-selectable-filter.html In this video we will discuss jQuery selectable filter option with an example. Along the way we will also discuss destory method. This is continuation to Part 97. Please watch Part 97 from jQuery Tutorial before proceeding. Here is what we want to be able to do When "Exclude Weekends" checkbox is checked, we should not be able to select weekends (Sat and Sun) When "Exclude Weekends" checkbox is not checked, we should be able to select all days including weekends (Sat and Sun) Code used in the demo <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Demo.WebForm1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="jquery-1.11.2.js"></script> <script src="jquery-ui.js"></script> <link href="jquery-ui.css" rel="stylesheet" /> <script type="text/javascript"> $(document).ready(function () { var selectableList = $('#selectable'); selectableList.selectable({ stop: getSelectedItems }); function getSelectedItems() { var selectedItems = ''; $('.ui-selected').each(function () { selectedItems += $(this).text() + '<br/>'; }); $('#result').html(selectedItems); } function createSelectableList(filterValue) { selectableList.selectable('destroy').selectable({ stop: getSelectedItems, filter: filterValue }); $('#selectable li').removeClass('ui-selected'); $('#result').empty(); var weekends = $('li[data-value="weekend"]'); if (filterValue == '*') { weekends.removeClass('excluded'); } else { weekends.addClass('excluded'); } } $('#cbExclude').click(function () { if ($(this).is(':checked')) { createSelectableList('li[data-value="weekday"]'); } else { createSelectableList('*'); } }); }); </script> <style> li { display: inline-block; border: 1px solid black; padding: 20px; cursor: pointer; } .ui-selecting { background-color: grey; color: white; } .ui-selected { background-color: green; color: white; } .excluded { background-color: red; color:white; cursor:default } </style> </head> <body style="font-family: Arial"> <form id="form1" runat="server"> Exclude Weekends : <input id="cbExclude" type="checkbox"/> <ul id="selectable"> <li data-value="weekday">Mon</li> <li data-value="weekday">Tue</li> <li data-value="weekday">Wed</li> <li data-value="weekday">Thu</li> <li data-value="weekday">Fri</li> <li data-value="weekend">Sat</li> <li data-value="weekend">Sun</li> </ul> You selected : <div id="result"></div> </form> </body> </html>
Views: 13848 kudvenkat
What is $document ready function in jquery
 
10:24
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/03/what-is-documentreadyfunction-in-jquery.html In this video we will discuss 1. What is $(document).ready(function() in jquery and when to use it 2. Difference between $(window).load and $(document).ready $(document).ready is a jQuery event. It fires as soon as the DOM is loaded and ready to be manipulated by script. This is the earliest point in the page load process where the script can safely access elements in the page's html dom. This event is fired before all the images, css etc.. are fully loaded. The following example works, because the jquery code that adds the event handler to the button is inside the ready() function, which ensures that the DOM is fully loaded before this piece of code is executed, so the JavaScript can find the button element in the DOM and adds the click event hanlder. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('#button1').click(function () { alert('jQuery Tuorial'); }); }); [/script] [/head] [body] [input id="button1" type="button" value="Click Me" /] [/body] [/html] In the following example, we have removed the ready() method. When you click the button now, you don't get the alert. This is because the jQuery code is present before the button element, so by the time the jQuery code is executed the button element is not loaded into DOM. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $('#button1').click(function () { alert('jQuery Tuorial'); }); [/script] [/head] [body] [input id="button1" type="button" value="Click Me" /] [/body] [/html] To make this example work, you have 2 options 1. Place your jQuery code in $(document).ready function OR 2. Place your script at the bottom of the page just before the closing [/body] element $(window).load event fires when the DOM and all the content on the page (images, css etc) is fully loaded. Since the window load event waits for images, css etc to be fully loaded, this event fires after ready event. The following example proves the above point. When you run the page with the following script, notice that the alert in ready function is displayed before the alert in load function. [script type="text/javascript"] $(window).load(function () { alert('Window loaded'); }); $(document).ready(function () { alert('DOM Loaded and ready'); }); [/script] In most cases, the script can be run as soon as the DOM hierarchy has been fully constructed. So ready() is usually the best place to write your JavaScript code. However, in your application there could be scenarios where you should be using $(window).load over $(document).ready. For example, let's say we want to display the actual image dimensions (Height and Width). To get the actual image dimensions, we will have to wait until the image is fully loded, so the jQuery code to get the height and width should be in $(window).load event. Example : If you use $(document).ready() instead of $(window).load() the height and width will be displayed as 0. [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(window).load(function (){ $('#div1').html("Height = " + $('#Image1').height() + "[br/]" + "Width = " + $('#Image1').width()) }); [/script] [/head] [body] [div id="div1"][/div] [img src="Chrysanthemum.jpg" id="Image1" /] [/body] [/html]
Views: 206598 kudvenkat
jQuery append elements
 
08:18
Link for all dot net and sql server video tutorial playlists https://www.youtube.com/user/kudvenkat/playlists?sort=dd&view=1 Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/04/jquery-append-elements.html In this video we will discuss how to append and prepend elements To append elements we have append() appendTo() To prepend elements we have prepend() prependTo() Since these methods modify DOM, they belong to DOM manipulation category. jquery append example : The following example appends the specified HTML to all div elements <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('div').append('<b> Tutorial</b>'); }); </script> </head> <body style="font-family:Arial"> <div id="div1">jQuery</div> <div id="div2">C#</div> <div id="div3">ASP.NET</div> </body> </html> jquery appendto example : The above example can be rewritten using appendTo as shown below. $('<b> Tutorial</b>').appendTo('div'); What is the difference between append and appendTo Both these methods perform the same task. The only difference is in the syntax. With append method we first specify the target elements and then the content that we want to append, where as we do the opposite with appendTo method. jquery prepend example : The following example prepends the specified HTML to all div elements <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('div').prepend('<b>Tutorial </b>'); }); </script> </head> <body style="font-family:Arial"> <div id="div1">jQuery</div> <div id="div2">C#</div> <div id="div3">ASP.NET</div> </body> </html> jquery prependTo example : The above example can be rewritten using prependTo as shown below. $('<b>Tutorial </b>').prependTo('div'); What is the difference between prepend and prependTo Both these methods perform the same task. The only difference is in the syntax. With prepend method we first specify the target elements and then the content that we want to prepend, where as we do the opposite with prependTo method. jQuery append existing element example : These methods (append, appendTo, prepend, prependTo) can also select an element on the page and insert it into another <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('div').append($('#mySpan')); }); </script> </head> <body style="font-family:Arial"> <span id="mySpan"> Programming</span> <div id="div1">jQuery</div> <div id="div2">C#</div> <div id="div3">ASP.NET</div> </body> </html> Difference between prepend and append prepend method, inserts the specified content to the beginning of each element in the set of matched elements, where as append method inserts the specified content to the end of each element in the set of matched elements.
Views: 50613 kudvenkat
3: jQuery syntax and differences from JavaScript - Learn jQuery front-end programming
 
09:15
jQuery syntax and differences from JavaScript - Learn jQuery front-end programming. In this lesson we will learn about the syntax of jQuery, and talk about the differences between jQuery and JavaScript. A list of all jQuery selectors: https://api.jquery.com/category/selectors/ -- mmtuts is a YouTube channel that focuses on teaching beginner and advanced courses in various multimedia related skills. We plan to make tutorials available on programming, video production, animation, graphic design, and on software such as the Adobe Creative Cloud programs. jQuery for beginners is a how to series that teaches the jQuery framework to people who are just starting out learning programming. The course teaches how jQuery scripting can be made easy and teaches how to build many features on websites through behavior using jQuery. Creating behavior on websites with jQuery is easy and should not be seen as otherwise, which is why we want to explain the language in a easy to understand way for beginners. If you have suggestions on new courses, or specific lessons within existing courses you would like to see, then feel welcome to submit them in the comment section or in a private message. ALL suggestions will be seen, but not all will be replied to since we get quite a few every day.
Views: 11303 mmtuts
CSS :checked selector
 
01:33
The CSS :checked selector is used to select the radio input elements "radio" and checkbox elements "checkbox" when they are checked. Also the option element ("option" that is within "select") when it is selected. http://www.cssinhtml.com/en/css_selectors/css-pseudo-class-checked-selector/
Views: 716 pcwebschool
Target a Specific Child of an Element Using jQuery, jQuery in freeCodeCamp
 
02:19
In this challenge we learn how to specify a certain child of an element so we can make it do stuff. Sometimes we do not want to select all children of an elemtn, and this lesson shows you how to only target specific children.
Views: 715 We Will Code
CSS Tutorial 5 - Parent/Child Selectors and Classes
 
06:38
http://www.programminghelp.org/ Watch in 720p In this tutorial, we will learn about how to modify specif tags that are within other tags and we will learn about classes.
Views: 4670 programminghelporg
jquery extensions introduction - part 75
 
02:38
This video is an introduction to jquery extensions. jQuery has extended the CSS3 selectors with the following selectors. Because these selectors are jQuery extension and not part of the CSS specification, queries using them cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using these selectors, first select some elements using a pure CSS selector, then use .filter(). There are total 22 jquery extensions and I will try cover all the possible attribute selector as much as possible. rest you can take it as a homework :-) I need you to try these cases on your machine and also do try few crazy scenarios if you can. If you get stuck or if you have any query then please do comment below and let me know. I will try to reply you as soon as possible.
Views: 40 dnanetwork
Part 14 - Jquery Effects - #Sliding effects | slideUp, slideDown and slideToggle Methods
 
09:47
OVERVIEW:: In this video I have explained, Jquery Effects. Specially, Sliding effects ( slideUp, slideDown and slideToggle Methods) SOCIAL : Find Us on FB : http://facebook.com/technotipstutorial Subscribe US : http://youtube.com/aapkanigam Follow us on Twitter : @technotipsMVC OR @aapkanigam VISIT OUR BLOG HERE :http://technotipstutorial.blogspot.com INTRODUCTION : #Visibility Effects 1. show(): To display hidden elements 2. hide(): To hide elements 3. toggle(): To show and hide elements with single button #Sliding effects 1. slideUp(): Hide elements with animation effect from down to up direction. 2. slidedown(): Display elements with animation effect from up to down direction. 3. slideToggle(): Hide and show the element with animation effect. It does the task of both slideUp and slideDown #Fading effects 1. fadeIn(): Display elements by increasing opacity. 2. fadeOut(): Hide elements by decreasing opacity.. 3. fadeToggle(): Display and Hide elements by increasing and decreasing opacity. It does the task of both fadeIn and fadeOut methods. 4. fadeTo(): fade to the specified opacity with animation effects #Adding Removing CSS class 1. addClass(): add CSS class to an element 2. removeClass(): remove CSS class from an element 3. toggleClass(): add and remove CSS class 4. hasClass(): return true if element consist specified class name RECOMMENDATION: Part 1. What is Jquery? : https://www.youtube.com/watch?v=hq3AtjlAjgw Part 2: https://www.youtube.com/watch?v=rareeV-lMUE Part 3. What are selectors? : https://www.youtube.com/watch?v=Qh8Gk-NKVuc Part 4. Element selectors :https://www.youtube.com/watch?v=x4Q9cFM0Kug Part 5. Attribute selectors: https://www.youtube.com/watch?v=-npNwso54YU What is jquery show hide toggle slideUp slidedown slideToggle fadeIn fadeOut fadeToggle fadeTo addClass removeClass toggleClass hasClass Jquery effects step by step jquery tutorial Id selectors Class selectors Element selectors Attribute selectors Jquery Plugins Jquery tutorial technotips ashish technotips tutorial asp.net mvc with jquery best video in jquery Jquery Plugins Jquery AJAX JSON object
Views: 450 Technotips - Ashish