can I pass variable (variable named test in this case) to jQuery .load function?
$(document).ready(function() {
$('a').click(function(e) {
e.preventDefault();
var test= $(this).attr('href');
$('.window').load($(test));
});
This doesn’t work.
You are wrapping your url in a call to jQuery. Just pass
test, not$(test).Also, you are missing the closing
});in your sample code. Not sure if it’s a typo here or in your actual code.