asked on
$(document).on("click", "a", function(evt) {
evt.preventDefault() ;
var ID = "Wrap_" + $(this).attr('id');
var link = encodeURI($(this).attr('href'));
alert(link);
$('#'+ ID).load(link);
});
<a href="myfile.php?param=My Word">My Word</a>
<a href="myfile.php?param=My word">MyWord</a>
ASKER
ASKER
jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.
TRUSTED BY
ASKER
Just tried to recreate the issue at home and realised your 1/2 correct, the <a id='My Word'> is being created by php with a space which is causing the error
In the code bellow is it possible to load the response from myfile.php into the next div with class='resp'?
Yes I need to remove the id's
Open in new window