Tooltip on map area tag

后端 未结 1 875
醉话见心
醉话见心 2021-01-01 03:45

I have a map and area inside it with title here the code


        \"\"

        
相关标签:
1条回答
  • 2021-01-01 04:25

    Using qTip2, this is a basic implementation using your current area tags:

    Be sure to reference jQuery, jquery.qtip.min.css and jquery.qtip.min.js

    jQuery(document).ready(function (e) {
        jQuery('area').qtip({
            style: {
                classes: 'qtip-dark'
            },
            events: {
                show: function(event, api) {
                    api.set({
                        'content.text': api.elements.target.attr('title')
                    });
                }
            }
        });
    });
    
    0 讨论(0)
提交回复
热议问题