Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you help me to detect visibility of whole element? #8

Closed
Valeka opened this issue Aug 10, 2013 · 1 comment
Closed

Can you help me to detect visibility of whole element? #8

Valeka opened this issue Aug 10, 2013 · 1 comment
Labels

Comments

@Valeka
Copy link

Valeka commented Aug 10, 2013

First, thank you for this plugin. But I'm beginner and I'm not so sure how to use it. I have page where user should show his skill and bars grow when the user loads that slide (impress.js). So this function works great when I switch between two distant slides, but when they are near each other, one part of the skill page is "visible" and bars load their full size early.
Here is the code that I used for my bars:

var win = jQuery(window);
var allMods = jQuery(".skill");

allMods.each(function(i, el) {
  if (jQuery(el).visible(true)) {                                           
    jQuery("span.bar.line1").animate({ width: w1 }, 3000, function() { });
   } 
});

I hardly make this work:) But can you help to make it TRUE only if it's whole div visible?

@samatcd
Copy link
Member

samatcd commented Sep 5, 2013

Hi @Valeka, I've used impress a bit—you're probably better off to use the impress feature which fires an event when you navigate to that slide instead of this plugin (unless I've mis-read your intent).

Using impress:
event impress:stepenter

Using the newer impress:
event enterStep

http://jmpressjs.github.io/docs/jqevents.html

@samatcd samatcd closed this as completed Sep 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants