jQuery match only part of id from div

前端 未结 6 1955
星月不相逢
星月不相逢 2021-02-01 12:51

I ran into an unusual situation yesterday night.

I need to match only part of id. Let me clear you all with an example

I have few divs like



        
6条回答
  •  青春惊慌失措
    2021-02-01 13:41

    Alternatively, add class="sales_info" to your HTML mark-up.

    Then, do this:

    $(".sales_info").bind("click", function() {
       ...
    }
    

提交回复
热议问题