replaceWith jquery - chnage tags
by ian_smithz
HTML
<button>First</button>
<button>Second</button>
<button>Third</button>
JavaScript
$( "button" ).click(function() {
$( this ).replaceWith( "<div>" + $( this ).text() + "</div>" );
});
by ian_smithz
<button>First</button>
<button>Second</button>
<button>Third</button>
$( "button" ).click(function() {
$( this ).replaceWith( "<div>" + $( this ).text() + "</div>" );
});