On Nov 23, 1:15 pm, "tobias.br...@me.com" <tobias.br...@me.com> wrote:
> Right now i've added a hidden div with the current url which i can
> read with jquery and reload it with $.load()... but i wonder if there
> is a more clever way :-)

What Michel is suggesting is that you store this in the div when you
do the load.  To store and fetch the data, you can just use:

    http://docs.jquery.com/Core/data#name
    http://docs.jquery.com/Core/data#namevalue

So simply try:

    $("#myDiv").load(myUrl, {my: "data"}, function (responseText) {
        // ... anything else you need here.
        $(this).data("url", myUrl);
    });

Then later:

    var url = $("#myDiv").data("url");

And that's it!

  -- Scott

Reply via email to