HTML:
<div class="slider">
<div class="button-wrap">
<div class="content-wrap" id="button-1">one contents</div>
<div class="controller">
<div><a mce_href="#buttton-1" href="#buttton-1">button one </a>
</div>
</div>
</div>
</div>
jQuery:
$('#button-1').closest('.slider').css({'left':'-1200px'});
这是行不通的。
到目前为止我有这个脚本
<script>
jQuery(function($){
$('#button-1').closest('.slider').css({'background':'#f00 !important'});
$('#button-2').closest('.slider').css({'left':'-1200px !important'});
}
</script>