jQuery - hide / display form field
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

https://jsfiddle.net/uwedoowe/rf4n3sdj/2/

Current function is:
If select box changes to country Australia, hide the "other_state" field

Task:
I also need this function to check the default selected country when the page is loaded in hide the "other_state" field if Australia

Thanks!

awarded to Subhash Dasyam

Crowdsource coding tasks.

2 Solutions

Winning solution

use jquery

check external resource in jsfiddle

here is the edited code working

https://jsfiddle.net/rf4n3sdj/3/


@Subhash Dasyam has already solved the problem,

I just want to make it more generic, checking the value is a solution but that value would change so I would make it with data attribute.

https://jsfiddle.net/rf4n3sdj/7/

View Timeline