Home
Search results “Jquery element by style”
jQuery attribute selector
 
08:17
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-selector.html In this video we will discuss selecting elements 1. That have specified attribute 2. That have specified attribute values Syntax : $('[attribute]') $('[attribute="value"]') $('[title]') // Selects all elements that have title attribute $('div[title]') // Selects all div elements that have title attribute $('[title="divTitle"]') // Selects all elements that have title attribute value - divTitle $('div[title="divTitle"]') // Selects all div elements that have title attribute value - divTitle Selects all elements with title attribute 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]').css('border', '5px solid red'); }); [/script] [/head] [body] [div title="div1Title"] DIV 1 [/div] [br /] [div title="div2Title"] DIV 2 [/div] [p title="pTitle"] This is a paragraph [/p] [span title="div1Title"] SAPN 1 [/span] [br /][br /] [span] SPAN 2 [/span] [/body] [/html] Selects all div elements with title attribute and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('div[title]').css('border', '5px solid red'); }); [/script] Selects all elements with title attribute value - div1Title, and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('[title="div1Title"]').css('border', '5px solid red'); }); [/script] Selects all div elements with title attribute value - div1Title, and sets 5px solid red border [script type="text/javascript"] $(document).ready(function () { $('div[title="div1Title"]').css('border', '5px solid red'); }); [/script] Selects all div elements with both title and style attributes, and sets 5px solid black border [html] [head] [title][/title] [script src="Scripts/jquery-1.11.2.js"][/script] [script type="text/javascript"] $(document).ready(function () { $('div[title][style]').css('border', '5px solid black'); }); [/script] [/head] [body] [div title="divTitle" style="background-color:red"] Red DIV [/div] [br /] [div title="divTitle" style="background-color:green"] Green DIV [/div] [br /] [div title="divTitle"] Normal Div [/div] [br /] [div] Normal Div without any attributes [/div] [/body] [/html] Selects all div elements with title attribute value - divTitle, and style attribute value - background-color:red, and sets 5px solid black border [script type="text/javascript"] $(document).ready(function () { $('div[title="divTitle"][style="background-color:red"]').css('border', '5px solid black'); }); [/script] Selects all div elements with either title or style attributes, and sets 5px solid black border [script type="text/javascript"] $(document).ready(function () { $('div[title],[style]').css('border', '5px solid black'); }); [/script]
Views: 98913 kudvenkat
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: 1136 Ranga Rajesh Kumar
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: 130909 kudvenkat
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: 58680 kudvenkat
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 ========================================================
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: 150583 kudvenkat
jQuery wrap elements
 
06:52
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-wrap-elements.html In this video we will discuss how to wrap and unwrap elements The following jquery methods are used to wrap and unwrap elements. Since these methods modify DOM, they belong to DOM manipulation category. wrap unwrap wrapAll wrapInner wrap - Wrap an HTML structure around each element in the set of matched elements. Consider the following HTML <div id="div1"> DIV 1 </div> <div id="div2"> DIV 2 </div> <div id="div3"> DIV 3 </div> The following line of code wraps each of the above div element with another div element. $('div').wrap('<div class="containerDiv"></div>'); So the HTML in the DOM would now look as shown below. To view the DOM HTML use the browser developer tools. <div class="containerDiv"> <div id="div1"> DIV 1 </div> </div> <div class="containerDiv"> <div id="div2"> DIV 2 </div> </div> <div class="containerDiv"> <div id="div3"> DIV 3 </div> </div> Example : <html> <head> <title></title> <style> .containerDiv { background-color:red; color:white; font-weight:bold; margin: 5px; } </style> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { alert($('div.containerDiv').length); $('div').wrap('<div class="containerDiv"></div>'); alert($('div.containerDiv').length); }); </script> </head> <body style="font-family:Arial"> <div id="div1"> DIV 1 </div> <div id="div2"> DIV 2 </div> <div id="div3"> DIV 3 </div> </body> </html> unwrap - Remove the parents of the set of matched elements from the DOM. Example : <html> <head> <title></title> <style> .containerDiv { background-color:red; color:white; font-weight:bold; margin: 5px; } </style> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { alert($('div.containerDiv').length); $('div').wrap('<div class="containerDiv"></div>'); alert($('div.containerDiv').length); $('div').unwrap(); alert($('div.containerDiv').length); }); </script> </head> <body style="font-family:Arial"> <div id="div1"> DIV 1 </div> <div id="div2"> DIV 2 </div> <div id="div3"> DIV 3 </div> </body> </html> wrapAll - Wrap an HTML structure around all elements in the set of matched elements. Consider the following HTML <div id="div1"> DIV 1 </div> <div id="div2"> DIV 2 </div> <div id="div3"> DIV 3 </div> The following line of code wraps all of the matching div element with another div element. $('div').wrapAll('<div class="containerDiv"></div>'); So the HTML in the DOM would now look as shown below. <div class="containerDiv"> <div id="div1"> DIV 1 </div><div id="div2"> DIV 2 </div><div id="div3"> DIV 3 </div> </div> wrapInner - Wrap an HTML structure around the content of each element in the set of matched elements. Consider the following HTML <div id="div1"> DIV 1 </div> <div id="div2"> DIV 2 </div> <div id="div3"> DIV 3 </div> The following line of code wraps each of the above div element content with another div element. $('div').wrapInner('<div class="containerDiv"></div>'); So the HTML in the DOM would now look as shown below. <div id="div1"> <div class="containerDiv"> DIV 1 </div> </div> <div id="div2"> <div class="containerDiv"> DIV 2 </div> </div> <div id="div3"> <div class="containerDiv"> DIV 3 </div> </div>
Views: 45094 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: 51436 kudvenkat
Javascript + jQuery DOM: selecting HTML elements
 
05:41
Selecting elements in the HTML document using Javascript and jQuery so they can be manipulated—with both plain Javascript & jQuery. Code & tutorials: http://learn-the-web.algonquindesign.ca/topics/dom/
Views: 2706 Thomas Bradley
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: 47418 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: 102478 kudvenkat
Arabic jQuery Practical Course #002 - Scroll To Element
 
14:41
Learn How to Scroll to Any Element
Views: 8489 Elzero Web School
How to use the jQuery CSS method to style HTML elements
 
02:41
https://blog.kevinchisholm.com You can find plenty more articles like this on my blog!
Views: 8 Kevin Chisholm
jQuery video tutorial 12 - jQuery tag selector
 
05:52
jQuery tag selector : To select html element(s) by their tag name, we use jQuery tag selector Syntax of jQuery tag selector: $(“CSS tag selector”).action(parameters); If we use CSS tag selector in a jQuery function then it is called as jQuery tag selector Ex: $("p").css( {"border":"2px solid red"} ); It selects any HTML element whose tag name is set to “p” and applies the border of 2px solid red ======================================================== Follow the link for next video: https://youtu.be/v5ZE2zi48sQ Follow the link for previous video: https://youtu.be/HpRdrhCq158 ========= 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
jQuery :: Controlling CSS
 
05:46
In this tutorial, we will take a look at how you can use jQuery to change CSS styles for dynamically controlling the look on your web page.
Views: 4287 The Art of Code
jquery Replacing Element - Change the css of an element using jquery
 
07:07
jquery Replacing Element - change text inside an element using jquery, jquery in freecodecamp. change the css of an element using jquery, jquery in freecodecamp. notice that in this example we are using the jquery element selector. jquery plugin development. to select the elements by tag name use jquery element selector.. how to select li item inside ul element using jquery selector. in this tutorial i will show you that how can we select li item inside ul element using jquery selector.
Views: 17 Times Touch
jquery how to add multiple css elements to a div?
 
05:48
how to add multiple css elements to a div using jquery.
Views: 155 Go Freelancer
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: 94187 kudvenkat
7: How to animate elements using jQuery - Learn jQuery front-end programming
 
10:51
How to animate elements using jQuery - Learn jQuery front-end programming. In this lesson we will learn how to animate HTML elements by manipulating the CSS styling. Download lesson files: http://mmtuts.net/course.php?c=jquery&l=7 -- 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: 10502 mmtuts
jQuery Tip 3 Style Sheet Switcher
 
09:52
Essentially what were are doing is just playing with attributes. We are just changing the href attribute of the link in the head of the document and then populating a p tag with what button we clicked. Download filesused from site http://lucidgrafix.com/video/jquery-tip-3-style-sheet-switcher/
Views: 1219 Eric Young
jquery draggable widget
 
