I'll give your idea a try. I am learning jQuery (albeit slowly).
Thanks for your help.
JAS
On Feb 2, 11:01 pm, Ricardo Tomasi wrote:
> You can also write your own methods, that's the beauty of jQuery:
>
> jQuery.fn.getCell = function(x,y){
> return jQuery( this[0].rows[y].cells[x] );
>
> };
I agree. The overloading does make the methods inscrutable (at least
for a beginner).
JAS
On Feb 3, 5:50 am, RobG wrote:
> On Feb 3, 7:25 am, "Michael Geary" wrote:
>
> > That didn't work because .html is a method, not a property you can set.
>
> Not exactly - the issue is that the OP is assi
Thanks, that's very clear.
JAS
On Feb 2, 10:25 pm, "Michael Geary" wrote:
> That didn't work because .html is a method, not a property you can set. This
> would have a better chance of working:
>
> $('#myTable tr:eq(4) td:eq(3)').html( 'new text' );
>
> But what was wrong with your original c
On Feb 3, 7:25 am, "Michael Geary" wrote:
> That didn't work because .html is a method, not a property you can set.
Not exactly - the issue is that the OP is assigning a value to the
jQuery.html property instead of calling the function referenced by it
and passing the value as an argument.
Th
You can also write your own methods, that's the beauty of jQuery:
jQuery.fn.getCell = function(x,y){
return jQuery( this[0].rows[y].cells[x] );
};
$('#myTable').getCell(5,1).html('New content');
- ricardo
On Feb 2, 7:25 pm, "Michael Geary" wrote:
> That didn't work because .html is a metho
That didn't work because .html is a method, not a property you can set. This
would have a better chance of working:
$('#myTable tr:eq(4) td:eq(3)').html( 'new text' );
But what was wrong with your original code? It looked fine to me (except for
the "var oCell =" part - that doesn't look right,
To set the html contents of matched elements using jQuery's .html()
method, you would do it like this:
$("#myTable tr:eq(4) td:eq(3)").html("new text")
http://docs.jquery.com/Attributes/html#val
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Feb 2, 2009
With almost 1000 cells in my table, your solution doesn't sound all
that easy to me.
thanks,
JAS
On Feb 2, 3:55 pm, jQuery Lover wrote:
> The easiest way is to give your td's unique id's and then use
> $('#colXrowY').html()
>
>
> Read jQuery HowTo Resource - http://jquery-howto.blogspot
Well I tried:
$("#myTable tr:eq(4) td:eq(3)").html = "new text";
and, while it gave no error, it also produced no result.
Any other ideas?
JAS
On Feb 2, 5:15 pm, ksun wrote:
> try $("#myTable tr:eq(4) td:eq(1)").html() for the 5th row and 2nd
> column
>
> On Feb 2, 5:46 am, JAS wrote:
>
> >
try $("#myTable tr:eq(4) td:eq(1)").html() for the 5th row and 2nd
column
On Feb 2, 5:46 am, JAS wrote:
> I am (very) new to jQuery, and I have what I think must be a simple
> question.
>
> Without jQuery, I would write:
>
> var oCell = document.getElementById('myTable').rows[5].cells
> [2].inne
The easiest way is to give your td's unique id's and then use
$('#colXrowY').html()
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Mon, Feb 2, 2009 at 3:46 PM, JAS wrote:
>
> I am (very) new to jQuery, and I have what I think must be a simple
> question.
>
> Without j
11 matches
Mail list logo