Wednesday, 7 August 2013

If variable equals the number 1

If variable equals the number 1

I'm trying to write a very simple if statement in my jquery. If the
variable equals the number one then do this, if it equals the number two
then do this. This is what I wrote but it doesn't seem to work and I can't
figure out why:
$("#next-btn").click(function() {
if (current_slide = 1) {
first_screen();
}, else if (current_slide = 2) {
second_screen();
}
});
probably very simple, but I appreciate the help.

No comments:

Post a Comment