Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter vpsilva

    (@vpsilva)

    And I had the option of leaving some selected. For example I would like that the first option was selected.

    It’s possible?

    Plugin Author croixhaug

    (@croixhaug)

    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’);
    });

    Thread Starter vpsilva

    (@vpsilva)

    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?

    Thread Starter vpsilva

    (@vpsilva)

    Hi there! I’m new with js, but took a researched and added the call at the head http://prntscr.com/8pgr0l inspections element >> open new tab: http://prntscr.com/8pgrao

    But in my page has not changed the selected area.

    Can you help me?

    Plugin Author croixhaug

    (@croixhaug)

    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’);
    });

    Thread Starter vpsilva

    (@vpsilva)

    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 = "http://gofastway.tv/wp-content/themes/brooklyn/js/select-1st-hotspot.js"> </script>
        
         <script type = "text / javascript" src = "http://gofastway.tv/wp-content/themes/brooklyn/js/select-2nd-hotspot.js"> </script>
        
    </head>

    Thank you for your attention.

    Plugin Author croixhaug

    (@croixhaug)

    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!

    Thread Starter vpsilva

    (@vpsilva)

    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="http://gofastway.tv/wp-content/themes/brooklyn/js/select-1st-hotspot.js"></script>
    <script type="text/javascript" src="http://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');
    });
    Plugin Author TylerDigital

    (@tylerdigital)

    That’s very odd, but I guess if you’ve got it working as 2 separate scripts we can’t argue with success 😉

    Thread Starter vpsilva

    (@vpsilva)

    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

    Plugin Author croixhaug

    (@croixhaug)

    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!
    Nathan

    Thanks 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,
    Jelle

    Plugin Author croixhaug

    (@croixhaug)

    Hi 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

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Improvements’ is closed to new replies.