2014-05-21

I have a map and I want to open each part in new window by a link, but I cant have them in new window.I use target="_blank", but it doesnt work.I know that I must change my js but I cant.my js is :

/* Interactieve kaart / $(document).ready(function() { if ($('#kaart').length) { $('#kaart area').each(function() { $(this).mouseover(function(e) { var provincie_id = $(this).attr('id').replace('area_', ''); $('#' + provincie_id).show(); this.t = this.title; this.title = ''; this.top = (e.pageY + 35); this.left = (e.pageX - 5); $('body').append('' + this.t + '

'); $('p#vtip #vtipArrow').attr("src", '/fr/wp-content/themes/axabank/img/tooltip_arrow.png'); $('p#vtip').css("top", this.top + "px").css("left", this.left + "px").fadeIn("medium"); }); $(this).mousemove(function(e) { this.top = (e.pageY + 30); this.left = (e.pageX + 2); $('p#vtip').css("top", this.top + "px").css("left", this.left + "px"); }); $(this).mouseout(function(e) { var provincie_id = $(this).attr('id').replace('area_', ''); $('#' + provincie_id).hide(); this.title = this.t; $("p#vtip").fadeOut("slow").remove(); }); $(this).click(function(e) { e.preventDefault(); var provincie_id = $(this).attr('id').replace('area_', ''); var provincie_href = $(this).attr('href'); //alert('You clicked ' + provincie_id); window.location = provincie_href; //window.open = (provincie_href, '_blank'); }); }); } if ($('#trouwegebruikers').length) { $('#trouwegebruikers').anythingSlider({ mode: 'h', // fade mode - new in v1.8! resizeContents: false, // If true, solitary images/objects in the panel will expand to fit the viewport buildArrows: false, // If true, builds the forwards and backwards buttons buildNavigation: false, // If true, builds a list of anchor links to link to each panel buildStartStop: false, autoPlay: true, hashTags: false, delay: 3500 }); } if ($('#kortingen').length) { $('#kortingen').anythingSlider({ mode: 'h', // fade mode - new in v1.8! resizeContents: false, // If true, solitary images/objects in the panel will expand to fit the viewport buildArrows: false, // If true, builds the forwards and backwards buttons buildNavigation: false, // If true, builds a list of anchor links to link to each panel buildStartStop: false, autoPlay: true, hashTags: false, delay: 3500 }); } if ($('#highlight').length) { $('#highlight').animate({ opacity: 1 }, 500); } if ($('#kaart').length) { $('#kaart').animate({ opacity: 1 }, 500); } if ($('#banner').length) { $('#banner').animate({ opacity: 1 }, 500); } / begin modal / //select all the a tag with name equal to modal $('a[name=modal]').click(function(e) { //Cancel the link behavior e.preventDefault(); $("html:not(:animated),body:not(:animated)").animate({ scrollTop: 0 }, 500); //Get the A tag var id = $(this).attr('rel'); document.getElementById("ifdynamic").src = id; id = "#dialog"; //Get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); //Set heigth and width to mask to fill up the whole screen $('#mask').css({ 'width': maskWidth, 'height': maskHeight }); //transition effect $('#mask').fadeIn(400); $('#mask').fadeTo("slow", 0.8); //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); //Set the popup window to center $(id).css('top', winH / 2 - $(id).height() / 2); $(id).css('left', winW / 2 - $(id).width() / 2); //transition effect $(id).fadeIn(600); }); //if close button is clicked $('.window .close').click(function(e) { //Cancel the link behavior e.preventDefault(); $('#mask').hide(); $('.window').hide(); }); //if mask is clicked $('#mask').click(function() { $(this).hide(); $('.window').hide(); }); }); / BK-Select version 1.0 * Copyright (c) 2012 by Bobkhin * Skype: ducdhm * Mail: ducdhm@gmail.com / (function($) { $.fn.bkSelect = function() { if($.browser.msie && $.browser.version === "6.0") { return $(this); } else { var $selects = $(this); for(var i = $selects.length - 1; i >= 0; i--) { var $select = $selects.eq(i), disableCls = $select.is(":disabled")?" disabled":"", $options = $select.find("option"), $selectedOption = $select.find("option:selected"); value = $selectedOption.html(); $select.wrap(""); var $wrapper = $select.parent().append("" + value + ""), optionsStr = "
"; for(var j = 0, l = $options.length; j < l; j++) { var $option = $options.eq(j) actived = $option.is(":selected")?" actived":""; optionsStr += "" + $option.html() + ""; } optionsStr += "
"; // Calculate width of wrapper select $wrapper.append(optionsStr).find("ul").css({ "position": "static", "display": "block", "visibility": "hidden", "targer": "_blank" }); $wrapper.css("width", $wrapper.width() + 30).find("ul").css({ "position": "absolute", "display": "none", "visibility": "visible", "targer": "_blank" }); } return $selects.parent(); } }; $(function() { var $root = $("body"); $root.delegate(".bk-select:not([class=disabled])", "mouseover mouseout", function() { $(this).toggleClass("hover"); }); $root.delegate(".bk-select:not([class*=disabled]) span", "click", function() { var $this = $(this), $wrapper = $this.parent(), $ul = $wrapper.find("ul"); $(".bk-select").not($wrapper).css("z-index", "").find("ul").css("display", "none"); if($ul.is(":hidden")) { $wrapper.css("z-index", 9999); $ul.css("display", "block"); } else { $ul.css("display", "none"); } return false; }); $root.delegate(".bk-select ul li", { "mouseover mouseout": function() { $(this).toggleClass("hover"); }, click: function() { var $this = $(this), value = $this.attr("rel") || $this.html(), html = $this.html(), $ul = $this.parent(), $wrapper = $ul.parent(), $form = $wrapper.parent(); if(!$this.hasClass("actived")) { $this.addClass("actived").siblings().removeClass("actived"); $wrapper.find("span").html(html); $wrapper.find("select").val(value); } if ($form.hasClass("regiokeuze_cat")) { /* on template category.php / doThis(value); } else if ($form.hasClass("regiokeuze")) { / on other templates (resturant.php, wellness.php, hotel.php, trouwegebruikers-hotels.php / $form.submit(); } else if ($form.hasClass("typekeuze")) { / keuze hotel/resto/wellness / linkTo(value); } else { / no class on form if only one option */ //nothing } $ul.css("display", "none"); $wrapper.css("z-index", ""); } }); }); }(jQuery)); function linkTo(sel){ optVal = sel; if(optVal=="") return false; if(optVal == 2) { window.location='/nl/category/kortingen/hotel/'; } if(optVal == 1) { window.location='/nl/category/kortingen/restaurant/'; } if(optVal == 3) { window.location='/nl/category/kortingen/wellness/'; } }

Show more