I have been scratching my head for 3 hours trying to get jQueryUI tabs to work in my custom module that I am building using Chris Hammond's Module Template. I'm wondering if anyone has a simple example because the documentation doesn't seem to make sense to me. I've also tried using DnnTabs() in place of tabs().
Here is my code for MyModule.ascx:
<dnn:DnnJsInclude ID="DnnJsInclude" runat="server" FilePath="~/DesktopModules/MyModule/module.js" />
<div id="tabz">
<ul>
<li><a href="#tabs-1">Page 1</a></li>
<li><a href="#tabs-2">Page 2</a></li>
</ul>
<div id="tabs-1">
<div class="form">This is Tab 1</div>
</div>
<div id="tabs-2">
This is Tab 2
</div>
</div>
Code in module.js:
(function ($) {
$("#tabz").tabs();
})(jQuery);
I also tried adding this to my myModule.ascx.cs:
protected void Page_Init(object sender, EventArgs e)
{
Framework.jQuery.RequestRegistration();
if (Framework.AJAX.IsInstalled()) {
Framework.AJAX.RegisterScriptManager();
}
}
If I put an alert in the jQuery code it executes with or without this Page_Init(). Thanks for your help!