开发者

Using MVCt4 inside Javascript

I have recently become a T4MVC fanatic and now I seem incapable of using visual strings in my MVC3 projects. I am currently trying to use an T4MVC link to a script file inside a JavaScript function but it appears that I'm either doing it wrong or it's not possible. The code follows. Any help would be appreciated.

<script type="text/javascript">
$(function () {
    if (!Modernizr.inputtypes.range) 开发者_开发技巧{
        $.getScript(@Links.Scripts.modernizr_1_7_min_js, function(){
            $("input[type='range']").range();
        });
    }
});
</script>

EDIT:

Sorry, there is no issue with T4MVC in JavaScript. Looking at the page source, the link text is generated properly.


Sorry. This ended up being a non-issue. There is no issue with using T4MVC in Javascript. I guess I was thrown off because VS does not provide intellisence for T4MVC while editing JS. Thanks for following up David.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