Fastest Web Hosting

how can make click on specific element by jquery

0 votes
asked Sep 20, 2016 in Jquery by vinod (2,660 points)

Sir
i made a link

<ul id="click" class="image">
  <li>
    <a href="#inline" rel="flowerPhoto">image</a>
  </li>
</ul>

and I am trying to trigger it by this function

$(document).ready(function() {
  $('#click').find('a').trigger('click');
});

But this not worked

I actually need to trigger whatever get's called here <a href="#inline" rel="flowerphoto">

1 Answer

0 votes
answered Oct 13, 2016 by Hatim Saifuddin (300 points)
$(document).ready(function() {
  $('a[href="#inline"]').trigger('click');
});

Job Board

TechnicalSharp is a technical community of developers where they are sharing their knowledge and solutions and against it they are getting the score point which help them to make profile strong which is under eyes on MNC's
...