English 中文(简体)
气箱链路在麻ja素含量内的 t
原标题:fancybox links doesn t work on inside ajax content

我需要更新有关我网站的一节,经常使用Ajax、jquery和php。

当第1页的负荷时,该页的文字功能显示该节的内容。 然后用json I检查最新情况,如果结果有,则要求发挥同样的功能。

如今,在麻省部分内有类似链接。

<a href="news.php?id" class="ajaxpopup">title</a>

to call fancybox but instead of opening a popup, it opens the page directly. If the link to call fancybox is not inside an ajax content it displays properly. I know that there are some people with the same problem but the answers are for divs with specific id. How can I set it globally. I mean to work on links with class="ajaxpopup"?

这是我所称的内容的职能。

$(document).ready(function() {
  $(".ajaxpopup").fancybox({
     overlayColor       :  #000000 , 
     centerOnScroll     : true,
     transitionIn       :  none ,
     transitionOut      :  none ,
     modal              : true
  }); 
});

function update(page,value)    {
  var data =  id= +value;
  $.ajax({
    url: page,
    type: "POST",       
    data: data,     
    cache: false,
    success: function (html) {  
      $( #updates ).html(html);   
      $( #updates ).fadeIn(200);      
    }       
  });
}

之后是零件

最佳回答

在装满动态内容后,将轮胎箱再次捆起来。

 div.load("myserverpage.aspx?mode=popularmodels", { symbol: $("#txtSymbol").val() }, function() {
                $(this).fadeIn(100);

                $(".ajaxpopup").fancybox({
                     scrolling :  no ,
                     titleShow : true,
                     titlePosition :  over ,
                     onClosed : function () {
                        $("#login_error").hide();
                    }
                });
            });
问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签