Reputation: 701
I am using a nimbb api to record video using a webcam and the project is very simple.Here is my sample. Once i finish recording i get this message "Your video has been saved. Thank you!". I want to skip this message and reload the div so that webcam loads again. I am doing like this.
var url ="index.html";
//alert("yes");
alert("Your video has been saved. Thank you!");
$("#re").load(url);
But this is reloading whole body. I just want to load webcam div. What i am doing wrong here?
Upvotes: 2
Views: 227
Reputation: 171679
Using load()
you can target css selectors within the page being loaded. If your div has id="video"
for example:
$("#re").load(url + ' #video');
be sure to leave a space between the url and the selector
See loading page fragments section of load() API docs
Upvotes: 6