Select tab bar by class instead of id

This commit is contained in:
Takumi
2013-07-27 14:13:21 +10:00
parent 4425cee4df
commit 7c9db97814
2 changed files with 2 additions and 2 deletions

View File

@@ -117,7 +117,7 @@ if ( ! function_exists( 'sp_post_checklist' ) ) {
global $post_id;
$obj = get_post_type_object( $meta );
?>
<div id="<?php echo $meta; ?>-all" class="wp-tab-panel" style="display: <?php echo $display; ?>;">
<div id="<?php echo $meta; ?>-all" class="wp-tab-panel sp-tab-panel" style="display: <?php echo $display; ?>;">
<input type="hidden" value="0" name="sportspress[<?php echo $meta; ?>]" />
<ul class="categorychecklist form-no-clear">
<?php

View File

@@ -1,5 +1,5 @@
jQuery(document).ready(function($){
$('#sportspress-tabs a').click(function() {
$('.sp-tab-panel').siblings('.wp-tab-bar').find('a').click(function() {
$(this).closest('li').removeClass('wp-tab').addClass('wp-tab-active').siblings().removeClass('wp-tab-active').addClass('wp-tab').closest('.wp-tab-bar').siblings($(this).attr('href')).show().siblings('.wp-tab-panel').hide();
return false;
});