Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8475505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:54:43+00:00 2026-06-10T17:54:43+00:00

sorry for my bad english my code work with jquery 1.4.2 but not work

  • 0

sorry for my bad english
my code work with jquery 1.4.2 but not work with 1.7.1
I am receiving “missing ) after argument list” error in firebug with the code below:

$(document).ready(function() {
  $('#content').html($('#content').html().replace(/#([a-zA-Z1-9]{1,})/gi,'<a href="<?php echo $this->webroot ?>instagrams/index/$1" class="tag_replace">#$1</a>'));
});

my generated code:

$(document).ready(function() {
  $('#content').html($('#content').html().replace(/#([a-zA-Z1-9]{1,})/gi,'<a href="/instagram/instagrams/index/$1" class="tag_replace">#$1</a>'));
});

browser error code :
SyntaxError: missing ) after argument list
[Break On This Error]

…agram/instagrams/index/content” class=”tag_replace”>#content”).append(html)

jquery….min.js (line 11, col 63)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:54:45+00:00Added an answer on June 10, 2026 at 5:54 pm

    If you must write JS code dynamically using PHP, put the relevant variable on a line of its own so you can separate out problems with that from problems with your JS code.

    You can also take advantage of the function parameter version of .html():

    $(document).ready(function() {
        $('#content').html(function(index, old) {
            var root = "<?php echo $this->webroot ?>";
            var match = /#([a-zA-Z1-9]{1,})/gi;
    
            return old.replace(match, '<a href="' + root + 'instagram/instagrams/index/$1" class="tag_replace">#$1</a>');
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Sorry for my bad english) Well, I've 3 errors in my code. Error's: First
sorry for bad English. It's Ruby code. s = мистика `touch #{s}` `cat #{s}`
Sorry for my bad english but'im italian. I've a spinner and I want when
First of all sorry for my bad english. I'm a german guy. The code
sorry for my bad english. I've got such a question: why the first code:
first of all i m sorry for my bad english becouse i m not
Sorry for bad English :( Suppose i can preliminary organize recipes and ingredients data
Sorry for bad english and bad title! I have the table post id title
At first sorry my bad English. I want define routing for this url: For
at first sorry my bad English I want load model in my plugin controller

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.