69
rated 0 times
[
73]
[
4]
/ answers: 1 / hits: 52565
/ 8 Years ago, wed, april 13, 2016, 12:00:00
I'm trying to reload particular element on button on click using jQuery, but when I click the button, the entire page gets loaded in this element. I have tried the following code which loads the entire page in this element. I want to load only particular element.
$(document).ready(function() {
$("#button").click(function() {
$("#demo").load(location.href + "#demo");
});
});
<div id="example">
<p id="demo">hi</p>
<button id="button" type="button">press</button>
</div>
More From » jquery