I've got a ul with let's say 10 li elements. Inside every li elemenet there is img that on click is opened in modal. I want to make a function that when you send someone a link to specific img (let say www.aaa.com/#/image/3) to open the third image. So far I don't have any success. On the list I've got: $(document).on('click', 'li img', function(){ ... }
Here is the question how to simulate specific img click event, cuz I've made this modal to work with this
, it's not very specific like number 3 from the url.
ps I don't want to use server side, that's why I'm using #.