If it is working the slide.

Takenaka: You’d bind an event listener to the player.

Carruth: Takenaka like http://hastebin.com/lavebemoxe.js ?

Takenaka: Don’t bind one in the other.

Takenaka: Looks like oyu just need ended.

Takenaka: Also, don’t mix .bind with .on – use .on always.

Wilbourne: Well I want to detect if it is playing

Peixoto: By using the playing event from the plyr thing

Takenaka: That’s fine, but the example you made doesn’t make any sense.

Takenaka: You don’t want to bind an event listener inside of another even listener.

Richeson: Well I am esentall trying to wrap jQuerythis.find’.question-video’.on’ended’,function{ in an if statement to detect if the video is actively playing

Takenaka: You can only detect if the event fired.

Takenaka: Rather, when the event fires.

Ambrosini: Not even with like a var isPlaying = blah blah

Takenaka: You could if you wanted to. not sure why you would, though.

Sisko: And the ifisPlaying = true {

Takenaka: That would just be if isPlaying { in that case.

Takenaka: Check the plugin and see if it offers some kind of “isPlaying” method.

Albarazi: I checked, they just have “playing”

Wittenmyer: They have a playing event

Takenaka: Then you’d have to set that status bit.

Foglio: Like var isPlaying = playing; ? or.

Takenaka: Is playing a method or event?

Uken: I’m having a problem converting a css selector to jquery “.menu-full .menu-links div” Doesn’t want to select anything in jquery, If I just use “.menu-links div” it works fine.

Gangler: So they don’t belong to the menu-full element

Mckeon: Those are two different selectors

Takenaka: Also: there’s no “converting” – jquery uses css selectors plus some.

Casstevens: Yeah I know, “.menu-full .menu-links div” exists, just not when the page loads

Raif: Do I have to create an on.click event after it exists?

Takenaka: Why are you selecting those elements, then?

Takenaka: Hah – use delegation instead :

Takenaka: Https://api.jquery.com/on/#direct-and-delegated-events and http://learn.jquery.com/events/event-delegation/ for more info.

Prybylski: Takenaka playing is an event according to the docs

Takenaka: So playing would be running a function.

Takenaka: That means you’ll need to bind an event listener.

Donahue: Oh ok, i’ll need to figure it out

Takenaka: Var isPlaying = false; $’someThing’.on’playing’, function { isPlaying = true; };

Takenaka: Then set it to false when you stop.

Takenaka: Why are you checking on state, btw?

Gangler: He’s anti-establishment. gotta keep an eye on the state

Lindholm: Takenaka based on your code I was able to do a console.log within the .on’playing. – however, what goes in the if statement?

Takenaka: I don’t know what you mean.

Takenaka: Can you share an example of what you’re trying to do now?

Rowntree: I have it locally, but when someone clicks a true answer I want the slide to iterate to the next one

Takenaka: Because the if would’t go inside of that particular event handler.

Yballe: It eventually ends and reloads the page when no slides are left

Takenaka: What does that have to do with whether or not the video is playing?

Quante: I think at one point I was experiencing issues but you’re right it seems to work without that, my issue now is that the active-slide cl*** is not appending to the next slide -_- sigh

Dondero: When I console.log activeIndex I get a -1

Greenhill: If it is working the slide index should go up, remove active-slide from the current li, and then add it to the next one