Untitled
raw download clone
TEXT
views 12
,
size 1656 b
(function($) {


                ($("img[usemap]")).mapify({
                    hoverClass: "drop-hover",
                    popOver: {
                        content: function(zone) {
                            if (zone.attr("data-sprzedane") == "Sprzedane") {
                                return "<p class='sprzedane'>" +
                                    zone.attr("data-sprzedane") +
                                    "</p>";

                            } else {

                                return "<p class='dymek'>Numer domu: " + zone.attr("data-numer") + "</p>" +
                                    "<p class='dymek'>Powierzchnia domu: " + zone.attr("data-powierzchnia") + "</p>" +
                                    "<p class='dymek'>Powierzchnia dziaƂki: " + zone.attr("data-dzialka") + "</p>" +
                                    "<p class='dymek'>Cena: " + zone.attr("data-cena") + "</p>";

                            }
                        },
                        delay: 0.7,
                        margin: "15px",
                        height: "130px",
                        width: "260px"
                    },
                    onAreaHighlight: function() {
                        console.log("onAreaHighlight callback");
                    },
                    onMapClear: function() {
                        console.log("onMapClear callback");
                    }
                });

                $("#dynamicClassChange").click(function() {
                    $(this).attr("data-hover-class", "hover-green");
                });

            })(jQuery);
close fullscreen
Login or Register to edit or fork this paste. It's free.