Re: [jQuery] Re: Jquery .submit not firing up!

2009-12-23 Thread Peter Laws
If there's an error, the dredded IE doesn't throw up any error, normally its on the ball in that department. And I can't post a link (unless I do it privately?) as its a pre-production site. FWIW, I copied the example from the JForm site letter by letter - still not firing; removed all other java

[jQuery] Problem with a search form in a loaded php file??

2009-12-23 Thread 123gotoandplay
hi, have simple search form which works in list.php Now i am 'loading' list.php in #content and now the search function doesn't work. what i have done - change the type from submit to button - in index.php i added $("#content #search_button").click(function() { alert("click");

[jQuery] Re: UI dialog, How to center buttons

2009-12-23 Thread RobGMiller
Thanks Richard, Too simple. On Dec 22, 12:13 pm, "Richard D. Worth" wrote: > .ui-dialog .ui-dialog-buttonpane { text-align: center; } > .ui-dialog .ui-dialog-buttonpane button { float: none; } > > - Richard > > > > On Tue, Dec 22, 2009 at 1:44 PM, RobGMiller wrote: > > What is the easiest way t

[jQuery] Problem with window focus event in Firefox 3.5/Win Vista?

2009-12-23 Thread paul s
Hi folks, I'm having a problem using: jQuery(window).bind("focus", function(event) { alert("test"); }); in Firefox. I'd expect a single alert box when I focus on the window. However in Firefox I get 4 alert boxes in a row? IE6, 7 and 8 are fine with this and produce the expected, single alert

[jQuery] Re: $(checkbox).css('background-color',value) does not work on FireFox?

2009-12-23 Thread Šime Vidas
> So, on Safari, the code for the checkbox passes.  On Firefox, it does not. > Funny thing, the element has a style for the background color, but > .css('background-color') is not returning the color I set.  It is returning > rgb(255,255,255). What do you mean by "in Safari the code passes" ? >

[jQuery] Re: js function to jQuery

2009-12-23 Thread Šime Vidas
Well, it actually gets even shorter... you can combine the two selectors into one jQuery("#TreeviewTd, #MenuBarTd").toggle(); I have no experience with the UpdatePanel, but I encourage you to get rid of all other AJAX libraries and stick to jQuery... Can you tell me why jQuery(document).read

[jQuery] IE issue - not all data received from ajax response

