fixing jquery syntax error in getting the data-id attr when clicking a map region
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 11 Aug 2016 14:01:07 +0000 (10:01 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 11 Aug 2016 14:01:07 +0000 (10:01 -0400)
parts/community-map.php

index 4bc5af5..2317cc1 100644 (file)
@@ -75,11 +75,9 @@ foreach ($nav_posts as $p){
         });
         console.log(site_array);
         $(region).on("click", function (){
-
-            window.location.href = site_array[$(this).getAttribute("data-id")];
+            window.location.href = site_array[$(this).attr("data-id")];
     //        window.location.href = 'https://www.google.com';
         });
-
     });
    
 </script>