Jquery Toggle on click of image
问题 I am trying to understand how the jquery toggle works. I want to toggle to next anchor with class plr-anchor on click of image with class go_down . The data is populated using maps. Jquery code: $('.go_down').on('click',function(e){ #('.plr-anchor').next('.plr-anchor').toggle()}); } Code snippet: {data.map(function(categ) { return <div> <a className="plr-anchor" id={categ.short_name}></a> <img src="/static/img/icon_up.png" className="go_down"/> </div>}.bind(this)} There seems to be a problem