Reputation: 1248
I am working with the plugin SVGA USA Map from: http://codecanyon.net/item/interactive-svg-usa-map/1021095. I am able to add the extra string but it is appended right next to the state name like so: AlabamaextraString when i want it to appear like this: Alabama extraString
here is the code i playing with i figured their is an easy way of doing this but i am just not thinking of it. directJobs[id] is the extra string i am adding by appending it. Please any help would be greatly appreciated. i don't have access to ask the author as of right now.
$('#map').next('.point').remove();
$('#map').after($('<div />').addClass('point'));
$('.point').html(stateNames[id]).css({
left: mouseX - 50,
top: mouseY - 70
}).append(directJobs[id]).fadeIn();
Upvotes: 0
Views: 42
Reputation: 488
You're appending the directJobs[id] string to stateNames[id] with no other characters separating the two. Something like this should work:
$('#map').next('.point').remove();
$('#map').after($('<div />').addClass('point'));
$('.point').html(stateNames[id]).css({
left: mouseX - 50,
top: mouseY - 70
}).append(" " + directJobs[id]).fadeIn();
Upvotes: 1