How to get ID of clicked element with jQuery

后端 未结 5 1979
花落未央
花落未央 2020-12-08 18:38

I have the following html:

link
link         


        
5条回答
  •  感动是毒
    2020-12-08 19:19

    First off you can't have just a number for your id unless you are using the HTML5 DOCTYPE. Secondly, you need to either remove the # in each id or replace it with this:

    $container.cycle(id.replace('#','')); 
    

提交回复
热议问题