Good day.

There is a directory page. There is a picture link: enter image description here

She leads here, home. enter image description here The title “Our Products” is anchored. There are tabs (bookmarks).

Task: it is necessary that when you click on the link from the first screen, there was not just a transition to the main page, but the second tab was opened (the one that is called “Aviation Components”).

I tried this:

$(".aviation-img-cont").click(function(){ $("#tab_l2").click(); }); 

It does not work, although if you just alert, it works. Tab, in this case, is a label. Maybe that's the point.

  • one
    These are different pages and they have a different JS context. It is impossible on the last page in advance to cause JS to trigger an action on a future page (unless of course you are messing with URLs through history). Send an anchor by reference, and on the landing page, check its availability and open the required tab. - Lexx918
  • It seems, that is necessary. Can approximate code? - Oleg
  • one
    in the link on the first page you add the anchor href="/foo#bar" , on the second page you check it and perform the actions $(function(){ if (location.href заканчивается на '#bar') { $el.click(); } }) - Lexx918

0