Improvements
-
It would be really cool and I confess that I need it to dial the map could have a circle option.
See the site in question gofastway.tv
The shape=”poly” isn’t perfect.
It has a project with this idea?
Thanks
-
And I had the option of leaving some selected. For example I would like that the first option was selected.
It’s possible?
Hi there, right now polygon is the only supported shape. It’s flexible, but of course it’s a little tedious if you’re trying to draw a circle. We plan to add other drawing options in the future, but it requires major changes and isn’t planned anytime soon.
If you know javascript, it’s possible to simulate clicking on an area so you could have one set by default.
in your case, something like:
jQuery(function() {
jQuery(‘#hotspots-image-4061-area-2’).trigger(‘click’);
});Huunn great!
But where do I put this function?
My theme Brooklyn hasn’t Custom JS. (Has the Custom CSS)
Change some .js file plugin itself DrawAttention adding this function?
Hi there! I’m new with js, but took a researched and added the call at the head https://prntscr.com/8pgr0l inspections element >> open new tab: https://prntscr.com/8pgrao
But in my page has not changed the selected area.
Can you help me?
Hi there, it looks like you have the code setup alright but it’s possible that your theme is loading things in the background and the custom script is firing too early. Please try changing from this:
jQuery(function() {
jQuery(‘#hotspots-image-4061-area-2’).trigger(‘click’);
});to:
jQuery(window).load(function() {
jQuery(‘#hotspots-image-4061-area-2’).trigger(‘click’);
});Perfect, it works!!
I can use the same script to do the same in the second picture?
As you can see I have two images, the first works but not the second.
I created two separate scripts and each with their ID. I believe that did not work out.
I can use a script to these two executions?
jQuery (function () { jQuery ('# hotspots-image-4365-area-1') trigger ('click.'); }); to: jQuery (window) .load (function () { jQuery ('# hotspots-image-4365-area-1') trigger ('click.'); }); jQuery (function () { jQuery ('# hotspots-image-4061-area-3') trigger ('click.'); }); to: jQuery (window) .load (function () { jQuery ('# hotspots-image-4061-area-3') trigger ('click.'); });
or should separate work?
In my head:
<head> ???? <script type = "text / javascript" src = "https://gofastway.tv/wp-content/themes/brooklyn/js/select-1st-hotspot.js"> </script> ???? <script type = "text / javascript" src = "https://gofastway.tv/wp-content/themes/brooklyn/js/select-2nd-hotspot.js"> </script> ???? </head>
Thank you for your attention.
You should be able to put them in one file (or two if you prefer)
Script 1:
jQuery (window).load(function () {
jQuery (‘#hotspots-image-4365-area-1’) trigger (‘click’);
});Script 2:
jQuery (window).load(function () {
jQuery (‘#hotspots-image-4061-area-3’) trigger (‘click’);
});or combined script:
jQuery (window).load(function () {
jQuery (‘#hotspots-image-4365-area-1’) trigger (‘click’);
jQuery (‘#hotspots-image-4061-area-3’) trigger (‘click’);
});Hope that helps!
I tried with both forms and fix the code.
It seems that when you run the first function of the second script does not work.
As a test I made one at a time and each worked alone. With individual code is correct, but when the two together only the first one does.
Your code is correct, but still couldn’t do as required.
<head> <script type="text/javascript" src="https://gofastway.tv/wp-content/themes/brooklyn/js/select-1st-hotspot.js"></script> <script type="text/javascript" src="https://gofastway.tv/wp-content/themes/brooklyn/js/select-2nd-hotspot.js"></script> </head>
jQuery(window).load(function() { jQuery('#hotspots-image-4365-area-1').trigger('click'); });
jQuery(window).load(function() { jQuery('#hotspots-image-4061-area-3').trigger('click'); });
That’s very odd, but I guess if you’ve got it working as 2 separate scripts we can’t argue with success ??
Looks like it was, it was what I needed
jQuery(window).load(function() { jQuery('#hotspots-image-4365-area-1').trigger('click'); setTimeout(function(){ jQuery('#hotspots-image-4061-area-3').trigger('click'); },1000); });
Thanks for all the answers, everything was useful.
I have just installed the draw attention and I’m kind of playing with it. I was wondering if it’s possible to have AND more information by clicking on a hotspot AND extra information by hovering above the hotspot. For the moment hovering is not possible but I suppose this is possible once I have bought the pro version
Hi there,
The pro version does have some extra layout options, so instead of clicking for more information you could choose the hover option. And the tooltip layout your would show the information in a title pop-up box rather than on the side of the image. You can see some demos of the different layout options on wpdrawattention.com and just let us know if you have any other questions
Thanks!
NathanThanks Nathan,
is it also possible to combine the hover and click option?
I would like to have the following:
Click on hotspot ==> information A
Hover over hotspot ==> information B
Is this possible as well?Best ragards,
JelleHi Jelle,
Unfortunately you can only choose one “click” or “hover” The various mouse & touch events wouldn’t work on all devices if we were to combine the two. Particularly on mobile devices where there is no “hover” (only tap) things would get extra confusing.
Let us know if you have any other questions!
Thanks,
Nathan
- The topic ‘Improvements’ is closed to new replies.