Define a function to determine whether the radio is selected by using the JQ selector to get the value of the checked radio, or null if not selected, and then the if branch to show the hidden Div.
function issetshoplist_theme2 () {var value0 = $ (' input:radio[value=shoplist_theme2]:checked '). Val (); if (value0! = null {$ (' #theme2set '). Show ();} else {$ (' #theme2set '). Hide ();}}
Then, after each radio Click event occurs, the function function body executes the above functions, showing that a div is hidden.
$ ("Input[name=shoplist_theme]"). Click (function () {var value = $ (' input[name=shoplist_theme]:checked '). Val (); $ ("# Iframe2 "). attr (" src "," __root__/index.php/home/index/shoplist/theme/"+ value); Issetshoplist_theme2 ();});
PS: in $ (document). Also call this function when ready. Oh ...
jquery Judge Radio Select or not to show or hide a div