jQuery pass url variable into load function

Posted by Adi on Stack Overflow See other posts from Stack Overflow or by Adi
Published on 2010-02-17T09:58:39Z Indexed on 2010/06/05 10:02 UTC
Read the original article Hit count: 172

Filed under:
|
|

Hi,

I'm trying to use load to reload a portion of the current page (long story why) but am having an issue with the variable syntax.

Here is the snippet of code:

var pathname = window.location.pathname;
$('#menu').load("/cms.php #menu");

I woudl like to replace /cms.php with the variable, but am having issues with the corrent syntax.

Any help/advice would be much appricated.

A.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about variables