jquery - I need to open colorbox on a jqvmap region click -


i need open colorbox on region click on jqvmap http://jqvmap.com/

jquery('#wine-map').vectormap({         map: 'world_en',         backgroundcolor: '#000',         color: '#ffffff',         hoveropacity: 0.7,         selectedcolor: '#666666',         enablezoom: true,         scalecolors: ['#ffffff', '#eeeeee'],         normalizefunction: 'polynomial',         onregionclick: function(element, code, region){             if (code == 'us')    {                 var message = "wines usa"                 alert(message);             }         }     }); 

so instead of alert, require inline content html show via colorbox..

http://www.jacklmoore.com/colorbox/example1/

i have tried

jquery('#wine-map').vectormap({         map: 'world_en',         backgroundcolor: '#000',         color: '#ffffff',         hoveropacity: 0.7,         selectedcolor: '#666666',         enablezoom: true,         scalecolors: ['#ffffff', '#eeeeee'],         normalizefunction: 'polynomial',         onregionclick: function(element, code, region){             if (code == 'us')    {                 $.colorbox({html:'<h2>areas in usa</h2><ul><li><a href="#">california</a></li></ul> '});             }         }     }); 

which works require inline content called... inline content:

<!-- contains hidden content inline calls --> <div style='display:none'>     <div id='inline_content' style='padding:10px; background:#fff;'>         <h2>areas in usa</h2>         <ul>              <li><a href="#">california</a></li>          </ul>                 </div> </div> 


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -