I have a problem with rebinding jqModal when i load main content via ajax
i really run out of ideas jqModal is last version jquery the same
i whant to use the jqModal to load product description and the produtas are 
loaded with ajax.

$(document).ready(
    function()
    {

    var addClickHandlers = function() {

    $('#ex1a').jqm({
        ajax: '@href',
        //ajax: 'web/pagini/prod.php',
        trigger: 'a.jqmodalfer',
        overlayColor: '#fff',
        overlay: 65,
        modal:true,
          onShow: open,
          onHide: close});
    };

    addClickHandlers();

        $('#meniucontent a.linc')
            .bind(
                'click',
                function() {
                var href, a, afost, campt;
                afost=false;
                a = this.href.split("=");
                href = a[1];
                campt=this.firstChild.data;
                $('#capmeniuprod').empty();
                $('#capmeniuprod').append(campt);    
                $('#layerprod').empty();
                $('#layerprod').append("<div 
style=\"position:absolute;margin-top:10px;margin-left:10px;\"><img 
src=\"imagini/busy.gif\" alt=\"loading\" /></div>");
                  if ($('#contsus').is(':visible')) {
                    
$('#contsus').slideUp(1500,function(){functiebagnor(href,"695px");});
                    afost=true;
                  }
                if (afost==false)
                {
                    functiebagnor(href,"695px");
                }

                return false;
        });

var functiebagnor = function(lincu, marime) {
                $('#layerprod').css("min-height",marime);
                $('#layerprod').empty();
                
$("#layerprod").load("web/pagini/produsea.php",{catid:lincu},function(){addClickHandlers();});
}

    });

      var open= function(hash) {hash.w.slideDown("fast", function(){
                hash.w.fadeTo(680,1);
                    });
                }      

      var close=function(hash) {
                hash.w.fadeTo(680,0.15,function(){ 
                hash.w.slideUp("normal",function() {
                hash.o.remove();
                        }); 
                    });
                }








 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to