Why does data.url report as undefined? (How to determine the page URL)
-
Would you help teach me why
data.url
is reporting back asundefined
?This is my code snippet:
$(window).on('action:ajaxify.end', function(data) { console.log('url is ' + data.url); });
The output in my browser console is:
url is undefined nodebb.min.js:15:22076
Edit: My goal is to determine the URL of the "page" that the user is currently at.
Thank you.
-
@baris @bentael helped me out last night. Amongst other things he confirmed that too, that being on the index page results in an empty
data.url
. He did get me going using thelocation.href
.I have to say every one on this forum has been super helpful. I intend to make a donation to Nodebb in the near future.
Copyright © 2024 NodeBB | Contributors