From: Anthony Talarico Date: Thu, 11 Aug 2016 14:01:07 +0000 (-0400) Subject: fixing jquery syntax error in getting the data-id attr when clicking a map region X-Git-Tag: v1.0.0^2~145 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=413e11b008fed8bc2f5ac8bcf5a169365cf581fd;p=WP-Themes%2Fpetoskeyarea.git fixing jquery syntax error in getting the data-id attr when clicking a map region --- diff --git a/parts/community-map.php b/parts/community-map.php index 4bc5af5..2317cc1 100644 --- a/parts/community-map.php +++ b/parts/community-map.php @@ -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'; }); - });