[jQuery] Re: Can I get the contents from respose by ajax
And I found the load is not work either, because it still get the construct not the value for example div id=test/div $(document).ready(function) { $('#test').load('ajax.php #a'); }); and the result was div id=testdiv id=a123/div/div, what I exactly want is div id=test123/div On 1月11日, 下午8時13分, Balazs Endresz balazs.endr...@gmail.com wrote: As jQuery parses this html the output will contain three elements: title, meta, and the div instead of the single html. So .find() won't work because it will search in the descendant elements, but filter will return '#a' because it's an element of the current jQuery object. $('html/html') doesn't work either, I guess it's not possible to create an html element so easily. You can also try setting the dataType option to html (or maybe xml). On Jan 11, 11:13 am, David .Wu chan1...@gmail.com wrote: I tried all your suggestion, but got some weired result. ajax.html !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleajax/title script type=text/javascript src=js/jquery-1.2.6.js/script /head body div id=response/div input name=btn type=button value=ajax id=btn / script language=javascript !-- $(document).ready(function() { $('#btn').click(function() { $.ajax( { url:'ajax.php', cache:false, success:function(res) { $('#response').html($('#a',res).text()); //got nothing $('#response').html($(res + ' #a').text()); //got ajaxtest contents $('#response').html($(res).find('#a').text()); //got nothing } }); }); }); //-- /script /body /html ajax.php !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleajax/title /head body div id=atest contents/div /body /html On 1月10日, 上午2時11分, dropcube ronnyh...@gmail.com wrote: is there any way to get the value 123 straight from div? yes, just apply a jQuery selector to the response content and get whatever you need. In this example: $('#a', res).text(); OR $(res).find('#a').text(); You can also try with $.load that allows you to specify a jQuery selector in the URL.
[jQuery] Re: Simulate BackSpace key
Thank to all! I do it! function setCursorPosition(textArea, selOffset) { if (document.selection) { // IE, Opera var sel = document.selection.createRange(); sel.collapse(true); sel.moveStart('character', selOffset); textArea.focus(); sel.select(); return true; } else if (window.getSelection) { // Mozilla/Netscape... var selection = window.getSelection(); range = selection.getRangeAt(0); range.setStart(range.startContainer,range.startOffset+selOffset); textArea.focus(); return true; } return false; } Only one tible :( - in Opera this work incorrect. Have you any idea? On 9 янв, 16:50, jQuery Lover ilovejqu...@gmail.com wrote: You can't trigger but can achieve the same effect :) An you will definitely deal with Ranges to make your code cross browser :) jQuery HowTo Resource - http://jquery-howto.blogspot.com On Fri, Jan 9, 2009 at 7:43 PM, Ricardo Tomasi ricardob...@gmail.com wrote: You can't actually trigger a keypress, only it's event listeners. I think you'll have to deal with ranges:https://developer.mozilla.org/En/DOM/Range
[jQuery] Re: Simulate BackSpace key
What do movePrev() and .moveNext() function? I know'n that functions in jQuery. On 12 янв, 09:48, ggerri a...@ggerri.com wrote: Hi I've done something similar with the Tab. Maybe that helps. You'll need the FIELDS Plugin for that: $(#PG1_L02-4-5) .bind('keydown',function(e) { switch(e.keyCode) { case 9: // tab if(e.shiftKey) { $(this) .movePrev() .movePrev(); } else { $(this) .moveNext() .moveNext(); } break; }; }); Regards Gerald On Jan 9, 12:17 pm, RSol viacheslav.rud...@gmail.com wrote: I write WYSWYG editor and use to editing 'div' tag with .attr ('contentEditable','true') On 9 янв, 08:23, jQuery Lover ilovejqu...@gmail.com wrote: Here is how to simulate a backspace in javascript: getElementById('yourTextBox').Select(TextBox1.SelectionStart - 1, 1) getElementById('yourTextBox').SelectedText = jQuery HowTo Resource - http://jquery-howto.blogspot.com-Hide quoted text - - Show quoted text -
[jQuery] Re: Can I get the contents from respose by ajax
Use filter with $.ajax: $('#response').html($(res).filter('#a').text()); On Jan 12, 9:30 am, David .Wu chan1...@gmail.com wrote: And I found the load is not work either, because it still get the construct not the value for example div id=test/div $(document).ready(function) { $('#test').load('ajax.php #a'); }); and the result was div id=testdiv id=a123/div/div, what I exactly want is div id=test123/div On 1月11日, 下午8時13分, Balazs Endresz balazs.endr...@gmail.com wrote: As jQuery parses this html the output will contain three elements: title, meta, and the div instead of the single html. So .find() won't work because it will search in the descendant elements, but filter will return '#a' because it's an element of the current jQuery object. $('html/html') doesn't work either, I guess it's not possible to create an html element so easily. You can also try setting the dataType option to html (or maybe xml). On Jan 11, 11:13 am, David .Wu chan1...@gmail.com wrote: I tried all your suggestion, but got some weired result. ajax.html !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleajax/title script type=text/javascript src=js/jquery-1.2.6.js/script /head body div id=response/div input name=btn type=button value=ajax id=btn / script language=javascript !-- $(document).ready(function() { $('#btn').click(function() { $.ajax( { url:'ajax.php', cache:false, success:function(res) { $('#response').html($('#a',res).text()); //got nothing $('#response').html($(res + ' #a').text()); //got ajaxtest contents $('#response').html($(res).find('#a').text()); //got nothing } }); }); }); //-- /script /body /html ajax.php !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleajax/title /head body div id=atest contents/div /body /html On 1月10日, 上午2時11分, dropcube ronnyh...@gmail.com wrote: is there any way to get the value 123 straight from div? yes, just apply a jQuery selector to the response content and get whatever you need. In this example: $('#a', res).text(); OR $(res).find('#a').text(); You can also try with $.load that allows you to specify a jQuery selector in the URL.
[jQuery] Re: jQuery 1.3rc1 error with :not()
I have 3 html TABLES in my DOM, $('table:not(:first)').length() gave me 2 (correct) tables in 1.2.6 gives me 5?? tables in 1.3rc1 El 12/01/2009 3:15, John Resig escribió: Hey Everyone - jQuery 1.3rc1 is ready. This means that 1.3 is effectively finished barring a horrible bug between now and the final release on Wednesday (the 14th). You can grab the source here: http://code.jquery.com/jquery-1.3rc1.js Please let me know, personally, if you find some bad new bug and we can triage it together. A screenshot of the final test run can be found here (on 8 browsers): http://flickr.com/photos/jeresig/3189240673/ Who else here is excited to get this out the door? --John -- Enrique Meléndez Estrada (2367) Servicios Informáticos Organización y Servicios Internos Instituto Tecnológico de Aragón
Re: Fw: [jQuery] Re: IMAP PHP is possible or not !!!!
Sorry, what do you mean? - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sun, Jan 11, 2009 at 7:01 PM, bharani kumar bharanikumariyer...@gmail.com wrote: So , need to increase the speed, i thing my english is very poor, On Sun, Jan 11, 2009 at 7:30 PM, bharani kumar bharanikumariyer...@gmail.com wrote: retrieves mail list, it will take around 40 sec for retrieve mail list, so need to increase the
[jQuery] Dialog - Can't Copy or Select Text
Hi, I Set up a JQuery Dialog in my site. But in FF the user can't select or copy text from the Dialog. And in IE Ctrl + C doesn't work after selecting a text. Another Question: how to disable the resizing of the Dialog. Thanks Rafael.
[jQuery] Re: Saving HTML as an image...
However, drawing using javascript *is* possible. You need the canvas tag. There is a public script that makes it possible to have one solution for both IE and Mozilla and Safari. Do check though, whether the user can do save as. I'm not sure. Another thing is, it doesn't involve jQuery... :( Good luck, Paul On Jan 12, 3:21 am, brian bally.z...@gmail.com wrote: You'll certainly have to look at something server-side. I suggest you create a form with hidden fields that jQuery populates (I'm assuming that the data is user-generated) and which is then sent to an application to create the chart/graph. If you use PHP, you coulduse the PEAR Image_Graph package, for example. On Sun, Jan 11, 2009 at 7:02 PM, mumbojumbo madmediabl...@gmail.com wrote: Hello, I'm working on an application that will use jquery to make charts and graphs and I want to allow the user to save the html as an image. Can this be done? This really isn't a jquery question per se, but I would like to know if jquery could do it/ or if it can be done at all. MJ
[jQuery] jQuery.noConflict() is not working
Hi! I am using following things in separate JS file: a- var dom = {}; dom.query = jQuery.noConflict(true); b- var jQ = jQuery.noConflict(); c- jQuery.noConflict(); Neither of above work and Firbug gives error. But $ works perfectly. Can some one guide me where I am doing mistake. Thanks in advance
[jQuery] function text() in jquery
hello, Im kinda new in jquery so maybe its a begginer question. I have a page with a div containing some text and a combobox. something like that div id=testText hello this is text and this is combobox selectoption value='1'1/optionoption value='2'2/optionoption value='3'3/option/select/div I wrote a function which return the text from the div. alert($('#testText').text()); My problem is that the function also return the text inside the combobox. is there a way to filter out the combobox text? the only workaround I can think of is to wrap my text in another div and call its text. This workaround will be a bit complicated for me because the text on my page is dynamic and it can come after the input field or before the input field so I just want to get the text inside the div without the input fields text... (This only happens with combobox). tnx, Kazuar -- View this message in context: http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p21410667.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Jquery tablesorter problem
when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Is there a delay when passing data to trigger method?
I have this strange problem. what i notice is when i am sending an AJAX request then i get the response say in xxx ms. but it takes additional seconds to pass the response data to an element. to make it clear here is what im doing. 1. register a custom event listener on a particular element. 2. request to server (expecting JSON) 3. script receive the data in xxx ms. 4. trigger the custom event and pass the small data to trigger method. 5. interpret data. my problem starts on step 3 - step 5 when i receive the response (using firebug to monitor time) it will take a few more seconds to trigger my custom event. I have no idea why :( here is the website http://cls.creativouae.com
[jQuery] AJAX delay response.
Could anyone tell me what is wrong with this code? :( function sendAjaxRequest(param,listener){ $.ajax({ type: POST, dataType: json, url: index.php?page=ajax, data: param, success: function(data){ if(data.status==0){ $(#+listener).trigger('trueSuccess',[data]); }else{ $(#+listener).trigger('trueError',[data]); } }, error: function(){ data='An Unexpected error has occured. Please try again later.'; $(#+listener).trigger('unexpectedError',[data]); } }); } success event trigger a few more seconds after the response is already received from the server. 1. response received + few more seconds before triggering success. this is the only time i encountered this one. some of my projects is not the same as this. But on my previous projects i did not put it in a function and not in a separate JS file. this is right here is on a different js file and within a function. Does it matter? Im really lost pls help website is http://creativouae.com/creativo_leave
[jQuery] load script regarding to value of textfield
hello community, i have some kind of a beginner question and i really would appreciate if you could help me with that. when someone types a value into the textfield and clicks on search or enter than the javascript line should be called regarding to the entered value. this should happen without reloading the complete page. # FORM form id=searchForm action= input type=text name=searchText id=searchText value= size=30 maxlength=30/ input type=button name=searchButton id=searchButton class=button buttonText value=Search / /form # Script to call script type=text/javascript src=http://gdata.youtube.com/feeds/api/ videos?q=' + searchTerm + 'alt=json-in- scriptcallback=showMyVideosmax-results=7format=5/script see the SearchTerm in the js line, it should be replaced with the value of the textfield. thank you very much in advance! dirk
[jQuery] Re: Problem with creating dynamic html...
Thank you. I will check it later. On Jan 11, 3:01 pm, Mike Alsup mal...@gmail.com wrote: This is in html (by default) input type=hidden id=brojacgrupa value=1 / div id=grupe div id=grupa1 class=grupa input type = hidden id=grupa1 value=1/ div class=dodatni-sastojcispan class=naslov- posKolicina/span span class=kolicina-posNaslov/span/div div id=grupa-sadrzaj div id=grupa-list div div class=dodani-sastojciinput name=vrijednosti[][1][kol] type=text title=Količina npr. 100ml, 10 kom i sl. / /div div class=dodani-sastojciinput name=vrijednosti[][1][naziv] type=text title=Primjer: U polje količina unesete 10 kom, a u naslov jaja. //div div class=dodani-clear/div /div /div span class=novisastojakDodaj sastojak/ span/div /div /div div id=grupanovi /div span id=novagrupaNova grupa/span When i click on grupanovi it creates: $('#grupanovi').append('div id=grupediv id=grupa'+document.getElementById('brojacgrupa').value+' class=grupainput type = hidden id=grupa'+document.getElementById ('brojacgrupa').value+' value='+document.getElementById ('brojacgrupa').value+'/div class=dodatni-sastojcispan class=naslov-posKolicina/span span class=kolicina-posNaslov/ span/divdiv id=grupa-sadrzajdiv id=grupa-listdivdiv class=dodani-sastojciinput name=vrijednosti[][1][kol] type=text title=Količina npr. 100ml, 10 kom i sl. / /divdiv class=dodani-sastojciinput name=vrijednosti[][1][naziv] type=text title=Primjer: U polje količina unesete 10 kom, a u naslov jaja. //divdiv class=dodani-clear/div/div/ divspan class=novisastojakDodaj sastojak/span/div/div/ div'); But this works only on default: $(.novisastojak).click(function(){ alert('testiram'); }); not on dynamical content created. Help? }); Here's two resources you should read: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st... http://www.learningjquery.com/2008/03/working-with-events-part-1 Note that with the soon-to-be-released 1.3 version of jQuery this situation will be much easier to handle. Mike
[jQuery] Re: jQuery.noConflict() is not working
There's no reason why any of those wouldn't work You need to provide more information/live-sample-page to help others help you rest assured that the .noConflict functionality does indeed work On Jan 12, 3:47 am, Bluesapphire michealg...@gmail.com wrote: Hi! I am using following things in separate JS file: a- var dom = {}; dom.query = jQuery.noConflict(true); b- var jQ = jQuery.noConflict(); c- jQuery.noConflict(); Neither of above work and Firbug gives error. But $ works perfectly. Can some one guide me where I am doing mistake. Thanks in advance
[jQuery] Re: Jquery tablesorter problem
in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] How to grab the filename (src attribute) of an image?
Hi all, how do i grab the filename of an image? Situation now: i use normal javascript when clicking on an image and just inserted some jquery to post gamedata to update a gamepage with the help of the taconite plugin (returns xml-data), so far so good. I just miss one item = i need the filename (src attribute of the image) of the image on which was clicked, ut just can't figure out how to grab it. Thanks in advance for your help.
[jQuery] Re: How to grab the filename (src attribute) of an image?
$('img').click(function() { var fileName = $(this).attr('src'); alert(fileName); }); Maurício -Mensagem Original- De: webmas...@terradon.nl Para: jQuery (English) jquery-en@googlegroups.com Enviada em: segunda-feira, 12 de janeiro de 2009 10:59 Assunto: [jQuery] How to grab the filename (src attribute) of an image? Hi all, how do i grab the filename of an image? Situation now: i use normal javascript when clicking on an image and just inserted some jquery to post gamedata to update a gamepage with the help of the taconite plugin (returns xml-data), so far so good. I just miss one item = i need the filename (src attribute of the image) of the image on which was clicked, ut just can't figure out how to grab it. Thanks in advance for your help.
[jQuery] [treeview] Expand the trees on the image and no link
Hello, I would like to know how to: - Permetre the conduct of a tree by clicking on the image (or file folder with a +) but when and clicking on the hyperlink (a href=index.php blabla / a ) the tree does not take place. Thank you for your help.
[jQuery] Posting Repeating Ajax Requests
Is there some like quering for repeating Ajax requests. like i want to query a url via ajax every 2 seconds is there an option natively in jquery for that currently I am using setInterval('func()', 2000) i just wanted to know if there is anything natively available.
[jQuery] [treeview] Expand the trees on the image and no link
Hello, I would like to know how to: - Permetre the conduct of a tree by clicking on the image (or file folder with a +) but when and clicking on the hyperlink (a href=index.php blabla / a ) the tree does not take place. Thank you for your help.
[jQuery] Correct me!
Hi! I have used following things in separate JS file so no conflict will be there between JQUERY and other JS frameworks. a- var dom = {}; dom.query = jQuery.noConflict(true); b- var jQ = jQuery.noConflict(); c- jQuery.noConflict(); But when I used jQ or others, FireBug gives error. But in usage of $ , there is no problem and all works fine. Can someone solve my problem. Thanks in advance
[jQuery] Re: How to grab the filename (src attribute) of an image?
I believe he/she is binding an event with javascript not jquery's event binding. Webmaster you can refer to an element which was clicked with this keyword. So to get your image source just use this.src property. Example: img src=... onClick=alert(this.src) / The same when applying with event listeners... - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 6:05 PM, Mauricio (Maujor) Samy Silva css.mau...@gmail.com wrote: $('img').click(function() { var fileName = $(this).attr('src'); alert(fileName); }); Maurício -Mensagem Original- De: webmas...@terradon.nl Para: jQuery (English) jquery-en@googlegroups.com Enviada em: segunda-feira, 12 de janeiro de 2009 10:59 Assunto: [jQuery] How to grab the filename (src attribute) of an image? Hi all, how do i grab the filename of an image? Situation now: i use normal javascript when clicking on an image and just inserted some jquery to post gamedata to update a gamepage with the help of the taconite plugin (returns xml-data), so far so good. I just miss one item = i need the filename (src attribute of the image) of the image on which was clicked, ut just can't figure out how to grab it. Thanks in advance for your help.
[jQuery] Re: Correct me!
User this sintax: (function ($) { // code goes here // Here $ is a jQuery reference })(jQuery) More detailed description is here: http://jquery-howto.blogspot.com/2008/12/what-heck-is-function-jquery.html - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 12:51 PM, Bluesapphire michealg...@gmail.com wrote: Hi! I have used following things in separate JS file so no conflict will be there between JQUERY and other JS frameworks. a- var dom = {}; dom.query = jQuery.noConflict(true); b- var jQ = jQuery.noConflict(); c- jQuery.noConflict(); But when I used jQ or others, FireBug gives error. But in usage of $ , there is no problem and all works fine. Can someone solve my problem. Thanks in advance
[jQuery] Re: append() not working on dynamically-created nodes in IE
Yep, that was all it took. Thanks! On Jan 11, 3:43 pm, Karl Rudd karl.r...@gmail.com wrote: Try closing the tag, ie: $('#myDiv').append($('h2/h2')); Actually the second $() shouldn't be needed: $('#myDiv').append('h2/h2'); Karl Rudd On Mon, Jan 12, 2009 at 7:35 AM, Joe White vulcanvik...@gmail.com wrote: I'm troubleshooting a problem where my text wasn't showing up in IE. I've narrowed the problem down to creating a DOM node dynamically (with $(html)) and then passing it to append(). In FireFox, append will add the node as expected; but when passed a dynamically-created node in IE, it does nothing. No error message is displayed; it just silently fails, and no node is added to the page. Here's a trivial example: $('#myDiv').append($('h2')); I put that code into the ready event, on a page with a div id=myDiv. I also added some CSS to put a border on the h2, so I'd be able to see whether it got added. Result: in FireFox, I can see the border, proving that the h2 got added. In IE, nothing. No error. If, instead, I find an existing h2 using its selector (e.g. $ ('#myH2')), and append() that (instead of a dynamically-created one), then IE works fine; it moves that existing element into myDiv. It appears to just be when a DOM element is dynamically created with $ (html), and then append()ed, that there's a problem. Full example: html head styleh2{border:1px solid blue;}/style script src=../vendor/jquery/jquery-1.2.6.js/script script $(function(){ $('#myDiv').append($('h2')); }); /script /head body div id=myDiv/div /body /html Expected behavior: when you run this, you should get a blank page with a 2px-tall blue line extending across the page. (This is the border around the h2.) FireFox shows this expected behavior. Actual behavior (IE6 on Windows): you get a blank page. The status bar just says Done like usual, and does not show that any errors occurred. Is this a bug in jQuery? Or am I misunderstanding how $(html) is meant to be used?
[jQuery] Form validation, not typical name of input.
Hi, i have problem with validation for my form. For example: form id=valid input type=text name=data[Order][login] / /form $('#valid').validation({ rules: { 'data[Order][login]': 'required', } }); The validation method above dosn't work. Where is the problem? With not typical name of input?
[jQuery] Re: [treeview] Expand the trees on the image and no link
Did I understand you correctly. Your html code is like this: img/ a href=link/a And you want to show tree content if user clicks on an image, but follows the link on anchor click? If so you should give you img's an id (or class, but id's are faster) and do this: $(document).ready(function(){ // Assume you wrapped your code to some div id=myTree $('#myTree img').click(function(){ // code to display your content }); }); - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 4:58 PM, cv adgoo...@cwi.fr wrote: Hello, I would like to know how to: - Permetre the conduct of a tree by clicking on the image (or file folder with a +) but when and clicking on the hyperlink (a href=index.php blabla / a ) the tree does not take place. Thank you for your help.
[jQuery] Re: Form validation, not typical name of input.
Nevermind, it's working, problem was in other place. On 12 Sty, 14:19, grassoalvaro grassoalv...@yahoo.com wrote: Hi, i have problem with validation for my form. For example: form id=valid input type=text name=data[Order][login] / /form $('#valid').validation({ rules: { 'data[Order][login]': 'required', } }); The validation method above dosn't work. Where is the problem? With not typical name of input?
[jQuery] Re: Form validation, not typical name of input.
You might find this useful (just as a note for the future) http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 6:40 PM, grassoalvaro grassoalv...@yahoo.com wrote: Nevermind, it's working, problem was in other place. On 12 Sty, 14:19, grassoalvaro grassoalv...@yahoo.com wrote: Hi, i have problem with validation for my form. For example: form id=valid input type=text name=data[Order][login] / /form $('#valid').validation({ rules: { 'data[Order][login]': 'required', } }); The validation method above dosn't work. Where is the problem? With not typical name of input?
[jQuery] Re: function text() in jquery
anyone? kazuar wrote: hello, Im kinda new in jquery so maybe its a begginer question. I have a page with a div containing some text and a combobox. something like that div id=testText hello this is text and this is combobox selectoption value='1'1/optionoption value='2'2/optionoption value='3'3/option/select/div I wrote a function which return the text from the div. alert($('#testText').text()); My problem is that the function also return the text inside the combobox. is there a way to filter out the combobox text? the only workaround I can think of is to wrap my text in another div and call its text. This workaround will be a bit complicated for me because the text on my page is dynamic and it can come after the input field or before the input field so I just want to get the text inside the div without the input fields text... (This only happens with combobox). tnx, Kazuar -- View this message in context: http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p21414973.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Posting Repeating Ajax Requests
There is no option in jquery for auto requests in a set period of time. The javascript native setInterval() is a better option don't you think ?! - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 4:50 PM, Adeel Shahid imadeelsha...@gmail.com wrote: Is there some like quering for repeating Ajax requests. like i want to query a url via ajax every 2 seconds is there an option natively in jquery for that currently I am using setInterval('func()', 2000) i just wanted to know if there is anything natively available.
[jQuery] Re: function text() in jquery
This is quite tricky. I could not figure out how to get the text (probably I should go home:) ). If there is no other solution here is a dirty trick: var tmp = $('#testText select'); //remove the select box $('#testText select').remove(); // get the text within the div var txt = $('#testText').text(); // put back the selectbox $('#testText').append(tmp); - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 7:01 PM, kazuar kazuar...@gmail.com wrote: anyone? kazuar wrote: hello, Im kinda new in jquery so maybe its a begginer question. I have a page with a div containing some text and a combobox. something like that div id=testText hello this is text and this is combobox selectoption value='1'1/optionoption value='2'2/optionoption value='3'3/option/select/div I wrote a function which return the text from the div. alert($('#testText').text()); My problem is that the function also return the text inside the combobox. is there a way to filter out the combobox text? the only workaround I can think of is to wrap my text in another div and call its text. This workaround will be a bit complicated for me because the text on my page is dynamic and it can come after the input field or before the input field so I just want to get the text inside the div without the input fields text... (This only happens with combobox). tnx, Kazuar -- View this message in context: http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p21414973.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: function text() in jquery
$(#testText).clone().remove('select').text() won't work as the remove method doesn't remove the elements from the jQuery object, just from the DOM. Here's how it should work: var e = $(#testText).clone(); var select = e.find('select')[0]; e[0].removeChild(select); alert( e.text() ); On Jan 12, 3:01 pm, kazuar kazuar...@gmail.com wrote: anyone? kazuar wrote: hello, Im kinda new in jquery so maybe its a begginer question. I have a page with a div containing some text and a combobox. something like that div id=testText hello this is text and this is combobox selectoption value='1'1/optionoption value='2'2/optionoption value='3'3/option/select/div I wrote a function which return the text from the div. alert($('#testText').text()); My problem is that the function also return the text inside the combobox. is there a way to filter out the combobox text? the only workaround I can think of is to wrap my text in another div and call its text. This workaround will be a bit complicated for me because the text on my page is dynamic and it can come after the input field or before the input field so I just want to get the text inside the div without the input fields text... (This only happens with combobox). tnx, Kazuar -- View this message in context:http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jQuery UI Tabs Flash
This is because of how browsers work. What's happening is that the browser is downloading all the HTML and beginning to display it. Then when the DOM is 'ready', jquery is running the code you've specified which creates the tab interface. To avoid this issue you have to use CSS to 'hide' the content that you don't want displayed on page load. So if you have 3 tabs, you would use standard CSS to 'hide' (display: none) the 2nd and 3rd tabs so the browser would never display them to begin with. Then when the tabs load, jquery takes over showing/hiding the content. On Jan 11, 10:24 pm, Chris cpot...@siolon.com wrote: On Jan 11, 12:02 pm, Chris cpot...@siolon.com wrote: I searched the archives, but I couldn't find an answer. For some reason the tabs, when initialized flashes, three times. Any idea why? http://www.chris-gwen.com/ No ideas?
[jQuery] Re: load script regarding to value of textfield
Try this: $('#searchButton').click(function(){ var url = 'script type=text/javascript src=http://gdata.youtube.com/feeds/api/videos?q=' + $('#searchText').val() + 'alt=json-in-scriptcallback=showMyVideosmax-results=7format=5/script'; // ajax functions to call $.ajax, $.load, $.get, $.post }); - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 1:49 PM, dirk w dirkwendl...@googlemail.com wrote: hello community, i have some kind of a beginner question and i really would appreciate if you could help me with that. when someone types a value into the textfield and clicks on search or enter than the javascript line should be called regarding to the entered value. this should happen without reloading the complete page. # FORM form id=searchForm action= input type=text name=searchText id=searchText value= size=30 maxlength=30/ input type=button name=searchButton id=searchButton class=button buttonText value=Search / /form # Script to call script type=text/javascript src=http://gdata.youtube.com/feeds/api/ videos?q=' + searchTerm + 'alt=json-in- scriptcallback=showMyVideosmax-results=7format=5/script see the SearchTerm in the js line, it should be replaced with the value of the textfield. thank you very much in advance! dirk
[jQuery] Re: Dialog - Can't Copy or Select Text
You can set resizable option to true/false (read docs http://docs.jquery.com/UI/Dialog/dialog#options) - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 1:41 PM, sirmoreno sirmor...@gmail.com wrote: Hi, I Set up a JQuery Dialog in my site. But in FF the user can't select or copy text from the Dialog. And in IE Ctrl + C doesn't work after selecting a text. Another Question: how to disable the resizing of the Dialog. Thanks Rafael.
[jQuery] Re: Thickbox and Yahoo Stores
it won't be very useful but here's a snippet with the site itself removed: a class=thickbox href=http://site.example.com/Scripts/theFile.htm? modal=falseamp;height=500amp;width=720Click Here To Open Thickbox/ a when you click that link you get the thickbox loading animation and the rest of the page is greyed out. the animation never goes away. Your browser really requests a 1x1 tracking pixel from a yahoo URL like http://a.analytics.yahoo.com/p.pl?a=asdfasdfasdfasdf Maybe there's a way to use jquery to reset the href value of the link to the original location, rather than what yahoo appends. Or maybe yahoo is appending some sort of onclick behavior that can be reset On Jan 10, 2:08 am, jQuery Lover ilovejqu...@gmail.com wrote: Do you have a link or could you copypaste html code snippet of your image with the links... jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Jan 10, 2009 at 2:16 AM, MikeFCraft mikewfcr...@gmail.com wrote: I'm helping someone set up thickbox to work on their yahoo store. It seems like Yahoo has a built-in click tracking system that is messing up the thickbox though. For example clicking on a thickbox link that points to theFile.htm first makes a request to yahoo for something like: http://a.analytics.yahoo.com/p.pl?a=... with a ton of analytical data appended to the URL. It returns a tracking gif, and the real content of theFile.htm never loads. (you just stare at thickbox's loadingAnimation.gif forever) Has anyone ever seen this before and come up with a workaround?
[jQuery] Meta Data within elements
I am creating a product/category tree using jquery. I would like to be able to store additional data within each node. The nodes in my tree are basicaly list elements. How would I add data to these elements such as the count of products and categories beneath them ? I tried this method. jQuery.data(objNode, 'intProdCounter', intProdCounter); But I have had some problems.. are there any other ways of acheiving this ? thanks for any help in advance -- View this message in context: http://www.nabble.com/Meta-Data-within-elements-tp21416642s27240p21416642.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] auto testing/parsing/scraping javascript/ajax webistes
Hi List! Trying to get my head/hands around how to web scrape/test websites that use javascript/ajax libraries... Are there any tools/suggestions that you might suggest in this area. Basic/initial research for google suggests that things like seamonkey, and/or headless browser apps might work. Any Open Source solutions that could be used to attack this issue would be seriously useful. thanks...
[jQuery] Re: Simplemodal causes validators to fire on webform
would this work if I have some fields using the jquery validate plugin (for masked fields) and some using the MS required field validator? Tom On Jan 10, 1:13 am, jQuery Lover ilovejqu...@gmail.com wrote: You probably binding your validators to ALL input[type=submit] or to some class (Ex: .submit) If so give your selector a scope $('.submit-button', document.forms[0]).bind()... jQuery HowTo Resource - http://jquery-howto.blogspot.com On Thu, Jan 8, 2009 at 9:31 PM,tawright915tawright...@gmail.com wrote: When I click the close button on my modal message box it causes the required field validators to fire on my form. Is there a way to stop this from happening? Tom- Hide quoted text - - Show quoted text -
[jQuery] Re: function text() in jquery
Hello, maybe it could be easier to use the good old DOM in this scenario: var textNode = $('#testText').get().firstChild; // now we have the textNode var textRaw = textNode.nodeValue; // now we have the text string with all the white-space around var text = $.trim(textRaw); // we strip the trailing white-space using the jQuery trim function Of course this works as expected only if the text you're looking for is placed in the #testText's first textNode. I'd recommend using more meaningful markup instead and putting the text inside p element. ;) -- Bohdan Ganicky On Jan 12, 11:55 am, kazuar kazuar...@gmail.com wrote: hello, Im kinda new in jquery so maybe its a begginer question. I have a page with a div containing some text and a combobox. something like that div id=testText hello this is text and this is combobox selectoption value='1'1/optionoption value='2'2/optionoption value='3'3/option/select/div I wrote a function which return the text from the div. alert($('#testText').text()); My problem is that the function also return the text inside the combobox. is there a way to filter out the combobox text? the only workaround I can think of is to wrap my text in another div and call its text. This workaround will be a bit complicated for me because the text on my page is dynamic and it can come after the input field or before the input field so I just want to get the text inside the div without the input fields text... (This only happens with combobox). tnx, Kazuar -- View this message in context:http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Simplemodal causes validators to fire on webform
I figured it out. The close button on my modal panel was set to causes validation = true. I set that to false and all works fine. Thanks for the help. Your post got me thinking about that. Tom On Jan 10, 1:13 am, jQuery Lover ilovejqu...@gmail.com wrote: You probably binding your validators to ALL input[type=submit] or to some class (Ex: .submit) If so give your selector a scope $('.submit-button', document.forms[0]).bind()... jQuery HowTo Resource - http://jquery-howto.blogspot.com On Thu, Jan 8, 2009 at 9:31 PM,tawright915tawright...@gmail.com wrote: When I click the close button on my modal message box it causes the required field validators to fire on my form. Is there a way to stop this from happening? Tom- Hide quoted text - - Show quoted text -
[jQuery] Re: Anyway to highlight words accents-insensitive?
So, I tried something similar to what I had in mind and was able to get it working. I'll put it here in case anyone wants it: # ORIGINAL CODE # highlight: function(value, term) { return value.replace(new RegExp((?![^;]+;)(?![^]*)( + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, \\$1) + )(?![^] *)(?![^;]+;), gi), strong$1/strong); } # MODIFIED CODE WITH ACCENTS-INSENSITIVE SUPPORT # highlight : function(value, term) { // Strip accents from 'term' for an accents-insensitive search term = stripAccents(term); var value_no_accents = stripAccents(value); var everything_except_term = value_no_accents.split(new RegExp(term, gi)); var highlighted_value = ''; var current_position = 0; for (var n in everything_except_term) { // Get the part with accents, since they were stripped to make the comparisson using RegExp, and add it to the final value var part_no_accents = everything_except_term[n]; var part = value.substr(current_position, part_no_accents.length); //--- this one with accents!!! highlighted_value += part; // Add the part length to the current position current_position += part.length; // If its not the last part, add the accented and highlighted term to the final value if (n everything_except_term.length - 1) { // Get the term with the original accentuation and add it highlighted to the final value var termo_local = value.substr(current_position, term.length); highlighted_value += strong + termo_local + /strong; // Update the current position current_position += term.length; } } return highlighted_value; } Where the function to strip accents (Credits: http://scripterlative.com/?noaccent) is: function stripAccents(str) { var rExps=[ {re:/[\xC0-\xC6]/g, ch:'A'}, {re:/[\xE0-\xE6]/g, ch:'a'}, {re:/[\xC8-\xCB]/g, ch:'E'}, {re:/[\xE8-\xEB]/g, ch:'e'}, {re:/[\xCC-\xCF]/g, ch:'I'}, {re:/[\xEC-\xEF]/g, ch:'i'}, {re:/[\xD2-\xD6]/g, ch:'O'}, {re:/[\xF2-\xF6]/g, ch:'o'}, {re:/[\xD9-\xDC]/g, ch:'U'}, {re:/[\xF9-\xFC]/g, ch:'u'}, {re:/[\xD1]/g, ch:'N'}, {re:/[\xF1]/g, ch:'n'} ]; for(var i=0, len=rExps.length; ilen; i++) str=str.replace(rExps[i].re, rExps[i].ch); return str; } I'll send and e-mail to the plugin creator suggesting the inclusion of an ignoreAccents option, which would toggle beetwen the original and the modified code. That's it. Thanks again for the help!
[jQuery] Re: Need help with a Jquery toggle bug in my menu's
I implemented your fix and unfortunately, the issue remains. To further demonstrate the problem, I've added some YouTube videos to the page to simulate the Flash components I have on my main example. Now, if you load the page, and then the on one of the main menu items to reload the page, keep your mouse over one of the main menu items while the page is loading. When the page finishes loading, your mouse should still be over the main menu item, and the sub menus will not display, until you move your mouse outside the main menu item, at which point, the states for on/off are switched, and the menu is unusable. I hope this makes sense. It's one pain in the ass bug. It looks to me like while the DOM is still loading, it's seeing there is an event (mouseenter/mouseleave) occuring and setting it's state before the DOM is fully loaded. When the DOM finishes loading, the states are switched, and the menu is messed up. On Jan 10, 11:56 am, jQuery Lover ilovejqu...@gmail.com wrote: I suggest you take the other way. We shall not forget about beloved CSS :) Try this: $(document).ready(function(){ $('#nav li') .bind('mouseenter mouseleave', function(){ $(this).toggleClass('menu-on'); }); }); In your CSS file add: #nav div{ display:none;} #nav .menu-on div{ display:block; } Drawback is if the user is on li while page is being he will not see the div at first. He will need to move his mouse out and then in. To workaround this problem we can add an extra .hover() event listener to li's ... Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Jan 10, 2009 at 9:12 PM, Ted theodorew...@gmail.com wrote: Sorry, very new to Jquery (and not that skilled at js to begin with). I think I follow what you are saying, but not having a good grasp of the jquery syntax, I'm not sure exactly how to properly execute. Here's what I came up with, but it's not working, so I know there's a problem somewhere, but am unable to fix:
[jQuery] Re: Calling images programatically from a database?
Well, I figured out a solution. Just in case someone in the future has the same problem as me, here's what I did: (1) Delete all that script in the head section (2) Do this in the body: a href=%%picture%% rel=lyteboximg style=display:none src=% %picture%% onLoad=this.style.display='block' alt=/a So all I did was call up a picture in the database (which may or may not exist), giving it a default state of 'display:none', and if it actually found a picture, then show it. Seems kind of...improper, but it works in both IE6 and FF, which is good enough for me.
[jQuery] Re: Calling images programatically from a database?
Well, I figured out a solution. Just in case someone in the future has the same problem as me, here's what I did: (1) Delete all that script in the head section (2) Do this in the body: a href=%%picture%% rel=lyteboximg style=display:none src=% %picture%% onLoad=this.style.display='block' alt=/a So all I did was call up a picture in the database (which may or may not exist), giving it a default state of 'display:none', and if it actually found a picture, then show it. Seems kind of...improper, but it works in both IE6 and FF, which is good enough for me.
[jQuery] Examples of great plugin documentation?
I am about to rewrite documentation of Jeditable plugin (has been on my TODO list for a while). While putting together some notes it would be great if people from list could send me links to other plugin documentation you have found to be well structured or written. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: function text() in jquery
Hi, I thank you all for your help. I guess I'll go with Bohdan's suggestion. I'll put the text inside another tag (probably p tag...). thanks again for all your help, if you think of anything else please let me know. Kazuar Bohdan Ganicky wrote: Hello, maybe it could be easier to use the good old DOM in this scenario: var textNode = $('#testText').get().firstChild; // now we have the textNode var textRaw = textNode.nodeValue; // now we have the text string with all the white-space around var text = $.trim(textRaw); // we strip the trailing white-space using the jQuery trim function Of course this works as expected only if the text you're looking for is placed in the #testText's first textNode. I'd recommend using more meaningful markup instead and putting the text inside p element. ;) -- Bohdan Ganicky On Jan 12, 11:55 am, kazuar kazuar...@gmail.com wrote: hello, Im kinda new in jquery so maybe its a begginer question. I have a page with a div containing some text and a combobox. something like that div id=testText hello this is text and this is combobox selectoption value='1'1/optionoption value='2'2/optionoption value='3'3/option/select/div I wrote a function which return the text from the div. alert($('#testText').text()); My problem is that the function also return the text inside the combobox. is there a way to filter out the combobox text? the only workaround I can think of is to wrap my text in another div and call its text. This workaround will be a bit complicated for me because the text on my page is dynamic and it can come after the input field or before the input field so I just want to get the text inside the div without the input fields text... (This only happens with combobox). tnx, Kazuar -- View this message in context:http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p... Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p21418248.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: load script regarding to value of textfield
thanks a lot for your help! is it possible to additionally explain me how i can execute this link through the ajax functions? that would be great! thanks in advance On 12 Jan., 15:53, jQuery Lover ilovejqu...@gmail.com wrote: Try this: $('#searchButton').click(function(){ var url = 'script type=text/javascript src=http://gdata.youtube.com/feeds/api/videos?q='+ $('#searchText').val() + 'alt=json-in-scriptcallback=showMyVideosmax-results=7format=5/script'; // ajax functions to call $.ajax, $.load, $.get, $.post }); - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 1:49 PM, dirk w dirkwendl...@googlemail.com wrote: hello community, i have some kind of a beginner question and i really would appreciate if you could help me with that. when someone types a value into the textfield and clicks on search or enter than the javascript line should be called regarding to the entered value. this should happen without reloading the complete page. # FORM form id=searchForm action= input type=text name=searchText id=searchText value= size=30 maxlength=30/ input type=button name=searchButton id=searchButton class=button buttonText value=Search / /form # Script to call script type=text/javascript src=http://gdata.youtube.com/feeds/api/ videos?q=' + searchTerm + 'alt=json-in- scriptcallback=showMyVideosmax-results=7format=5/script see the SearchTerm in the js line, it should be replaced with the value of the textfield. thank you very much in advance! dirk
[jQuery] autocomplete
Hi all new to the group and jQuery in general. I just installed the very cool autocomplete plugin yesterday and have it working in the following scenarios: $(#example).autocomplete(data); Where data is a local string as shown in the examples. $(#example).autocomplete('get_data.php'); Where the data is retrieved from a PHP page that calls a mysql database. Now I am trying to get it to work inside of an app built in CakePHP. I have data as a JSON object with the following structure: var data = {17:angel hair,16:basmati rice,21:black beans} I thought that I could just pass this to autocomplete but nothing happens. Meaning the autocomplete field does do anything at all on the UI. My question is: what is the correct way to handle a JSON object with autocomplete? Do I need to enumerate the values into a string? That seems a little hacky. Just looking for the correct methodology. Thanks.
[jQuery] [jCarousel] Extend to pass XML feed as an argument
I'm setting up a site that uses jCarousel in a variety of places (and for that I must thank Jan, it's a great tool); the sliders are all going to look similar but all will use slightly different XML for the ajax portion. What I would like to be able to do would be to pass this feed as an argument to the jcarousel constructor so that it would look something like this: jQuery('#classname-carousel').jcarousel({ itemVisibleOutCallback: {onAfterAnimation: function(carousel, item, i, state, evt) { carousel.remove(i); }}, itemLoadCallback: mycarousel_itemLoadCallback, xmlSource: '/path/to/source.xml' scroll: 4 }); My questions are: 1. Is this the best way to go about this? If so, how can I make this change, and can it be done in the packed source? 2. If there is a better and/or more obvious way to do this without having to extend the core functionality, could you let me know? Thanks to anyone with advice!
[jQuery] Smooth animation
Hi, group. Im trying to make animation using jquery, but its controlled server side using XMLSocket. When jQuery receive coordinates from server it moving my DIV across the browser but its too fast. I cant understand how to do smooth animation. My server script (perl) compute the same x,y coordinates like jquery (i saw how in jQuery core) but i dont know how jquery delay all these x and y coordinates properly to make animation smooth. Ill be happy if someone explain me how it works. Excuse me for my english. Best Regards!
[jQuery] Any trick to making text at has been faded in look good?
Hi, all... I prefer to use .fadeIn(500), etc., to bring elements onto a page, as it gives the user a chance to keep up with changes being made visually. However, .fadeIn leaves text looking *u-ga-ly*... changing .fadeIn to .show leaves text nicely rendered in the browser. Is there some trick or other way to cause the browsers to render text that has been faded in looking good? Rick
[jQuery] Re: Examples of great plugin documentation?
Mika Tuupola ha scritto: I am about to rewrite documentation of Jeditable plugin (has been on my TODO list for a while). While putting together some notes it would be great if people from list could send me links to other plugin documentation you have found to be well structured or written. I saw a lot of sites of plugins (even your, great plugin!). I think your site is clear an clean, but the one I prefer is the site of mike alsup. http://malsup.com/jquery/form/ Bye :) -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so) - italy +39 347 7196482
[jQuery] Hierarchy Checkbox Tree
I am hoping that someone has done this before. I am after something like this: http://static.geewax.org/checktree/index.html I will explain why this fine example does not work for my instance below. The behavior of the “United States” section in particular is what we are after. If a parent checkbox is checked, everything below that parent also gets checked. Unlike the example, there would not be a way to uncheck a child if the parent is selected. There are multiple “levels” of the parent child relationship. The example of the United States shown above has 2 levels. In our case there can be up to 9 levels of depth. In this case if the ultimate parent is selected, all 9 levels (all parent and all children) would be selected. When any parent within the hierarchy is selected, their children become selected. The system needs to work with checkboxes rather than images as shown in the example. This would mean that the checkboxes for the children of a selected parent are “disabled” thus not allowing a child to not be selected. We are currently using the tree from “sample 3” from Bassistance (http://jquery.bassistance.de/treeview/demo/) to get that behavior. If all this were not enough, the tree could contain 2,000 items that make up this hierarchy. So the less “building” the page has to do the better. All of the item will be loaded on the page when the page is rendered.
[jQuery] Re: Any trick to making text at has been faded in look good?
However, .fadeIn leaves text looking *u-ga-ly*... changing .fadeIn to .show leaves text nicely rendered in the browser. Is there some trick or other way to cause the browsers to render text that has been faded in looking good? IE is the only browser that struggles with this. Here's a hack: http://jquery.malsup.com/fadetest.html
[jQuery] Re: Any trick to making text at has been faded in look good?
Are you talking about Internet Explorer browser? If so, have a look in the following article: http://www.kevinleary.net/blog/jquery-fadein-fadeout-problems-in-internet-explorer/ Maurício -Mensagem Original- De: Rick Faircloth r...@whitestonemedia.com Para: jquery-en@googlegroups.com Enviada em: segunda-feira, 12 de janeiro de 2009 14:44 Assunto: [jQuery] Any trick to making text at has been faded in look good? Hi, all... I prefer to use .fadeIn(500), etc., to bring elements onto a page, as it gives the user a chance to keep up with changes being made visually. However, .fadeIn leaves text looking *u-ga-ly*... changing .fadeIn to .show leaves text nicely rendered in the browser. Is there some trick or other way to cause the browsers to render text that has been faded in looking good? Rick
[jQuery] Re: Jquery tablesorter problem
Can I also use table sorter with datagrid control? Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: autocomplete
JSON support is still a bit rough. Here is an example, the parse-option is something we want to improve a lot in the future: http://jquery.bassistance.de/autocomplete/demo/json.html Jörn On Mon, Jan 12, 2009 at 4:34 PM, rhythmicde...@gmail.com rhythmicde...@gmail.com wrote: Hi all new to the group and jQuery in general. I just installed the very cool autocomplete plugin yesterday and have it working in the following scenarios: $(#example).autocomplete(data); Where data is a local string as shown in the examples. $(#example).autocomplete('get_data.php'); Where the data is retrieved from a PHP page that calls a mysql database. Now I am trying to get it to work inside of an app built in CakePHP. I have data as a JSON object with the following structure: var data = {17:angel hair,16:basmati rice,21:black beans} I thought that I could just pass this to autocomplete but nothing happens. Meaning the autocomplete field does do anything at all on the UI. My question is: what is the correct way to handle a JSON object with autocomplete? Do I need to enumerate the values into a string? That seems a little hacky. Just looking for the correct methodology. Thanks.
[jQuery] Re: How to grab the filename (src attribute) of an image?
Thanks for the answers, i see some daylight now, but i already have a normal onclick event on the image, triggering my normal js function: squareClicked(row,col,isEmpty) { // my other normal js function // with jquery : showing message div // my jquery post to taconite plugin page, processing gamedata and returning xml data to update gamepage // with jquery: hiding message div. } Where and how do i implement var fileName = $(this).attr('src'); This is the javascript link: a href='JavaScript:squareClicked(a,b, true)'img src='images/ test.gif/a
[jQuery] radio buttons in tablesorter
Hello , I'm having a problem with radio button in a table: I have a table that has the option to select the required row through a radio button. But the problem is that if I sort the table (by any column) after selecting some row, the selection goes off. Is there any way to maintain the state of the radio buttons in the table after sorting? Thanks a lot!! Soledad.
[jQuery] Re: autocomplete
Thanks Jörn I appreciate you taking the time to help me out. Steve -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jörn Zaefferer Sent: Monday, January 12, 2009 12:18 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: autocomplete JSON support is still a bit rough. Here is an example, the parse-option is something we want to improve a lot in the future: http://jquery.bassistance.de/autocomplete/demo/json.html Jörn On Mon, Jan 12, 2009 at 4:34 PM, rhythmicde...@gmail.com rhythmicde...@gmail.com wrote: Hi all new to the group and jQuery in general. I just installed the very cool autocomplete plugin yesterday and have it working in the following scenarios: $(#example).autocomplete(data); Where data is a local string as shown in the examples. $(#example).autocomplete('get_data.php'); Where the data is retrieved from a PHP page that calls a mysql database. Now I am trying to get it to work inside of an app built in CakePHP. I have data as a JSON object with the following structure: var data = {17:angel hair,16:basmati rice,21:black beans} I thought that I could just pass this to autocomplete but nothing happens. Meaning the autocomplete field does do anything at all on the UI. My question is: what is the correct way to handle a JSON object with autocomplete? Do I need to enumerate the values into a string? That seems a little hacky. Just looking for the correct methodology. Thanks.
[jQuery] table striping - skip hidden rows
I have a table with multiple tbody's. Within each tbody there are a number of rows that can be hidden or shown by clicking on a link. I'm using the following function to stripe alternating rows: jQuery.fn.stripeTable = function(){ $(this).find(tbody tr:nth-child(even)).addClass(alt); } but now I'm trying to account for hidden rows, so that when I click to hide some rows I the striping is revised I can't quite work out the syntax to filter first for visible rows, then find even rows among those can anyone assist?
[jQuery] Re: Need help with a Jquery toggle bug in my menu's
And here's the URL again: http://dl.getdropbox.com/u/21984/menu_test/menu_test.html On Jan 10, 11:56 am, jQuery Lover ilovejqu...@gmail.com wrote: I suggest you take the other way. We shall not forget about beloved CSS :) Try this: $(document).ready(function(){ $('#nav li') .bind('mouseenter mouseleave', function(){ $(this).toggleClass('menu-on'); }); }); In your CSS file add: #nav div{ display:none;} #nav .menu-on div{ display:block; } Drawback is if the user is on li while page is being he will not see the div at first. He will need to move his mouse out and then in. To workaround this problem we can add an extra .hover() event listener to li's ... Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Jan 10, 2009 at 9:12 PM, Ted theodorew...@gmail.com wrote: Sorry, very new to Jquery (and not that skilled at js to begin with). I think I follow what you are saying, but not having a good grasp of the jquery syntax, I'm not sure exactly how to properly execute. Here's what I came up with, but it's not working, so I know there's a problem somewhere, but am unable to fix:
[jQuery] Re: Jquery tablesorter problem
Also, to get around the problem : I made a div around the table : div id=tableDiv table id=table1 cellspacing=1 class=tablesorter // table content here /table /div I used this jquery after making div: $(#tableDiv).each(function(){ $(this).find(table).each(function() { if($(this).hasClass('tablesorter')) { $(this).tablesorter({widthFixed: true, widgets: ['zebra']}) //.tablesorterPager({container: $(#pager)}) } }); }); This worked fine . div id=tableDiv table id=table1 cellspacing=1 class=tablesorter *runat=server**// only this thing changed * // table content here /table /div I used this jquery after making div: $(#tableDiv).each(function(){ $(this).find(table).each(function() { if($(this).hasClass('tablesorter')) { $(this).tablesorter({widthFixed: true, widgets: ['zebra']}) //.tablesorterPager({container: $(#pager)}) } }); }); This does not work. Any body knows the reason. On Mon, Jan 12, 2009 at 9:09 AM, Varun Khatri khatri.vk1...@gmail.comwrote: Can I also use table sorter with datagrid control? Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Any trick to making text at has been faded in look good?
Thanks for the reply, Mauricio, but I couldn't get your solution to work. Adding the background (at least in IE 7) didn't have any effect on the display of the final text. Also, on your demo page, I got an error. Looking at the code, I think you've got a no-background class on both demo p's. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mauricio (Maujor) Samy Silva Sent: Monday, January 12, 2009 12:03 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Any trick to making text at has been faded in look good? Are you talking about Internet Explorer browser? If so, have a look in the following article: http://www.kevinleary.net/blog/jquery-fadein-fadeout-problems-in-internet-explorer/ Maurício -Mensagem Original- De: Rick Faircloth r...@whitestonemedia.com Para: jquery-en@googlegroups.com Enviada em: segunda-feira, 12 de janeiro de 2009 14:44 Assunto: [jQuery] Any trick to making text at has been faded in look good? Hi, all... I prefer to use .fadeIn(500), etc., to bring elements onto a page, as it gives the user a chance to keep up with changes being made visually. However, .fadeIn leaves text looking *u-ga-ly*... changing .fadeIn to .show leaves text nicely rendered in the browser. Is there some trick or other way to cause the browsers to render text that has been faded in looking good? Rick
[jQuery] Re: Extend to pass XML feed as an argument
I see that this failed to keep jCarousel in my title - newbie mistake. I do hope someone sees this though. :) On Jan 12, 9:59 am, Josh ranger...@gmail.com wrote: I'm setting up a site that usesjCarouselin a variety of places (and for that I must thank Jan, it's a great tool); the sliders are all going to look similar but all will use slightly different XML for the ajax portion. What I would like to be able to do would be to pass this feed as an argument to thejcarouselconstructor so that it would look something like this: jQuery('#classname-carousel').jcarousel({ itemVisibleOutCallback: {onAfterAnimation: function(carousel, item, i, state, evt) { carousel.remove(i); }}, itemLoadCallback: mycarousel_itemLoadCallback, xmlSource: '/path/to/source.xml' scroll: 4 }); My questions are: 1. Is this the best way to go about this? If so, how can I make this change, and can it be done in the packed source? 2. If there is a better and/or more obvious way to do this without having to extend the core functionality, could you let me know? Thanks to anyone with advice!
[jQuery] Re: Anyway to highlight words accents-insensitive?
There is a bug in the previous code with Internet Explorer. To fix it, replace this: ### // If its not the last part, add the accented and highlighted term to the final value if (n everything_except_term.length - 1) { // Get the term with the original accentuation and add it highlighted to the final value var termo_local = value.substr(current_position, term.length); highlighted_value += strong + termo_local + /strong; // Update the current position current_position += term.length; } ### With this: ### // Get the term with the original accentuation and add it highlighted to the final value var term_local = value.substr(current_position, term.length); highlighted_value += (term_local == '') ? term_local : strong + term_local + /strong; // Update the current position current_position += term.length; ### Not as straightforward as the other, but now works in Firefox 3, Opera 9 and Internet Explorer 6 and 7. (I also corrected a typo from the translation: termo_local is actually term_local). Also, Jörn (the plugin creator) alerted me that it's not necessary to change the plugin source code because 'highlight' is an option that can be overwritten globally or locally. So people interested in this modification won't have much trouble implementing it.
[jQuery] Re: Jquery tablesorter problem
alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
*alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:25 AM, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik.Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Cycle Pluging next up text
Hello, I'm creating a slideshow with the awesome Cycle plugin and would like to append the alt text of the next slide into a next up: area. Is there a way to get the alt attribute of the next slide and append it to my next up div in the onAfter callback? Right now i'm using the before and after options to add loading... and current slide alt text, respectively: $(#fade).load(pictures.php, function() { $(this).cycle({ fx: 'fade', timeout: 0, prev: '#prev', next: '#next', before: onBefore, after: onAfter, pager: '#nav' }); function onBefore(currSlideElement, nextSlideElement, options, forwardFlag) { $('#main').html('loading...'); } function onAfter(currSlideElement, nextSlideElement, options, forwardFlag) { $('#main').html(this.alt); } }); Ideally, in my onAfter callback I would like to have the upcoming image's alt text instead of the current one's. Is this possible? Thanks! ~Amy
[jQuery] Re: function text() in jquery
There are two alternatives: $('#testText').contents(':not(select)')[0].nodeValue; this one is unsupported but works too: $('#testText').contents('[nodeType=3]')[0].nodeValue; Notice that both will keep the linebreaks. if text() could handle textnodes this would be much easier. - ricardo On Jan 12, 2:43 pm, kazuar kazuar...@gmail.com wrote: Hi, I thank you all for your help. I guess I'll go with Bohdan's suggestion. I'll put the text inside another tag (probably p tag...). thanks again for all your help, if you think of anything else please let me know. Kazuar Bohdan Ganicky wrote: Hello, maybe it could be easier to use the good old DOM in this scenario: var textNode = $('#testText').get().firstChild; // now we have the textNode var textRaw = textNode.nodeValue; // now we have the text string with all the white-space around var text = $.trim(textRaw); // we strip the trailing white-space using the jQuery trim function Of course this works as expected only if the text you're looking for is placed in the #testText's first textNode. I'd recommend using more meaningful markup instead and putting the text inside p element. ;) -- Bohdan Ganicky On Jan 12, 11:55 am, kazuar kazuar...@gmail.com wrote: hello, Im kinda new in jquery so maybe its a begginer question. I have a page with a div containing some text and a combobox. something like that div id=testText hello this is text and this is combobox selectoption value='1'1/optionoption value='2'2/optionoption value='3'3/option/select/div I wrote a function which return the text from the div. alert($('#testText').text()); My problem is that the function also return the text inside the combobox. is there a way to filter out the combobox text? the only workaround I can think of is to wrap my text in another div and call its text. This workaround will be a bit complicated for me because the text on my page is dynamic and it can come after the input field or before the input field so I just want to get the text inside the div without the input fields text... (This only happens with combobox). tnx, Kazuar -- View this message in context:http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p... Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context:http://www.nabble.com/function-text%28%29-in-jquery-tp21410667s27240p... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: table striping - skip hidden rows
Should work: $(this).find(tbody tr).not(:hidden).filter(:even).addClass (alt); On Jan 12, 1:08 pm, brian bally.z...@gmail.com wrote: The way I sometimes do this with PHP is to set a $counter var and then use the modulo operator on the incremented counter to write the classname for the row. So, something like this might work: // where you have CSS classes Row0 Row1 $(this).find(tbody tr:visible).each(function(i, el) { $(el).addClass('Row' + ((++i + 2) % 2)); }); Or something like that. On Mon, Jan 12, 2009 at 12:55 PM, rolfsf rol...@gmail.com wrote: I have a table with multiple tbody's. Within each tbody there are a number of rows that can be hidden or shown by clicking on a link. I'm using the following function to stripe alternating rows: jQuery.fn.stripeTable = function(){ $(this).find(tbody tr:nth-child(even)).addClass(alt); } but now I'm trying to account for hidden rows, so that when I click to hide some rows I the striping is revised I can't quite work out the syntax to filter first for visible rows, then find even rows among those can anyone assist?
[jQuery] Re: Jquery tablesorter problem
you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
Can I also use table sorter with datagrid control? No, well, not out of the box anyways... as the DataGrid control doesn't generate thead, th, and tbody tags, all of which are important parts of the TableSorter structure If you insist on using DataGrid, you'll have to make a custom control adapter that generates the HTML that the plugin is looking for On Jan 12, 12:09 pm, Varun Khatri khatri.vk1...@gmail.com wrote: Can I also use table sorter with datagrid control? Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: table striping - skip hidden rows
Right - that's way simpler. Yay, jQuery! On Mon, Jan 12, 2009 at 2:46 PM, MorningZ morni...@gmail.com wrote: Should work: $(this).find(tbody tr).not(:hidden).filter(:even).addClass (alt); On Jan 12, 1:08 pm, brian bally.z...@gmail.com wrote: The way I sometimes do this with PHP is to set a $counter var and then use the modulo operator on the incremented counter to write the classname for the row. So, something like this might work: // where you have CSS classes Row0 Row1 $(this).find(tbody tr:visible).each(function(i, el) { $(el).addClass('Row' + ((++i + 2) % 2)); }); Or something like that. On Mon, Jan 12, 2009 at 12:55 PM, rolfsf rol...@gmail.com wrote: I have a table with multiple tbody's. Within each tbody there are a number of rows that can be hidden or shown by clicking on a link. I'm using the following function to stripe alternating rows: jQuery.fn.stripeTable = function(){ $(this).find(tbody tr:nth-child(even)).addClass(alt); } but now I'm trying to account for hidden rows, so that when I click to hide some rows I the striping is revised I can't quite work out the syntax to filter first for visible rows, then find even rows among those can anyone assist?
[jQuery] Re: Jquery tablesorter problem
well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
Without seeing a working (errr, non working) page, constantly posting the same piece of non-working code is not helping others help you How about just using a class? On Jan 12, 2:51 pm, Varun Khatri khatri.vk1...@gmail.com wrote: well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun
[jQuery] Re: Jquery tablesorter problem
What happens with: $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) On Jan 12, 3:11 pm, Varun Khatri khatri.vk1...@gmail.com wrote: Here I have attached 3 files ... Its just a simple example I am trying this coz all my tables are dynamic (made at runtime) can you please check and let me know ... I have already spent hours for just 1 thing : Thanks I really appreciate the effort Varun On Mon, Jan 12, 2009 at 11:59 AM, MorningZ morni...@gmail.com wrote: Without seeing a working (errr, non working) page, constantly posting the same piece of non-working code is not helping others help you How about just using a class? On Jan 12, 2:51 pm, Varun Khatri khatri.vk1...@gmail.com wrote: well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery: $(#+serverIdPrefix+table1)// serverIdPrefix nicely found what is attached by server to id of table .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) it doesnt work when ever table is runat=server can some one help? Thanks Varun Default3.aspx 145KViewDownload jquery.tablesorter.js 31KViewDownload sort.js 1KViewDownload
[jQuery] Sortables ie7 issue
Hello! I'm using Sortables to drag n' drop divs in a project. Well, all non IE browsers the code works fine!!! The javascript code is $('div.recebeDrag').Sortable({ accept : 'drag', helperclass : 'dragAjuda', activeclass : 'dragAtivo', hoverclass : 'dragHover', handle : '.grupo_titulo', opacity : 0.7, onChange: *function*() { atualiza_debug(); }, onStart : *function*() { $.iAutoscroller.start(*this*, document .getElementsByTagName('body')); }, onStop : *function*() { $.iAutoscroller.stop(); } }); I can move the div ONCE in IE. When I wanna move again, the div seems dead. I can't move and the select doesn't make anything! The live *problem* http://72.29.82.68/~gruposof/inicial.html Thanks!
[jQuery] Old code not working with new 1.2.6
I had a piece of code that worked with 1.2.2 but now it doesn't seem to work with 1.2.6 Here is the code, can anybody see anything that would cause it to stop working? All it does is adds a link to a piece of text in a table cell. $('#'+i).children('td:first').next().click(function(){ ord = $(this).text(); window.location.href = Recap?ord=+ord+pg=+page; }); It doesn't seem to be picking up the right part of the DOM anymore...
[jQuery] Drag a created div by append
Hello! I have a little problem in Sortables. When I create a new div using append, I cannot move it using Sortables. Other div's (created by 'hand') I can move normally. Here's my code: //Btn Add $('.btn_adicionar').click(function () { $(#conteudo_esquerda).append(conteudo_area()); atualiza_debug(); }); //Function for data conteudo_area = function() { return 'div id=grupoN class=drag \ div class=grupo_tituloimg src=images/item.png alt=Eventos title=Eventos width=22 height=22 class=item / span class=tituloNotícias/span/div \ form \ select id=sel_grupo name=sel_grupo class=sel_grupos \ option value=destaquesDestaques/option \ option value=qualidadeQualidade/option \ option value=noticias selected=selectedNotícias/ option \ /select \ /form \ \ pLorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ut nisl. Nulla viverra odio. /p \ /div'; } //Sortables code $('div.recebeDrag').Sortable({ accept : 'drag', helperclass : 'dragAjuda', activeclass : 'dragAtivo', hoverclass : 'dragHover', handle : '.grupo_titulo', opacity : 0.7, onChange: function() { atualiza_debug(); }, onStart : function() { $.iAutoscroller.start(this, document.getElementsByTagName ('body')); }, onStop : function() { $.iAutoscroller.stop(); } }); The online demo: http://72.29.82.68/~gruposof/inicial.html Another issue. The Sortables in non-dynamic div works fine in Firefox. But in IE, I can move only ONE TIME. After moved, I cannot do this again I tested in Firefox 3.0.5 and Internet Explorer 7.0.6001 in Windows Vista Thanks and sorry about my bad english! Rafael
[jQuery] Form submission - Callback method not being called
Hi, I am having some difficulties trying programatically submit a form. The form never get submitted and the callback is never executed. Could anyone please give me some pointers, please? Take the following example: --- ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/ TR/xhtml11/DTD/xhtml11.dtd html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ title/title script type=text/javascript src=jquery-1.2.6.js/script script type=text/javascript jQuery.noConflict(); /script script type=text/javascript function handleFormSubmissionClick(event) { handleValidation(); } function handleValidation(args) { jQuery(form).submit(handleFormSubmission); } function handleFormSubmission(event) { //This callback is never executed... return true; } jQuery(document).ready(function(){ jQuery(#submit).bind(click, handleFormSubmissionClick); }); /script /head body form input id=submit name=submit type=button value=send / /form /body /html --- Best regards, Jean-Philippe Couture, jcout...@gmail.com
[jQuery] Re: Jquery tablesorter problem
If I remove runat=server Like *table id=table1 cellspacing=1 class=tablesorter* And then use : $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *It works fine * But If I do *table id=table1 cellspacing=1 class=tablesorter runat=server* And then use : $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *It doesnot work* In the firebug it desont show any error : Infact when I write this in the console it says *Object length=1* but still does not work... :( Thanks Varun On Mon, Jan 12, 2009 at 12:26 PM, MorningZ morni...@gmail.com wrote: What happens with: $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) On Jan 12, 3:11 pm, Varun Khatri khatri.vk1...@gmail.com wrote: Here I have attached 3 files ... Its just a simple example I am trying this coz all my tables are dynamic (made at runtime) can you please check and let me know ... I have already spent hours for just 1 thing : Thanks I really appreciate the effort Varun On Mon, Jan 12, 2009 at 11:59 AM, MorningZ morni...@gmail.com wrote: Without seeing a working (errr, non working) page, constantly posting the same piece of non-working code is not helping others help you How about just using a class? On Jan 12, 2:51 pm, Varun Khatri khatri.vk1...@gmail.com wrote: well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) It works fine.. how ever if i use : table id=table1 cellspacing=1 class=tablesorter runat=server //row and column here /table and jquery:
[jQuery] Re: table striping - skip hidden rows
Simpler still would be this: $(this).find(tbody tr:visible:even).addClass(alt); --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 12, 2009, at 2:52 PM, brian wrote: Right - that's way simpler. Yay, jQuery! On Mon, Jan 12, 2009 at 2:46 PM, MorningZ morni...@gmail.com wrote: Should work: $(this).find(tbody tr).not(:hidden).filter(:even).addClass (alt); On Jan 12, 1:08 pm, brian bally.z...@gmail.com wrote: The way I sometimes do this with PHP is to set a $counter var and then use the modulo operator on the incremented counter to write the classname for the row. So, something like this might work: // where you have CSS classes Row0 Row1 $(this).find(tbody tr:visible).each(function(i, el) { $(el).addClass('Row' + ((++i + 2) % 2)); }); Or something like that. On Mon, Jan 12, 2009 at 12:55 PM, rolfsf rol...@gmail.com wrote: I have a table with multiple tbody's. Within each tbody there are a number of rows that can be hidden or shown by clicking on a link. I'm using the following function to stripe alternating rows: jQuery.fn.stripeTable = function(){ $(this).find(tbody tr:nth- child(even)).addClass(alt); } but now I'm trying to account for hidden rows, so that when I click to hide some rows I the striping is revised I can't quite work out the syntax to filter first for visible rows, then find even rows among those can anyone assist?
[jQuery] Re: Cycle Pluging next up text
function onAfter(currSlideElement, nextSlideElement, options, forwardFlag) { $('#main').html(this.alt); }}); Ideally, in my onAfter callback I would like to have the upcoming image's alt text instead of the current one's. Is this possible? Thanks! ~Amy Hmm, a bit tricky but this might get the job done: function onAfter(curr,next,opts,fwd) { var $slides = $(this).parent().children(); var index = $slides.index(this); var $nextSlide; if (fwd index == (opts.slideCount - 1)) $nextSlide = $slides.eq(0); else if (fwd) $nextSlide = $slides.eq(index+1); else if (opts.slideCount == 0) $nextSlide = $slides.eq(opts.slideCount-1); else $nextSlide = $slidex.eq(index-1) $('#main').html($nextSlide.attr('alt')); } Disclaimer: this won't work if you're using the 'slideExpr' option. Mike
[jQuery] Re: table striping - skip hidden rows
ps.. i totally missed the :visible selector on the docs On Jan 12, 3:36 pm, Karl Swedberg k...@englishrules.com wrote: Simpler still would be this: $(this).find(tbody tr:visible:even).addClass(alt); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 12, 2009, at 2:52 PM, brian wrote: Right - that's way simpler. Yay, jQuery! On Mon, Jan 12, 2009 at 2:46 PM, MorningZ morni...@gmail.com wrote: Should work: $(this).find(tbody tr).not(:hidden).filter(:even).addClass (alt); On Jan 12, 1:08 pm, brian bally.z...@gmail.com wrote: The way I sometimes do this with PHP is to set a $counter var and then use the modulo operator on the incremented counter to write the classname for the row. So, something like this might work: // where you have CSS classes Row0 Row1 $(this).find(tbody tr:visible).each(function(i, el) { $(el).addClass('Row' + ((++i + 2) % 2)); }); Or something like that. On Mon, Jan 12, 2009 at 12:55 PM, rolfsf rol...@gmail.com wrote: I have a table with multiple tbody's. Within each tbody there are a number of rows that can be hidden or shown by clicking on a link. I'm using the following function to stripe alternating rows: jQuery.fn.stripeTable = function(){ $(this).find(tbody tr:nth- child(even)).addClass(alt); } but now I'm trying to account for hidden rows, so that when I click to hide some rows I the striping is revised I can't quite work out the syntax to filter first for visible rows, then find even rows among those can anyone assist?
[jQuery] Re: jQuery UI tabs widget problem
Is working when replaced jquery.ui-1.6rc4 demos\tabs\default.html js files with http://jquery-ui.googlecode.com/svn/trunk/ jquery-1.3pre.js ui/ui.core.js ui/ui.tabs.js $(function() { $(#tabs).tabs(); //$('#tabs').data(disabled.tabs, [1,2]); //works $('#tabs').tabs({ disabled: [1,2] }); //this method not working ??? //$('#tabs').tabs(disable, 1); //works //$('#tabs').tabs(disable, 2); //works }); Thanks Klaus Jesse Danny On Jan 12, 1:56 am, Klaus Hartl klaus.ha...@googlemail.com wrote: Again, everything works as expected for me. Could you possibly put up a test case? Also, could you try and update to latest version from the repository? It may be related to a bug that occured when initializing a div instead of a ul element. BTW, in your first example you need to use the data method: jQuery('#product').data(disabled.tabs, [1,2,3,4]); --Klaus On 12 Jan., 00:03, Jesse jesse.bad...@gmail.com wrote: I would like to confirm that the array methods for disabling tabs does not work. I have 1.6rc4 installed. 5 Tabs 4 of which I need disabled on page load jQuery('#product').tabs(); jQuery('#product').tabs(disabled.tabs, [1,2,3,4]); does not work.. neither does jQuery('#product').tabs({ disabled: [1,2,3,4] }); However this does work jQuery('#product').tabs(); jQuery('#product').tabs(disable, 1); jQuery('#product').tabs(disable, 2); jQuery('#product').tabs(disable, 3); jQuery('#product').tabs(disable, 4); J On Jan 10, 4:25 am, Klaus Hartl klaus.ha...@googlemail.com wrote: $(#tabs).data('disabled.tabs', [1,2]) as well as $(#tabs).tabs ({ disabled: [1,2] }) both do work fine for me. --Klaus On 9 Jan., 12:47, tesdev tesde...@googlemail.com wrote: Using jquery.ui-1.6rc4\jquery.ui-1.6rc4\demos\tabs\default.html as a base Getting there... ui-state-disabled is assigned but... line 11 ... $(function() { $(#tabs).tabs(); // tried 3disablevariations from different sources //$(#tabs).data('disabled.tabs', [1,2]); $(#tabs).tabs(disable, 1); //works $(#tabs).tabs(disable, 2); //works //$(#tabs).tabs({disabled: [1,2]}); }); The array versions dont work - should they in this context? Danny On Dec 31 2008, 5:26 pm, Klaus Hartl klaus.ha...@googlemail.com wrote: No suggestions unless you show us some code... --Klaus On 31 Dez., 08:11, JasonR jbra...@yahoo.com wrote: Hello, I have some content and am using thetabswidget to reload without refreshing. Everything is working fine except for one problem...the ui- tabs-disabled class is not being assigned to any of thetabs. Whichever tab I click is assigned the ui-tabs-selected class, and the tab adopts the styles for that class. But my styles for the disabled tabsare not showing up. Checking in Firebug I can verify that the class is not being assigned. Any suggestions? Thanks.
[jQuery] EqualTo not seem to be working.
Hi, I have the following code. I want to compare confirm_number with number. The required field works, but not the equalTo. Any help is appreciated. Thanks, Greg script src=scripts/jquery-1.2.6.js/script script type=text/javascript src=scripts/ jquery.maskedinput-1.0.js/script script type=text/javascript src=scripts/jquery.validate.pack.js/ script -- snip -- script $(document).ready(function(){ $(#form1).validate()({ rules: { Name: required, ChurchName: required, Email: { required: true, email: true }, number: { required: true, equalTo: '#confirm_number' } }, messages: { Name: Please enter your name, ChurchName: Please enter your church name, Email: Please enter a valid email address, Phone: Please enter your phone number, number: Please enter the correct validation number } }); }); /script -- snip -- form action=formmailv5.php method=post name=form1 id=form1 input type=hidden name=confirm_number class=required value=?=$_SESSION['key']; ? id=confirm_number / -- snip -- tr td align=rightValidation:br / img src=php_captcha.php /td td valign=topType the characters you see on the left:br input name=number class=required type=text id=numberbr /td /tr
[jQuery] Re: Jquery tablesorter problem
Sorry man, no idea what to tell you. good luck with your issue On Jan 12, 3:34 pm, Varun Khatri khatri.vk1...@gmail.com wrote: If I remove runat=server Like *table id=table1 cellspacing=1 class=tablesorter* And then use : $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *It works fine * But If I do *table id=table1 cellspacing=1 class=tablesorter runat=server* And then use : $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *It doesnot work* In the firebug it desont show any error : Infact when I write this in the console it says *Object length=1* but still does not work... :( Thanks Varun On Mon, Jan 12, 2009 at 12:26 PM, MorningZ morni...@gmail.com wrote: What happens with: $(.tablesorter) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) On Jan 12, 3:11 pm, Varun Khatri khatri.vk1...@gmail.com wrote: Here I have attached 3 files ... Its just a simple example I am trying this coz all my tables are dynamic (made at runtime) can you please check and let me know ... I have already spent hours for just 1 thing : Thanks I really appreciate the effort Varun On Mon, Jan 12, 2009 at 11:59 AM, MorningZ morni...@gmail.com wrote: Without seeing a working (errr, non working) page, constantly posting the same piece of non-working code is not helping others help you How about just using a class? On Jan 12, 2:51 pm, Varun Khatri khatri.vk1...@gmail.com wrote: well to me both returned same value So I agree But still cant find solution to problem: *alert($(#+serverIdPrefix+table1).size());// still returns 1* $(#+serverIdPrefix+table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)}) *//still doesnot work* Is there any other mistake that you can think of that I am making here , I know it should be pretty simple But I am unable to make it work Thanks Varun On Mon, Jan 12, 2009 at 11:48 AM, MorningZ morni...@gmail.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik size and length are equivalent, well, except that size is slower Straight from the docs: Length: The number of elements currently matched. The size function will return the same value Size: This returns the same number as the 'length' property of the jQuery object. However, it is slightly slower, so length should be used instead On Jan 12, 2:25 pm, Lukas Pitschl | Dressy Vagabonds lu...@dressyvagabonds.com wrote: you shouldn't use .length on a jQuery object, since that always returns 1 afaik. Use .size() instead. If your alert then still reports 1 you've selected the table correctly using jQuery, else you have to check your id. also your example implies, that the serverIdPrefix is not used. Check if html corresponds to your javascript on that. best regards, lukas pitschl Am 12.01.2009 um 20:21 schrieb Varun Khatri: alert($(#+serverIdPrefix+table1).length)); This returns 1 I dint get it Plz help Thanks Varun On Mon, Jan 12, 2009 at 4:26 AM, MorningZ morni...@gmail.com wrote: in the runat=server version, put alert($(#+serverIdPrefix+table1).length)); right before the tablesorter line believe me, as a .NET programmer myself, the runat=server is *not* causing tablesorter (or jQuery) to break, you definitely are not jQuery-selecting the table properly On Jan 12, 6:14 am, Genus Project genusproj...@gmail.com wrote: when the table is generated by server side code, are you sure you are calling the correct selector (#+serverIdPrefix+table1) ? maybe you missed some letter or something. you can use firebug to examine the generated table html to see if you are in fact calling the correct selector. If you are, it really doesnt matter if the table is runat server or not. They all transform to HTML fragments. On Jan 12, 7:52 am, varun khatri.vk1...@gmail.com wrote: Hi I was trying to use jquery table sorter plugins: when ever I use it like : table id=table1 cellspacing=1 class=tablesorter //row and column here /table and jquery: $(#table1) .tablesorter({widthFixed: true, widgets: ['zebra']}) .tablesorterPager({container: $(#pager)})
[jQuery] Re: Old code not working with new 1.2.6
jQuery 1.3 is going to be released soon. You might want to try to see if it works with 1.3b2. Also, it might be helpful to publish snippets of html that relates to your query. On Jan 12, 11:27 am, bryce4president brycekmar...@gmail.com wrote: I had a piece of code that worked with 1.2.2 but now it doesn't seem to work with 1.2.6 Here is the code, can anybody see anything that would cause it to stop working? All it does is adds a link to a piece of text in a table cell. $('#'+i).children('td:first').next().click(function(){ ord = $(this).text(); window.location.href = Recap?ord=+ord+pg=+page; }); It doesn't seem to be picking up the right part of the DOM anymore...
[jQuery] Re: Any trick to making text at has been faded in look good?
Learned something today.. it's nice to know that the filter attribute is causing the problem and to remove it when finished with the animation. On Jan 12, 10:09 am, Rick Faircloth r...@whitestonemedia.com wrote: Thanks for the reply, Mauricio, but I couldn't get your solution to work. Adding the background (at least in IE 7) didn't have any effect on the display of the final text. Also, on your demo page, I got an error. Looking at the code, I think you've got a no-background class on both demo p's. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mauricio (Maujor) Samy Silva Sent: Monday, January 12, 2009 12:03 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Any trick to making text at has been faded in look good? Are you talking about Internet Explorer browser? If so, have a look in the following article: http://www.kevinleary.net/blog/jquery-fadein-fadeout-problems-in-inte... Maurício -Mensagem Original- De: Rick Faircloth r...@whitestonemedia.com Para: jquery-en@googlegroups.com Enviada em: segunda-feira, 12 de janeiro de 2009 14:44 Assunto: [jQuery] Any trick to making text at has been faded in look good? Hi, all... I prefer to use .fadeIn(500), etc., to bring elements onto a page, as it gives the user a chance to keep up with changes being made visually. However, .fadeIn leaves text looking *u-ga-ly*... changing .fadeIn to .show leaves text nicely rendered in the browser. Is there some trick or other way to cause the browsers to render text that has been faded in looking good? Rick
[jQuery] Re: Hierarchy Checkbox Tree
The easiest way I can see of doing it is: div id=container div input type=checkbox value=1/ div input type=checkbox value=1.1 input type=checkbox value=1.2 div input type=checkbox value=1.3 /div input type=checkbox value=1.3 /div /div /div $('#container :checkbox').change(function(){ var jQ = $(this), nest = jQ.next('div'); if (jQ.attr('checked') == 'checked') // Checked - Check and disable all children. nest.find(':checkbox').attr({checked: 'checked', disabled: 'disabled'}); else // Unchecked - Uncheck and enable all children nest.find(':checkbox').attr({checked: '', disabled: 'disabled'}); }); It's untested, but I think it should work, and/or at least give you a starting point for a way to achieve your goal. On Jan 12, 11:54 am, bmclaughlin i...@bmclaughlindesigns.com wrote: I am hoping that someone has done this before. I am after something like this:http://static.geewax.org/checktree/index.html I will explain why this fine example does not work for my instance below. The behavior of the “United States” section in particular is what we are after. If a parent checkbox is checked, everything below that parent also gets checked. Unlike the example, there would not be a way to uncheck a child if the parent is selected. There are multiple “levels” of the parent child relationship. The example of the United States shown above has 2 levels. In our case there can be up to 9 levels of depth. In this case if the ultimate parent is selected, all 9 levels (all parent and all children) would be selected. When any parent within the hierarchy is selected, their children become selected. The system needs to work with checkboxes rather than images as shown in the example. This would mean that the checkboxes for the children of a selected parent are “disabled” thus not allowing a child to not be selected. We are currently using the tree from “sample 3” from Bassistance (http://jquery.bassistance.de/treeview/demo/) to get that behavior. If all this were not enough, the tree could contain 2,000 items that make up this hierarchy. So the less “building” the page has to do the better. All of the item will be loaded on the page when the page is rendered.
[jQuery] Re: .load() callback
I've had a minor success now that it's defined inside document.ready, one of the pages is now working, however my main nav bar ( ulli emName/emText /li li etc etc/ul ) isn't working. You can see the page at: http://www.ispycreativity.com/concept07.htm the relevant jQuery is at http://www.ispycreativity.com/scripts/global.js Thanks for the significant time you guys have committed to helping me =). ricardobeat wrote: You are defining your watchLinks function outside document.ready, so it's not available. it should look like this (pay attention to the closing brackets/parenthesis, you had extra ones at the end): $(document).ready(function(){ / CHECK URL var pageHash = window.location.hash.substr(1); if( pageHash == ) openPage(home); else openPage(pageHash); watchLinks(); //Watch the links pictureIt('graphics/bg/ploughedfield.jpg'); // WATCH LINKS function watchLinks() { $(document).click(function(e) { var $linkClicked = $(e.target); if( $linkClicked.is(a) ) { var youWantToGoTo = $linkClicked.attr('href').slice(0,-4); openPage(youWantToGoTo); // Open destination window.location.hash = youWantToGoTo; // Set the url # return false; }; }); }; }); cheers, - ricardo On Jan 11, 10:01 am, BlueStunt l...@lsdon.com wrote: This still doesn't work, I've stripped it down to this: $(document).click(function(e) { var $linkClicked = $(e.target); if( $linkClicked.is(a) ) { alert(Hi); return false; } }); but nothing registers, the return false doesn't work and neither is there an alert. Here's the relevant jquery in full: $(document).ready(function() { // CHECK URL var pageHash = window.location.hash.substr(1); if( pageHash == ) // If empty open HOME { openPage(home); } else { openPage(pageHash); // Else open relevant } watchLinks(); // Watch the links pictureIt('graphics/bg/ploughedfield.jpg'); }); WATCH LINKS function watchLinks() { $(document).click(function(e) { var $linkClicked = $(e.target); if( $linkClicked.is(a) ) { var youWantToGoTo = $linkClicked.attr('href').substr(0,$(this).attr('href').length-4); // Determine destination openPage(youWantToGoTo); // Open destination window.location.hash = youWantToGoTo; // Set the url # return false; } }); }; }); }; malsup wrote: I've read through both the link you suggested andhttp://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips... but I can't understand how I would make event delegation work for me. This is what I attempted: function watchLinks() { $(a).click(function(e) { var linkClicked = $(e.target); if( linkClicked.is(a)) { var youWantToGoTo = linkClicked.attr('href').substr(0,$(this).attr('href').length-4); // Determine destination openPage(youWantToGoTo); // Open destination window.location.hash = youWantToGoTo; // Set the url # return false; } }); }; Don't bind the anchors, bind the document: $(document).click(function(e) { var $el = $(e.target); if ($el.is('a')) { var href = $el.attr('href'); var hash = href.substr(0,href.length-4); openPage(hash); window.location.hash = hash; return false; } }); -- View this message in context:http://www.nabble.com/.load%28%29-callback-tp21389522s27240p21398423 Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/.load%28%29-callback-tp21389522s27240p21423890.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Problem with creating dynamic html...
in 1.3 it will be something like this $(),live('click', function(){ }); or you can do something like this in 1.2.6 $().click(function(e){ e = e.target || e.srcElement; if $(e).is('CSS selector') fire the function }); adding some bubbling $().click(function(e){ e =e.target || e.srcElement; obj = e; ancestors = []; while(obj) { ancestors.push(obj); obj = obj.parentNode; } if $(ancestors).is('CSS selector') fire the function }); still needs a lot of work but should be a starting point. Good luck. On Jan 12, 4:13 am, Nedim nedi...@gmail.com wrote: Thank you. I will check it later. On Jan 11, 3:01 pm, Mike Alsup mal...@gmail.com wrote: This is in html (by default) input type=hidden id=brojacgrupa value=1 / div id=grupe div id=grupa1 class=grupa input type = hidden id=grupa1 value=1/ div class=dodatni-sastojcispan class=naslov- posKolicina/span span class=kolicina-posNaslov/span/div div id=grupa-sadrzaj div id=grupa-list div div class=dodani-sastojciinput name=vrijednosti[][1][kol] type=text title=Količina npr. 100ml, 10 kom i sl. / /div div class=dodani-sastojciinput name=vrijednosti[][1][naziv] type=text title=Primjer: U polje količina unesete 10 kom, a u naslov jaja. //div div class=dodani-clear/div /div /div span class=novisastojakDodaj sastojak/ span/div /div /div div id=grupanovi /div span id=novagrupaNova grupa/span When i click on grupanovi it creates: $('#grupanovi').append('div id=grupediv id=grupa'+document.getElementById('brojacgrupa').value+' class=grupainput type = hidden id=grupa'+document.getElementById ('brojacgrupa').value+' value='+document.getElementById ('brojacgrupa').value+'/div class=dodatni-sastojcispan class=naslov-posKolicina/span span class=kolicina-posNaslov/ span/divdiv id=grupa-sadrzajdiv id=grupa-listdivdiv class=dodani-sastojciinput name=vrijednosti[][1][kol] type=text title=Količina npr. 100ml, 10 kom i sl. / /divdiv class=dodani-sastojciinput name=vrijednosti[][1][naziv] type=text title=Primjer: U polje količina unesete 10 kom, a u naslov jaja. //divdiv class=dodani-clear/div/div/ divspan class=novisastojakDodaj sastojak/span/div/div/ div'); But this works only on default: $(.novisastojak).click(function(){ alert('testiram'); }); not on dynamical content created. Help? }); Here's two resources you should read: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st... http://www.learningjquery.com/2008/03/working-with-events-part-1 Note that with the soon-to-be-released 1.3 version of jQuery this situation will be much easier to handle. Mike
[jQuery] Re: Cycle Pluging next up text
Thanks much, that just about does it! The only issue I've found is that $nextSlide becomes undefined if paging backwards. For example: http://static.spartaninternet.com/sandbox/ If you click the back button to get to slide 1 it becomes undefined. ~amy On Jan 12, 3:56 pm, Mike Alsup mal...@gmail.com wrote: function onAfter(currSlideElement, nextSlideElement, options, forwardFlag) { $('#main').html(this.alt); }}); Ideally, in my onAfter callback I would like to have the upcoming image's alt text instead of the current one's. Is this possible? Thanks! ~Amy Hmm, a bit tricky but this might get the job done: function onAfter(curr,next,opts,fwd) { var $slides = $(this).parent().children(); var index = $slides.index(this); var $nextSlide; if (fwd index == (opts.slideCount - 1)) $nextSlide = $slides.eq(0); else if (fwd) $nextSlide = $slides.eq(index+1); else if (opts.slideCount == 0) $nextSlide = $slides.eq(opts.slideCount-1); else $nextSlide = $slidex.eq(index-1) $('#main').html($nextSlide.attr('alt')); } Disclaimer: this won't work if you're using the 'slideExpr' option. Mike
[jQuery] improving performance of table navigation
Hi, I am trying to write table navigation using keys for asp.net gridview. This is what I have so far. It is working fine but it is slow. Please look at it and let me know how to improve the performance if possible. Basically it is html table with input elements. The structure of table is like this table tr td div style=height:22px; input type = text /div /td /tr tr td div style=height:22px; input type = text /div /td /tr ... /table jQuery(function($) { $('table#%= myTable.ClientID %') .bind('keydown', funcKeyDown) }); function funcKeyDown(event) { //get cell element. var cell = event.target; //get current cellIndex var $cell = $(cell); var currCell = $cell.parents(td); var cellIndex = currCell[0].cellIndex; //get current rowIndex var currRow = $cell.parents(tr); var rowIndex = currRow[0].rowIndex; var nextRowIndex, targetElem = null; var nextCell; switch(event.keyCode) { case 13: //enter key if(shiftKeyPressed == 1){ //move left if(!(cellIndex == 0)){ targetElem = currRow.children(td).eq (cellIndex-1).find(input[type=text]); if(targetElem){targetElem.select();}}} else { //move right if(!(cellIndex == (numElements -1))){ targetElem = currRow.children(td).eq (cellIndex+1).find(input[type=text]); if(targetElem){ targetElem.select(); } } } return false; case 16: //shift key shiftKeyPressed = 1; return false; case 33: case 34: //page-up, page-down if(event.keyCode == 33){ nextRowIndex = rowIndex - pageSize; if(nextRowIndex 0) nextRowIndex = 0; } if(event.keyCode == 34){ nextRowIndex = rowIndex + pageSize; if(nextRowIndex numRows) nextRowIndex = numRows; } targetElem = currRow.parent().children(tr).eq (nextRowIndex).children(td).eq(cellIndex) .find(input [type=text]); if(targetElem != null){targetElem.select();} return false; case 37: //left if(!(cellIndex == 0)){ targetElem = currRow.children(td).eq (cellIndex-1).find(input[type=text]); if(targetElem != null){targetElem.select();}} return false; case 38: //up if(rowIndex != 0){ targetElem = currRow.parent().children(tr).eq (rowIndex-1).children(td).eq(cellIndex) .find(input [type=text]); if(targetElem != null){ targetElem.select();}} return false; case 39: //right arrow if(!(cellIndex == (numElements -1))){ targetElem = currRow.children(td).eq (cellIndex+1).find(input[type=text]); if(targetElem != null){targetElem.select();}} return false; case 40: // down if(rowIndex = 0){ targetElem = currRow.parent().children(tr).eq (rowIndex+1).children(td).eq(cellIndex) .find(input [type=text]); if(targetElem != null){targetElem.select();}} return false; } }
[jQuery] Re: Any trick to making text at has been faded in look good?
Can you be more specific? Are you saying the filter attribute causes IE to poorly render fades? If so, what does your coding solution look like? $('#dogs').fadeIn(500).attr('filter', '') ??? Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Kean Sent: Monday, January 12, 2009 4:08 PM To: jQuery (English) Subject: [jQuery] Re: Any trick to making text at has been faded in look good? Learned something today.. it's nice to know that the filter attribute is causing the problem and to remove it when finished with the animation. On Jan 12, 10:09 am, Rick Faircloth r...@whitestonemedia.com wrote: Thanks for the reply, Mauricio, but I couldn't get your solution to work. Adding the background (at least in IE 7) didn't have any effect on the display of the final text. Also, on your demo page, I got an error. Looking at the code, I think you've got a no-background class on both demo p's. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mauricio (Maujor) Samy Silva Sent: Monday, January 12, 2009 12:03 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Any trick to making text at has been faded in look good? Are you talking about Internet Explorer browser? If so, have a look in the following article: http://www.kevinleary.net/blog/jquery-fadein-fadeout-problems-in-inte... Maurício -Mensagem Original- De: Rick Faircloth r...@whitestonemedia.com Para: jquery-en@googlegroups.com Enviada em: segunda-feira, 12 de janeiro de 2009 14:44 Assunto: [jQuery] Any trick to making text at has been faded in look good? Hi, all... I prefer to use .fadeIn(500), etc., to bring elements onto a page, as it gives the user a chance to keep up with changes being made visually. However, .fadeIn leaves text looking *u-ga-ly*... changing .fadeIn to .show leaves text nicely rendered in the browser. Is there some trick or other way to cause the browsers to render text that has been faded in looking good? Rick