12:17
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-draggable-widget.html In this video we will discuss jquery draggable widget jquery draggable widget allow elements to be moved using the mouse. This widget is in interactions category on the jQuery UI website. http://jqueryui.com/draggable/ Consider the following HTML <div id="draggableDiv" class="divClass"> Drag me around </div> .divClass { height: 200px; width: 200px; background-color: red; color: white; display:table-cell; vertical-align:middle; text-align:center; } To make the above div element draggable $('#draggableDiv').draggable(); Some of the useful options to customize the draggable widget axis - Constrains dragging to either x or y axis containment - Constrains dragging to within the bounds of the specified element or region cursor - The CSS style of the cursor during the drag operation opacity - opacity during the drag operation revert - Boolean property that specifies if the element should revert to its start position when dragging stops revertDuration - The duration of the revert animation, in milliseconds snap - Specifies whether the element being dragged should snap to other elements. Value can be boolean or a selector. When set to true, the element will snap to all other draggable elements. When a selector is specified the element being dragged will snap to the element specified by the selector snapTolerance - The distance in pixels between the element being dragged and the element to which to snap to, at which snapping should occur. cancel - Prevents dragging from starting on specified elements Constrains dragging to x axis $('#draggableDiv').draggable({ axis : 'x' }); Constrains dragging to within the bounds of the parent element HTML <div id="containerDiv" style="height:300px; width:300px; border:3px solid black"> <div id="draggableDiv" class="divClass"> Drag me around </div> </div> jQuery $('#draggableDiv').draggable({ containment : 'parent' }); Changes the cursor style to "move" during the drag operation $('#draggableDiv').draggable({ cursor: 'move' }); Changes the opacity to 0.3 during the drag operation $('#draggableDiv').draggable({ opacity : '0.3' }); Reverts the div element to its start position when dragging stops. Revert animation completes in 1000 milli-seconds. $('#draggableDiv').draggable({ revert: true, revertDuration : 1000 }); The following example 1. Snaps the coloured div elements to the div element with thick black border. 2. The snapping occurs as soon as the distance between any of the coloured div element and the div element with thick black border is 50 pixels 3. The cancel option cancels dragging from starting on the div element with thick black border HTML <div id="redDiv" class="divClass" style="background-color: red"> Red Div </div> <div id="greeDiv" class="divClass" style="background-color: green"> Green Div </div> <div id="blueDiv" class="divClass" style="background-color: blue"> Blue Div </div> <div id="brownDiv" class="divClass" style="background-color: brown"> Brown Div </div> <br /> <br /> <div id="snapDiv" style="height: 400px; width: 400px; border: 5px solid black"> </div> Style .divClass { height: 200px; width: 200px; color: white; display: table-cell; vertical-align: middle; text-align: center; } jQuery $('div').draggable({ snap: '#snapDiv', snapTolerance: 50, cancel : '#snapDiv' });
Views: 22086 kudvenkat
jQuery Tutorial 20: nth-child selector
 
07:53
Learn what is nth-child() selector is in jQuery and how it really works!
Views: 1879 codedamn
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: 99 jalbao
Access elements and contents inside an iFrame using jQuery
 
03:31
Access elements and contents inside an iFrame using jQuery is simple. We can use contents() method to access the elements inside an iFrame. To know more Visit www.codeexpertz.com.
Views: 4794 Anishnirmal
jQuery - Styling DOM #06
 
23:34
In this video we will learn to style DOM using jQuery. Tutorial: https://goo.gl/i8Geb7 Subscribe: http://goo.gl/cFA9in Video: https://youtu.be/y5JeOthu6Jg jQuery - Selectors https://youtu.be/aLBzEb3kEpQ jQuery - Chaining Methods https://youtu.be/W2mUxZX7RYs YouTube Playlist: https://www.youtube.com/playlist?list=PLG6ePePp5vvbfbvBuv_Ny2QpkzI4Q4hMu GitHub repository: https://github.com/yusufshakeel/jquery-project HTML Playlist: https://www.youtube.com/watch?v=5gVxlxwBcCU&list=PLG6ePePp5vvYI1n1aFlELPfh9sfGcIHal CSS Playlist: https://www.youtube.com/watch?v=5ueRHotsM3A&list=PLG6ePePp5vvay3bbTde2X36BqUt7osZ3e JavaScript Playlist: https://www.youtube.com/watch?v=6jJHw9YJnQY&list=PLG6ePePp5vvZrPZCp85dssGxQ7QLfujt7 thanks for watching see you in the next video stay happy and keep smiling :-)
Views: 326 Yusuf Shakeel
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: 73319 kudvenkat
Font Selector with jQuery and Google Web Font
 
