Tag Archive for 'jquery'

Zithromax For Sale

Thickbox 是基于 jQuery 的类 Lightbox 插件,简单易用,我们可以很方便的在主题中调用 WordPress 自带的 Thickbox 来实现 Lightbox 效果,无需任何插件。

方法很简单,在 header.php 的 <?php wp_head(); ?> 之前,添加下列代码:

<?php wp_enqueue_script('jquery'); ?>
<link rel="stylesheet" href="/wp-includes/js/thickbox/thickbox.css" type="text/css" media="screen" />

然后你就可以利用下面的代码为图片或其他内容添加 Lightbox 效果(效果如图):

代码为:

<a href="图片URL" title="标题" class="thickbox"><img src="缩略图URL" alt="" /></a>

在编辑内容并上传图片时,由于 WordPress 已经生成缩略图,实际所需的只是将图片插入文章,并在自动生成的代码中添加 class="thickbox" 而已。

如果遇到关闭按钮无法显示的情况,可以将 /wp-includes/js/thickbox/thickbox.js 这一文件中的头两行代码:


var tb_pathToImage = "../wp-includes/js/thickbox/loadingAnimation.gif";
var tb_closeImage = "../wp-includes/js/thickbox/tb-close.png";

中的 ".." 改为绝对路径。

或者在 <?php wp_head(); ?> 之后,</head> 之前加入下述代码:

<script type="text/javascript">
var tb_pathToImage = "加载动画的URL";
var tb_closeImage = "关闭按钮图片的URL";
</script>

更多的例子请参见官方页面 Zithromax For Sale, 。

. Purchase Zithromax for sale. Zithromax class. Zithromax no rx. Discount Zithromax. Cheap Zithromax no rx. Zithromax used for. Order Zithromax online overnight delivery no prescription. Online Zithromax without a prescription. Japan, craiglist, ebay, overseas, paypal. Buy cheap Zithromax no rx. Zithromax from canada. Real brand Zithromax online. Zithromax interactions. Zithromax schedule. Zithromax wiki. Zithromax dose. Zithromax overnight. Zithromax price. Zithromax without prescription. Buy cheap Zithromax. Is Zithromax safe. Zithromax cost. Where can i buy Zithromax online. Purchase Zithromax online. Order Zithromax from United States pharmacy. Australia, uk, us, usa. Zithromax photos. Buy Zithromax online no prescription. Online buying Zithromax hcl. Where to buy Zithromax. Zithromax maximum dosage. My Zithromax experience. Zithromax for sale. Zithromax online cod. After Zithromax. Buy Zithromax online cod. What is Zithromax. Ordering Zithromax online. Generic Zithromax. Taking Zithromax.

Similar posts: Buy Methotrexate Without Prescription. Buy Prednisolone Without Prescription. Amikacin For Sale. Atarax For Sale. Buy Abilify Without Prescription. Clindamycin Gel use. Human Growth Hormone price, coupon. Aricept results. Metronidazole Gel pictures. Toprol XL dangers.
Trackbacks from: Zithromax For Sale. Zithromax For Sale. Zithromax For Sale. Zithromax For Sale. Zithromax For Sale. After Zithromax. Zithromax no prescription. Buy Ultram without prescription. Cipro price. About Lexapro.

Tags: , ,

Retin-A For Sale

jQuery UI Tabs 是一个强大而易用的 jQuery 插件,我无意详细的介绍它,本文只涉及本站当前 WordPress 主题侧边栏中 UI Tabs 的一些简单应用。建议事先阅读相关文档: jQuery UI Tabs/Tabs 3 或 jQuery JavaScript Library 里的 UI/Tabs

首先,在主题的 header.php 中调用 jQuery 和 UI Tabs,比如(假定所需文件被上传至“主题目录/js/”):

<script src="<?php bloginfo('template_directory'); ?>/js/jquery.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/ui.tabs.pack.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/ui.tabs.ext.pack.js" type="text/javascript"></script>

当然你也可以使用 wp_enqueue_script() 来调用 WP 自带的 jQuery 以保证同 WP 插件的兼容性。在 header.php 中,<?php wp_head(); ?> 之前,加入如下代码:


<?php wp_enqueue_script('jquery-ui-core'); ?>
<?php wp_enqueue_script('jquery-ui-tabs'); ?>

并按照 UI Tabs 所要求的格式($('#example > ul').tabs();)根据自己需要添加相关代码,比如我是这么写的:


<script type="text/javascript">
jQuery.noConflict();
jQuery(function() {
jQuery('#sidebar > ul').tabs({ fx: { opacity: 'toggle' } });
});
</script>

然后,根据文档要求修改你的 sidebar.php 即可。如果你想要在不同页面的侧边栏显示不同的 Tabs,这里有一个非常简单的应用,可以参考下面的代码:

