I have a .change () function set for the dropdown menu with an ID of .country I when the page loads , Then I am trying to set the dropdown menu to "United States" and running the .change () function:
$ ('# Country') Change (function () {resetDisclosure (); var countrycode = $ (this) .val (); var countryname = $ ('# option: selected'). Text (); $ ('#' (country code == ' OC '|| Country code ==' EU ') {$ (' # OC H4, # EU H4 '). Html (' & lt; strong & gt; '+ countryName +' & lt; / strong & gt; ; ') $ Fancybox.resize (); $ .fancybox.center ();}); $ ("# country") val (' oc '). $ ("# Country") Change ();
The last thing is wrong, because I can not force. How can I go about compelling change function?
I am starting and I A different function has attempted to hand over the content of the .change () function, but it says that,
Try:
$ ("# country"). Val ('os'). Trigger ('change');
Comments
Post a Comment