10-08-2012 01:34 PM - edited 10-08-2012 01:35 PM
hi, i have a small bbui and webworks app.
now i need to add some jQuery code but i dont know where to exactly add it. me want to add for example something like this:
$(document).ready(function () {
$("#Div1").click(function () {
alert("Hello world!");
});
});i added this to my index.htm, but my code where the Div1 element is, is in a home.htm which is loaded via bb.pushScreen
its not working, do i have to add the jQuery code to every "screen" where i want to use it?
Solved! Go to Solution.
10-08-2012 01:45 PM
10-08-2012 01:51 PM
I know where to place it in a "normal" jQuery page, but here the bb.pushScreen is special.
but i solved it now:
bb.pushScreen('home.htm', 'home');then i use the following:
ondomready: function(element, id) {
if (id == 'home') {
$("#Div1").click(function () {
alert("Hello world!");
});
}
} and it works ![]()