scanjko of Lab UK
2/24/2015 - 12:35 PM

https://github.com/finalclap/iframeTracker-jquery

On this link: https://github.com/finalclap/iframeTracker-jquery

How to use?
You need added library to header in your project before jquery library. And you can use this code for trigger event.
For detail please see this link: https://github.com/finalclap/iframeTracker-jquery


jQuery(document).ready(function($){
    $('.iframe_wrap iframe').iframeTracker({
        blurCallback: function(){
            // Do something when iframe is clicked (like firing an XHR request)
            // You can know which iframe element is clicked via this._overId
        },
        overCallback: function(element){
            this._overId = $(element).parents('.iframe_wrap').attr('id'); // Saving the iframe wrapper id
        },
        outCallback: function(element){
            this._overId = null; // Reset hover iframe wrapper id
        },
        _overId: null
    });
});


If you need stop embeded video on owl slider you can used this code: 

  jQuery('.player iframe').iframeTracker({
        blurCallback: function () {
            owl.trigger('owl.stop');
        },
        overCallback: function (element) {
            this._overId = jQuery(element).parents('.player').attr('id'); // Saving the iframe wrapper id
        },
        outCallback: function (element) {
            this._overId = null; // Reset hover iframe wrapper id
        },
        _overId: null
    });