I'm trying to write code something like this:
$('[id^=myitem_]').data(
'powq',
$([
'<p><b>Description:</b></br>'+$(this).find("input[name=description]").val()+'</p>',
'<p>Some other data:</p>'
].join(''))
);
As you can see inside 'value' i want to catch object inside [id^=myitem_]
, but i cannot. In this case every time i get first object in whole document. I think here, inside 'value', $(this)
mean window or whole document.
Any idea..?