On my page i have a couple of tags that looks like this:
<parameter name="address" class="transform">@ViewBag.Address</parameter>
To do that i have created this function:
function transform(id) {
$('#' + id + ' .transform').each(function (index) {
var tag = $(this).parent().html();
$(this).parent().html() = tag.replace('parameter','input type="text"');
});
}
Now, if i alert $(this).parent().html() i get the original tag, but the function doesn't work. What am i doing wrong?
$(this).parent().html() = "value"call is wrong. Have a look to example in the API api.jquery.com/html