[jQuery] Column total

2009-12-28 Thread evanbu...@gmail.com
Column Total I am using this bit of code to add the values in a table column which works pretty well until it encounters a null td cell with a nbsp; value. From that point on in the loop, I receive a NaN error in my alert. I'm wondering how to ignore these non-numeric values or replace them

[jQuery] Re: Column total

2009-12-28 Thread evanbu...@gmail.com
Yes, that's very helpful and works perfectly. thanks On Dec 28, 12:55 pm, Shawn sgro...@open2space.com wrote: jQuery(function() {         var MarketCapTotal = 0;         // loop through the table    jQuery('#grdWatchlistname tbody tr').each(function() {    // replace the dollar signs

[jQuery] AND OR Expression

2009-12-10 Thread evanbu...@gmail.com
I having trouble with this line if (td4th.text() '4') || (td4th.text() '2' (activeCEO == 'Yes')) In plain English, I want it to be true if td4th 4 OR td4th 2 AND activeCEo = 'Yes' Thanks $('#tblBoardDirectors tr').each(function() { var relStatus = ($('td:nth-child(5)',

[jQuery] Re: AND OR Expression

2009-12-10 Thread evanbu...@gmail.com
the || operator it doesn't. On Dec 10, 1:29 pm, Richard D. Worth rdwo...@gmail.com wrote: Convert with parseInt and then compare int to int instead of strings https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global... - Richard On Thu, Dec 10, 2009 at 12:26 PM, evanbu

[jQuery] Re: AND OR Expression

2009-12-10 Thread evanbu...@gmail.com
var td4th = parseInt($('td:nth-child(4)', jQuery (this))); as you are parseInt-ing a jQuery object On Dec 10, 2:36 pm, evanbu...@gmail.com evanbu...@gmail.com wrote: This isn't working out for me var td4th = parseInt($('td:nth-child(4)', jQuery (this)));    if (td4th.text() 4

[jQuery] Re: Filtering table cell values

2009-12-07 Thread evanbu...@gmail.com
. On Sun, Dec 6, 2009 at 5:55 PM, evanbu...@gmail.com evanbu...@gmail.com wrote: I'm using this code hightlight any table cell in the 12th column with a value of zero which works well. //SharesHeld        jQuery('#Directorships tr').each(function() {        jQuery('#Directorships td:nth-child

[jQuery] Filtering table cell values

2009-12-06 Thread evanbu...@gmail.com
I'm using this code hightlight any table cell in the 12th column with a value of zero which works well. //SharesHeld jQuery('#Directorships tr').each(function() { jQuery('#Directorships td:nth-child(12)').filter(function() { if (jQuery(this).text() == 0)

[jQuery] Re: Remove css attribute from the DOM element

2009-12-06 Thread evanbu...@gmail.com
I like to use the addClass method rather than embed CSS in my js code. I find it easier to maintain. $('td').addClass('myCSSClass'); $('td').removeClass('myCSSClass'); On Dec 6, 6:09 pm, Joshua Partogi joshua.part...@gmail.com wrote: Hi all, What is the cleanest approach to remove a css

[jQuery] Re: Remove css attribute from the DOM element

2009-12-06 Thread evanbu...@gmail.com
I like to use CSS classes in an external stylesheet and then use the addClass method. I find the maintenance much easier this way. $('td').addClass('myCSSClass'); to remove the CSS Class $('td').removeClass('myCSSClass') On Dec 6, 6:09 pm, Joshua Partogi joshua.part...@gmail.com wrote: Hi

[jQuery] Changing background color of table cells

2009-12-05 Thread evanbu...@gmail.com
I have a table with an id of Directorships and I want to add the class bgHighlight to any cell with a value of 'D'. This code below works fine for an entire table but I just want to apply this logic to a single column of the same table rather than the whole table. Thanks. $('#Directorships

[jQuery] Re: Changing background color of table cells

2009-12-05 Thread evanbu...@gmail.com
Swedbergwww.englishrules.comwww.learningjquery.com On Dec 5, 2009, at 12:50 PM, evanbu...@gmail.com wrote: I have a table with an id of Directorships and I want to add the class bgHighlight to any cell with a value of 'D'. This code below works fine for an entire table but I just want

[jQuery] Re: Checking/unchecking parent checkbox

2009-09-30 Thread evanbu...@gmail.com
'); On Tue, Sep 29, 2009 at 6:09 AM, evanbu...@gmail.com evanbu...@gmail.comwrote: Anyone?  I've been working on this for hours and can't come up with a solution.  Thanks On Sep 28, 3:13 pm, evanbu...@gmail.com evanbu...@gmail.com wrote: I thought this would do it but no luck

[jQuery] Re: Checking/unchecking parent checkbox

2009-09-29 Thread evanbu...@gmail.com
Anyone? I've been working on this for hours and can't come up with a solution. Thanks On Sep 28, 3:13 pm, evanbu...@gmail.com evanbu...@gmail.com wrote: I thought this would do it but no luck $(this).parents(checkbox:first).attr('checked', false); On Sep 28, 2:42 pm, evanbu...@gmail.com

[jQuery] Checking/unchecking parent checkbox

2009-09-28 Thread evanbu...@gmail.com
Hi I've been using jQuery a couple of months and I'm really having a blast with it but need a little help with this problem. I have a table of records generated from a database that looks like this. Each record has a checkbox with a unique id followed by a person's name and employment status.

[jQuery] Re: Checking/unchecking parent checkbox

2009-09-28 Thread evanbu...@gmail.com
I thought this would do it but no luck $(this).parents(checkbox:first).attr('checked', false); On Sep 28, 2:42 pm, evanbu...@gmail.com evanbu...@gmail.com wrote: Hi I've been using jQuery a couple of months and I'm really having a blast with it but need a little help with this problem. I

[jQuery] Load external content into popup

2009-09-21 Thread evanbu...@gmail.com
My function loads content from an external page (field.details.preview.aspx) and loads it into a div named container. I would like to load this external content into a popup page instead. I'm not sure how to tackle this. Thanks script type=text/javascript $(document).ready(function() {

[jQuery] Hiding table rows based on value

2009-09-03 Thread evanbu...@gmail.com
Hi I have a checkbox that when clicked I want to hide all of the entire rows in my table where those fields with a class of internalField equals True. The hiding part works well but when I uncheck the checkbox the rows do not become visible again. So I guess my question is how do I toggle the

[jQuery] Re: Hiding table rows based on value

2009-09-03 Thread evanbu...@gmail.com
', 'hidden'); } }); }); }); On Sep 3, 10:30 am, evanbu...@gmail.com evanbu...@gmail.com wrote: Hi I have a checkbox that when clicked I want to hide all of the entire rows in my table where those fields with a class of internalField equals True.  The hiding

[jQuery] Re: Toggle Div Based on Value

2009-07-23 Thread evanbu...@gmail.com
, if value == retired, do this evanbu...@gmail.com wrote: Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code

[jQuery] Re: Toggle Div Based on Value

2009-07-23 Thread evanbu...@gmail.com
(){         var checkValue = $(this).parents(div).attr(value);         if (checkValue == 'Retired'){                 $(this).parents(div).toggle();         } return false; }); You will see the parents function, this allows you to traverse up the dom. evanbu...@gmail.com wrote: Right, but how do

[jQuery] Re: Toggle Div Based on Value

2009-07-23 Thread evanbu...@gmail.com
#table1.RelStatus. evanbu...@gmail.com wrote: Very cool.  This is what I have now but it only hides the first div containing the RelStatus value = 'Retired' script type=text/javascript     $(document).ready(function() {         $(#chkIncludeRetired).click(function

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread evanbu...@gmail.com
        console.log(3);         // and some more of your code here         console.log(4);     } By watching the Firebug console, you will then be able to see which of your console.log() calls were actually executed. -Mike From: evanbu...@gmail.com This is probably more of a basic javascript

[jQuery] Toggle Div Based on Value

2009-07-22 Thread evanbu...@gmail.com
Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread evanbu...@gmail.com
in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..'   From:       evanbu...@gmail.com evanbu...@gmail.com                                                                         To:         jQuery (English) jquery-en@googlegroups.com

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread evanbu...@gmail.com
...@gmail.com evanbu...@gmail.com                                                                         To:         jQuery (English) jquery-en@googlegroups.com                                                                     Date:       07/22/2009 02:18 PM

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread evanbu...@gmail.com
or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..'   From:       evanbu...@gmail.com evanbu...@gmail.com                                                                         To:         jQuery (English) jquery-en

[jQuery] Calling other functions inside a function

2009-07-21 Thread evanbu...@gmail.com
This is probably more of a basic javascript question than a specific jquery function. I have this jQuery function named validateSubmit() which calls two other regular javascript functions. When using IE, both createCharts() and getDirectorIDs get called but when using FireFox, only

[jQuery] Re: Calling other functions inside a function

2009-07-21 Thread evanbu...@gmail.com
: Hi, Can you please post the function that is not working in Firefox please? Regards On 21 Jul, 19:48, evanbu...@gmail.com evanbu...@gmail.com wrote: This is probably more of a basic javascript question than a specific jquery function.  I have this jQuery function named

[jQuery] check/uncheck all checkboxes with specific id

2009-06-30 Thread evanbu...@gmail.com
I want to check all of my checkboxes in my form that have an id that begins with 'chkEvent'. Thanks script language=Javascript type=text/javascript $(document).ready(function() { $(#toggleEvents).click(function(event){ $('inp...@type=checkbox]').each( function() { // Begin

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread evanbu...@gmail.com
to discriminate the nodes and apply the check/uncheck effect) On Jun 30, 12:38 pm, evanbu...@gmail.com evanbu...@gmail.com wrote: I want to check all of my checkboxes in my form that have an id that begins with 'chkEvent'.  Thanks script language=Javascript type=text/javascript $(document).ready

[jQuery] Toggle Text

2009-06-25 Thread evanbu...@gmail.com
Hi I'm using this to check/uncheck a group of checkboxes which works fine. However, when all of checkboxes are checked, I would like the span id=CheckAll to read Uncheck All and to toggle back to Check All when all of the boxes are unchecked. script src=js/jquery-1.3.2.min.js

[jQuery] Placing .get method results in a div tag

2008-12-18 Thread evanbu...@gmail.com
Hi I've been using jQuery all of about 12 hrs now. I want to place the results I get back from results.aspx into the div results rather than alert it out. Thanks. script type=text/javascript function addNumbers() { var number1 = $('#number1').attr('value'); var