0

当“滑块”在里面时,如果它可以工作,但在信息窗口内,控件不起作用

google.maps.event.addListener(marker, 'click', function(e) {
       console.log("click");
       var template = core.common.getTemplate("RealtyHoverCard");
       if(!template) return;
       //openInfoBubble(marker, map, realty); //refactor :3
       if(window.infoBubble !== null) window.infoBubble.close();
       window.infoBubble = new InfoBubble({
       content: '<div class="hcLoading"><img src="/img/spinner-nocnok.gif"/></div>',
       // position: new google.maps.LatLng(-35, 151),
       shadowStyle: 1,
       padding: 0,
       margin: 0,
       backgroundColor: '#FFFFFF',
       borderRadius: 5,
       arrowSize: 10,
       borderWidth: 2,
       borderColor: '#DFDFDF',
       disableAutoPan: false,
       hideCloseButton: false,
       arrowPosition: 10,
       arrowStyle: 0,
       backgroundClassName: 'hcGoogleMapWrap',
       closeSrc: common.utils.getUrl('img/bubble_close.png')
});
infoBubble.setContent(template);
infoBubble.open(map, marker);
dataService.realties.getHovercard(markerDto.id, function(data){
       var hovercardViewModel = new RealtyHovercardModel(data);                            
       ko.applyBindings(hovercardViewModel, $(".realty-hovercard").last()[0]);
}, null);

http://jsfiddle.net/Jorgelig/BvErb/36/

4

1 回答 1

0

解决方法是解绑并绑定点击

dataService.realties.getHovercard(markerDto.id, function(data){

    var hovercardViewModel = new RealtyHovercardModel(data);
    ko.applyBindings(hovercardViewModel, $(".realty-hovercard").last()[0]);

    $('.carousel-control.left').off('click').on('click', function(e) {
        $('#RealtyPicturesCarousel').carousel('prev');
        return false;
    });

    $('.carousel-control.right').off('click').on('click', function(e) {
        $('#RealtyPicturesCarousel').carousel('next');
        return false;
    });
},null);
于 2013-05-29T17:35:27.457 回答