I would like to use jQuery’s load function.
I can write:
Now I would like to have a variable as the source div in the html page, how do I write that out?
You can just use normal string concatentation:
var div = '#aSpecificDivinThatPage'; $('#somediv').load('somefile.html ' + div);
You mean you want to copy the html from the source div and put it into another div?