128
rated 0 times
[
131]
[
3]
/ answers: 1 / hits: 23211
/ 13 Years ago, wed, june 8, 2011, 12:00:00
This is a simple question I know, I've looked on google but can't find much help. I'm trying to create an object, with my own custom parameters, and then call one of them in an alert.
Whatever I try, doesn't seem to work, I know this is pretty simple stuff and I appologise! All my other JS in my time have been pretty simple and all inline because of that, I'm moving on to more OOP JS now.
$.fn.DataBar = function() {
$.DataBar.defaultOptions = {
class: 'DataBar',
text: 'Enter Text Here'
}
this.greet = function() {
alert(this.text);
};
}
var q = new $.DataBar();
q.greet();
More From » jquery