Hello, I have a question about jquery in OJET.
I have been trying to use JQuery in my OJET site, but for some reason i can't seem to execute a simple alert on a onclick. The below is a simple example. I'm not sure why i can't use Jquery, any help would be much appreciated.
html
<h1>People Content Area</h1>
<div class="alert alert-info">Click "Parse" button.</div>
<button class="btn" id="btnParse" title="Parse Tabs">Parse</button>
<div data-bind="text: something"></div>
my JS looks like this
define(['ojs/ojcore' ,'knockout', 'jquery'
], function(oj, ko) {
function peopleContentViewModel() {
var self = this;
self.something = ko.observable("Hello World");
}
$(document).ready(function () {
$(function () {
$('#btnContainer').on('click', '#btnParse', function () { alert('clicked');});
});
// bind each view model to a jQueryMobile page
ko.applyBindings(peopleContentViewModel, document.getElementById("mainCol"));
});
});