2014-06-23 26 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 ...这里它会工作...