How to rebind the carousels on the content aspx after a couple of modalpops on the master page?
My carousels that are added by the index_new.aspx.cs works fine until the master's page code-behind issues a couple of modal-popups. When the master's code-behind hides the last modal-popups the jQuery's carousels, on the content page are in their raw ul & li. I'm using jquery, jquery-1.4.2.min.js, on the index_new.aspx but none on the master page.
Thank you in advance for your assistance.
Here's my code for the Master and the index_new:
- <body class="bodyBG" onunload="HandleClose();" onload="load();">
<script type="text/javascript">
</script>
<form id="form1" runat="server" defaultfocus="search_TB" defaultbutton="search_Btn">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" AsyncPostBackTimeout="1200">
</asp:ScriptManager>
<div id="fullPage">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="div_menu" class="menu" runat="server">
<asp:PlaceHolder ID="PlaceHolder_navigation" runat="server"></asp:PlaceHolder>
</div>
<div id="div_add_favorites" runat="server">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Panel ID="pnl_add_favorites" runat="server" CssClass="modalpopup" BorderColor="ActiveBorder"
BorderStyle="Solid" BorderWidth="3px">
<table width="400px">
<tr>
</tr>
</table>
<asp:HiddenField ID="HiddenTarget_favorite" runat="server" />
</asp:Panel>
<cc1:ModalPopupExtender ID="mpe_add_favorites" runat="server" BackgroundCssClass="modalBackground"
TargetControlID="HiddenTarget_favorite" PopupControlID="pnl_add_favorites" OnOkScript="btn_Add_Favorite_Click">
</cc1:ModalPopupExtender>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div> </form>
<!-- The following line INCLUDES contents of file. This allows updating many pages with same content -->
</body>
here my index_new.aspx:
- <%@ Page Language="C#" MasterPageFile="~/My_web_page_MasterPage_New.master" AutoEventWireup="true" CodeFile="index_new.aspx.cs" Inherits="index_new" Title="My web page" CodeFileBaseClass="BasePage" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="assets/tabs.css" rel="stylesheet" type="text/css" />
<script src="Scripts/carousel/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="Scripts/qTip/jquery.qtip-1.0.min.js" type="text/javascript"></script>
<script src="Scripts/carousel/jquery.jcarousel.min.js" type="text/javascript"></script>
<link href="Scripts/carousel/skins/tango/homepage_carousel_skin.css" rel="stylesheet" type="text/css" />
<link href="storyboard.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.jcarousel-skin-tango .jcarousel-container-horizontal {
width: 800px;
margin-left:18px;
text-align:center;
}
.jcarousel-skin-tango .jcarousel-clip-horizontal {
width: 800px;
}
</style>
<script type="text/javascript">
jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) {
if ((t /= d) < (1 / 2.75)) {
return c * (7.5625 * t * t) + b;
} else if (t < (2 / 2.75)) {
return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
} else if (t < (2.5 / 2.75)) {
return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
} else {
return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
}
};
jQuery(document).ready(function() {
jQuery('.first-and-second-carousel').jcarousel({
visible: 4,
scroll: 5,
auto: 0,
itemFallbackDimension: 800
});
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="wrapper" id="mainContent" style="width: 958px;">
<asp:UpdatePanel ID="updatePanel_3" runat="server">
<ContentTemplate>
<div runat="server" id="div_updatepanel5">
<asp:UpdatePanel ID="UpdatePanel5" runat="server">
<ContentTemplate>
<%-- Second thru .. Rows for the Carousels --%>
<div style="background-position: #FFFFFF; background: #FFFFFF; width: 100%; margin: 0px 0 0px 0;">
<div id="claimform">
<asp:PlaceHolder ID="PlaceHolder_Carousels" runat="server"></asp:PlaceHolder>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<
</div>
</asp:Content>