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

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -