开发者

Advanced Wordpress php Help

I am trying to include this sliding out info panel that i created into my wordpress site. I have tried using in the page.php file and the index.php file and have had no success. My site is a single page site and i believe i am having issues figuring this out beca开发者_运维技巧use of that. The include file is actually a whole html page so im getting stumped on how to go about this. Please Help......Sugestions


You don't need the whole html page. You just need this part (the button and the div). Put it in the page.php somewhere in the body tag, doesn't really matter where since it's positioned in the css:

<div class="panel"> 
    <h3>Email Subscription</h3> 
    <p>Enter your email address below to receive promotional products and exclussive Elite givaways!</p> 

  <p><input name="" type="text" value="enter your email" /><input name="" type="submit" /></p> 
</div> 
<a class="trigger" href="#">infos</a> 

Then make sure you have this javacript in the head tag in header.php:

<script type="text/javascript"> 
$(document).ready(function(){
    $(".trigger").click(function(){
        $(".panel").toggle("fast");
        $(this).toggleClass("active");
        return false;
    });
});
</script> 

Then also obviously need the jquery js in the head tag in header.php:

<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script> 

And the css for the trigger and box in the head tag in header.php:

<link rel="stylesheet" href="style2.css" type="text/css" media="screen" /> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