Cycle Plug-In: Pager Active CSS Class Not Working
I'm absolutely stumped here. I'm using the cycle plug-in with an existing nav bar (2 buttons). It functions correctly -- but for some reason -- I can't get the corresponding nav button to change CSS class and show as highlighted. Any ideas?
jQuery:
- $(document).ready(function() {
- $('#slideShow').cycle({
- fx: 'fade',
- activePagerClass: 'active',
- pager: '#featureNav',
- pagerAnchorBuilder: function(idx, slide) {
- return '#featureNav li:eq(' + idx + ') a';
- }
- });
- });
HTML:
- <div id="featureHome">
- <div id="slideShowContainer">
- <div id="slideShow">
- <img src="images/image.jpg" alt="" height="220" width="698" border="0" />
- <img src="images/image.jpg" alt="" height="220" width="698" border="0" />
- </div>
- </div>
- <ul id="featureNav">
- <li><a href="#" title="">Button 1</a></li>
- <li class="last"><a href="#" title="">Button 2</a></li>
- </ul>
- </div>
CSS:
- #featureNav {
- background-image: url("../images/feature_nav_back.png");
- background-repeat: no-repeat;
- list-style-type: none;
- margin: 0;
- padding: 0 0 4px 5px;
- position: absolute;
- z-index: 9998;
- top: 207px;
- left: 0;
- width: 709px;
- height: 43px
- }
- #featureNav li {
- float: left
- }
- #featureNav li a {
- color: #666;
- font-size: 14px;
- font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif;
- font-weight: bold;
- line-height: 14px;
- text-decoration: none;
- text-align: center;
- text-transform: uppercase;
- display: block;
- margin: 0 1px 0 0;
- padding: 20px 0 0;
- width: 354px;
- height: 24px
- }
- #featureNav li.last a {
- margin-right: 0
- }
- #featureNav li a:hover {
- color: #fff;
- background-image: url("../images/feature_btn_back_over.png");
- background-repeat: no-repeat
- }
- #featureNav li a.active {
- color: #fff;
- background-image: url("../images/feature_btn_back_over.png");
- background-repeat: no-repeat
- }