I have a couple of widgets that are embeddable for any website. So, users who want to use those widgets will get a script bundle and couple of divs.
I want to link one widget to another. Assume, there are four widgets used on a website. I want to link them as users will click on one widget it will scroll to another.
Is there any way to connect one widget to another?
Suppose, there is one widget click here to know the details. If a user clicks on that will scroll to the details section which is another widget embedded with just a div.
This is what my goal is. Thanks
You can do the following:-
Suppose this is your details widget:-
<div id="details-widget">
details-widget
</div>
You can scroll down to above div by writing the 'click here widget' in the following way: -
<div>
<a href="#details-widget">click here</a>
</div>
Basically, you have to mention the id of the div in href of 'a' tag. On clicking the 'click here', it will scroll down to 'details widget'.