Hi everyone.
I'd like to understand how to fix my promblem below:
so, here's my web site:
http://people.irr.ru/conf/index.php
If you click "Novosibirsk" link on map you can see the tooltip with a content. At the end of this content there's the link "read more" - click on it. ... so here the problem: 1. The function api.updatePosition does not work in my case cause second div appears the link "Novosibirsk", it does not recalculate its position.. but if we close this tooltip, and reopen it again - it loooks correctly.
Here archieve of my test pages:
http://sotnikovs.com/files/www.rar
Sorry for my English.
BassEast,
Great use of the tooltip first of all, and love the image map. If you want to update the tooltip osition you can do it simply by finding the parent qtip element of the element you're clicking. Here's an updated version of your myshow function which does it:
JS Code
function myshow(){
$("#one").show().parents('.qtip:first').qtip('api').updatePosition();
}
Hope this helps.
!! Thanks a lot Craig for changin' my function - it's what I wanted!
--------------------------------
Hmm.. Actually i've two more quetions:
1. How to be if i need some of my tooltips be displayed on page load? Is it possible?
2. Why the main div of tooltip does not change its width when i include some file, for example:
JS Code
content: {
url: 'showarticle.php'
and this file (showarticle.php) contains the following:
JS Code
<div style="width:500px;">some text</div>
No problem. Regarding the two extra questions, could you update to the latest branch revision and see if it resolves your second issue first? The files are here:
http://bazaar.launchpad.net/~craig.craig...runk/files
The first part is definitely possible using the show.ready option e.g.
JS Code
$('.qtip').qtip({
show: {
ready: true
}
});
If you're using the debug script both but if not, just the jquery.qtip.js

.
Ctrl F5...[url]
http://people.irr.ru/conf/index.php[/url]
i've changed something..) but it doesn't solved the problem is still... hmm..
by the way, if i add:
ready: true - shows stupid mistake:
JS Code
$.fn.qtip.cache.screen.scroll is undefined
[Break on this error] left: (adjustedPosition.left < $.fn.qtip.cache.screen.scroll.left),
What browser is this error occuring in? IE or others? Or both?
Craig, i probably already bore you.. but i can't resolve these 2 problems.
1. When i click "read more", adds new <div> tag with width 500px, ie it's more than the parent <div> has... but i need to recalculate the width of the main container to 500px too.
I add this code to my script:
JS Code
$("#one").show().parents('.qtip:first').qtip('api').updateWidth();
and nothing has changed..
2. The second problem is how to turn on (to display:block) some of the tooltips?
Resolved the first problem
JS Code
function myshow(){
if ($("#one").css('display') == 'none') { $("#one").show().parents('.qtip:first').qtip('api').updateWidth(400).updatePosition();
}
else {
$("#one").hide().parents('.qtip:first').qtip('api').updateWidth().updatePosition();
}
}
remains one last problem...)
Craig.
Only one thing...
Here:
http://people.irr.ru/conf/index.php, now i have 3 cities on the map, i need one tooltip for example: "???????????" city, be displayed onload atonce.
How to do this, in my case?
BassEast,
Good to see you resolved the first problem, but this shouldn't be necessary. Seems you've found a library bug that I'll be fixing today! Regarding the showing onload, you need the show.ready function, but you said it produced an error?
BassEast,
What's the crazy method? Can't seem to identify it in your code (lack of sleep maybe...). What browser is the error occuring in? I'm not seeing any in FF or Opera? IE perhaps?
Also, if you're looking to show all tooltips on load and keep them there e.g. never hide, you can simply declare show and hide as false e.g. "show: false, hide: false". That way they stay visible constantly.
Hi Craig.
I've just almost finished the project with your cool Jquery plugin here the link:
http://conference.irr.ru/
But i have some problem.. if you look at the code this line:
JS Code
adjust: {
//screen: true,
screen i should commented.. cause there is a mistake in file jquery.qtip.js:
JS Code
$.fn.qtip.cache.screen.scroll is undefined
[Break on this error] left: (adjustedPosition.left < $.fn.qtip.cache.screen.scroll.left),
I need, if i resize the window of my browser, the tooltip (if it positions at the right) rollover to the left.. or if i scroll the browser to the bottom, the tooltip Rollover to the bottom too
But i dont know how to do this..
I've just update your new files.. in my directory, but it didn't fixe my problem... (( hmm..
BassEast,
Could you provide the full code your using please?