HomeОбразованиеRelated VideosMore From: kudvenkat

jQuery disabled selector

156 ratings | 52887 views
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
Html code for embedding videos on your blog
Text Comments (6)
Noemi Yanet Yanqui Cueva (6 months ago)
hola. help me! cuando realizo la seleccion del jquery, no me muestra los resultados que a usted, a pesar de que he copiado su código.¿A qué podría ser ? Agradesco su ayuda
Ahmet Yaman (1 year ago)
Thank you sir
ashab uddin (3 years ago)
Hello Friend, How Are You, How To Close Jquery Trigger Effect After File Uploaded ? Because My Click File And Uploaded Image In One Div Up To Up So, Where File Upload Finish Than I want To Close The Trigger Effect... Thank You
Carlo Leonini (3 years ago)
Can you please tell me how to access your blog so that I can get the source code for the various exercises?Thank you
Silver (1 year ago)
check Desc: http://csharp-video-tutorials.blogspot.com/2015/04/jquery-disabled-selector.html
csharp (3 years ago)
Sir, Could you please do some videos on Design Patterns.?

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.