2009-12-23 Thread bumpalump
Hi I have problem with Internet Explorer and jQuery ajax. My jQuery code is: Code: Select all $.ajax({ type : 'POST', url : 'ajax_user_func.php', dataType : 'html', data: { iv_filter_mode: $('#filter_realtime:checked').val(), team: $('#filter_

[jQuery] window.parent.document.getElementById('msgAlert').innerHTML

2009-12-23 Thread ajijogja
hi... im aji n im newbie in jQ . . i want to know how use jQ with this : window.parent.document.getElementById('msgAlert').innerHTML . . thx be4

[jQuery] Re: How to validate fields

2009-12-23 Thread Šime Vidas
I don't get what you mean. Show us the code...

[jQuery] Re: IE Issue with jquery.form.js

2009-12-23 Thread geni...@gmail.com
Myabe not for that topic, but I think the problem with IE is the same. Why html example works in IE here http://www.malsup.com/jquery/form/#html and nothing workes here: http://raut.ru/comment/form.html when it is actually the same copy? Even I copied the whole page here: http://raut.ru/comment/for

Re: [jQuery] How to get these two slide show to alternate?????

2009-12-23 Thread Leonardo Balter
first you forgot a "{" in the first cycle, maybe you already noticed this. Second, trying to help you: why don't you try to use for both slideshows a delay of 3000ms but a timeout of 3 secs in the first and 6 secs in the other one. This make the right magic for you? 2009/12/23 Rick Faircloth >

[jQuery] Image Upload and preview

2009-12-23 Thread amy
Hi I have todo an Image upload with Preview and I am using a jsp and servlet for it. I am stuck at a point and not getting a way out. my JSP page looks like: function submitImage() { $.post("UploadFileServlet2", {func: "doPost"}, function (d

[jQuery] Latest JQuery File

2009-12-23 Thread David Matchoulian
Dear jQuery Guys, I downloaded the latest file, and when i opened it in dreamweaver and scrolled through the code i noticed that half the code is colored blue, that is half the code is considered "string", i tryed to fix it myself but i didn't since i was afraid that i might ruin the code. What is

Re: [jQuery] Meta question about this newsgroup

2009-12-23 Thread Leonardo Balter
Pastebin (http://pastebin.com) as the best reedit option and http://jsbin.com as the best "as working" example option. 2009/12/22 aquaone > Providing a link to a live site or using a pastebin type site (e.g. > http://jsbin.com/) is likely your best bet. > > aquaone > > > On Tue, Dec 22, 2009 at

Re: [jQuery] Re: js function to jQuery

2009-12-23 Thread Leonardo Balter
Nah, make it sexier, use parenteses (tip from the new John Resig's ebook): ( var $ = window.jQuery; $("#CollapseExpandTd").click( function() { $("#TreeviewTd").toggle(); $("#MenuBarTd").toggle(); }); ); $ will be a local variable and unicorns will come to see the magic runni

[jQuery] [Superfish] onHide event fires more than it should

2009-12-23 Thread Nick Pierpoint
Hello. Just started using the Superfish plugin - wonderful job. I'm trying to use the "onHide" event but have noticed that the event is fired more frequently than necessary: $("ul.sf-menu").supersubs({ minWidth:12, // minimum width of sub-menus in em units

[jQuery] Jquery + ie7 spans

2009-12-23 Thread Alex Mcauley
Morning and happy holidays!.. I am having some trouble with jQuery and IE7 quirks (suprise suprise).. Basically i wrote a script that truncates some text and when "More Details" is clicked - JQuery unhides the truncated text and adds a "Less Details" link at the bottom (which inturn hides the rev

[jQuery] Re: not able to receive POST data in php file

2009-12-23 Thread Alex Mcauley
Looks like a problem in the PHP/SQL... 1. Make sure $vote is an integer else you will have to wrap it in '' inside the SQL UPDATE statement. 2. The INSERT statement should wrap like this ... INSERT INTO `table_name` (`column1`,`column_2`) VALUES ('$value_1','$value_2') 3. You can save yourself a f

Re: [jQuery] Problem with window focus event in Firefox 3.5/Win Vista?

2009-12-23 Thread Leonardo Balter
Try the .one( event type, callback fn ) method 2009/12/23 paul s > Hi folks, > > I'm having a problem using: > > jQuery(window).bind("focus", function(event) { alert("test"); }); > > in Firefox. > > I'd expect a single alert box when I focus on the window. However in > Firefox I get 4 alert boxe

[jQuery] Tabs - Sliding and Fading DIV

2009-12-23 Thread Yoyo
Hi, I am trying to make 3 tabs with sliding and fading DIVs. My questions: Is there any better way to make this? How can I also fade when the slides are going up and down? .button { width: 200px; height: 50px; float: left; cursor: hand; } .content

[jQuery] jquery star rating

2009-12-23 Thread Christoph
Hi! Does anyone have "hearts-icons" to replace the star icon in jquery star rating? Thanks, Chris

Re: [jQuery] Problem with a search form in a loaded php file??

2009-12-23 Thread Leonardo Balter
First of all: an Id is meant to be unique, so you can start with $('#search_button') selector and test it all again. 2009/12/23 123gotoandplay > hi, > > have simple search form which works in list.php > > Now i am 'loading' list.php in #content and now the search function > doesn't work. > > w

Re: [jQuery] Latest JQuery File

2009-12-23 Thread Charlie Griefer
I'd wager this is an issue with Dreamweaver's parsing of the code. You should -not- be modifying the core jQuery files, unless you really -really- know what you're doing. And if that's the case, you still really should -not- be modifying the core jQuery files. On Tue, Dec 22, 2009 at 11:34 PM, D

RE: [jQuery] How to get these two slide show to alternate?????

2009-12-23 Thread Rick Faircloth
Yes, I found the missing “{“, but thanks for pointing that out. I tried your combination of timings, but it still didn’t work. I tried that combination before, but again, it just causes a change sequence like: start - first slide changes 3 sec later- sec

[jQuery] Re: Problem with a search form in a loaded php file??

2009-12-23 Thread Scott Sauyet
On Dec 23, 4:37 am, 123gotoandplay wrote: > Now i am 'loading' list.php in #content and now the search function > doesn't work. You might want to look at question 2.1 of the FAQ [1] or at the Ajax and Events Tutorial [2] to see if that's the issue. -- Scott [1] http://docs.jquery.com/Frequent

[jQuery] Re: How to get these two slide show to alternate?????

2009-12-23 Thread Scott Sauyet
On Dec 22, 10:56 pm, "Rick Faircloth" wrote: > Just alternate the two slideshow transitions 3 seconds apart. > > Why won't this work? > >    $('.slideshow').cycle(delay: 3000, timeout: 3000}); >$('.slideshow2').cycle({delay: 6000, timeout: 3000}); I haven't used the plugin, but looking at the

[jQuery] Problem with jQuery and AJAX

2009-12-23 Thread Muaz
Hello I have this problem I am facing for past couple of days. I am using the following jQuery code jQuery(document).ready(function(){ jQuery("#login").click(function(){ jQuery("#logbox").slideToggle("slow"); }

[jQuery] Re: Jquery .submit not firing up!

2009-12-23 Thread Mike Alsup
If you can't post a link then create a very simplified example that demonstrates the problem and post a link to that. Mike On Dec 23, 4:23 am, Peter Laws wrote: > If there's an error, the dredded IE doesn't throw up any error, > normally its on the ball in that department. > > And I can't post

[jQuery] Re: Problem with window focus event in Firefox 3.5/Win Vista?

2009-12-23 Thread Scott Sauyet
On Dec 23, 5:29 am, paul s wrote: > I'm having a problem using: > > jQuery(window).bind("focus", function(event) { alert("test"); }); > > in Firefox. > > I'd expect a single alert box when I focus on the window. However in > Firefox I get 4 alert boxes in a row? I get an unending stream of them u

[jQuery] Re: Jquery .submit not firing up!

2009-12-23 Thread Scott Sauyet
On Dec 23, 9:25 am, Mike Alsup wrote: > If you can't post a link then create a very simplified example that > demonstrates the problem and post a link to that. And if you haven't used it, JSBin is an excellent place to do it: http://jsbin.com/ -- Scott

Re: [jQuery] Re: Jquery .submit not firing up!

2009-12-23 Thread Bharani kumar srinivasan
this is the live demo url, look this link. u will find error in Firefox, i dont have prob in IE.. On Wed, Dec 23, 2009 at 7:55 PM, Mike Alsup wrote: > If you can't post a link then create a very simplified example that > demonstrates the problem and post a link to that. > > Mike > > > On Dec

[jQuery] Re: Problem with jQuery and AJAX

2009-12-23 Thread Scott Sauyet
On Dec 23, 9:00 am, Muaz wrote: > login and loggedin are two div which are on same place. Both divs are > recreated by AJAX but after they are recreated jQuery stops working > untill i manually refresh the page (Copying my reply from another thread...) You might want to look at question 2.1 of t

[jQuery] Re: Image Upload and preview

2009-12-23 Thread Scott Sauyet
On Dec 23, 1:57 am, amy wrote: > Hi I have todo an Image upload with Preview and I am using a jsp and > servlet for it. I am stuck at a point and not getting a way out. > [ .. ] > I am unable to view the image. The control flows to servlet and gets > stuck there. It does not move back to jsp. If

[jQuery] Change "this" when binding element

2009-12-23 Thread Ami
I am suggestion for new small feaute in jQuery. add a new proeprty to "bind" function. a Scope property. sometimes I am binding a function inside object. So I need a solution to change the scope of this function. something like: $().bind('click',data,scope,function) For Examp

[jQuery] Re: Change "this" when binding element

2009-12-23 Thread Ami
One solution is to use the data property like: function myObj() { document.bind('scroll',this,this.myScroll); this.myScroll=function (data) { //Now I am trying to get this.a alert(data.a)} } But I am sure that changing the scope will work better. On Dec 23, 5:03 p

[jQuery] Re: jQuery Selector Help

2009-12-23 Thread Mike Walsh
[ ... snipped ... ] > > ... and after looking at your code (which always helps), I see you're > referencing "this" (as opposed to jQuery's $(this)), which is why html() > wouldn't have worked. > > In that case, sure.  It's been said that "this" is more efficient than > creating a jQuery reference

Re: [jQuery] Re: jQuery website search function

2009-12-23 Thread Karl Swedberg
On Dec 23, 2009, at 2:29 AM, RobG wrote: On Dec 22, 10:51 pm, Schalk Neethling wrote: Hi there, I was wondering whether anyone knows if the jQuery website has some sort of API to access the search functionality of the site? Stimulus, response... function searchDoc

Re: [jQuery] Re: $(checkbox).css('background-color',value) does not work on FireFox?

2009-12-23 Thread John Arrowwood
I mean that in Safari and Firefox, the code produces: Whether there is a visual modification or not, Safari at least tells me that the background-color is what I set it to be. Firefox tells me it is white. I was simply wondering whether or not I should waste time trying to figure out a work-ar

[jQuery] Re: Does jquery have problems with webkit browsers?

2009-12-23 Thread pw
You were right (as I too had suspected), the problem was not with jquery. The Chrome JS interpreter balked at a line of my code (which looked something like '[var1,var2]=somestring.split(":");' which is perhaps a bit Perlish, but which the Firefox JS interpreter didn't mind). Once I fixed that, t

Re: [jQuery] Problem with jQuery and AJAX

2009-12-23 Thread John Arrowwood
I think the problem here is that you are destroying and then re-creating the elements. When you destroy the element, you lose all of the event handlers that you had associated with them. Try changing to: jQuery('#login').live('click',function... And see if that doesn't solve your problem. On

[jQuery] AJAX request

2009-12-23 Thread Octavian Râşniţă
Hi, I am trying to make a function that does an AJAX request if the user typed at least 3 chars in a text field. I have tried: $(document).ready(function(){ $('#term').keyup(function(){ if ($(this).val().length >= 3) { sendValue($(this).val()); } }); }); If I type at le

[jQuery] Targeting/selecting via the title atribute of a link?

2009-12-23 Thread Janmansilver
I have to add som jquery magic to a link where the only unique identifier is the "title"-atribute? my code: How do I target this via Jquery?

Re: [jQuery] Targeting/selecting via the title atribute of a link?

2009-12-23 Thread Charlie Griefer
$('a[title=blog]') On Wed, Dec 23, 2009 at 8:30 AM, Janmansilver wrote: > I have to add som jquery magic to a link where the only unique > identifier is the "title"-atribute? > > my code: > > > > How do I target this via Jquery? > -- Charlie Griefer http://charlie.griefer.com/ I have faile

[jQuery] Re: Targeting/selecting via the title atribute of a link?

2009-12-23 Thread Janmansilver
Thanks a million, I thought I read something similar in the documentation but I got a bit confused over the example/presentation, but your example is simple and easy and it works perfectly. Thanks! On Dec 23, 5:33 pm, Charlie Griefer wrote: > $('a[title=blog]') > > On Wed, Dec 23, 2009 at 8:30 A

[jQuery] Sending all checked checkboxes

2009-12-23 Thread spiraldev
How would I go about send all of my checked checkboxes with the class of "filter" via ajax?

Re: [jQuery] Sending all checked checkboxes

2009-12-23 Thread Charlie Griefer
If I'm understanding you properly... $('input:checkbox.filter:checked') would give you an array of checked checkboxes with class="filter" How you send them via AJAX depends on what the file on the server is expecting. On Wed, Dec 23, 2009 at 9:46 AM, spiraldev wrote: > How would I go about sen

[jQuery] using ":gt" - Firefox error console annouces an error

2009-12-23 Thread fran23
I'm using $(".s:gt(2)")... and it works fine, but Firefox 3.5.6 throws an error in the error console: Unbekannte Pseudoklasse oder Pseudoelement 'gt' ... in English (about) unknown pseudo class or pseudo element 'gt' It seems to be a bug in Firefox. Does anybody (but me) observed this ? fran

[jQuery] JQuery Validate div selector issues

2009-12-23 Thread p...@scotche.gg
Hi Guys I am trying to get validate to work, but I am soo close and yet soo far! I think the problem is the selector and way i append the error or valid classes to the label, or specify the element for errors? Can anyone see the mismatch or problem? HTML example... [code]Company Name:

[jQuery] .add()

2009-12-23 Thread Scott
Maybe I'm not understanding the point of .add() but it doesn't really do what I'd expect nor can I figure out how to do what I thought would be simple. I want to combine 2 jquery objects. var $obj1 = $(".stuff"); var $obj2 = $(".morestuff"); $obj1.add($obj2); alert($obj1.length); This doesn't do

Re: [jQuery] .add()

2009-12-23 Thread Charlie Griefer
As per the docs (http://docs.jquery.com/Traversing/add), $("div").css("border", "2px solid red") .add("p") .css("background", "yellow"); That will add a 2px red border around any 'div' element. Then add in a new selector and grab all of the elements. Add a yellow ba

[jQuery] Re: .add()

2009-12-23 Thread MorningZ
I think you are trying to merge the jQuery array of items found by ".stuff" and ".morestuff" var $obj1 = $(".stuff"); var $obj2 = $(".morestuff"); $obj1.add($obj2); alert($obj1.length); the problem is the line $obj1.add($obj2); doesn't assign the value back to variable "$obj1", so the next line

[jQuery] Re: .add()

2009-12-23 Thread Scott
Uh, that's not what I'm asking at all. In the documentation example you're passing .add() the "p" selector which is a string. I want the end result to be the same except instead of passing a selector string like "p" I want to pass an existing jquery object. It doesn't seem to work this way and the

[jQuery] Re: .add()

2009-12-23 Thread Scott
> $obj1 = $obj1.add($obj2); Ok, this is what I was missing. I don't know why I assumed it would work this way when .filter() is the same.

Re: [jQuery] Re: .add()

2009-12-23 Thread Charlie Griefer
Sorry, misunderstood. I wasn't clear on what you were trying to do, but saw the "Maybe I'm not understanding the point of .add()", so was trying to clarify that. Glad MorningZ got you sorted :) On Wed, Dec 23, 2009 at 10:59 AM, Scott wrote: > Uh, that's not what I'm asking at all. > > In the d

[jQuery] Re: IE Issue with jquery.form.js

2009-12-23 Thread dirknibleck
I discovered my problem, and it's self-created. What I don't understand now is why it worked in other browser... :-) The offender is: $("img.add_person_autocomplete_action").click(function(event){ $("form#insert_person_modal").resetForm(); $("div#insert_person_modal_popup").cs

[jQuery] Re: .add()

2009-12-23 Thread MorningZ
"I don't know why I assumed it would work this way when .filter() is the same" filter doesn't work the same either... as http://jsbin.com/imifa/edit chaining sticks to the current processed line, it doesn't remember for later processing unless it's told to :-) On Dec 23, 2:07 pm, Scott wrote

Re: [jQuery] Re: js function to jQuery

2009-12-23 Thread Leonardo Balter
Maybe the asp.Net ajax is still working and changing elements when the DOM is ready in the page. I would encourage you to get rid of your asp.net ajax too. It's a nightmare of issues. 2009/12/23 Šime Vidas > Well, it actually gets even shorter... you can combine the two > selectors into one

[jQuery] Re: JQuery Validate div selector issues

2009-12-23 Thread scotchegg
one issue to add :) I want the message text in the div inputbottom-text, but also on error update or replace the inputrightdiv with inputrightdiv-valid , as this class has my green tick. Is it possible to alter a div class on error, but place error text into another div? thanks again for any help

Re: [jQuery] problems with event triggering in IE6, presumably 5.5 as well.

2009-12-23 Thread Jeff @ FreeThought
Adam-241 wrote: > > I'm working on getting what should be a simple rollover effect done in > jquery, and it works like a charm in firefox and safari, but IE is not > having any of it. > ... > the problem seems to be that the layered divs I'm using to capture the > user's mouseover event are empt

[jQuery] [AUTOCOMPLETE]

2009-12-23 Thread Jake Moon
Is it possible to open the select list on focus? Best regards, Jake Moon

[jQuery] Failure event with jquery and form plug-in

2009-12-23 Thread James Calfee
The form plug-in documentation does not show a failure event. Can this be done? I'm reading it is in AJAX, so is this supported in the form plug-in too?

[jQuery] Padding eases in and out when I slide my content down...

2009-12-23 Thread cpix
Please take a look at the issue at crackpixels.com/test When you click on the "about/contact" link on top, the content slides down but the padding eases in as well. I read that the div needs to be nested in another div in order to fix the problem but it's not working for me. Anyone care to help me

[jQuery] Sub menu - long line of text

2009-12-23 Thread jamesict
Hi, I am trying to get a long line of text on a submenu to show completely. I changed the CSs from 330px min-width to 530px which did bring it all onto one line, however, this caused all of the shorter titles above to double onto one line. Is there any other way to do this? Thanks for any advice

[jQuery] jQuery Cycle Multiple Pagers

2009-12-23 Thread pmAgony
Hello Experts, I'm looking for some guidance on implementing multiple pagers on a jQuery Cycle plugin. My goal is as follows: 1. On hover of #slideshow, reveal left and right arrows so the user can navigate previous/next. Exactly like the lightbox feature. 2. Thumbnails of the images below the

[jQuery] Re: How to validate fields

2009-12-23 Thread __benatti
I don't have any code yet, I'm trying to do. But What I need is show an alert message when the third same value is entered. TEST <- first entry TEST <- second entry TEST <- alert message TEST1 <- first TEST2 <- first my HTML is strucuted as below . . . Is possible to help me with this issu

[jQuery] Re: .add()

2009-12-23 Thread Scott
I don't know how to communicate very well, I meant I don't know why I'd think .add() would work any different than .filter() does. On Dec 23, 1:38 pm, MorningZ wrote: > "I don't know why I assumed it would work this way when .filter() is > the same" > > filter doesn't work the same either... > >

[jQuery] how to get current sort order from tablesorter plugin?

2009-12-23 Thread vcohen
I'm just starting to use Christian Bach's excellent TableSorter plugin, and I need to get a column's current sort direction. I have several columns: ID Name Category ID and Name are set to non-sortable using headers:{ 0: {sorter: false}, 1: {sorter: false} } I'm adding a click handler on N

Re: [jQuery] how to get current sort order from tablesorter plugin?

2009-12-23 Thread aquaone
I believe tablesorter's internal sort is stored under "config.sortList" for the table DOM element. It's a multidimensional array of column indices and sort direction, e.g. [[2,0][0,1]]. aquaone On Wed, Dec 23, 2009 at 15:46, vcohen wrote: > > I'm just starting to use Christian Bach's excellent

[jQuery] Re: How to validate fields

2009-12-23 Thread Šime Vidas
You mean this? http://vidasp.net/jquery-example2.html

Re: [jQuery] Re: How to validate fields

2009-12-23 Thread Alexander Benatti
Yes, is this that I want, thanks for your help 2009/12/23 Šime Vidas > You mean this? > > http://vidasp.net/jquery-example2.html >

[jQuery] .attr issue in Chrome on Windows

2009-12-23 Thread Scott Wilcox
Hi folks, I'm using the Google CDN hosted JQuery file listed below: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js I have this function below which works fine in Firefox (all os's), Safari and Chrome on mac, but not Chrome on Windows. Very strange! function switchImage(t,filename)

[jQuery] Re: $(checkbox).css('background-color',value) does not work on FireFox?

2009-12-23 Thread Šime Vidas
I did some more testing and it is true that Firefox is the only mayor browser that returns the white color, instead of the actual background color... However, if you use the camelcase notation it will work even in Firefox. $("#mycheckbox").css("backgroundColor"); // works in all browsers $("#mych

[jQuery] Re: Latest JQuery File

2009-12-23 Thread Šime Vidas
LOL If you downloaded the jQuery library from www.jquery.com, than you can be sure that it's valid leave it as it is. It seems that the syntax highlighter in Dreamweaver isn't smart enough to cope with the advanced JS code from jQuery :)

[jQuery] how to access elements with index in for-loop

2009-12-23 Thread Eric Zhong
when i use for-loop to access elements with array index or get() method it doesn't work. but i have to use the index to access, what happen please . ok: http://jsbin.com/olego wrong: http://jsbin.com/ulixu

[jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Eric Zhong
2009/12/24 Eric Zhong > when i use for-loop to access elements with array index or get() method it > doesn't work. > but i have to use the index to access, what happen please . > > > ok: http://jsbin.com/olego > wrong: http://jsbin.com/ulixu > wrong:http://jsbin.com/axugi

[jQuery] Re: js function to jQuery

2009-12-23 Thread RobG
On Dec 23, 2:06 pm, Leonardo Balter wrote: > Nah, make it sexier, use parenteses (tip from the new John Resig's ebook): > > ( var $ = window.jQuery; >    $("#CollapseExpandTd").click( >    function() { >       $("#TreeviewTd").toggle(); >       $("#MenuBarTd").toggle(); >     }); > ); > > $ will

[jQuery] Re: js function to jQuery

2009-12-23 Thread RobG
On Dec 23, 6:58 am, jqHunter wrote: > Hi All, > > I have the following js function used in an old web app. How can I > translate this to equivalent jQuery code? Appreciate your help! > > function expandCollapse_onclick() > { >     var treeCell = document.getElementById("TreeviewTd"); >     var t

[jQuery] Re: using ":gt" - Firefox error console annouces an error

2009-12-23 Thread Šime Vidas
This works fine in my Firefox 3.5.6 * some content some content some content some content some content some content some content some content some content some content $(document).ready(function() { $(".s:gt(2)").css("color", "red"); }); **

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Richard D. Worth
What about using .each? http://docs.jquery.com/Core/each#callback - Richard On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong wrote: > > > 2009/12/24 Eric Zhong > > when i use for-loop to access elements with array index or get() method it >> doesn't work. >> but i have to use the index to access,

[jQuery] Re: .attr issue in Chrome on Windows

2009-12-23 Thread Šime Vidas
Well, what is the value of the src attribute in Chrome (if it's not what is should be)? Have you made sure that the arguments t and filename are strings?

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Eric Zhong
2009/12/24 Richard D. Worth > What about using .each? > > http://docs.jquery.com/Core/each#callback > > - Richard > > > On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong > wrote: > >> >> >> 2009/12/24 Eric Zhong >> >> when i use for-loop to access elements with array index or get() method it >>> does

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Richard D. Worth
The index is passed as the first argument to the callback function you provide to .each. - Richard On Wed, Dec 23, 2009 at 8:49 PM, Eric Zhong wrote: > > > 2009/12/24 Richard D. Worth > > What about using .each? >> >> http://docs.jquery.com/Core/each#callback >> >> - Richard >> >> >> On Wed, De

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Eric Zhong
thanks again, i think i have understand your mind. Thanks! 2009/12/24 Richard D. Worth > The index is passed as the first argument to the callback function you > provide to .each. > > - Richard > > > On Wed, Dec 23, 2009 at 8:49 PM, Eric Zhong > wrote: > >> >> >> 2009/12/24 Richard D. Worth >

[jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Šime Vidas
First of all, the "wrong" code is wrong, look this is your code: $(function(){ var trs = $("#tb tr:not(:first)") for( var i=0; i<$trs.length; i++ ) { //$trs[i].find("td:eq(1)").attr("style","color:red"); //wrong $trs.get(i).find("td:eq(1)").a

[jQuery] Re: Autosuggest breaks in ie7/8

2009-12-23 Thread GJK
Want to let you now it's fixed and it works great now under ie7/8. And want to thank especially MorningZ for your help. There was one little error in your fix. And I found nice little debug tool for JSON -> http://www.jsonlint.com After adding the array then imploding in the php code it worked grea

[jQuery] toLowerCase method works in Google Chrome but not IE

2009-12-23 Thread ArnieML
Hi, Code snippet is as follows: function setStartMood(cookiemood) { if(cookiemood) { $("#moodlist").val(cookiemood); $("#plsselectmood").css( {'visibility': 'hidden'} ); mood = cookiemood.toLowerCase();

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Eric Zhong
thank you very much, your way is better than mine ! 2009/12/24 Šime Vidas > > First of all, the "wrong" code is wrong, look this is your code: > > $(function(){ >var trs = $("#tb tr:not(:first)") > >for( var i=0; i<$trs.length; i++ ) { >//$trs[i].find("td:eq(1

RE: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Rick Faircloth
Ø this is a pretty stupid way to loop through a jQuery object Is it necessary to be insulting to be helpful, Eric? What was your code like when you first began to write JS or jQuery? Always perfect and mature, I’m sure… Rick From: jquery-en@googlegroups.com [mailto:jquery...@google

Re: [jQuery] Re: js function to jQuery

2009-12-23 Thread Michael Geary
Unicorns are a mythical creature, and so is that use of parentheses. Could this be the syntax you were looking for? (function() { var $ = window.jQuery; $("#CollapseExpandTd").click( function() { $("#TreeviewTd").toggle(); $("#MenuBarTd").toggle(); }); })(); That puts al

[jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread MorningZ
On Dec 23, 10:01 pm, "Rick Faircloth" wrote: > Ø  this is a pretty stupid way to loop through a jQuery > object > > Is it necessary to be insulting to be helpful, Eric?  What was your > > code like when you first began to write JS or jQuery?  Always > > perfect and mature, I’m sure… > > Rick The

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Michael Geary
Don't sweat it, dude. First off, Eric didn't post the comment you're referring to. And if he had, I'd be inclined to cut him some slack. After all, Eric's English is *much* better than my Chinese (or whatever Eric's native language is). Second, we all post something once in a while that offends a