javascript - button not calling the correct function -


one of table cells has following content:

 <td>      <span onclick="deleteproductvariants()" class="icon icon-trash"></span>      <button class="done" onclick="update_attributes(this)">done</button> </td> 

my problem when click button, seems it's still deleteproductvariants() called. don't have idea why- did encounter before?
note: none of them in form have been submitted or anything. it's function called, weirdly.

here jquery example....

<td>      <span id="deleteproductvariants" class="icon icon-trash"></span>      <button class="done" id="update_attributes">done</button> </td>  $('document').ready(function(){     $('#deleteproductvariants').click(function(){         alert($(this));     });     $('#update_attributes').click(function(){         alert($(this));     }); }); 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -