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 462525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:04:59+00:00 2026-05-12T23:04:59+00:00

I am working with jqDock on a DotNetNuke project. I ran jQuery.noConflict() and went

  • 0

I am working with jqDock on a DotNetNuke project. I ran jQuery.noConflict() and went through the jqDock.js file and changed all ‘$’ to ‘jQuery’ (though I don’t think it was necessary).
In this little bit of code I have an issue:

altImage : function(){
      var alt = jQuery(this).attr('alt');
      return (alt && alt.match(/\.(gif|jpg|jpeg|png)$/i)) ? alt : false;

    } //end function altImage()

At the end of the regular expression there is a chunk that says $/i, My find/replace set this to jQuery. It broke the program. Is this because that ‘$’ symbol isn’t associated with jQuery there? Is it part of the Regular Expression? If so…what exactly is it saying?

  • 1 1 Answer
  • 2 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-05-12T23:05:00+00:00Added an answer on May 12, 2026 at 11:05 pm

    The usual style to writing jQuery plugins would mean that one would not need to replace $ throughout the plugin. Most plugins are written such that the plugin code is surrounde by a self-invoking anonymous function that passes in jQuery for a parameter $ such that $ refers to the jQuery object inside of that function. Like so

    (function($) {
    
        // I can happily use $ here to refer to the jQuery object
        $.fn.myFunction ....
    
    })(jQuery);
    

    So be careful when doing a naive find/replace.

    As others have already mentioned, in the context of a regular expression, $ is used to match the end of the string.

    Finally, when using $.noConflict(), you can assign the jQuery object to a different alias and use that alias throughout the subsequent code. For example

    var $j = $.noConflict();
    
    // can use $j alias for jquery now
    $j(document).ready(function($) { 
        // can use $j or $ for jQuery object inside this function as the 
        // jQuery object is passed in 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on my first Rails project, I used Ryan Bates' Nifty-Generators to create the
Working on calling a C function from my asm project. I'm trying to push
Working on an old Kohana 2 project and I want to link two models.
Working on writing a custom property Handler for our custom file type in windows
Working through the five minute Xtext tutorial (http://www.eclipse.org/Xtext/documentation/2_1_0/010-xtext-in-5-minutes.php) I get to Generating The Language
Working with the Box2djs plugin here: http://www.crackin.com/dev/mms/physics/ ... and all I'm trying to do
Working on a project at the moment and we have to implement soft deletion
Working on a project that parses a log of events, and then updates a
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
Working on a project where a sequential set of methods must be run every

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.