Amjad Masad![]()
Not many tools and widgets on the web support the "right to left" direction even-though many languages are written that way which include Arabic, Persian, Urdu, Hebew and many more..
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script type="text/javascript"
src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"
charset="utf-8">
</script>
<meta charset=utf-8 />
<title>Carousel RTL</title>
<style>
.yui3-carousel-content li { width: 50px; }
body {direction: rtl;}
</style>
</head>
<body class="yui3-skin-sam">
<div id="container" class="yui3-carousel-loading">
<ol>
<li>واحد</li>
<li>اثنان</li>
<li>ثلاثة</li>
<li>أربعة</li>
<li>خمسة</li>
</ol>
</div>
<script>
YUI({
// latest gallery build
gallery: 'gallery-2011.06.01-20-18'
// include the carousel module, and the rtl plugin
}).use("gallery-carousel","gallery-carousel-rtl", function(Y) {
// when the DOM is ready for manipulation load the carousel
Y.on("contentready", function() {
// instantiate the orginal carousel
var carousel = new Y.Carousel({
boundingBox: "#container",
contentBox: "#container > ol",
isCircular: true
});
// plugin the RTL plugin
carousel.plug(Y.CarouselRTLPlugin, {
// specify animation options
animation: {
speed: 0.5,
effect: Y.Easing.backIn
}
});
// finally render the carousel
carousel.render();
}, "#container");
});
</script>
</body>
</html>No forum posts for this module.
© 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