Jump to content
  • 0

Проблема с позиционированием всплывающей подсказки


BETEP
 Share

Question

Доброго времени! Помогите пожалуйста разобраться! С помощью данного плагина сделал всплывающую подсказку для своей навигационной карты, в инструкции было написано, что можно применить абсолютно к любому тэгу которому можно прописать атрибут title и class, я так и сделал (прописал для тэга area). Cама подсказка работает корректно, но вот только с позиционированием проблема, она "всплывает" не там где надо! Подскажите пожалуйста, может быть у кого-нибудь есть хоть какие-нибудь идеи. Заранее всем спасибо!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Дайте код подсказки, сделаю

или вот пример



$(function(){
$(".js_right").tipTip({maxWidth:"auto",edgeOffset: 10,
defaulPosition:"rigth", delay:600});
});

советую использовать плагин (сам им пользуюсь)qTip, документация, туториалы, очень гибкий, достаточно посмотреть демо.

Варианты позиционирования

Пример простейшей подсказки



$(document).ready(function(){

$('сюда пишем класс или тег').qtip({
id: 'myTooltip',
content: {
text: 'здесь текст подсказки',
},
position:

{
my: 'right center', //Это позиционирование
at: 'bottom left', //Это позиционирование
},

show: {
delay: 150, //Задержка

style: {
classes: 'ui-tooltip-green ui-tooltip-shadow ui-tooltip-jtools ui-tooltip-rounded', //Дефолтные стили подсказки, можно менять на свои
width:200,

},

});

Edited by Modestes
Link to comment
Share on other sites

  • 0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Мэпка</title>

</head>

<body>
<center>
<img class="map maphilighted" width="1200" height="1300" usemap="mapka" src="genplan2.jpg" >
<map id="myMap" name="mapka" >
<area shape="poly" coords="805,804,810,914,876,909,869,803" href="#" />
<area shape="poly" coords="805,804,810,914,748,918,743,805" href="#" />
<area shape="poly" coords="680,806,688,920,748,918,743,805" href="#" />
<area shape="poly" coords="680,806,688,920,608,926,600,809" href="#" />
<area shape="poly" coords="804,804,796,705,858,702,868,803" href="#" />
<area shape="poly" coords="804,804,796,705,735,707,740,805" href="#" />
<area shape="poly" coords="680,806,674,708,735,707,740,805" href="#" />
<area shape="poly" coords="680,806,674,708,594,710,600,809" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"ffcc00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}'/>
<area shape="poly" coords="788,600,791,705,858,702,848,602" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"ffcc00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}'/>
<area shape="poly" coords="788,600,791,705,730,707,726,600" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"ffcc00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="667,601,671,708,730,707,726,600" href="#" />
<area shape="poly" coords="667,601,671,708,594,710,588,601" href="#" />
<area shape="poly" coords="786,600,786,510,873,520,848,579,848,602" href="#" />
<area shape="poly" coords="786,600,786,510,721,502,721,600" href="#" />
<area shape="poly" coords="662,600,659,495,721,502,721,600" href="#" />
<area shape="poly" coords="662,600,659,495,581,485,588,601" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"ff0049","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="884,981,799,985,796,915,876,909" href="#" />
<area shape="poly" coords="694,992,799,985,796,915,686,921" href="#" />
<area shape="poly" coords="695,992,613,997,608,926,687,921" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"ff0049","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="508,1003,613,997,608,926,505,932" href="#" />
<area shape="poly" coords="501,863,604,857,608,926,505,932" href="#" />
<area shape="poly" coords="501,863,604,857,599,793,497,799" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"ff0049","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="495,733,595,732,599,793,497,799" href="#" />
<area shape="poly" coords="485,673,591,669,596,731,495,734,485,698" href="#" />
<area shape="poly" coords="485,673,591,669,588,610,482,612" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"ff0049","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="478,550,584,548,588,610,482,612" href="#" />
<area shape="poly" coords="478,550,584,548,580,486,475,489" href="#" />
<area shape="poly" coords="465,455,463,432,576,428,581,486,476,489" href="#" />
<area shape="poly" coords="459,352,463,432,576,428,572,372" href="#" />
<area shape="poly" coords="671,389,656,494,581,485,572,372" href="#" />
<area shape="poly" coords="671,389,656,494,726,503,739,402" href="#" />
<area shape="poly" coords="812,415,797,511,726,503,739,402" href="#" />
<area shape="poly" coords="812,415,797,511,873,520,910,434" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"00ff00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="822,417,844,323,948,348,910,434" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"00ff00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="822,417,844,323,779,307,757,405" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"00ff00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="684,391,706,290,779,307,757,405" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"00ff00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="684,391,706,290,639,273,613,379" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"00ff00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="546,367,572,257,639,273,613,379" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"00ff00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="546,367,572,257,507,241,482,356" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"00ff00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
<area shape="poly" coords="417,344,438,261,457,229,507,241,482,356" href="#" alt="Shadow for some" data-maphilight='{"fillColor":"00ff00","shadow":false,"shadowBackground":"ffffff","alwaysOn":true}' />
</map>
</center>


</body>
</html>

Edited by BETEP
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy