Skip to content
Snippets Groups Projects
Commit 575fb4bf authored by khawkins's avatar khawkins
Browse files

Refine .on events and selectors

Improves jQuery 2 compatibilityt
parent f098ddc0
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,7 @@ if (jQuery('body').hasClass('google-analytics-loaded')) {
// Link overlay images
$(function() {
$('.with-overlay').click(function(e) {
$('.with-overlay').on('click',function(e) {
var href = $(this).find('a:first').attr('href') || '';
if (href.length > 0) {
window.location.href = href;
......@@ -216,7 +216,7 @@ if (jQuery('body').hasClass('google-analytics-loaded')) {
// Smooth scroll anchor links for jQuery users
// -----------
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
$('a[href*=\\#]:not([href=\\#])').on('click', function() {
// Table compatibility
if ($(this).parent().parent().hasClass('tabs')) {
return true; //exit
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment