pjehan on "[Plugin: Owl Carousel] Shortcode options"

ساخت وبلاگ

Hello,

I will just quickly repost the latest review from Mk0:

Guys this plugin is great! I use it on all sites, it renders perfectly and scales on all devices. You can swipe it on tablets/phones too.

It also works perfectly for those of you creating sites that you want google to index correctly.

The only down side is that it seems the plugin author is no longer updating this release.

So here's a quick guide to integrating it in to your site.

To add the plugin to a page enter the shortcode
[owl-carousel category="minislider" autoPlay="true"]
The category is important here as that allows you to setup more than one slider per page, just group them by category.

Add more options to your shortcode from the list below like this:
[owl-carousel category="minislider" singleItem="true" items="1" autoPlay="true" navigation="false" pagination="false" slideSpeed="900" paginationSpeed="400"]

Other options for the shortcode are:

items 5 int This variable allows you to set the maximum amount of items displayed at a time with the widest browser width
itemsDesktop [1199,4] array This allows you to preset the number of slides visible with a particular browser width. The format is [x,y] whereby x=browser width and y=number of slides displayed. For example [1199,4] means that if(window<=1199){ show 4 slides per page} Alteatively use itemsDesktop: false to override these settings. Check my Custom Demo
itemsDesktopSmall [979,3] array As above.
itemsTablet [768,2] array As above.
itemsTabletSmall false array As above. Default value is disabled.
itemsMobile [479,1] array As above
itemsCustom false array This allow you to add custom variations of items depending from the width If this option is set, itemsDeskop, itemsDesktopSmall, itemsTablet, itemsMobile etc. are disabled For better preview, order the arrays by screen size, but it's not mandatory Don't forget to include the lowest available screen size, otherwise it will take the default one for screens lower than lowest available.
Example:
[[0, 2], [400, 4], [700, 6], [1000, 8], [1200, 10], [1600, 16]]
For more information about structure of the inteal arrays see itemsDesktop. Check my Custom Demo
singleItem false boolean Display only one item. See demo
itemsScaleUp false boolean Option to not stretch items when it is less than the supplied items. See demo
slideSpeed 200 int Slide speed in milliseconds
paginationSpeed 800 int Pagination speed in milliseconds
rewindSpeed 1000 int Rewind speed in milliseconds
autoPlay false int/boolean Change to any integrer for example autoPlay : 5000 to play every 5 seconds. If you set autoPlay: true default speed will be 5 seconds.
stopOnHover false boolean Stop autoplay on mouse hover
navigation false boolean Display "next" and "prev" buttons.
navigationText ["prev","next"] array You can cusomize your own text for navigation. To get empty buttons use navigationText : false. Also HTML can be used here
rewindNav true boolean Slide to first item. Use rewindSpeed to change animation speed.
scrollPerPage false boolean Scroll per page not per item. This affect next/prev buttons and mouse/touch dragging.
pagination true boolean Show pagination.
paginationNumbers false boolean Show numbers inside pagination buttons
responsive true boolean You can use Owl Carousel on desktop-only websites too! Just change that to "false" to disable resposive capabilities
responsiveRefreshRate 200 int Check window width changes every 200ms for responsive actions
responsiveBaseWidth window jQuery selector Owl Carousel check window for browser width changes. You can use any other jQuery element to check width changes for example ".owl-demo". Owl will change only if ".owl-demo" get new width.
baseClass "owl-carousel" string Automaticly added class for base CSS styles. Best not to change it if you don't need to.
theme "owl-theme" string Default Owl CSS styles for navigation and buttons. Change it to match your own theme
lazyLoad false boolean Delays loading of images. Images outside of viewport won't be loaded before user scrolls to them. Great for mobile devices to speed up page loadings. IMG need special markup class="lazyOwl" and data-src="your img path". See example.
lazyFollow true boolean When pagination used, it skips loading the images from pages that got skipped. It only loads the images that get displayed in viewport. If set to false, all images get loaded when pagination used. It is a sub setting of the lazy load function.
lazyEffect "fade" boolean / string Default is fadeIn on 400ms speed. Use false to remove that effect.
autoHeight false boolean Add height to owl-wrapper-outer so you can use diffrent heights on slides. Use it only for one item per page setting.
jsonPath false string Allows you to load directly from a jSon file. The JSON structure you use needs to match the owl JSON structure used here. To use custom JSON structure see jsonSuccess option.
jsonSuccess false function Success callback for $.getJSON build in into carousel. See demo with custom JSON structure here.
dragBeforeAnimFinish true boolean Ignore whether a transition is done or not (only dragging).
mouseDrag true boolean Tu off/on mouse events.
touchDrag true boolean Tu off/on touch events.
addClassActive false boolean Add "active" classes on visible items. Works with any numbers of items on screen.
transitionStyle false string Add CSS3 transition style. Works only with one item on screen. See Demo

The authors website is no longer loading, so use the wayback archive to view an old version here: http://web.archive.org/web/20150206061228/http://owlgraphic.com/owlcarousel/index.html

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 256 تاريخ : جمعه 21 خرداد 1395 ساعت: 16:15