0

How can i simulate a click on the bouton "edit" by using jquery ?

<ul class=​"sa-address-list">​
 <li class=​"sa-address-row util-clearfix">​
  <div class=​"sa-address-wrapper " data-id=​"5445664">​
   <div class=​"sa-address-item    selected" data-id=​"5445664">​
   <input type=​"radio" checked=​"checked" name=​"addressId" class=​"select-radio-input" value=​“5445664”>​
   <div class=​" si-username">​namename​</div>​
   <ul class=​"si-bg sa-location">​…​</ul>​
   <div class=​"si-bg sa-mobile-number">​phone​</div>​
   <p class=​"si-operation">​…​</p>​
     <a class=​"si-edit" href=​"javascript:​;​">​Edit​</a>
    ​</p>​
  <i class=​“shop here”>​Ship to this address​</i>​
ibobo
  • 91
  • 7

1 Answers1

0

$('.si-edit').trigger('click'); http://api.jquery.com/trigger/

or

$('.si-edit').click(); http://api.jquery.com/click/

Beardo08
  • 76
  • 1
  • 8
  • Try this, the inline javascript didn't seem to work: https://jsfiddle.net/80cj32fn/11/ – Beardo08 Mar 10 '16 at 22:15
  • i have to use it in filemaker with plugin who run javascript, i made work this for select : MBS( "WebView.RunJavaScript"; "WV"; "$('span:contains(" & field of what i want select&")').trigger('click');" ) but simulate the click on edit i could't find – ibobo Mar 10 '16 at 22:54
  • i find this in source maybe that could help you : n.on("click", ".sa-address-wrapper .si-edit", function(e) { var t = i(this); if (t.closest(".sa-address-item").length) { return } t.closest(".sa-address-wrapper").find(".sa-address-item .si-edit").trigger("click") }); – ibobo Mar 10 '16 at 23:08