Comments (11)
Regarding number 1, the highlight code uses z-index to "pop" the element through the overlay. Unfortunately, z-index is scoped to the closest "positioned" element (absolute, fixed, relative), so it will never move out of the scope of that element. If you aren't highlighting the positioned element itself, a sub element won't come through the overlay.
I wrote a different highlighting function that uses masking instead of z-index to work around this limitation: https://github.com/dbellizzi/jquery-mask
from guiders-js.
@dbellizzi Could you briefly explain how to use jquery-mask with guiders as I'm having a lot of trouble.
I don't really understand that the container
's role is in $(container).mask(selector)
. Should it be the #guiders_overlay
or what?
Basically what I'm trying to do is to mask the element that the guider attaches to when it opens. It doesn't seem to work no matter what I do. Any help would be appreciated?
jobDocket:
attachTo: '#gen-job-docket'
position: 6
overlay: true
title: 'Some title'
description: 'To do some stuff, read this.'
buttons: [{
name: 'Okay, got it'
onclick: -> doSomething()
}]
onShow: ->
$('#guiders_overlay').mask(@attachTo)
from guiders-js.
You might have them reversed. If you do: $('body').mask('#gen-job-docket') it will hide all of "body" and allow "#gen-job-docket" to show through. Container is the outer container, nothing outside that will be touched, everything inside there will be hidden except for the stuff listed inside mask().
from guiders-js.
And just to show you how I used it with Guiders-JS, I changed the default behavior of highlighting:
guiders._highlightElement = function(selector) {
$(document).mask(selector);
};
guiders._dehighlightElement = function(selector) {
$(document).mask(false);
};
from guiders-js.
@dbellizzi How reliable is https://github.com/dbellizzi/jquery-mask? I am working on a major version upgrade to guiders.js and am considering using jquery mask by default.
from guiders-js.
(This would introduce a dependency though... something I have so far avoided, other than depending on jQuery.)
from guiders-js.
For example, in my testing with Google Chrome, I find calling mask adds a scroll bar to the window. I'm looking for a good solution to make highlighting more consistent.
from guiders-js.
We're using it with Guiders-JS in production at Wikispaces.com, and we haven't had any problems with it, but I haven't heard of anyone else using it. I don't see the Chrome scrollbar issue, but I'm happy to debug it. Do you have a test page that shows the problem that you can send me?
from guiders-js.
Maybe I'm not using it right? Here is some test code that doesn't show the
#div1 over the overlay, and causes Chrome to have horizontal and vertical
scroll bars.
On Sun, Jan 27, 2013 at 8:01 PM, Dominick Bellizzi <[email protected]
wrote:
We're using it with Guiders-JS in production at Wikispaces.com, and we
haven't had any problems with it, but I haven't heard of anyone else using
it. I don't see the Chrome scrollbar issue, but I'm happy to debug it. Do
you have a test page that shows the problem that you can send me?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/69#issuecomment-12767941.
from guiders-js.
You don't need an overlay div, and if you include it, it is on top of everything, so I would get rid of that first. Next, you need to adjust the overlay style to apply to the "mask" class, or just use the one that I've been using, since it doesn't require the positioning items:
.mask {
z-index: 500000;
position: absolute;
background-color: #000;
opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
}
I wasn't able to see any scrollbars in Chrome though. I'm running the latest chrome 24 on Windows 7.
from guiders-js.
Great, I get it now -- when I use it right! It's very cool. I didn't
realize what the mask was at first, because your readme says it's "Useful
for pulling elements up through an overlay"... I just assumed I would have
an overlay. If I were you, I'd add a png showing visually that multiple
new divs with the mask class are going to be built around your elements,
instead of an overlay.
I'm planning to add optional support for this in guiders.js. What I'm
going to do is something like:
if ($.mask) {
$("body").mask(myGuider);
} else {
// show overlay
}
Then I'm going to mention it in the docs as an optional plug in instead of
the overlay.
On Mon, Jan 28, 2013 at 12:37 AM, Dominick Bellizzi <
[email protected]> wrote:
You don't need an overlay div, and if you include it, it is on top of
everything, so I would get rid of that first. Next, you need to adjust the
overlay style to apply to the "mask" class, or just use the one that I've
been using, since it doesn't require the positioning items:.mask {
z-index: 500000;
position: absolute;
background-color: #000;opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
}I wasn't able to see any scrollbars in Chrome though. I'm running the
latest chrome 24 on Windows 7.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/69#issuecomment-12772422.
from guiders-js.
Related Issues (20)
- README says "prev" but the special name value for a back button is "back" HOT 4
- Vertical positioning doesn't take margins into account
- z-index values are ridiculous HOT 1
- Buttons duplication when the tour run second time HOT 3
- Highlight does not work unless attachTo is specified HOT 2
- issue with dehighlightElement
- button onclick runs immediately HOT 1
- One help/tour link to rule all tabs HOT 1
- Responsive design improvement suggestion
- Wrapping onClose callbacks or having global events HOT 2
- Returning guider on next and prev methods HOT 1
- Add a changelog HOT 3
- Tag releases HOT 5
- Whenever something is loading, display the loading animation (non-priority)
- Highlight does not work with divs HOT 5
- Unobtrusive Fork of Guiders.js HOT 4
- Events should be namespaced
- IE8/9 overlay set to absolute
- Arrows not shown under IE7 HOT 1
- Respond appropriately to screen edge HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guiders-js.