I am having a JavaScript class like
MyClass = function() { }
MyClass.prototype.init = function(param){ }
MyClass.prototype.reset = function() { }
if I call these function from HTML page using onClick="reset()" It works nice. But If I call these functions from jQuery it is not working. Please suggest to me.
A sample call from jQuery:
$(document).ready(
function()
{
app = new MyClass();
app.init(someid, url,
"event_handling": {
"event1":app.reset
});
})
along with the above, is it possible to add CSS rules like:
"css_class_names": {
style-1: "firstStyle",
style-2: "secondStyle"
}
If possible, then how can I apply style to the particular element which has the ID Thanks in advance!
{) in the app.init call.app.initbefore"event_handling". Edit: looks like a closing one too.