| Page 1 of 1 | [ 2 posts ] |
|
Hi,
I added a button on carousel navigation bar (YUI 2.9.0). That button is not visible in any other browser but Chrome. I even tried to wrap a span that includes button in to an outer DIV but no luck!!! Appreciate any help I get to resolve this problem. Here is a piece of code: function init_carousel() { var carousel = new YAHOO.widget.Carousel("carouselcontainer"); carousel.set("numVisible", 1); carousel.set("animation", { speed: 0.01 }); carousel.set("autoPlayInterval", 2000); carousel.set("isCircular", true); carousel.render(); carousel.show(); carousel.startAutoPlay(); } YAHOO.util.Event.onDOMReady(init_carousel); YAHOO.util.Event.onContentReady("carouselcontainer", function() { var carNavs = carouselcontainer.getElementsByClassName('yui-carousel-nav'); var carNav = carNavs[0]; var commentButton = document.createElement('span'); commentButton.className = 'yui-carousel-button yui-carousel-comment-button'; commentButton.innerHTML = '<button name="Comment" type="button">Comment</button>'; commentButton.style.cssFloat = 'left'; commentButton.addEventListener('click', Oncomment, false); carNav.appendChild(commentButton); }); |
|
Have you tried adding the markup for the button to the HTML source of your document, and targeting it that way, instead of appending it in JavaScript? What does firebug show for the styles in Firefox? It might help if you provided the HTML structure of your carousel from your document, as well. it's hard to debug without being able to see all the pieces.
|
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group