|
[Solved] override z-index
|
|
4th May, 16:04
Post: #1
|
|||
|
|||
|
[Solved] override z-index
I've looked at other threads that were solved on doing this, but it's not working for me. I am using the qtip in an ASP.NET modal pop-up and it sets its z-index to 100001. Here's my code:
JS Code
The console.log shows the correct z-index of 100002. Yet ... the z-index of the qtip is still 15001. What gives? |
|||
|
4th May, 18:15
Post: #2
|
|||
|
|||
|
RE: override z-index
Are you trying to set the base zIndex of the tooltips? Use the $.fn.qtip.zindex property for that
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
5th May, 01:11
(This post was last modified: 5th May 01:30 by Scott Elliott.)
Post: #3
|
|||
|
|||
RE: override z-index
(4th May 18:15)Craig Wrote: Are you trying to set the base zIndex of the tooltips? Use the $.fn.qtip.zindex property for that Ok, so I changed the defaults section in my original post to: JS Code
Still, no go. The tip z-index remains 150001. Btw, I also tried: JS Code
Firebug's Console shows that $.fn.qtip.baseIndex IS 100002, as expected. However, the tip still displays style="z-index: 15002". |
|||
|
5th May, 02:47
Post: #4
|
|||
|
|||
|
RE: override z-index
Scott: Try "$.fn.qtip.zindex" rather than "$.fn.qtip.baseIndex":
JS Code
|
|||
|
5th May, 05:27
Post: #5
|
|||
|
|||
RE: override z-index
(5th May 02:47)kiddailey Wrote: Scott: Try "$.fn.qtip.zindex" rather than "$.fn.qtip.baseIndex": 2 Questions. Which of these are possible and of those that are, which one is the most efficient (performance-wise): JS Code
-- or -- JS Code
-- or -- JS Code
It just seems weird to me that you have to set this via $.fn.qtip.zindex. Seems to me I should be able to do this in my $.fn.qtip.defaults object literal e.g. Method 2. |
|||
|
5th May, 06:08
Post: #6
|
|||
|
|||
|
RE: override z-index
Only the 1st and 3rd are possible at the moment. As far as performance -- if I were to guess -- I'd say the 3rd one as it is (mostly) a simple variable assignment. In the first one you've got the overhead of the new function and it's call. In the second, you've got the "merging" of the settings object with the custom parameter object.
Modifying the z-index base has come up a number of times, but I'm not sure if it's that common a feature that it needs to be exposed via the settings object. Curious to hear Craig's thoughts on that though. |
|||
|
5th May, 14:33
Post: #7
|
|||
|
|||
RE: override z-index
(5th May 06:08)kiddailey Wrote: Only the 1st and 3rd are possible at the moment. As far as performance -- if I were to guess -- I'd say the 3rd one as it is (mostly) a simple variable assignment. In the first one you've got the overhead of the new function and it's call. In the second, you've got the "merging" of the settings object with the custom parameter object. That's what I figured. And by the way, this did work for me: JS Code
|
|||
|
8th May, 23:44
Post: #8
|
|||
|
|||
|
RE: [Solved] override z-index
Making the z-index a per-tooltip setting would kill the libraries z-index stacking memory. Not to mention that even though qTip can do a lot of things tooltips don't usually do, you have to remember its still just that, a tooltip library
At the end of the day all the fancy examples are just use cases for overflowing core functionality, so making it a per-tooltip property doesn't really make much sense in my opinion.Besides, as you've demonstrated you can quite easily achieve this mnaually, although I'm still not sure on what kind of use-case in which this would be useful? Thoughts? Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
9th May, 17:45
Post: #9
|
|||
|
|||
RE: [Solved] override z-index
(8th May 23:44)Craig Wrote: Making the z-index a per-tooltip setting would kill the libraries z-index stacking memory. Not to mention that even though qTip can do a lot of things tooltips don't usually do, you have to remember its still just that, a tooltip library Well, as far as my use-case, I am using AjaxControlToolkit's ModalPopUpExtender. They generate their own z-index to make sure their modal is the topmost layer. I don't know what that is until runtime and obviously, I would want my tooltips to be topmost so that they would be visible in those modal popups. I understand your reasoning for not exposing z-index as a top level property. However, if you were to make QTIP.zindex a calculation that sets itself to 1 above the topmost layer on the page instead of hard-coding it to 15000, I would've never had the issue in the first place thereby leaving zindex alone, as you intended. Why not do something like: JS Code
Personally, I use "form *" as my $.map selector, but I changed it to "body *" in the example, as not everyone would have a form on their pages. I tested this change in the qtip.js and it works perfectly. What do you think, Craig? I |
|||
|
9th May, 18:29
Post: #10
|
|||
|
|||
|
RE: [Solved] override z-index
I don't know... it seems like extra work for the browser for something that 90% of users wouldn't notice. Who uses z-indexs above 15000 regularly any who? And since it's an exposed property, it's easily override-able if you need it. But then maybe I'm just a purist
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
9th May, 18:33
Post: #11
|
|||
|
|||
RE: [Solved] override z-index
(9th May 18:29)Craig Wrote: I don't know... it seems like extra work for the browser for something that 90% of users wouldn't notice. Who uses z-indexs above 15000 regularly any who? And since it's an exposed property, it's easily override-able if you need it. But then maybe I'm just a purist True, but you could have an exposed property that would allow you to turn it off/on in the defaults, with the default being off. It was just a thought. |
|||
|
29th June, 12:57
Post: #12
|
|||
|
|||
|
RE: [Solved] override z-index
how come you all agree with solution given.
because copy and paste the above code gives me javascript error. HTML Code
please i need proper solution to overwrite z-index. this post is very confusing. write in simple language with example. |
|||
|
30th June, 22:39
(This post was last modified: 30th June 22:42 by Scott Elliott.)
Post: #13
|
|||
|
|||
RE: [Solved] override z-index
(29th June 12:57)amitshahc Wrote: please i need proper solution to overwrite z-index. this post is very confusing. I'm not totally sure what you don't understand. It seems as though you may not have read the whole thing. If you don't have the maxZIndex() function, it's not going to work for you. Here's what I actually ended up with in my project: JS Code
I had to abstract some things away, as I really use object literals for my entire script, but I hope this helps. |
|||
|
1st July, 12:53
Post: #14
|
|||
|
|||
|
RE: [Solved] override z-index
Basically, just change the $.fn.qtip.zindex property on page load (before you create any tooltips)
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| What's to prefer Override Defaults or Shared Options? | fspade | 2 | 292 |
28th February 07:20 Last Post: fspade |
|
| [Solved] Weird Z-index Issue | sparky672 | 6 | 783 |
10th December 15:08 Last Post: sparky672 |
|
| [Solved] Rounded Corner Z-Index behind youtube Object | devin | 1 | 784 |
5th October 00:28 Last Post: Craig |
|
| [Solved] qTip disappears background text with z-index | ScopeXL | 0 | 435 |
27th September 21:39 Last Post: ScopeXL |
|
| [Solved] qTip show: z-index parent frame | ic3d | 6 | 1,481 |
13th April 19:13 Last Post: Craig |
|
| [Solved] critical attr override issue | aaronbarker | 4 | 583 |
21st January 14:17 Last Post: aaronbarker |
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help





