views:

18

answers:

0

I have a simple database bound accordion control that works well. I also have other colorbox modal triggers on the page that work. However, when I include a modal trigger in the accordion header, the link redirects the page rather than trigger the modal box. How can I get the modal to trigger properly?

<link href="colorbox.css" rel="stylesheet" type="text/css" />
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.colorbox-min.js" type="text/javascript"></script>
<script type="text/javascript">
    function pageLoad(sender, args) {
     $(".modaleditbox").colorbox({ width: "50%", height: "50%", iframe: true });
    }
</script>
<asp:Accordion runat="server" ID="Accordion1"
HeaderCssClass="accountheader"
HeaderSelectedCssClass="accountheaderselected"
ContentCssClass="accountcontent"
SelectedIndex="-1"
RequireOpenedPane="false"
FadeTransitions="false"
SuppressHeaderPostbacks="true"
AutoSize="None">
    <HeaderTemplate>
        //Name
        <a href="URL" class="modaleditbox">Pop Modal Window</a>
    </HeaderTemplate>
    <ContentTemplate>
        //Content
    </ContentTemplate>
</asp:Accordion>