+91 9422537131 | info@adhvik.online |
Sports Sagaa | Simplicity Global Services Register
02 Dec 19 by Administrator 75

Events

Events are provided by Owl Carousel in strategic code locations. This gives you the ability to listen for any changes and perform your own actions.

var owl = $('.owl-carousel');
owl.owlCarousel();
// Listen to owl events:
owl.on('changed.owl.carousel', function(event) {
    ...
})

You could also trigger events by yourself to control Owl Carousel:

var owl = $('.owl-carousel');
owl.owlCarousel();
// Go to the next item
$('.customNextBtn').click(function() {
    owl.trigger('next.owl.carousel');
})
// Go to the previous item
$('.customPrevBtn').click(function() {
    // With optional speed parameter
    // Parameters has to be in square bracket '[]'
    owl.trigger('prev.owl.carousel', [300]);
})

Callbacks

Instead of attaching an event handler you can also just add a callback to the options of Owl Carousel.

$('.owl-carousel').owlCarousel({
    onDragged: callback
});
function callback(event) {
    ...
}

Data

Each event passes very useful information within the event object . Based on the example above:

function callback(event) {
    // Provided by the core
    var element   = event.target;         // DOM element, in this example .owl-carousel
    var name      = event.type;           // Name of the event, in this example dragged
    var namespace = event.namespace;      // Namespace of the event, in this example owl.carousel
    var items     = event.item.count;     // Number of items
    var item      = event.item.index;     // Position of the current item
    // Provided by the navigation plugin
    var pages     = event.page.count;     // Number of pages
    var page      = event.page.index;     // Position of the current page
    var size      = event.page.size;      // Number of items per page
}

Type: attachable
Callback: onInitialize

When the plugin initializes.


Type: attachable
Callback: onInitialized

When the plugin has initialized.


Type: attachable
Callback: onResize

When the plugin gets resized.


Type: attachable
Callback: onResized

When the plugin has resized.


Type: attachable, cancelable, triggerable
Callback: onRefresh
Parameter: [event, speed]

When the internal state of the plugin needs update.


Type: attachable
Callback: onRefreshed

When the internal state of the plugin has updated.


Type: attachable
Callback: onDrag

When the dragging of an item is started.


Type: attachable
Callback: onDragged

When the dragging of an item has finished.


Type: attachable
Callback: onTranslate

When the translation of the stage starts.


Type: attachable
Callback: onTranslated

When the translation of the stage has finished.


Type: attachable
Callback: onChange
Parameter: property

When a property is going to change its value.


Type: attachable
Callback: onChanged
Parameter: property

When a property has changed its value.


Type: triggerable
Parameter: [speed]

Goes to next item.


Type: triggerable
Parameter: [speed]

Goes to previous item.


Type: triggerable
Parameter: [position, speed]

Goes to position.


Type: triggerable

Destroys carousel.


Type: triggerable
Parameter: data

Removes current content and add a new one passed in the parameter.


Type: triggerable
Parameter: [data, position]

Adds a new item on a given position.


Type: triggerable
Parameter: position

Removes an item from a given position.


Lazy

load.owl.lazy

Type: attachable
Callback: onLoadLazy

When lazy image loads.


loaded.owl.lazy

Type: attachable
Callback: onLoadedLazy

When lazy image has loaded.


Autoplay

play.owl.autoplay

Type: triggerable
Parameter: [timeout, speed]

Runs autoplay.


stop.owl.autoplay

Type: triggerable

Stops autoplay.


Video

stop.owl.video

Type: attachable
Callback: onStopVideo

When video has unloaded.


play.owl.video

Type: attachable
Callback: onPlayVideo

When video has loaded.

Tags:
Share Post
24 Aug 19 by Administrator 205
There are few web safe fonts which can be widely used in websites. Arial Helvetica Times New Roman Times Courier New Courier Verdana Georgia Palatino Garamond Bookman Comic Sans MS Treb
02 Oct 19 by Administrator 138
insert into posts select companyid, ptypeid, postid, langid, lpostid1,lpostid2,plink, forid, ppostid,ptitle,pshort,pfull,postedby,metakey,metadescription,metadata,sortorder,postdate,postrate,totalview
by 247
For sanjeewan alumni there are reference sites are https://www.iitbombay.org/ https://iitmaa.org/
23 Sep 19 by Administrator 143
Concat column names in following way we can specify any column template for data field there must be = in the beginning and == in the end { data: '=FName== =MName== =LName', title: 'Full Name' },
23 Sep 19 by 77
https://developers.facebook.com/docs/facebook-login/web && <script>window.fbAsyncInit = function() {FB.init({appId : '1208343976013791',cookie : true,xfbml : true,version : 'v4.0'});F
12570

We are simpliy creative. We create stunning identities for our clients that people recommand.

Login
×
Remember me
Forgot password?