[SOLVED] Button On Click Not Functional

This is a busy forum. I know you guys are so busy but this is sort of urgent, kindly please help!!!

I use async routing…to resolve a template with it’s context data. These work well but I have a form on this template with a button that I want to do something on it being clicked!

I want to trigger a Location - Request Permission using Phonegap!
But this it seems like it’s never loaded in the DOM.
I use DOM7, and I tried this for almost 3 Hours but Fail everytime.

$$('#findLocation').click(function () { console.log('Location Can Be Found Now!'); });

Nothing Is logged into my console regardlessly! I want to capture the on-click event of the button! How can I go about this??? I have several buttons I will want to detect events on…

Kindly Help me pleaseeeee. Thanks in advance. Blessings!

Hey Team,

I have used the DOM7 .find() function to go about this…

$$(document).on('page:init', '.page[data-name="tap-me-page"]', function (e) { $$('.page-content').find('#findLocation').on('click', function (e) { console.log('Location Can Be Found Now!'); }); });

It works perfectly… Whoever that needs it, can go about it like so…
Hope it helps someone someday!
Once again, thanks guys

1 Like