I wrote this code:
<div id='avt' align='center'> <div id='session_true'> код </div> <div id='session_false'> код </div> </div>
The question is how to correctly select session_false
and session_true
in jQuery
? Thank you in advance.
I wrote this code:
<div id='avt' align='center'> <div id='session_true'> код </div> <div id='session_false'> код </div> </div>
The question is how to correctly select session_false
and session_true
in jQuery
? Thank you in advance.
If I understood correctly, the following code will hide the session_true
block and show the session_false
block, for example:
$('#session_true').hide(); $('#session_false').show();
I advise you to start learning the basics of jQuery (but first javascript).
Try to change $ everywhere on jQuery ... I didn’t work on wordpress either until I changed ...
look at the find method
I will not say for the blocks DIV, but with inputs - there were problems. IdI didn’t want to get out, I had to use a name and set a name like ID and
$ ('div [name = session_true]') ..........
Source: https://ru.stackoverflow.com/questions/195645/
All Articles