Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to bind points to the background image div? #24

Open
Ybelyavsky opened this issue Jun 19, 2024 · 0 comments
Open

How to bind points to the background image div? #24

Ybelyavsky opened this issue Jun 19, 2024 · 0 comments

Comments

@Ybelyavsky
Copy link

Ybelyavsky commented Jun 19, 2024

How to bind points to the background image div?

Living example

<section>
    <div class="container main-background" id="main_foto_hotspots">
      // img background
    </div>
</section>
.main-background {
  background-image: url(main_foto.webp);
  background-repeat: no-repeat;
  background-position-x: right;
  background-position-y: top;
  background-size: 50%;
}
jQuery('#main_foto_hotspots').hotspot({
  data: [
    { "x":18, "y":38, "Title":"The Title","Message":"Create the Message here" },
    { "x":43, "y":40, "Title":"jQuery Hotspot","Message":"This jQuery Plugin lets you create hotspot to any HTML element." }
  ],
  tag: '**div.background**', //optional (default is img)
  interactivity: "click", // options : click, none (default is hover)
  hotspotClass: 'Hotspot'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant