【发布时间】:2011-03-21 17:38:54
【问题描述】:
我第一次在 Dotnetnuke 中尝试 jquery,但它不起作用。我的 ascx 文件看起来像
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="DesktopModules.demo.WebUserControl" %>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery("#featured > ul").tabs({ fx: { opacity: "toggle"} }).tabs("rotate", 7500, true);
});
</script>
我的代码文件看起来像:
using System;
using System.Web.UI;
using DotNetNuke.Entities.Modules;
namespace DesktopModules.demo
{
public partial class WebUserControl : PortalModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!Page.IsPostBack)
{
DotNetNuke.Framework.jQuery.RequestRegistration();
}
}
catch (Exception exc)
{
DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, exc);
}
}
}
}
在 IE 中我不断收到错误
Microsoft JScript 运行时错误:对象在 IE 中不支持此属性或方法
上线
jQuery("#featured > ul").tabs({ fx: { opacity: "toggle"} }).tabs("rotate", 7500, true);
请帮忙解决这个错误,不知道还能尝试什么。
【问题讨论】:
-
欢迎来到 StackOverflow!当您提出问题时,右侧有一个方便的如何格式化框。值得一读,就像问题区域上方 [?] 中的the page linked 一样。 (这次我已经为你格式化了。)
标签: jquery dotnetnuke