jQuery("#centeronCurrentLocationCheckBox").change(function() { if(showLocation == 0){ showLocation = 1; }else{ showLocation = 0; alert("hi"); } });
I am trying to write a function that will allow me to turn a function off with a checkbox. here is my code:jQuery("#centeronCurrentLocationCheckBox").change(function() { if(showLocation == 0){ showLocation = 1; }else{ showLocation = 0; alert("hi"); } }); I have another working checkbox that does the same as this, so I thought I would recreate it with just different titles for the function and id name. I also created a event handler function for this as well, but when I did, my map did not show up at all and I got an error that was located in the arcgis javascript api. any suggestions as to how to create the code to turn this function on and off?
function checkboxChanged(sender, evt) { if variable... return; // equal to cancel else do something... }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.