JavaScript function class
function showhide(obj){
alert(obj)
$(obj).next('div').toggle();
}
This is a big category This here returns alert (obj) // get It's javascript:, I don't know how to write it, please help.
Reply to the discussion (solution)
The code is fine,
I don’t know if you want to say why only one div is shown and hidden.
Next itself can only select one div. If you want to get all the divs after the a tag, use the nextAll method. The JQ I use is version 1.7.2
The code is fine!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn