I was working on one of the functions and had pass an js element to it and wanted to perform jquery functions which require an id in format $("#id")
Here is how to use jquery operations on an element received in js format
//ele is an checkbox element
Here is how to use jquery operations on an element received in js format
//ele is an checkbox element
function enabletext(ele)
{
if(ele.checked==true)
{
var myid=ele.id;
jQuery(eval("'#" + myid + "'")).parent().siblings("#qtyid").show();
}
}
Good article
ReplyDeletehttps://wordpress-special-plugin.blogspot.co.id