hopscotch icon indicating copy to clipboard operation
hopscotch copied to clipboard

highlight current element

Open drewda opened this issue 10 years ago • 43 comments

How about the option to highlight the current element by graying out the rest of the page? This is what Intro.js does: http://usablica.github.io/intro.js/

drewda avatar Aug 17 '13 19:08 drewda

I agree, it is very useful to make everything black and make it highlight te focused object.

lacivert avatar Aug 23 '13 16:08 lacivert

+1 for that feature.

gnatok avatar Sep 09 '13 14:09 gnatok

I made a small hack for overlay effect: http://jsfiddle.net/8sbDa/2/

But now I see two problems:

  1. To highlight current element I need to have current element. I didn't found how to get it :(
  2. It is just hack. Really need some "native solution".

gnatok avatar Sep 09 '13 15:09 gnatok

@gnatok , yes, and it isn't the element we want to highlight. Your solution doesn't help for me unfortunately.

lacivert avatar Sep 10 '13 05:09 lacivert

@lacivert new version works good. But, again, is not native solution

http://jsfiddle.net/8sbDa/10/

gnatok avatar Sep 10 '13 09:09 gnatok

No, I think not only bubble should highlight, "Click me" element should be highlighted if we are talking about the way of intro.js http://usablica.github.io/intro.js/ . Do I think wrong?

lacivert avatar Sep 10 '13 13:09 lacivert

This feature would be very nice indeed, as the highlighting makes the whole tour experience more engaging!

cilia avatar Sep 10 '13 16:09 cilia

+1 for this addition - a very important feature in a tour!

maxms avatar Dec 05 '13 18:12 maxms

+1

devinfd avatar Dec 16 '13 20:12 devinfd

+1

justinkwanlee avatar Mar 14 '14 01:03 justinkwanlee

Here is a jsfiddle showing it in action... I didn't get all of the original demo styles in there (bootstrap etc), but it's at least working. Notice steps 3-5:

http://jsfiddle.net/plainkeyman/JZqWF/

On my local version, I changed the window resize timeout to 20ms instead of 100ms -- resizing the window was too clunky without it:

    setTimeout(function() {
      self.setPosition(self.currStep);
      resizeCooldown = false;
    }, 20);

plainkeyman avatar Apr 03 '14 02:04 plainkeyman

Actually - this breaks down when the screen width is really small. I'm making a fix for this... using the document width rather than the viewport width to calculate. See this revision:

http://jsfiddle.net/plainkeyman/JZqWF/1/

The project that I'm working on is calling for a box shadow around the 'highlighted' section.. however it would not allow any interaction with the content since it would be a div over the top. Don't know if that would be of any value.

plainkeyman avatar Apr 03 '14 18:04 plainkeyman

+1 for this feature. It will do the justice to the tour as it removes the distraction on the page.

jpatel3 avatar Sep 03 '14 14:09 jpatel3

The hack works, but it's not clean when the element you want to highlight has rounded borders (the color which is not the same as the background color).

gr1g avatar Feb 07 '15 21:02 gr1g

+1 for this feature. Great plugin.

yehudahkay avatar Feb 16 '15 14:02 yehudahkay

any update on this enhancement ?

satya1395 avatar Jul 27 '15 08:07 satya1395

Getting error: TypeError: el is null if (el.addEventListener) {

What can be the issue? I replaced JS and CSS with JSFiddle code.

ajinkyagadewar avatar Sep 07 '15 17:09 ajinkyagadewar

Sorry - I've been swamped and haven't been able to get back to it.

@gr1g you are right - that would be nice to update.
@ajinkyagadewar if I have time I will look into it.

plainkeyman avatar Sep 09 '15 18:09 plainkeyman

We are waiting for this feature I see :) I hope .

remytesta avatar Jan 05 '16 14:01 remytesta

+1

benoitmasson avatar Jan 29 '16 14:01 benoitmasson

+1

sganz avatar Jan 29 '16 17:01 sganz

  • 1

acomito avatar Mar 19 '16 16:03 acomito

+1

joshisa avatar Apr 03 '16 14:04 joshisa

+1

HarveyEV avatar Jun 12 '16 20:06 HarveyEV

+1

Tanktiger avatar Jun 14 '16 20:06 Tanktiger

This is such a highly requested feature, this should be our proof-of-concept for plugin support, IMO.

timlindvall avatar Jun 15 '16 22:06 timlindvall

+1

mattchinnock avatar Jul 19 '16 01:07 mattchinnock

+1

layonez avatar Aug 03 '16 20:08 layonez

+1

runmael avatar Sep 14 '16 14:09 runmael

+1

crayfishuk avatar Nov 16 '16 17:11 crayfishuk