The on () event in the on () event is always incremented.

There is another one in the

.on event. How to solve the problem is always incremented one by one when you click

.
    tree.on("nodeselect", function (e) {
        if (e.isLeaf) {
            var id = e.node.id;
            grid.load({id:id});
            var latLng = new google.maps.LatLng(e.node.lat,e.node.lng);
            tree.on("nodeclick", markerClickText(id,latLng));
 
            var div =map.getDiv();
            map.setZoom(5);//
            map.panTo(latLng);
            map.panBy(0, -(div.offsetHeight/4));//
            
        } else {
            grid.setData([]);
            grid.setTotalCount(0);
        }
    });

clipboard.png

Feb.28,2021

removed the event before adding

https://codeshelper.com/q/10.

tree.un ('nodeclick'). On ("nodeclick", markerClickText (id,latLng));

$('-sharpsub').unbind('click').click(function () {
    ...
});

$('-sharpsub').off().click(function () {
...
});

The

/ / binding event must not be put into the event, ah, if you put it in the event, you only need to remove

first.
tree.on("nodeselect", function(e){

}).on("nodeclick", function(e){

});

1. One way is to use a delegate and hang the time on the parent element
2. Second, off before on

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b0cf-2afad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b0cf-2afad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?