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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -