Jquery Globalization

ぐ巨炮叔叔 提交于 2019-12-12 02:32:59

问题


I am using MVC4.0 and Jquery globalization plugin from Microsift "http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip" which i got from "http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx". This plugin i am using for amount formating e.g

var result= $.format(1000, "c", "en-GB");

This plugin is working fine when i am giving reference to "glob.js" and "glob.all.js" files directly on page(View), but when i am giving reference to same files on master page its crashing in Jquery.validate.js file.

    $.each(params, function( i, n ) {
    source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() {
        return n;
    });
});

I am getting error as replace function is undefined. Please help me.

And, Where is the link for latest version of Microsoft Jquery Globalization plugin?

Thanks in Advance


回答1:


The jQuery globalization plugin from Microsoft has been accepted as a offical jQuery plugin a couple of years ago (http://blog.jquery.com/2010/10/04/new-official-jquery-plugins-provide-templating-data-linking-and-globalization/)

You can find the latest version here along with examples: https://github.com/jquery/globalize.

A more complete example of your code is needed to see why you get the error you get. Try to show it on http://jsfiddle.net/ maybee?



来源:https://stackoverflow.com/questions/17962644/jquery-globalization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!