Robert Vlaicu wrote:
> 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.
>
Robert,
You'll want to use the $.jqmAddTrigger() methods on the new triggers.
If you provided the ajax return, I would have a better idea of what you
are trying to do... but I'll take a stab at it anyway. Here is the
modified code;
$(document).ready(
function()
{
// add jqModal functionality to #ex1a
$('#ex1a').jqm({
ajax: '@href',
//ajax: 'web/pagini/prod.php',
trigger: 'a.jqmodalfer',
overlayColor: '#fff', // * DEPRICATED *
overlay: 65,
modal:true,
onShow: open,
onHide: close});
$('#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(){
var newTriggers = $('a.jqmodalfer',this);
$('#ex1a').jqmAddTrigger(newTriggers);
});
}
});
......
Hope this helps,
~ Brice
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/