Building a menu inside of ionic 4 progressive web application and I am using ajax /jquery to load pages into a div
. Is there any way to tell the jquery / to load the href src=
of the clicked element with the specific class. instead of adding this same code 20 times to load each different page
$('.classofButton').click ( function () {
$('#content').load ('href of clicked object or link etc') ;
} );
2
Answers
You can get the href by using
this
You can do it like this.