Jquery to get the name of the current html file

Although not JQuery, you can access it using the following:

document.location.href.match(/[^\/]+$/)[0]

or

document.location.pathname.match(/[^\/]+$/)[0] in case of unneeded anchors/hash tags (#).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)