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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:16:27+00:00 2026-06-06T15:16:27+00:00

I am using a jQuery plugin and running it through the Microsoft Ajax Minifier.

  • 0

I am using a jQuery plugin and running it through the Microsoft Ajax Minifier. My scripts work well for me, but now I am running into an issue with this plugin. The issue is that the plugin calls a function by its name using a string:

var s = (getCachedSortType(table.config.parsers, c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc");

Note the “sortNumeric” and “sortNumericDesc”. This calls these functions:

function sortNumeric(a, b) {
            return a - b;
        }

function sortNumericDesc(a, b) {
            return b - a;
        }

This is the only location these functions are called so the IDE VS2010 doesn’t think that the functions are being called from anywhere… They are conditionally via the code above.

**Here is the Problem**

When this gets minified, the string name of the function stays, but the function gets removed because it does not thing its getting referenced.

Is there any way to adjust the settings minifier to not do this?

I have also seen it change the names of the functions so

function testFunctionName(a,b)

Would become

function a

This would also cause a problem for situations like mine…
Please note, that I know it is bad code design to hard code function names like this. Like I said it is a plug-in that I am using. I would accept a solution that would call the function out right instead of by string, but I am always hesitant to modify plug-ins.

  • 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-06T15:16:29+00:00Added an answer on June 6, 2026 at 3:16 pm

    Use -unused:keep switch to retain unused functions. This, naturally, will prevent minifier from removing really unused code.

    Use -rename switch to assign permanent names to functions that you call by name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running into a problem using the jQuery Uploadify plugin in my cakePHP application.
I'm running into difficulty when using the TableSorter jQuery plugin, if I have a
I am using this jQuery plugin in my app http://www.building58.com/examples/tabSlideOut.html It all works well
i have long running task that gets called using jquery ajax. i am using
I am using jquery selectable plugin and running it to a situation as follows.
I am running and using the zRSSFeed jQuery plugin (http://www.zazar.net/developers/zrssfeed/) to pull feed items
I'm using the jQuery Cycle plugin to cycle through some images on a webpage.
I'm using jquery plugin tablesorter and I'm stuck with the following situation: my grid
I am using jquery plugin jstree to build a tree. When I execute this
Using jQuery validation plugin - http://docs.jquery.com/Plugins/Validation Wanting to use the remote method on a

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.