I'm using jQuery to get the content of a link and want to replace the link with just the content it has.
I got it to work, but I'm wondering if I could write it in just one statement instead of two.
Here is my code:
text = $(this).closest('.ui-btn-text').find("a[data-rel='popup']").html();
$(this).closest('.ui-btn-text').find("a[data-rel='popup']").replaceWith(text);
Thank you!