Jquery accordion does not work when I put the script in script file on a master page, but it does when I put it directly on the page.

I have a page called Default.aspx which inherits from a master page called Main.master. In Main.master, I have a asp:ScriptManager and within the script manager, I put the jQuery 1.4 library, jquery 1.7.2 ui library, I also put a custom js file I created which for now just has the code: $("#accordion").accordion({ collapsible: true, autoHeight: false }); When I load default.aspx, it is loading all the javascript files, but the accordion div is not being rendered into an accordion. If I put the code above directly between script tags on default.aspx, the accordion renders, so I am assuming it has something to do with it not recognizing the accordion id, but correct me if I am wrong.

以上就是Jquery accordion does not work when I put the script in script file on a master page, but it does when I put it directly on the page.的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