Skip to content

Commit

Permalink
Check if route works via first JS code
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Sep 12, 2023
1 parent fd5a930 commit e5e7d33
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,22 @@ document.addEventListener("turbolinks:load", function () {
$('.masonry-grid').masonry({
percentPosition: true
});
})

checkForNewsPopups();
})

function checkForNewsPopups() {
$.ajax({
url: Routes.news_popups_path(),
type: 'GET',
dataType: 'json',
success: (data) => {
console.log(data);
},
error: (xhr, status) => {
console.log('ERROR fetching news popups');
console.log(xhr);
console.log(status);
}
})
}

0 comments on commit e5e7d33

Please sign in to comment.