css - jquery-visible - Visible whole element -
i have page user should show skill , bars grow when user loads slide (impress.js). i'm using jquery-visible plugin. function works great when switch between 2 distant slides, when near each other, 1 part of skill page "visible" , bars load full size early. here code used bars:
var win = jquery(window); var allmods = jquery(".skill"); //.skill container allmods.each(function(i, el) { if (jquery(el).visible(true)) { jquery("span.bar.line1").animate({ width: 80 }, 3000, function() { }); } });
i hardly make work:) can make true if it's whole div visible?
i remowed whole jquery-visible code , used addeventlistener entering slide (div).
document.getelementbyid("slideid").addeventlistener ("impress:stepenter", function (event) {
// code step enter
}, false);
Comments
Post a Comment