[jQuery] Re: How do I write a JQuery expression for this?

2008-07-21 Thread Karl Swedberg

On Jul 21, 2008, at 1:28 AM, Yehuda Katz wrote:


I would strongly recommend against putting a table in a span.


Absolutely agree with Yehuda.

Fortunately, Dave's second email had sample HTML that used a div  
rather than a span.


--Karl



[jQuery] Re: How do I write a JQuery expression for this?

2008-07-21 Thread Samuel Vogel
We can't really help you with the information you provided.
How is the PDF placed in the td?

You could also just toss an exerpt of your markup at us. That'd be fine...

Regards,
Samy

2008/7/21 [EMAIL PROTECTED] [EMAIL PROTECTED]:


 Within a span with class TreeView, there is a table.  Within the
 table, there are TD's.  I want to select the TD's whose content ends
 in .pdf.  How would I go about writing an expression to, say, apply
 a class to only those nodes?


 Thanks for your help, - Dave




[jQuery] Re: How do I write a JQuery expression for this?

2008-07-20 Thread [EMAIL PROTECTED]

My bad.  Here's the HTML.  I would like to write an expression to
apply a class to all the TD's that have .pdf as the last part of
their innerHTML.

div id=domRoot
div id=folder0 style=display: block;/div
div id=folder1 style=display: block;/div
div id=folder2 style=display: block;/div
div id=item4 style=display: block;
table cellspacing=0 cellpadding=0 border=0 width=100%
tbody
tr
td background=ftv2vertline.gif 
valign=top/td
td valign=top/td
td width=100% valign=middle
a id=itemTextLink4 class=draggable 
onclick=clickOnLink('4',
'link','_self');return false; target=_self href=link style=-moz-
user-select: none;cougar.pdf/a
/td

Thanks, - Dave



On Jul 20, 7:03 pm, Samuel Vogel [EMAIL PROTECTED] wrote:
 We can't really help you with the information you provided.
 How is the PDF placed in the td?

 You could also just toss an exerpt of your markup at us. That'd be fine...

 Regards,
 Samy

 2008/7/21 [EMAIL PROTECTED] [EMAIL PROTECTED]:





  Within a span with class TreeView, there is a table.  Within the
  table, there are TD's.  I want to select the TD's whose content ends
  in .pdf.  How would I go about writing an expression to, say, apply
  a class to only those nodes?

  Thanks for your help, - Dave- Hide quoted text -

 - Show quoted text -


[jQuery] Re: How do I write a JQuery expression for this?

2008-07-20 Thread Karl Swedberg

Hi Dave,

I'd do it like this:

$('td').filter(function() {
return (/\.pdf\s*$/).test($(this).text())
}).addClass('someclass');

--Karl

Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jul 20, 2008, at 9:23 PM, [EMAIL PROTECTED] wrote:



My bad.  Here's the HTML.  I would like to write an expression to
apply a class to all the TD's that have .pdf as the last part of
their innerHTML.

div id=domRoot
div id=folder0 style=display: block;/div
div id=folder1 style=display: block;/div
div id=folder2 style=display: block;/div
div id=item4 style=display: block;
table cellspacing=0 cellpadding=0 border=0 width=100%
tbody
tr
td background=ftv2vertline.gif 
valign=top/td
td valign=top/td
td width=100% valign=middle
a id=itemTextLink4 class=draggable 
onclick=clickOnLink('4',
'link','_self');return false; target=_self href=link style=-moz-
user-select: none;cougar.pdf/a
/td

Thanks, - Dave



On Jul 20, 7:03 pm, Samuel Vogel [EMAIL PROTECTED] wrote:

We can't really help you with the information you provided.
How is the PDF placed in the td?

You could also just toss an exerpt of your markup at us. That'd be  
fine...


Regards,
Samy

2008/7/21 [EMAIL PROTECTED] [EMAIL PROTECTED]:






Within a span with class TreeView, there is a table.  Within the
table, there are TD's.  I want to select the TD's whose content ends
in .pdf.  How would I go about writing an expression to, say,  
apply

a class to only those nodes?



Thanks for your help, - Dave- Hide quoted text -


- Show quoted text -




[jQuery] Re: How do I write a JQuery expression for this?

2008-07-20 Thread Yehuda Katz
I would strongly recommend against putting a table in a span. Karl's
solution below is correct. You might also do :contains(.pdf) depending on
what sort of text is in your td's.

-- Yehuda

On Sun, Jul 20, 2008 at 6:38 PM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:


 Within a span with class TreeView, there is a table.  Within the
 table, there are TD's.  I want to select the TD's whose content ends
 in .pdf.  How would I go about writing an expression to, say, apply
 a class to only those nodes?


 Thanks for your help, - Dave




-- 
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325


[jQuery] Re: How do I write this jquery expression?

2008-05-15 Thread Wizzud

var visID = $('div.subNav:visible').attr('id');

On May 15, 10:28 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 I have a number of DIVs with class = subNav.  How do I write a
 Jquery expression to tell me the ID of the DIV with class subNav
 whose display element is not none (i.e. block)?

 Thanks, - Dave


[jQuery] Re: How do I write this jquery expression?

2008-05-15 Thread Klaus Hartl

var id = $('div.subNav').filter(function() { return $
(this).css('display') == 'block'; }).attr('id');

(untested)

--Klaus



On 15 Mai, 23:28, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 I have a number of DIVs with class = subNav.  How do I write a
 Jquery expression to tell me the ID of the DIV with class subNav
 whose display element is not none (i.e. block)?

 Thanks, - Dave


[jQuery] Re: How do I write this jquery expression?

2008-05-15 Thread Ryura

var id = $(div.subNav:visible).attr(id);

On May 15, 5:28 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 I have a number of DIVs with class = subNav.  How do I write a
 Jquery expression to tell me the ID of the DIV with class subNav
 whose display element is not none (i.e. block)?

 Thanks, - Dave


[jQuery] Re: How do I write this jquery expression?

2008-04-03 Thread SnapShot

I think it's:

$(input[type=input], $(.rowData)).blur( ... )

In other words: within the context of the set of rowData element,
select the input of type text.


On Apr 3, 4:58 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 Within my TR of class rowData, how do I write a jquery onblur
 handler for every input field of type = text or every field that is
 a TEXTAREA?

 Thanks, - Dave


[jQuery] Re: How do I write this jquery expression?

2008-04-03 Thread Jake McGraw

$(tr.rowData :text, tr.rowData textarea).blur(function(){
  /* Callback goes here */
});

On Thu, Apr 3, 2008 at 4:58 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

  Hi,

  Within my TR of class rowData, how do I write a jquery onblur
  handler for every input field of type = text or every field that is
  a TEXTAREA?

  Thanks, - Dave