using the .load function with varibles
I cant seem to get this little bit of code working. What i am trying to do is dynamically load the href of a link that is clicked, but this seems to return with nothing.
I have left out the opening tags
- $("a").live("click", function(){
- var raw = $(this).attr("href");
- var link = "'"+ raw + "'";
- alert(link);
- $('div#result').load(link, function(){
- alert('contentLoaded');
- });
- });
I have a series of checks filed out and they all fire accordingly, but no content shows up.
I have tried it with the .ajax function but I get the same thing(a success notice and no content).
I have made sure all elements exists and that my css is not making it the text disappear.