Sim Posted August 15, 2020 Posted August 15, 2020 (edited) But here's an odd error, and I know it's simple thing The code works fine, until the URL = url + "&loadMain=no"; is added. I want to append &loadMain=no to all urls. jq('a').on('click', function(e) { var url = jq(this).attr('href'); url = url + ”&loadMain=no"; //adding this line prevents alert so error is here alert(url); if(url.includes("?")) { e.preventDefault(); jq("#php__container").load(url); } }); Edit: answer: url = url + ' &text' instead of + "text" Edited August 15, 2020 by Sim Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.