samedi 24 septembre 2016

If statement's syntax in jquery [duplicate]

This question already has an answer here:

I have found this code online but I don't understand what it wants to say.I have never seen that syntax...could someone explain me?

size = ( $(this).innerWidth() > $(this).innerHeight() ) ? $ (this).innerWidth()*2 : $(this).innerHeight()*2,
            clickY = $(this).offset().top,
            clickX = $(this).offset().left,
            x = e.pageX - clickX,
            y = e.pageY - clickY;

Aucun commentaire:

Enregistrer un commentaire