04:31
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: 202 Code Tube
Sticky Navigation Tutorial (Fixed Position CSS + JavaScript / jQuery)
 
13:07
Learn how to create a "sticky" navigation (element should use "fixed" position once it would normally scroll out of view). Check out my "Get a Developer Job" course: https://www.udemy.com/git-a-web-developer-job-mastering-the-modern-workflow/?couponCode=YOUTUBE-HALF-OFF Link to the demo files shown in the lesson: http://learnwebcode.com/sticky-navigation-tutorial/ Have you put together a neat page infused with JavaScript awesomeness and want to move it from your computer to online so the world can see your JS chops? I’ve partnered with A Small Orange and can now offer my students 20% savings on any hosting plan. Hint: the shared “Small” plan is one of the best bangs for your buck around! http://p.asmallorange.com/learnwebcode/specialoffer Sign up for my newsletter to receive periodic webDev tips, tricks, resources and coupons. Join the list at http://learnwebcode.com/ Follow LearnWebCode on Twitter for resources and updates: https://twitter.com/learnwebcode In this lesson we make use of JavaScript and the jQuery library for event handling and conditional logic. If you are unfamiliar with JavaScript I recommend watching these two introductory videos: https://www.youtube.com/watch?v=1vMFpT0h-WI&list=UUHRp19HU7Y2LwfI0Ai6WAGQ https://www.youtube.com/watch?v=gIvR-WX5lIQ&list=UUHRp19HU7Y2LwfI0Ai6WAGQ
Views: 132405 LearnWebCode
jquery & ajax #1 - selector,event,css
 
22:06
jquery & ajax #1 - selector,event,css
Views: 29 LearnDevelopment
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: 30251 kudvenkat
jQuery Tutorial for Beginners #5 - jQuery Selectors
 
04:57
Hey gang, in this jQuery tutorial for beginners, I'll be showing you how we can use CSS selector syntax to grab content from our web pages in jQuery. If you know how to use CSS, and how to write a decent selector, then grabbing elements using jQuery will be a walk in the park for a ninja like you. To brush up on your CSS selectors, checkout CSS for beginners playlist and find the selector video's - https://www.youtube.com/playlist?list=PL4cUxeGkcC9gQeDH6xYhmO-db2mhoTSrT - it all kicks off at lesson 8 :) SUBSCRIBE TO CHANNEL - https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1 ========== JavaScript for Beginners Playlist ========== https://www.youtube.com/playlist?list=PL4cUxeGkcC9i9Ae2D9Ee1RvylH38dKuET ========== CSS for Beginners Playlist ========== https://www.youtube.com/playlist?list=PL4cUxeGkcC9gQeDH6xYhmO-db2mhoTSrT ========== HTML for Beginners Playlist ========== https://www.youtube.com/playlist?list=PL4cUxeGkcC9ibZ2TSBaGGNrgh4ZgYE6Cc ========== The Net Ninja ============ For more front-end development tutorials & to black-belt your coding skills, head over to - https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk ========== Social Links ========== Twitter - @TheNetNinja - https://twitter.com/thenetninjauk
Views: 11818 The Net Ninja
jQuery Selectors [#4] Ultimate Web Developer Course (Free Tutorial)
 
07:40
DOWNLOAD THE COURSE FILES HERE https://app.convertkit.com/landing_pages/4167?ref=YouTube_jQuery4 jQUERY SELECTORS In this lecture, we'll learn how to use jQuery selectors. WHAT IS THE ULTIMATE WEB DEVELOPER COURSE? The Ultimate Web Developer Course is one of the most comprehensive, A to Z web designer & developer courses on the web. Over the course of 8 months, I painstakingly researched, designed, developed, and filmed this course which covers everything from Visual Design to Adobe Photoshop; Web Design to Front-End Development; MySQL Programming to Career Building. This course will truly take you from knowing nothing at all, to a well-rounded, knowledgable and skilled web designer and developer. GET THE FULL COURSE + ALL COURSES FOR ONLY $31/mo. http://www.bradhussey.ca/ccsub-youtube To get the entire course, plus access to ALL of my current and future courses, simply head over to Code College using the following link, and enroll in our Unlimited Lifetime Access subscription plan. – http://www.bradhussey.ca/ccsub-youtube
Views: 13764 Brad Hussey
5: How to make elements appear and disappear in jQuery - Learn jQuery front-end programming
 
12:29
How to make elements disappear in jQuery - Learn jQuery front-end programming. In this lesson we will learn how to make HTML elements appear and disappear inside our websites. We will do this using the jQuery effects called show, hide, and fade. Download lesson files: http://mmtuts.net/course.php?c=jquery&l=5 -- 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: 12077 mmtuts
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: 23605 John Morris
How to select li item inside ul element using jquery selector
 
02:39
In this tutorial I will show you that how can we select li item inside ul element using jquery selector.
Views: 3559 Mr. Developer
jQuery DOM manipulation methods
 
16:55
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-dom-manipulation-methods.html In this video we will discuss 1. What are jQuery DOM manipulation methods 2. How to set attribute values using jQuery attr() method 3. How to retrieve attribute values using jQuery attr() method 4. How to set multiple attribute values using jQuery attr() method 5. How to remove an attribute using jQuery removeAttr() method What are jQuery DOM manipulation methods jQuery DOM manipulation methods manipulate the DOM in some manner. The complete list of jQuery DOM manipulation methods can be found at the following link. http://api.jquery.com/category/manipulation/ jQuery attr method is used to set or retrieve attribute values of html elements. Retrieves the title attribute value of the first matching element $('div').attr('title') Example : In this example we have 2 DIV elements. Since attr() function retrieves only the attribute value of first matching element, we only get the title attribute value of the first DIV element. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { alert($('div').attr('title')); }); </script> </head> <body style="font-family:Arial"> <div id="div1" title="My DIV1"> DIV 1 </div> <div id="div2" title="My DIV2"> DIV 2 </div> </body> </html> To retrieve the title attribute value of all the matching elements, jQuery each() method can be used. <script type="text/javascript"> $(document).ready(function () { $('div').each(function () { alert($(this).attr('title')); }); }); </script> Sets the title attribute value of all the matching elements to "new div title" $('div').attr('title', 'new div title'); Example : If you want to set the same value for the title attribute of all the elements, then there is no need to loop thru each element. All the div elements in this case will have 'new div title' as the title attribute value. <script type="text/javascript"> $(document).ready(function () { // set the same title attribute value for all the DIV elements $('div').attr('title', 'new div title'); // Retrieve and alert the title attribute value of all DIV elements $('div').each(function () { alert($(this).attr('title')); }); }); </script> If you want to set a different value for the title attribute, then you may need to loop thru each element. <script type="text/javascript"> $(document).ready(function () { // sets a different title attribute value for each DIV element $('div').each(function (i) { $(this).attr('title', 'div ' + (i + 1) + ' title'); }); // Retrieve and alert the title attribute value of all DIV elements $('div').each(function () { alert($(this).attr('title')); }); }); </script> How to set multiple attribute values : Using a JSON object to set multiple attribute values <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { var config = { 'title': 'New Div Title', 'style': 'border:3px solid red;', 'name': 'My Div' }; $('div').attr(config); var result = ''; $('div').each(function () { result += 'title = ' + $(this).attr('title') + '<br/>'; result += 'style = ' + $(this).attr('style') + '<br/>'; result += 'name = ' + $(this).attr('name') + '<br/><br/>'; }); $('#resultSpan').html(result); }); </script> </head> <body style="font-family:Arial"> <div id="div1" title="My DIV1"> DIV 1 </div> <br /> <div id="div2" title="My DIV2"> DIV 2 </div> <br /> <span id="resultSpan"> </span> </body> </html> Instead of creating a separate JSON object (config) and then passing it to attr() method, you can create the JSON object inline. $('div').attr({ 'title': 'New Div Title', 'style': 'border:3px solid red;', 'name': 'My Div' });
Views: 66209 kudvenkat
jQuery scroll event
 
10:17
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-scroll-event.html In this video we will discuss scroll event and how to handle it using jQuery. scroll event is raised when the user scrolls to a different place in the element. It applies to window objects, but also to scrollable frames and elements with the overflow CSS property set to scroll. In the following exampe, notice that the div element overflow style is set to scroll. The div element has a scrollbar and as you scroll up and down the div element, the scroll event is raised and handled. 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 () { $('div').scroll(function () { $('h3').css('display', 'inline').fadeOut(1000); }); }); </script> </head> <body style="font-family:Arial"> <div style="width:300px; height:200px; border:1px solid black; overflow:scroll"> PRAGIM Speciality in training arena unlike other training institutions. Training delivered by real time software experts having more than 10 years of experience. Interview questions and real time scenarios discussion on topics covered for the day. Realtime projects discussion relating to the possible interview questions. Trainees can attend training and use lab untill you get a job. Resume preperation and mock up interviews. 100% placement assistance. 24 hours lab facility. PRAGIM Technologies offers professional real time projects for studetns in their final semester. Course completion and project completion certificates will also be provided upon successful completion of the course. We have partnered with major multinational companies to place freshers with our clients on their course completion. </div> <br /> <h3 style="display:none; color:red">Scroll event handled</h3> </body> </html> The following example, keeps track of how many times the scroll event is raised. <html> <head> <title></title> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { var count = 0; $('div').scroll(function () { $('span').text(count += 1); }); }); </script> </head> <body style="font-family:Arial"> <div style="width:300px; height:200px; border:1px solid black; overflow:scroll"> DIV CONTENT </div> <br /> <h3 style="color:red">Scroll event handled <span>0</span> time(s)</h3> </body> </html> The following example, keeps track of whether the user scrolled up or down. <html> <head> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { var lastScrollTop = 0; $('div').scroll(function () { var currentScrollPosition = $(this).scrollTop(); if (currentScrollPosition > lastScrollTop) { $('h3').text('You scrolled down'); } else { $('h3').text('You scrolled up'); } lastScrollTop = currentScrollPosition; }); }); </script> </head> <body style="font-family:Arial"> <div style="width:300px; height:200px; border:1px solid black; overflow:scroll"> DIV CONTENT </div> <br /> <h3 style="display:inline; color:red"></h3> </body> </html>
Views: 47169 kudvenkat
Remove Style Using jQuery Css Function
 
01:34
Please visit http://technomark.in/Remove-Style-Using-jQuery-Css-Function.aspx for more information. Remove Style Using jQuery Css Function, Remove Style Using jQuery, Remove Style Using jQuery Function, Best Way To Remove Style Using jQuery, Remove Style, Remove Style In jQuery, jQuery Css Remove style, Remove background Using jQuery, Remove height Using jQuery, Remove Width Using jQuery, jQuery
Views: 125 Admin Technomark
Increase decrease font size using jquery
 
07:58
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/increase-decrease-font-size-using-jquery.html In this video we will discuss how to increase, decrease and reset font size using jQuery Replace < with LESSTHAN symbol and > with GREATERTHAN symbol <html> <head> <style> .divClass { font-size: 16px; background-color: #E3E3E3; width: 500px; padding: 5px; } </style> <script src="jquery-1.11.2.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#linkIncrease').click(function () { modifyFontSize('increase'); }); $('#linkDecrease').click(function () { modifyFontSize('decrease'); }); $('#linkReset').click(function () { modifyFontSize('reset'); }) function modifyFontSize(flag) { var divElement = $('#divContent'); var currentFontSize = parseInt(divElement.css('font-size')); if (flag == 'increase') currentFontSize += 3; else if (flag == 'decrease') currentFontSize -= 3; else currentFontSize = 16; divElement.css('font-size', currentFontSize); } }); </script> </head> <body style="font-family:Arial"> Font-Size: <a id="linkIncrease" href="#">Increase</a> <a id="linkDecrease" href="#">Decrease</a> <a id="linkReset" href="#">Reset</a> <br /><br /> <div id="divContent" class="divClass"> <b>jQuery Tutorial</b> <ul> <li>What is jQuery</li> <li>What is $(document).ready(function() in jquery</li> <li>Benefits of using CDN</li> <li>#id selector</li> <li>Element Selector</li> <li>class selector</li> <li>attribute selector</li> <li>attribute value selectors</li> <li>case insensitive attribute selector</li> <li>jQuery input vs :input</li> </ul> </div> </body> </html>
Views: 22770 kudvenkat
jQuery: How to change the attribute of a HTML tag
 
04:33
Attributes are properties of tag. For example hyperlink "a" has tag "href" and "img" has "src". You can easily change these attributes of tag using jquery.
Views: 777 WebTecho Tutorials
jQuery video tutorial 11 - jQuery selectors
 
03:02
JQuery Selectors First step in learning jQuery is learning “how to select HTML element(s) using jQuery” as efficiently as possible, then “how to add styles, effects, animations, events etc.” to them To select HTML element(s) JQuery function accepts a “CSS selector”. Syntax: jQuery(“CSS selector”).action(parameters); OR $(“CSS selector”).action(parameters); CSS Selector: is a string used to select or target HTML element(s) available on page. To select HTML element(s) on the page as much as specifically and as much as generically; CSS provides wide variety of selectors. Types of CSS Selectors 1. Tag selector (<tagname> tagname{} ) 2. Class selector (<tagname class=”classname”> .classname{} ) 3. ID selector (<tagname id=”idname”> #idname{} ) 4. Group selector ( slct1, slct2{} ) 5. Contextual selector a. Descendent selector( slct1 slct2{} ) b. Direct Child selector( slct1 > slct2{} ) c. Adjacent sibling selector( slct1 + slct2{} ) d. General sibling selector( slct1 ~ stct2{} ) 6. Attribute selector (<tagname attribute=””> [attributename]{} ) 7. Pseudo classes ( slct:pseudoclass{} ) 8. Pseudo elements ( slct::pseudoelement{} ) 9. Universal selector( *{} ) ======================================================== Follow the link for next video: https://youtu.be/SCMO3qA3Abs Follow the link for previous video: https://youtu.be/RrWC7ir4i4g ========= 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 ========================================================
JQuery Custom Creative Animation on HTML elements - Learn JQuery in Hindi
 
11:29
Visit Website @ http://www.vishacademy.com Connect with us on ... facebook » http://www.facebook.com/vishacademy twitter » http://www.twitter.com/vishAcademy youtube » http://www.youtube.com/vishacademy
Views: 21168 vishAcademy
jQuery CSS - Custom File Input
 
12:52
This tutorial is about " How to create a custom file input using CSS and jQuery " + some added functionality after the user selects some file, hope you guys will like this tutorial. Check out t-vac products : https://gumroad.com/akshayejh
Views: 13040 TVAC Studio
How To Apply !important To Style Using Jquery css, addClass, attr, prop
 
01:48
Please visit http://www.technomark.in/How-To-Apply-!important-To-Style-Using-Jquery-Css().aspx for more information. How To Apply !important To Style Using Jquery, Apply !important To Style Using Jquery, Apply !important To Style Using Jquery css(), Apply !important To Style Using Jquery addClass, Apply !important To Style Using Jquery attr prop, !important To Style Using Jquery, HTML, PHP, Asp.Net
Views: 170 Admin Technomark
jQuery Tutorial in Hindi Part 2: jQuery Selectors in Hindi | jQuery Element, Id, Classes Selectors
 
14:46
Welcome all, we will see the jQuery Selectors in Hindi. Selectors in jQuery in Hindi. 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 selectors in Hindi jquery selectors tutorial #jqueryselectorsinhindi #jquerySlectors
Views: 1831 Thapa Technical
how to remove all inline styles using jquery
 
05:57
if you are taking some plugins and by default inline styles css is coming and that is getting problem for that then it is help for you that how to remove all inline styles css using jquery.
Views: 100 kayum4
How to Style and Customize HTML Select Box Created by Select Element using CSS
 
22:11
How to Style and Customize HTML5 Select Box Created by Select Element using CSS https://youtu.be/lRFsCYDk4Vw WHAT WILL YOU LEARN? Learn to style an HTML select box using CSS and replace the default arrow for the dropdown applied by the browser with your own custom arrow. You will learn to create cross-browser custom css3 select box dropdown using the HTML5 select tag. It means the select box arrows will be supported in all the major browsers including ie10 or above. Here you also will learn three different methods to create a custom select box dropdown without using any external javascript library or bootstrap. We will simply use few css3 advance properties to get the effect of the custom arrow in your select dropdown box or what you call HTML combo box. I will show you how easily you can hide the default arrow from selectbox and apply your own custom arrow. ===============DOWNLOAD SOURCE CODEs============== *Code to Follow Along: https://goo.gl/MTXSFT *Click on the Fork Button on Codepen After Opening the Link to Start following Finished Final Code: https://goo.gl/ERqNWJ ===================================================== =================Navigate to Specific part============= 1:30 - Applying common styles to all select elements 3:58 - #1 Background Image Technique to Style HTML5 Select Box 7:15 - #2 Using CSS3 Border to Create Downword Arrow 13:27 - #3 Using FontAwesome Glyphicon for the Arrow in our Selectbox Dropdown list ==================================================== HOW WE WILL CREATE OUR CUSTOM SELECTBOX USING CCS3? To create a select box we simply use the html5 document to create our markup for the select box. We will create three different select boxes using the "select" element and the "option" element for creating dropdown lists. To hide the default styling from the select element applied by the browser we will use the css3 appearance property and set its value to none. And then, we will use an another useful rule to hide the default arrows applied by Internet explorer 10; from the select box dropdown. THREE DIFFERENT METHODS THAT WE WILL BE USING Each select box will be using a different method for styling the dropdown arrow inside the combobox. - The first Method will show using an Image Background technique to create custom arrow for the CSS select box. - The second method will use the CSS border property to create a triangular shape that will be used to customize your select element's dropdown arrow. - Finally, the third method will use the fontawesome glyphicon to create our custom arrow for the selectbox dropdown. All, the method will have the cross-browser support for our custom css3 select box. Each method ensures that it works properly in the Internet explorer 10 or above and other older browser. PROVIDE YOUR FEEDBACK If you have any questions, just comment below in comment section. I will try to respond as soon as possible. Like, share and comment! Thanks ============Useful Tutorials============= Creating Simple Horizontal Navigation Bar using Flexbox https://goo.gl/oR0lGf Distributing images evenly in a fluid container https://goo.gl/w2O1kR Creating three column responsive layout https://goo.gl/uj46tI How to create simple css3 preloading animation https://goo.gl/GqjXCr How to add preloader to your webpage using javascript https://goo.gl/JJuclF ================CONTACT and RESOURCES============== Find all the source codes here: https://codepen.io/smashtheshell Follow on Twitter https://twitter.com/amit4kp Add on Facebook https://www.facebook.com/kumaramit24chd Like Page on Facebook https://www.facebook.com/smashtheshell
Views: 18088 smashtheshell
jQuery - Wrap elements and Remove elements #10
 
21:55
In this video we will learn to wrap and remove elements using jQuery. Tutorial: https://goo.gl/DN9yU9 Subscribe: http://goo.gl/cFA9in Video: https://youtu.be/4tDCDktOHIQ jQuery Playlist: https://www.youtube.com/playlist?list=PLG6ePePp5vvbfbvBuv_Ny2QpkzI4Q4hMu GitHub repository: https://github.com/yusufshakeel/jquery-project HTML Playlist: https://www.youtube.com/watch?v=5gVxlxwBcCU&list=PLG6ePePp5vvYI1n1aFlELPfh9sfGcIHal CSS Playlist: https://www.youtube.com/watch?v=5ueRHotsM3A&list=PLG6ePePp5vvay3bbTde2X36BqUt7osZ3e JavaScript Playlist: https://www.youtube.com/watch?v=6jJHw9YJnQY&list=PLG6ePePp5vvZrPZCp85dssGxQ7QLfujt7 thanks for watching see you in the next video stay happy and keep smiling :-)
Views: 443 Yusuf Shakeel
jQuery Arabic Tutorials - How To Switch Between Styles
 
11:35
Learn how to switch Between styles with easy Method
Views: 5318 Elzero Web School
Playing with jQuery and the CSS class selector
 
09:41
The CSS Class selector is very useful when you need to manage or apply CSS styles to multiple elements. Additionally the CSS Selector also has performance advantages and can be overloaded. All of this becomes more exciting, when jQuery is used to add/remove or toggle classes. In this screencast, we'll take a look at how jQuery makes it easy to add/remove or toggle classes based on user events such as mouse-clicks and mouse-overs. Follow along with the code sample provided at: https://github.com/learnable-content/playing-with-jquery-and-class-selectors This screencast is a sample of my course - Introduction to jQuery https://learnable.com/courses/introduction-to-jquery-2884 on Learnable. This course is designed to get you up and running with jQuery with practical and easy to use examples. If you like this screencast, then head over to Learnable.com to join this course today!
Views: 2751 SitePoint

Civil code of the philippines annotated by paras
Country club cover letters
Cover letter for journalism job
Indian rail mobile ticketing application letters
Uk cover letter structure