DotNetNuke Jquery不工作在模块 [英] DotNetNuke Jquery doesnt work in module

查看:129
本文介绍了DotNetNuke Jquery不工作在模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JQuery文件,在正常的网页上工作正常,但不能在DNN内部工作。



DNN指向最新版本的JQuery主机设置
我有一个叫做news的容器(news.css,news.ascx)和一个叫做newsdata.ascx的容器里面的模块。



我有这个代码在模块中启动JQuery文件:

 < script type =text / javascript> 
$(function(){
$(#controller)。jFlow({
slides:#slides,
width:277px,
height:150px,
duration:250
});
});
< / script>

但没有任何反应。

感谢

解决方案

我猜想你遇到了一个问题,其中 $ 不是指 jQuery 。尝试将第一行改为 jQuery(function($){


I have a JQuery file that works fine on a normal webpage, but doesn't work inside of DNN.

DNN is pointing at the latest version of JQuery in the Host settings I have a container called news containing (news.css, news.ascx) and a module called newsdata.ascx inside of the container.

I have this code in the module to start launch the JQuery file:

<script type="text/javascript">
    $(function() {  
        $("#controller").jFlow({  
            slides: "#slides",  
            width: "277px",  
            height: "150px",  
            duration: 250  
        });  
    });  
</script>

But nothing happens. Am I placing the code in the correct locations?

Thanks

解决方案

I would guess that you've run into an issue where $ isn't referring to jQuery. Try changing the first line to jQuery(function ($) {

这篇关于DotNetNuke Jquery不工作在模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