mercredi 12 octobre 2016

How to determine if width size is 100% or 50%

I have button id=”buttons” that allow me to change div (id=”box”) width size inphp, but I need to write if statement in jquery , if id=”box” width is 50%, and when click button it change div id="box" to 100%.

If div width is 100%, then change to 50% once click button.

How to determine that width size using jquery if statements! Im rookie on jquery if statements I just want to learn . Many thanks.

Aucun commentaire:

Enregistrer un commentaire