JQuery selector [name^="value"] which starts with an string followed by a variable is not working -



JQuery selector [name^="value"] which starts with an string followed by a variable is not working -

attribute starts selector [name^="value"] not working.

$('[id^="editme_" + 'id']').css("display","none");

here 'editme_' string , 'id' variable.

thanks in advance.

you have not handled quotes correctly. use:

$('[id^="editme_'+id+'"]').css("display","none");

also can utilize .hide() instead of .css("display","none")

jquery jquery-selectors

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -