Jump to content

Bonaparte

Members
  • Posts

    2
  • Joined

  • Last visited

About Bonaparte

  • Birthday 08/14/1991

Previous Fields

  • Languages
    English, German, Italian

Profile Information

  • Location
    Cluj-Napoca

Bonaparte's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Ok, I understand... so, I tried to change the coords from the original script with SVG map made by me in Adobe illustrator, but after that it doesn't work. How can I change the shapes ?
  2. Hi, can someone tell me how can I use this jQuery code for my own image map. ( In PNG format ) <html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>The World Is Mine </title> <script type='text/javascript' src='http://code.jquery.com/jquery-1.8.0.js'></script> <link rel="stylesheet" type="text/css" href="/css/normalize.css"> <link rel="stylesheet" type="text/css" href="/css/result-light.css"> <script type='text/javascript' src="https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael-min.js"></script> <style type='text/css'> </style> <script type='text/javascript'>//<![CDATA[$(window).load(function(){jQuery(document).ready(function(){ var selectie = []; $('#sel').click(function(){ alert('Select Now: ' + selectie.join(',')); }); Raphael('map', 1000, 400, function () { var r = this; r.rect(0, 0, 1000, 400, 10).attr({stroke: "none"}); r.setStart(); for (var country in worldmap.shapes) { r.path(worldmap.shapes[country]).attr({stroke: "#ffffff", fill: "#5CADFF", title: country}); } var world = r.setFinish(); world.click(function(){ var tzara = this.attr('title'); if(!this.data('selectat')){ this.data('selectat', 1); this.attr('fill', '#B8DBFF'); selectie.push(tzara); selectie = $.unique(selectie); }else{ this.removeData('selectat'); this.attr('fill', '#5CADFF'); var exista = $.inArray(tzara, selectie); if(~exista) selectie.splice(exista, 1); } }); });}); It is possible to use this effect ( u can see running here: http://jsfiddle.net/Bonaparte/QK325/1/ ) for my PNG map ?
×
×
  • Create New...