Jump to content

I can't properly debug my JavaScript on my phone


Recommended Posts

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



Edit: answer:

url = url + ' &text' instead of + "text"

Edited by Sim
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...