Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-12-2012, 10:46 PM   PM User | #1
Tomtenisse
New to the CF scene

 
Join Date: Dec 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Tomtenisse is an unknown quantity at this point
Data from XML into imagemapster tooltip

I am working on a project involving JavaScript, since I am a flash developer and have worked mainly with ActionScript and HTML/CSS, unfortunately I am VERY new to javascript, so I´m begging for forgiveness already in case this question seems stupid.

On the site I´m working on, the user will be able to hover over different apartments and see price, etc in tooltip boxes next to every area.

I am using jquery+imagemapster for this, where every apartment is an area on the map, and so far it works great. The problem is that the client wants to be able to change the information displayed in the tooltip of each apartment via an XML document.

I am using w3schools example on http://www.w3schools.com/xml/tryit.a...yxml_app_first to get the XML data, and it works on a div but I´m having trouble getting it to show the content INSIDE the tooltip. Having trouble finding information on this, so if there´s an easy way to do this I would be really teful!

My javascript looks like this:

Code:
  var image = $('#apartments1');
            image.mapster({
            clickNavigate: true,
            mapKey: 'data-key',
            listKey: 'data-key',
            fillOpacity: 0.5,
            fillColor: '000000',
            stroke: false,
            isSelectable: false,
            singleSelect: false,
            showToolTip: true,
            toolTipClose: ["area-mouseout"],   
            clickNavigate: true,

areas:[
        {   key: "apart1", toolTip: $('<div class="tooltip">Insert XML here</div>')},
        {   key: "apart2", toolTip: "apart2" },
Tomtenisse is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:54 AM.


Advertisement
Log in to turn off these ads.