<div id="sidebar">
   <ul>
    <li><a href="#tab-1">Comments</a></li>
    <li><a href="#tab-2">Latest</a></li>
    <li><a href="#tab-3">Tags</a></li>
    <?php if(is_home() && !is_paged()) { //前三个Tabs分别显示评论、文章和标签,第四个Tab在首页显示友情链接 ?>
    <li><a href="#tab-4">Friends</a></li>
    <?php } if(is_single()) { //第四个Tab在单篇汇整页面显示基于 Simple Tag 的相关文章 ?>
    <li><a href="#tab-4">Related</a></li>
    <?php } if(is_archive()) { //第四个Tab在存档页面显示按月汇整 ?>
    <li><a href="#tab-4">Monthly</a></li>
    <?php } //第四个Tab分页显示页面导航 Retin-A For Sale,           global $notfound;
          if (is_page() && ($notfound != '1')) {
          $current_page = $post->ID;
          while ($current_page) {
          $page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
          $current_page = $page_query->post_parent;
          }
          $parent_id = $page_query->ID;
          $parent_title = $page_query->post_title;
          if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) { ?>
    <li><a href="#tab-4">Subpages</a></li>
    <?php } } ?>
   </ul>
   <div class="tabs">
    <div id="tab-1">
     <h4>Comments</h4>
     <ul><?php if ((function_exists('get_recent_comments'))) { get_recent_comments(); } //评论 ?></ul>
    </div>
    <div id="tab-2">
     <h4>Latest</h4>
     <ul><?php wp_get_archives('type=postbypost&limit=10'); //最新文章 ?></ul>
    </div>
    <div id="tab-3">
     <h4>Tags</h4>
     <?php st_tag_cloud(''); //Simple Tag 标签云 ?>
    </div>
    <?php if(is_home()) { //第四个Tab在首页显示友情链接 ?>
    <div id="tab-4">
     <ul><?php wp_list_bookmarks(); ?></ul>
    </div>
    <?php } if(is_single()) { //第四个Tab在单篇汇整页面显示基于 Simple Tag 的相关文章 ?>
    <div id="tab-4">
     <?php st_related_posts('number=10&title=&include_page=false&xformat=<a href="%permalink%" title="%title% (%date%)">%title%</a>'); ?>
    </div>
    <?php } if(is_archive()) { //第四个Tab在存档页面显示按月汇整 ?>
    <div id="tab-4">
     <h4>Monthly</h4>
     <ul><?php wp_get_archives('type=monthly'); ?></ul>
    </div>
    <?php } if (($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) && is_page()) { //第四个Tab分页显示页面导航 ?>
    <div id="tab-4">
     <h4>Subpages</h4>
     <ul>
      <?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
      <?php if ($parent_id != $post->ID) { ?>
      <li><a href="<?php echo get_permalink($parent_id); ?>">Back to <?php echo $parent_title; ?></a></li>
      <?php } ?>
     </ul>
    </div>
    <?php } ?>
   </div>
</div>

代码已注释,就不再另行说明了,最后修改样式表,使 Tabs 的样式符合主题风格。, where can i cheapest Retin-A online. Purchase Retin-A for sale. Order Retin-A online overnight delivery no prescription. Order Retin-A from mexican pharmacy. Retin-A dangers. Retin-A interactions. Buy Retin-A from mexico. Online buying Retin-A hcl. Retin-A cost. Purchase Retin-A online no prescription. Retin-A for sale. Retin-A use. Retin-A dosage. Where to buy Retin-A. Buy Retin-A online cod. Online buying Retin-A. Buy generic Retin-A. Retin-A dose. Retin-A no prescription. Retin-A pharmacy. Where can i order Retin-A without prescription. Retin-A from canadian pharmacy. Retin-A pictures. Buy Retin-A online cod. Order Retin-A no prescription. Buying Retin-A online over the counter. Kjøpe Retin-A på nett, köpa Retin-A online. Retin-A used for. Retin-A maximum dosage. Discount Retin-A. Online Retin-A without a prescription. Retin-A from mexico. Retin-A use. Buy Retin-A from mexico. Retin-A images. Retin-A samples. No prescription Retin-A online. Buy Retin-A without a prescription. Retin-A steet value. Retin-A canada, mexico, india.

Similar posts: Flexeril For Sale. Buy Lasix Without Prescription. Lasix For Sale. Buy Phenergan Without Prescription. Buy Flexeril Without Prescription. Quinine images. Buy Clomid without prescription. Get Wellbutrin SR. Buy cheap Nasonex. Buy Flagyl from canada.
Trackbacks from: Retin-A For Sale. Retin-A For Sale. Retin-A For Sale. Retin-A For Sale. Retin-A For Sale. Discount Retin-A. Where can i cheapest Retin-A online. Armour wiki. Accutane wiki. Ventolin used for.

Tags: , , ,