javascript - On [for="description"]' click not working -


jsfiddle

i trying if label has attribute for="description" on click should focus other element.

i have tried following not working. possible click event on attribute. or other can possibilities achieve this? other adding class or id.

$('[for="description"]').on('click', function() {     console.log('test');     alert('test'); }); 

you have typo in click event keyword. should lowercase. code:

$('[for="description"]').on('click', function () {     alert('test'); }); 

otherwise, have not define element class name nicedit-main.

demo


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -