To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Several questions regarding jQuery Approach...
1. you can acces them like this $('tr td', this).each(...);
Also see here for custom plugins and functions:
http://jquery-howto.blogspot.com/search/label/plugin
2. when you use $('table') you'll
Question related to the same plugin:
Plugin code:
jQ.fn.table = function(options, titles, data){
if(jQ(this).length == 0){
//try to find at least one element
$.log(Matching element +jQ(this).selector+ was not
found!)
Maybe because you are return reference to the function not a jQuery object:
return this;
Read this post:
http://jquery-howto.blogspot.com/2008/12/how-to-create-jquery-plugin-extending.html
It explains why you need to return jQuery object.
On Sat, Feb 7, 2009 at 1:28 PM, ShurikAg
But it does not even get to the return statement...
On Feb 7, 12:47 am, jQuery Lover ilovejqu...@gmail.com wrote:
Maybe because you are return reference to the function not a jQuery object:
return this;
Read this
But you are saying first time you run it, it gives you 'table', the
second time you run it, it says it's not a table...
This means, the first time it is getting to the return statement... Or
did I get you wrong ?
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat,
Sorry, I have probably didn't enplane myself properly.
I'm running it once, but when I'm trying to track jQ
(this).selector (by alert), it alerts me twice in the same run: once
with table and second is empty...
On Feb 7, 1:11 am, jQuery Lover ilovejqu...@gmail.com wrote:
But you are saying
And by the way: I tried to return jQ(this)... nothing changes.
On Feb 7, 1:18 am, ShurikAg shuri...@gmail.com wrote:
Sorry, I have probably didn't enplane myself properly.
I'm running it once, but when I'm trying to track jQ
(this).selector (by alert), it alerts me twice in the same run: once
could you post your code with alert statements?
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat, Feb 7, 2009 at 2:19 PM, ShurikAg shuri...@gmail.com wrote:
And by the way: I tried to return jQ(this)... nothing changes.
On Feb 7, 1:18 am, ShurikAg
/**
*
*/
(function(jQ) {
/**
* Default options
*/
var Defaults = {
cols: 0,
rows: 0,
cssClass: null, //if not set will try to get it from the object
itself
//if titles on the first table raw is
I figured out that the problem starts here:
jQ(this).addClass(Options.cssClass);
and here:
tHead.append(tr).prependTo(this);
But these lines should not cause 2 alerts...
I just run you code and i'm getting just one alert box ?!
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat, Feb 7, 2009 at 2:45 PM, ShurikAg shuri...@gmail.com wrote:
I figured out that the problem starts here:
hm
which browser you are working with?
On Feb 7, 1:49 am, jQuery Lover ilovejqu...@gmail.com wrote:
But these lines should not cause 2 alerts...
I just run you code and i'm getting just one alert box ?!
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat, Feb
FF3
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat, Feb 7, 2009 at 2:53 PM, ShurikAg shuri...@gmail.com wrote:
hm
which browser you are working with?
On Feb 7, 1:49 am, jQuery Lover ilovejqu...@gmail.com wrote:
But these lines should not cause 2
me too
and do you get The element must be valid table element!?
On Feb 7, 1:53 am, jQuery Lover ilovejqu...@gmail.com wrote:
FF3
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat, Feb 7, 2009 at 2:53 PM, ShurikAg shuri...@gmail.com wrote:
hm
which
I'm getting this error when the lines bellow are called:
jQ(this).addClass(Options.cssClass);
...
tHead.append(tr).prependTo(this);
On Feb 7, 1:56 am, ShurikAg shuri...@gmail.com wrote:
me too
and do you get The element must be valid table element!?
On Feb 7, 1:53 am, jQuery Lover
I don't have $.log() function so i just commented those lines out...
but let me log them with console.log()...
NOPE, I did not. I just got a table alert box and that's it... Just
one alert box!
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat, Feb 7, 2009 at 2:59
instead of $.log() just put alert(); you will see the error.
My html is something like this:
...
table class=.tbl/table
...
and I'm using it as:
var $table = $('.tbl');
$table.table();
On Feb 7, 2:04 am, jQuery Lover ilovejqu...@gmail.com wrote:
I don't have $.log() function so i just
That's what I did. I put console.log() (firebug console logging).
And still not getting that message. Only alert that says table...
Probably, you are using .table() function somewhere else on non table
element ???
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat,
I'm shocked!!!
This is all I'm trying to do:
var $table = $('.tbl');
$table.table();
$table.table.SetTitles({col1:test, col3: test3, col5: not
exist});
Do you get the table titles ?
On Feb 7, 2:16 am, jQuery Lover ilovejqu...@gmail.com wrote:
That's what I did. I put console.log() (firebug
And how come this:
I'm getting this error when the lines bellow are called:
jQ(this).addClass(Options.cssClass);
...
tHead.append(tr).prependTo(this);
???
On Feb 7, 2:22 am, ShurikAg shuri...@gmail.com wrote:
I'm shocked!!!
This is all I'm trying to do:
var $table = $('.tbl');
The weird thing is that it worked perfectly well until I inserted the
functions into table namespace...
On Feb 7, 2:24 am, ShurikAg shuri...@gmail.com wrote:
And how come this:
I'm getting this error when the lines bellow are called:
jQ(this).addClass(Options.cssClass);
...
I tried something:
If I pass to initUI this, and using it as bellow:
jQ.fn.table.initUI = function(obj){
if(Initialized){
//return;
}
Options.cols = Object.size(Titles);
c = 0;
//set scc if
I tried to debug the code and the second alert is fired when
table.initUI() returns.
It's probably how browsers work. When you call .table.initUI() it
probably goes through the .table as well.. or something... sounds
weird though :)
Anyway, it's good you have resolved your problem :)))
Good
By the way, for some reason, this:
1. you can acces them like this $('tr td', this).each(...); Also see
does not work
Thanks a lot.
Last question, is it a good idea to pass the object just in order to
stay in the same namespace?
On Feb 7, 2:51 am, jQuery Lover ilovejqu...@gmail.com wrote:
I tried to debug the code and the second alert is fired when
table.initUI() returns.
It's probably how browsers work.
I think namespacing is always a good idea :)
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat, Feb 7, 2009 at 3:57 PM, ShurikAg shuri...@gmail.com wrote:
Thanks a lot.
Last question, is it a good idea to pass the object just in order to
stay in the same
9:14 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Several questions regarding jQuery Approach...
1. you can acces them like this $('tr td', this).each(...);
Also see here for custom plugins and functions:
http://jquery-howto.blogspot.com/search/label/plugin
2. when you
1. you can acces them like this $('tr td', this).each(...); Also see
here for custom plugins and functions:
http://jquery-howto.blogspot.com/search/label/plugin
2. when you use $('table') you'll get a selection of all tables. If
you do this you would get the same object instance:
var $table =
Thank you very much!!!
I have just answered to all I was interested in this topic!
Thanks.
On Feb 6, 11:13 pm, jQuery Lover ilovejqu...@gmail.com wrote:
1. you can acces them like this $('tr td', this).each(...); Also see
here for custom plugins and
29 matches
Mail list logo