framework7

Open full view…

Click on list item is not working

fd222
Sun, 26 Mar 2017 13:46:41 GMT

<li><a href='#' class='item-link item-content' id='list-1'> How can i make click on list working? below is my code: $$('#list-1').on('click', function(){ myApp.alert('Hello, World!'); });

NikolayKuznetsov
Sun, 26 Mar 2017 13:51:06 GMT

https://jsfiddle.net/Nikoniko/u3afgmdu/ - click to "Click me" row

fd222
Mon, 27 Mar 2017 11:50:49 GMT

Many thanks i was using tabs and not referencing tab id. Another question how can i call about.html page on same click event? Do i need to use .html or .get?

NikolayKuznetsov
Mon, 27 Mar 2017 11:57:34 GMT

call == load? Use view.router.loadPage() or view.router.load()

fd222
Mon, 27 Mar 2017 13:44:10 GMT

Great many thanks. How can i view in console for debug if i use firebug?

fd222
Mon, 27 Mar 2017 13:58:51 GMT

One more question please: I have used mainView.router.loadPage('about.html'); which works fine but when i use code with in the about.html file it doesn't execute like : $$.getJSON("")

NikolayKuznetsov
Mon, 27 Mar 2017 15:23:09 GMT

> @fd222 > i use code with in the about.html file it doesn't execute like : $$.getJSON("") Look tutorial and examples - You have a wrong application structure.