2014-06-23 69 views
0

PHP從的fancybox外部鏈接不工作

$profile_url = $vars['url'].'pg/profile/'.$user->username; 

HTML

<div style='float:left;margin-top:8px;margin-right:-3px;'><a href='#edit_profile' class='apply_alert' id='{$job_id}'><span class='apply_button'></span></a></div> 

<div id="edit_profile"> 
    <div style="background:#fff;height:100%;border:1px solid #1583D0;"> 

     <div style="padding:20px 10px 10px;"> 
      <a style="text-decoration:none;" href="<?php echo $profile_url?>" class="profile_btn button-blue">Edit profile</a> 
     </div> 

    </div> 
</div> 

SCRIPT

$(".apply_alert").fancybox({ 
     'titlePosition' : 'inside', 
     'transitionIn' : 'none', 
     'transitionOut' : 'none', 
     'frameWidth' : 420,   // set the width 
     'frameHeight' : 175 
     }); 

我有一個的fancybox。裏面,我添加一個按鈕的鏈接。

我面臨的問題是我指的是在fancybox錨標記中的網址無法正常工作。當我點擊按鈕時,彈出窗口正在消失。如何解決這個問題。

回答

0

好吧,我找到了解決辦法只是在你的fancybox腳本設置hideOnContentClickfalse ...這裏它會工作...