Excuse me, how could I possible do something like this?
I have a DIV, which I hoped to use like a button to switch displaying content. When visitor touch it, the SPAN in the P will toggle. But I found the following problem. Please help me.
<div id="some_id" onclick="jQ_hide('.some_class p[class^="xxx-yyy"] span:nth-child(1)');"></div>
<div id="someother_id" onclick="jQ_show('.some_class p[class^="xxx-yyy"] span:nth-child(2)');"></div>
jQ_hide and jQ_show is function to hide and show lots element in a time.
I don’t know what to do when a ” happens in 2 “s .
Sorry for my bad English. Thank you.
Edit:
I have lots of .xxx-yyy-1 , .xxx-yyy-2, .xxx-yyy-3 … so I need to do this, or any other solution?
Edit 2:
I do not use jQuery .toggle is because .toggle takes time.
Thank you.
replace your inner double-quotes with escaped single quotes
\'