[jQuery] Similar Plugins
I think JQUERY site should have a reporting system where users can post similar plugins. Like for accordion there are more than one plugin but users dont know that there might be a better one than the one s/he is visiting. So in the plugin page there should be a block or section where it should say similar plugins. That would be really great if implemented. Thanks.
[jQuery] Re: $(something).text() doesn't preserve whitespace in IE
Thanks guys. I'll run the test and post the results ASAP. On Jul 7, 1:17 am, John Resig [EMAIL PROTECTED] wrote: I'm fairly certain that our .text() support has changed a lot since October 2006 (!). It would be interesting to re-examine this issue - if there are any current problems I know that we'd really like to get them fixed. --John On Sun, Jul 6, 2008 at 8:05 PM, Dave Methvin [EMAIL PROTECTED] wrote: I'm having some issues when calling $(something).text() in IE 6/7. Basically I'm getting the calling text() on a pre element which is whitespace sensitive. In Firefox and Safari it works perfectly returning the text with whitespace intact. Is it possible to make it work in IE or shall I give up? I noticed that too quite a while back, if you run the test in this message does it still do the same thing? http://www.nabble.com/.text()-method-quirks-p6933512s27240.html
[jQuery] Re: FlexiGrid Problem
Guys can you help me about the problem below? Thanks On Jul 4, 11:53 am, Nimrod [EMAIL PROTECTED] wrote: Hi All, I using two instances of FlexiGrid in a page and I'm encountering the below error on the pagination stat: Page of [object Object] What do you think causes the error? By the way this error appears only on FF. It is not displaying on IE but still there is an error (records don't appear). Thanks,Nimrod
[jQuery] Forgetted link
Hy Here is the link what you forget http://www.momentcity.hu/site/flash/index.php
[jQuery] Re: Database Request
Hi . Sorry , i don't see that jquery it's most than one script. So i use : Autocomplete Plugin . All field use local file as a base, a static base I want to use a sql base to have a dynamic one I made my own mod , but , it's basic cause it's not really my part . It's replace the search.php ?php $q = strtolower($_GET[q]); if (!$q) return; $cnx = mysql_connect(localhost,login,password) ; $db = mysql_select_db(dabase) ; $items = array(); $sql = SELECT numero, modele FROM materiel; $req = mysql_query($sql); while($data = mysql_fetch_array($req)) { $numero = $data['numero']; $modele = $data['modele']; $items[$numero] = $modele; } foreach ($items as $key=$value) { if (strpos(strtolower($key), $q) !== false) { echo $key|$value\n; } } ? In fact as , as the original script use an array , i echo an array from my base . This one works .. but it's not really a proper code . Cause i just want 1 field , not an array . But i don't know how to edit the code to just have a 1 collum list . Then , as i succes to filled 2 field with the array , why not , filled more than 2 .. But it's not more an array , and i don't know how to use a table .. I search the group but don't find an answer . With those 2 mods , i think that autocomplete plugin will be really great . Thanks On 6 juil, 20:06, Rey Bango [EMAIL PROTECTED] wrote: Which script are you referring to? Rey... DigiCelebs wrote: Anyone ?? please On Jul 4, 10:34 am, DigiCelebs [EMAIL PROTECTED] wrote: Hi .. I found your jquery script and it's great cause it's the first that i found with multiplie field. But you don't take list from a database ( sql ) , only from file. Is it possible to have a field that take the list from a sql database ?? Thanks __ Information from ESET NOD32 Antivirus, version of virus signature database 3244 (20080705) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com- Masquer le texte des messages précédents - - Afficher le texte des messages précédents -
[jQuery] Re: updated variable not pass to remote method
Hi, I found this solution: var token = 'somerandomstring'; $(.myform).validate({ submitHandler: function(form) { ris = checkCaptcha(); if( ris == 1 ) { form.submit(); } else { var validator = $(.myform).validate(); validator.showErrors({captcha: captcha is not correct.}); } }, onkeyup: false, onblur: false }); function checkCaptcha() { var ris; captcha = $(#captcha).val(); $.ajax({ type: GET, async: false, dataType: json, url: captcha.php, data: token=+token+captcha=+captcha, success: function( data ){ ris = data.ris; } }); return ris; }
[jQuery] Re: Sumbit Twice a form
There's actually no way of submitting a form twice in two action urls in normal browser's capability. What you can do is that serialize all your variables into string using serialize() and use AJAX to submit into two locations one after another. like this form action= id=pform onsubmit=return submit_my_form(); input type=text name=input1 input type=text name=input2 /form script language=javascript function submit_my_form(){ $.ajax({ url : url1.php, type : post, data : $(#pform).serialize(), success : function(e){ // so form is submitted successfully !! } }); $.ajax({ url : url2.php, type : post, data : $(#pform).serialize(), success : function(e){ // so form is submitted successfully !! } }); return false; } /script Hope this helps!! On Jul 5, 5:18 am, xomero [EMAIL PROTECTED] wrote: How can i submit a form twice, let say I want to save the form data on my database and with the send the same form data to a different script in an external host.
[jQuery] Odd Issue with Effects causing input values not to submit - Help!
Here's the HTML: form action=search.php method=get div class=contentArea a href=# id=advancedOptsLinkAdvanced Options/a /div div class=contentArea id=advancedOpts table tr td id=advancedOptsRow1 input type=text name=test /td /tr /table /div /form Here's the Javascript: $(#advancedOptsLink).click(function() { $(#advancedOpts).toggle(blind, { direction: vertical }, 600); return false; }); When I click on Advanced Options, any inputs inside of the DIV layer with the id advancedOpts (such as test from my example above) do not submit with the form. However, they WILL submit if I change the Javascript to this: $(#advancedOptsLink).click(function() { $(#advancedOpts).toggle(); return false; }); The effect seems to cause this issue here. Any ideas what to do about this?
[jQuery] click event bug?
i load several tables contents via AJAX. after each load, i do bind(click, function(){ ... }). this should bind it to all matching elements of the DOM. but, in all browsers, it does apply only to newly loaded parts, the others seem to be disabled somehow. this is the real code inside function renewEvents(), called after each AJAX success: $(tr.basic).unbind(click); $(tr.basic).bind(click, function(){ $(this).next().toggleClass(hidden); });
[jQuery] Links injected with jQuery not active in IE6
I am using jQuery to insert a series of links into a containing div. Upon insertion, these links are active in Firefox and Safari, but are not active (clickable) in IE6 (what a surprise.) While Internet explorer 6 does visually render the inserted code, it seems that the html elements are not recognized. If the same html is included in the initial code, the links work fine. However, when the are inserted after the DOM is loaded, they are not. Has anyone encountered similar problems, or is there a known workaround to this problem? Thanks in advance, Matt
[jQuery] Re: Sumbit Twice a form
On Mon, Jul 7, 2008 at 9:02 AM, Mahbub [EMAIL PROTECTED] wrote: There's actually no way of submitting a form twice in two action urls in normal browser's capability. What you can do is that serialize all your variables into string using serialize() and use AJAX to submit into two locations one after another. like this form action= id=pform onsubmit=return submit_my_form(); input type=text name=input1 input type=text name=input2 /form script language=javascript function submit_my_form(){ $.ajax({ url : url1.php, type : post, data : $(#pform).serialize(), success : function(e){ // so form is submitted successfully !! } }); $.ajax({ url : url2.php, type : post, data : $(#pform).serialize(), success : function(e){ // so form is submitted successfully !! } }); return false; } /script Hope this helps!! On Jul 5, 5:18 am, xomero [EMAIL PROTECTED] wrote: How can i submit a form twice, let say I want to save the form data on my database and with the send the same form data to a different script in an external host. i would handle that on the serverside of life, not the clientside. basically, your serverside script processes the form, saves it in a database, then if all correct, call the external form, via GET (that is, as query variables). -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: click event bug?
On Mon, Jul 7, 2008 at 11:21 AM, mattithjah [EMAIL PROTECTED] wrote: i load several tables contents via AJAX. after each load, i do bind(click, function(){ ... }). this should bind it to all matching elements of the DOM. but, in all browsers, it does apply only to newly loaded parts, the others seem to be disabled somehow. this is the real code inside function renewEvents(), called after each AJAX success: $(tr.basic).unbind(click); $(tr.basic).bind(click, function(){ $(this).next().toggleClass(hidden); }); use livequery instead and bound once and for all your event, instead of unbind/binding all the time: http://brandonaaron.net/docs/livequery/ -- Alexandre
[jQuery] JSONP cross-domain with POST
I use the CodeIgniter PHP framework and one of it's features is that the GET global is destroyed. I therefore use jQuery 1.2+ with POST for ajax/jsonp. This works in all jQuery versions, including the latest 1.2.6, for the _same_ domain. When it comes to cross-domain calls, something changed between versions 1.2.1 and 1.2.2 of jQuery. 1.2.1 works, while 1.2.2 and newer does not. Error is what you expect and the XHR connection fails to open: Access to restricted URI denied code: 1012 [Break on this error] xml.open(s.type, s.url, s.async, s.username, s.password); // earlier jQuery versions xhr.open(type, s.url, s.async); // later jQuery versions Running diffs on the files, I obviously see the changes but fail to understand the specifics that changed the behavior. If it is relevant, the submitted URL structure is as follows (pasted in an example callback function generated by jQuery at the end): http://domain.com/controller/method/var/?jsoncallback=jsonp1215426133956 Could someone with a better knowledge of the core offer some insight on what changed between 1.2.1 and 1.2.2, for remote calls, and if this can be resolved?
[jQuery] Re: $(something).text() doesn't preserve whitespace in IE
Results are at http://pastie.org/228916 On 7 Jul, 01:17, John Resig [EMAIL PROTECTED] wrote: I'm fairly certain that our .text() support has changed a lot since October 2006 (!). It would be interesting to re-examine this issue - if there are any current problems I know that we'd really like to get them fixed. --John On Sun, Jul 6, 2008 at 8:05 PM, Dave Methvin [EMAIL PROTECTED] wrote: I'm having some issues when calling $(something).text() in IE 6/7. Basically I'm getting the calling text() on a pre element which is whitespace sensitive. In Firefox and Safari it works perfectly returning the text with whitespace intact. Is it possible to make it work in IE or shall I give up? I noticed that too quite a while back, if you run the test in this message does it still do the same thing? http://www.nabble.com/.text()-method-quirks-p6933512s27240.html
[jQuery] Re: $(something).text() doesn't preserve whitespace in IE
I'm having some issues when calling $(something).text() in IE 6/7. Basically I'm getting the calling text() on a pre element which is whitespace sensitive. In Firefox and Safari it works perfectly returning the text with whitespace intact. Is it possible to make it work in IE or shall I give up? Have you tried using html() instead? -Dan
[jQuery] [New plugin] Colorpicker
http://eyecon.ro/colorpicker/ A simple component to select colors in the same way you select color in Adobe Photoshop Features * Flat mode - as element in page * Powerful controls for color selection * Easy to customize the look by changing some images * Fits into the viewport
[jQuery] Re: Adding data via external function
i had exactly the same requirement My solution was this: adding an option called service like so: $(.TagField input).autocomplete(null, { max: 20, highlight: false, multiple: true, multipleSeparator: ,, scroll: true, scrollHeight: 200, selectFirst:false, minChars:1, service:getData }); function getData(term,callback){ var d=['mark','testies','tester','code','hello world','hello','world']; var str=; function eachD(i,n){ str+=n+\n; } $.each(d,eachD); callback(str); } ... and changing the autocomplete code like so... .} else if((typeof options.service == function)){ options.service(lastWord(term),function(data){ var parsed = options.parse options.parse(data) || parse(data); cache.add(term, parsed); success(term, parsed); }); } else { // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match select.em. the getData method has hard coded data at the minute as i havent written the service and at the time of writing i am just testing it. Having this flexibility allows me to abstract the data loading so i can pull it from any data source, any data format and pass it into the plugin in the format it requires Hope this helps On Jun 27, 8:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Jorn, great work onautocomplete. One thing I'd like to see is the ability to pull the data from a function (instead of a static array or url). The function could return the array instead, however it wanted to go get the data. Imagine: autocomplete: function(urlOrDataOrFunction, options) { I tried to hack it in myself, making a function that returned an array of objects,using typeof urlOrData == 'function', and then invoking the function in the function request(term, success, failure) section, but I failed. Pretty spectacularly. It seems like it should work, but later item (for formatItem) comes back undefined. I'll keep working at it.
[jQuery] autocomplete
The autocomplete plugin by Jörn is awesome but limited in that i want to get my data for its from a function call instead of a url. let me explain. Allowing data to be pulled from a URL is great but it locks me into the required format. Allowing data from an array is cool but it locks me into a fixed set of data. By allowing a method (function) to be past in i can abstract the ajax call and format the data to a format required by the plugin but still have my url script return the data how i like. At the minute my url returns data as a JSON array which is how i want it to be and dont want to have to right another service to render it differently. By passing in a function to act as a delgate I can choose where the data comes from, the plugin should only care that it has been given some data regardless of wether that comes from a method call or an ajax call. I've went through the code and have a good idea of what to change but dont want to have to waste to much time doing this or breaking existing code and introducing bugs. Any chance of getting this in a n update
[jQuery] unblockUI and enter
Hello, I am using blockUI to display a simple message with a button. I would like when user presses enter the dialog to go off. interesting thing is in FF, it does work as expected, and in IE it does not, it sometimes does, it sometimes does not, and I could not figure out why. any ideas? Best.
[jQuery] Re: unblockUI and enter
I am using blockUI to display a simple message with a button. I would like when user presses enter the dialog to go off. interesting thing is in FF, it does work as expected, and in IE it does not, it sometimes does, it sometimes does not, and I could not figure out why. Does the button have focus? Can you post a link?
[jQuery] Re: [New plugin] Colorpicker
Wow, that's a beautiful implementation, Stefan! Wonderful combination of function and style. Thanks for sharing it with the community! cheers, --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 7, 2008, at 8:02 AM, Stefan wrote: http://eyecon.ro/colorpicker/ A simple component to select colors in the same way you select color in Adobe Photoshop Features * Flat mode - as element in page * Powerful controls for color selection * Easy to customize the look by changing some images * Fits into the viewport
[jQuery] Re: using a selector to obtain content from an ajax response
I can't really say from your answer that you actually solved your problem, so here is a way to use the browser parser instead of the jQuery one: $('div/ ').html(responseText).find('response_selector').appendTo('target_selector'); This creates a DIV node without adding it to the document in order to parse your HTML. You can then run a jQuery selector on this node like on any other node. -- Vincent On Jul 7, 6:19 am, theog [EMAIL PROTECTED] wrote: Thanks. I think the issue here was the Response contained strict xhml - html markup that jQuery could not parse. Wierd. Theo
[jQuery] Re: slideDown and slideUp are jerky
Thanks Michael, I will give this a try! On Jul 5, 8:49 pm, Michael Geary [EMAIL PROTECTED] wrote: This is caused by margin or padding on the element being animated. Try this experiment: Make sure you have the Web Developer Toolbar extension installed in Firefox. Load the tutorial page and test the slide in/slide out to confirm that it jerks at the end of the animation. Now select CSS / Edit CSS on the Web Developer Toolbar. Select the Embedded Styles tab in the Edit CSS sidebar and scroll to the end. Add this rule at the end: body * { margin:0 !important; padding:0 !important; } Repeat the test and you'll find that it no longer jerks. If you're really curious, try zeroing either the margin or the padding but not both. What I notice is that margin causes a jerk on a slideUp (Slide Out on the test page), and padding causes a jerk on the slideDown (Slide In). So you need to zero them both. If you can zero the margin and padding on the animated element in your page, it should fix it. -Mike From: JohnieKarr Does anyone have any ideas on this? I have gone to jquery.com and looked at different tutorials as well as different plug-in example sites, and it is obvious the difference between IE and Firefox. This link for example: http://docs.jquery.com/Tutorials:Live_Examples_of_jQuery Try the second example. You have to look carefully, but there is a jerk at the end of the slide in. You have to look close, but you will see it, especially if you do a side by side comparison with ff. One thing I have noticed is that the longer the webpage stays open, and the more times the script runs, the smoother it gets. Any ideas or discussion on this is greatly appreciated. Thanks!- Hide quoted text - - Show quoted text -
[jQuery] Re: $(something).text() doesn't preserve whitespace in IE
html() would be no good for what I'm trying to do. Basically I have pre blocks which contain pre-formatted source code (including a lot of extra html spans and what not for syntax highlighting and line numbering). I then take the text() of the pre's and insert it into a textarea which will now contain a plain text version of the code from the pre. Works perfectly in anything but IE. On 7 Jul, 12:49, Dan G. Switzer, II [EMAIL PROTECTED] wrote: I'm having some issues when calling $(something).text() in IE 6/7. Basically I'm getting the calling text() on a pre element which is whitespace sensitive. In Firefox and Safari it works perfectly returning the text with whitespace intact. Is it possible to make it work in IE or shall I give up? Have you tried using html() instead? -Dan
[jQuery] slideDown hidden portion/bump
I don't know why it does this. I am experiencing hidden content (the username label) until the animation is complete and the bump occurs. See it for yourself http://nunyez.googlepages.com/slidedowntest Help appreciated
[jQuery] Re: [New plugin] Colorpicker
On Mon, 2008-07-07 at 05:02 -0700, Stefan wrote: http://eyecon.ro/colorpicker/ A simple component to select colors in the same way you select color in Adobe Photoshop Features * Flat mode - as element in page * Powerful controls for color selection * Easy to customize the look by changing some images * Fits into the viewport The picked is really nice, but I'm unable to use the arrows on firefox 3 / Linux. Everything else works well. Daniele
[jQuery] Re: click event bug?
Another is to bind your click handler to the table. See here for more: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F - Richard On Mon, Jul 7, 2008 at 7:04 AM, Alexandre Plennevaux [EMAIL PROTECTED] wrote: On Mon, Jul 7, 2008 at 11:21 AM, mattithjah [EMAIL PROTECTED] wrote: i load several tables contents via AJAX. after each load, i do bind(click, function(){ ... }). this should bind it to all matching elements of the DOM. but, in all browsers, it does apply only to newly loaded parts, the others seem to be disabled somehow. this is the real code inside function renewEvents(), called after each AJAX success: $(tr.basic).unbind(click); $(tr.basic).bind(click, function(){ $(this).next().toggleClass(hidden); }); use livequery instead and bound once and for all your event, instead of unbind/binding all the time: http://brandonaaron.net/docs/livequery/ -- Alexandre
[jQuery] Re: Similar Plugins
+1 -- Ariel Flesler http://flesler.blogspot.com On 7 jul, 03:51, Mahbub [EMAIL PROTECTED] wrote: I think JQUERY site should have a reporting system where users can post similar plugins. Like for accordion there are more than one plugin but users dont know that there might be a better one than the one s/he is visiting. So in the plugin page there should be a block or section where it should say similar plugins. That would be really great if implemented. Thanks.
[jQuery] Re: Similar Plugins
Heck yeah...this is a great idea. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ariel Flesler Sent: Monday, July 07, 2008 8:53 AM To: jQuery (English) Subject: [jQuery] Re: Similar Plugins +1 -- Ariel Flesler http://flesler.blogspot.com On 7 jul, 03:51, Mahbub [EMAIL PROTECTED] wrote: I think JQUERY site should have a reporting system where users can post similar plugins. Like for accordion there are more than one plugin but users dont know that there might be a better one than the one s/he is visiting. So in the plugin page there should be a block or section where it should say similar plugins. That would be really great if implemented. Thanks.
[jQuery] How to replace a div content?
How could i replace a html content inside the div? I have 1 div (div id=elemini text/div) and everytime i click a button, i want to replace the html content inside the #ELEM to new one. I try to use: jQuery(#button).click(function() { jQuery(#elem).html('bmy text/b'); }); but everytime i click the button, the html is not replaced, resulting something like: bmy text/bbmy text/b What is the solution?
[jQuery] Re: Similar Plugins
Definitely +1.
[jQuery] Superfish 1.4.4 released - has auto-submenu arrows
Third release in 7 days, and like the subject says: auto generation of submenu arrows via an added span, customisable CSS, and nicely degradable indexed alpha-transparent png that should work for all colour schemes and menu types. Can be easily disabled via options object. http://users.tpg.com.au/j_birch/plugins/superfish/ Cheers Joel Birch.
[jQuery] Superfish / Firefox 3 PC / Flash issue
Hello, I have run into an issue with Superfish drop-down menus hiding behind a Flash file only on Firefox 3 on the PC. I have added param name=wmode value=opaque (I have also tried transparent instead of opaque) to the Flash movie to ensure I can properly have the Superfish menus appear on top of the movie. Everything works as planned on IE 6, IE 7, Firefox 2 PC Mac, Firefox 3 Mac and Safari 3 Mac. For some reason, Firefox 3 on the PC is sending the menus behind the Flash file. Has anybody else run into this issue? The site is in development, so I don't have any links. Thanks, Chad
[jQuery] ThickBox - Full Size
Hi, Is it possible to have ThickBox have a Full Sizelink that would show either another image file or the original image file in a seperate page. Similar to the way you normally would click on a thumbnail and see the full size image? Thanks, Dave
[jQuery] Re: jQuery issues in Firefox 3
On Sun, Jul 6, 2008 at 5:33 PM, Karl Swedberg [EMAIL PROTECTED] wrote: Putting the link (or style) tags before script tags in the head can ameliorate the problem. Others have tested this and have found that they have access to those style properties. Correct - it certainly fixed the original problem in this thread. Thanks to Deigo for pointing it out. David. -- Kayak Travel: http://www.travellingkayak.com
[jQuery] Problem with Cycle plugin using random and previous
[2nd post attempt] I've come across a problem with Mike Alsup's very good Cycle plug-in. This occurs when using both the random feature and a previous link. Previous will go to the previous item as it is ordered in the HTML, regardless of what appeared previously to the user in the random order. For example, if I have elements to be cycled which appear in the page code in this order: A, B, C But when randomized appear to the user in this order: A, C, B Then, if the user clicks the Previous link with B showing, the cycle will go to A, not C as the user would expect. Is there any way to achieve the expected behavior? Many thanks, Jon
[jQuery] Re: How to replace a div content?
When you figure this out, let me know. I'm looking into this as well and will post anything I find that might work. On Jul 7, 8:04 am, SimDigital [EMAIL PROTECTED] wrote: How could i replace a html content inside the div? I have 1 div (div id=elemini text/div) and everytime i click a button, i want to replace the html content inside the #ELEM to new one. I try to use: jQuery(#button).click(function() { jQuery(#elem).html('bmy text/b'); }); but everytime i click the button, the html is not replaced, resulting something like: bmy text/bbmy text/b What is the solution?
[jQuery] Re: Superfish 1.4.4 released - has auto-submenu arrows
On Tue, 8 Jul 2008 00:52:19 +1000, Joel Birch wrote: Third release in 7 days, and like the subject says: auto generation of submenu arrows via an added span, customisable CSS, and nicely degradable indexed alpha-transparent png that should work for all colour schemes and menu types. Can be easily disabled via options object. http://users.tpg.com.au/j_birch/plugins/superfish/ Hi Joel, Nice work as always! One thing I noticed on your demo at: http://users.tpg.com.au/j_birch/plugins/superfish/#sample2 If you open one of the droplist boxes (say 3rd one over, it stays open) - THEN click the 3rd Superfish menu above it, the menu opens BEHIND the opened droplist. Could just be a thing with the demo page, but I thought I'd mention it. Chuck
[jQuery] Re: NEW: XML to JSON Plugin
Hi Diego, I mean ( 1 ) I Know, but would be something like that xmlpersonnameDiego/ name/person/xml already great. :) Nice plugin.!! On 5 jul, 00:06, Diego [EMAIL PROTECTED] wrote: Hi Alexsandro, Do you mean (1)convert the generate JSON back to XML? OR... (2)define a javascript object and convert it to XML? If (1): I initially built this plugin for my personal use (for my convenience) so I could easily process XML data. Because of that, I didn't bother to differentiate between attributes / nodes. ie.: xmlpersonnameDiego/name/person/xml ...gives the same output as this... xmlperson name=Diego/person/xml ...so it would be impossible to reverse the conversion. If (2): This is quite easy. And actually, it would be pretty similar to the code I wrote to show the JSON structure in HTML (Under Examples Basic/Extended Structure) I will write this when I get a chance, but I'd rather wait for the feedback on this plugin to work out the best way to do it... Cheers, Diego Alexsandro_xpt wrote: Very good!!! Are possible to do reverse? -- Alexsandro www.alexsandro.com.br On 4 jul, 12:34, Diego [EMAIL PROTECTED] wrote: I wrote this a few months but didn't have the time to share it. Now that I've re-done the documentation for 2 of my plugins I thought I'd give it a few hours, knock some examples together and share it with the whole world (ok, maybe just a few people). Basic example: var xml = 'xmlmessageHello world/message/xml'; var json = $.xml2json(xml); alert(json.message); // shows Hello world Ajax example: var file = 'data/hello.xml'; //xmlmessageHello world/message/ xml $.get(file, function(xml){ �var json = $.xml2json(xml); �alert(json.message); }); See the documentation page for more examples and demos. XML to JSON Plugin -http://fyneworks.com/jquery/xml-to-json/ As always, feedback is welcome! Cheers, Diego
[jQuery] Re: How to replace a div content?
Cut and pasted your example. Works fine for me. Do you not have an onready opening function, eg $(function() {}? On Jul 7, 10:04 am, SimDigital [EMAIL PROTECTED] wrote: How could i replace a html content inside the div? I have 1 div (div id=elemini text/div) and everytime i click a button, i want to replace the html content inside the #ELEM to new one. I try to use: jQuery(#button).click(function() { jQuery(#elem).html('bmy text/b'); }); but everytime i click the button, the html is not replaced, resulting something like: bmy text/bbmy text/b What is the solution?
[jQuery] Re: [New plugin] Colorpicker
The picked is really nice, but I'm unable to use the arrows on firefox 3 / Linux. The arrows work for me in FF3. You have to click and drag on them -- they're not spin buttons, though at first glance that is how they look.
[jQuery] Problem with Cycle plugin using random and previous
I've come across a problem with Mike Alsup's very good Cycle plug-in. This occurs when using both the random feature and a previous link. Previous will go to the previous item as it is ordered in the HTML, regardless of what appeared previously to the user in the random order. For example, if I have elements to be cycled which appear in the page code in this order: A, B, C But when randomized appear to the user in this order: A, C, B Then, if the user clicks the Previous link with B showing, the cycle will go to A, not C as the user would expect. Is there any way to achieve the expected behavior? Many thanks, Jon
[jQuery] Problem with Cycle plugin using random and previous
I've come across a problem with Mike Alsup's very good Cycle plug-in. This occurs when using both the random feature and a previous link. Previous will go to the previous item as it is ordered in the HTML, regardless of what appeared previously to the user in the random order. For example, if I have elements to be cycled which appear in the page code in this order: A, B, C But when randomized appear to the user in this order: A, C, B Then, if the user clicks the Previous link with B showing, the cycle will go to A, not C as the user would expect. Is there any way to achieve the expected behavior? Many thanks, Jon
[jQuery] Problem with Cycle plug-in using random and previous
I've come across a problem with Mike Alsup's very good Cycle plug-in. This occurs when using both the random feature and a previous link. Previous will go to the previous item as it is ordered in the HTML, regardless of what appeared previously to the user in the random order. For example, if I have elements to be cycled which appear in the page code in this order: A, B, C But when randomized appear to the user in this order: A, C, B Then, if the user clicks the Previous link with B showing, the cycle will go to A, not C as the user would expect. Is there any way to achieve the expected behavior? Many thanks, Jon
[jQuery] simpleTree with POST instead GET
Hi guys. Do you know how to use POST instead GET method for simpleTree( http://news.kg/wp-content/uploads/tree/dd/)? Cheers Marco Antonio
[jQuery] Re: JQuery 1.2.6 and JQuery Form Plugin in IE7
I have set up a test page that shows this problem. It works in FF but not IE. http://education.llnl.gov/uploads/testup.lasso Mike, can you look into this. If you already have, do you have an estimate as to when this will be fixed? Thanks. On 7/3/08 2:05 PM, Shelane [EMAIL PROTECTED] wrote: Cute answer Mike. I use method as a hidden form name all the time and my code is already wrapped with that code everywhere. I'm terrible with coming up with good names for things, but I have to have some name that makes sense. What do you use? I have two key inputs that tell my processing pages what to do with the data coming in - task and method. I get this same error with jquery 1.2.6. in IE only. If I downgrade to jquery 1.2.4, it's fine. This is the error I get (you know how non-helpful JS errors in IE are): Line: 2 Char: 2490 Error: Object doesn't support this property or method Code: 0 URL: myurl here (internal site) On Jul 3, 5:16 am, Mike Alsup [EMAIL PROTECTED] wrote: I think if you avoid using poorly named form inputs, like 'action' and 'method', then you'll be fine. I'll look into why those are causing a problem in 1.2.6. Mike On Jul 3, 2:34 am, Drager [EMAIL PROTECTED] wrote: I haven't a public link to post, but I'm trying with the sample i was found here:http://www.malsup.com/jquery/form/file/ The only diference is jquery version. The error reporting in IE7 is this: Line: 24 Character: 531 Code: 0 Error Message: El objeto no acepta esta propiedad o método On 2 jul, 17:27, Mike Alsup [EMAIL PROTECTED] wrote: On Jul 2, 8:50 am, Drager [EMAIL PROTECTED] wrote: I want to upload a file using JQuery Form Plugin but I have some troubles. It work ok with JQuery 1.2.3 but don't with version 1.2.6 and IE 7. In Firefox2 it works great with both versions of JQuery. * jQuery Form Plugin * version: 2.12 (06/07/2008) * @requires jQuery v1.2.2 or later You need to provide more details than that. What isn't working? Is there an error? Can you post a link?
[jQuery] .hide() Doesn't Work Fast Enough?
I'm using jQuery to fade in my site logo on my home page header, to give the home page some animation. It works great. So that the page will degrade gracefully if the user doesn't have Javascript, the HTML has the complete logo already visible. That's what users without Javascript see. If the user has javascript, I first hide() the logo using jQuery. Then I fade it in. However, many times when I load my home page, I see the logo briefly before jQuery can hide it. You see the logo for a split second, and then it vanishes. (After that it fades in correctly). Is there a way to fix this? Here's the code: HTML: echo 'ul id=Animated_Header'; echo 'liimg src=/images/Logo_3.gif/li'; echo '/ul'; JQUERY; $(document).ready(function() { $('#Animated_Header').hide(); $('#Animated_Header').html('liimg src=/images/Logo_1.gif / liliimg src=/images/Logo_2.gif alt=FlavorZoom, the New Way to Count Calories/liliimg src=/images/Logo_3.gif /li'); $(ul.nav).superfish(); $('#Animated_Header').fadeIn(100).innerfade({ speed: 'slow', timeout: 300, type: 'sequence', containerheight: '71px' }); }); Thanks in advance to all for any info. -Vik
[jQuery] Re: Problem with Cycle plug-in using random and previous
Yikes! Sorry about the reposts -- I didn't realize the group was moderated for new users. - Previous Message - From: JonDetroit Date: 7/7/08 9:36 AM I've come across a problem with Mike Alsup's very good Cycle plug-in. This occurs when using both the random feature and a previous link. Previous will go to the previous item as it is ordered in the HTML, regardless of what appeared previously to the user in the random order. For example, if I have elements to be cycled which appear in the page code in this order: A, B, C But when randomized appear to the user in this order: A, C, B Then, if the user clicks the Previous link with B showing, the cycle will go to A, not C as the user would expect. Is there any way to achieve the expected behavior? Many thanks, Jon
[jQuery] Mouse moves on one element triggering a drag on another
I have a series of elements the top of which partly or wholly covers the rest (initially positioned/layered using CSS). I want to drag one of the lower elements but (I guess obviously) only the top element gets the mousedown/mousemove events. Is there a way of passing those events through to one of my lower elements? In case you're wondering what I'm doing, I have a transparent PNG file and so the user can see the lower elements, just not click on them directly. Regards and thanks John
[jQuery] Re: Links injected with jQuery not active in IE6
Can you post a link? On Jul 6, 11:13 pm, M. Miller [EMAIL PROTECTED] wrote: I am using jQuery to insert a series of links into a containing div. Upon insertion, these links are active in Firefox and Safari, but are not active (clickable) in IE6 (what a surprise.) While Internet explorer 6 does visually render the inserted code, it seems that the html elements are not recognized. If the same html is included in the initial code, the links work fine. However, when the are inserted after the DOM is loaded, they are not. Has anyone encountered similar problems, or is there a known workaround to this problem? Thanks in advance, Matt
[jQuery] Re: Superfish 1.4.4 released - has auto-submenu arrows
Thanks for the feedback Chuck, I see that behaviour in Firefox (all platforms), but I'm fine with it - and I think I have to be as I'm 95% sure there is no way around it. It's not nearly as bad as the problem bgIframe fixes for IE6 at least. Joel Birch.
[jQuery] jMaps and other G* functions
All jMaps functions never seen to return a handler that I can use, but only fire the callback if provided. I used jMaps to add a marker and centered the map. On this newly created marker, how can I get to the other G* methods such as openInfoWindow?
[jQuery] Find out current stylesheet title
Hi guys, I am new to jquery and I am stuck :P Basically I have a few style sheets which users will be able to choose between (through php), What I want to do is find out which style sheet is being used using jquery. So I need to find the title of the stylesheet that has a rel=stylesheet and if it is equal to ... then do ... Thanks for your time :D
[jQuery] fckeditor and jquery validation
Hi to everybody, I have a problem validating a textarea generated by fckeditor with PHP. I have placed the fckeditor inside a form, and the problem is that if a put a char in the textarea and then press submit the validation says that is empty, and if I press again, it says is ok and sends the form. this is my code: ? include_once(fckeditor/fckeditor.php); ? script src=js/jquery.js type=text/javascript/script script src=js/jquery.validate.js type=text/javascript/script script $(document).ready(function() { $(#FCKeditor1).addClass(required); $(#mi_form).validate(); }); /script form id=mi_form ?php $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor-BasePath = 'fckeditor/' ; $oFCKeditor-Value = '' ; $oFCKeditor-ToolbarSet = 'Barra_listas'; $oFCKeditor-Create() ; ? input type=text class=required / input type=submit value=envia / /form Any suggestion?
[jQuery] Re: .hide() Doesn't Work Fast Enough?
In which browser(s) are you having this issue? --John On Mon, Jul 7, 2008 at 12:41 PM, Vik [EMAIL PROTECTED] wrote: I'm using jQuery to fade in my site logo on my home page header, to give the home page some animation. It works great. So that the page will degrade gracefully if the user doesn't have Javascript, the HTML has the complete logo already visible. That's what users without Javascript see. If the user has javascript, I first hide() the logo using jQuery. Then I fade it in. However, many times when I load my home page, I see the logo briefly before jQuery can hide it. You see the logo for a split second, and then it vanishes. (After that it fades in correctly). Is there a way to fix this? Here's the code: HTML: echo 'ul id=Animated_Header'; echo 'liimg src=/images/Logo_3.gif/li'; echo '/ul'; JQUERY; $(document).ready(function() { $('#Animated_Header').hide(); $('#Animated_Header').html('liimg src=/images/Logo_1.gif / liliimg src=/images/Logo_2.gif alt=FlavorZoom, the New Way to Count Calories/liliimg src=/images/Logo_3.gif /li'); $(ul.nav).superfish(); $('#Animated_Header').fadeIn(100).innerfade({ speed: 'slow', timeout: 300, type: 'sequence', containerheight: '71px' }); }); Thanks in advance to all for any info. -Vik
[jQuery] Re: JQuery 1.2.6 and JQuery Form Plugin in IE7
I have set up a test page that shows this problem. It works in FF but not IE. http://education.llnl.gov/uploads/testup.lasso Mike, can you look into this. If you already have, do you have an estimate as to when this will be fixed? Thanks. I can't give you an estimate because the problem arises from a change to core and not something I can fix in the plugin. However, if you comment out line 203 of the uncompressed form plugin then things should work fine. Line 203 contains the following code: method: 'POST', Note however that you need to ensure that the form's method attribute is set to POST in the markup since the plugin will no longer catch that for you. Also, I stand by my previous comment about using better input names. I realize that method is a logical name for you, but using names like method, action, type, nodeType, etc, etc is asking for trouble. And this is a perfect example of why - your code used to work and now it doesn't. Surely you can come up with names that make sense and don't collide with DOM properties. Mike
[jQuery] Re: Adding data via external function
Yes, this will find its way into the autocomplete plugin. Paul Bakaus actually implemtended something close in the UI 1.6 branch. Its just not ready, yet. Jörn On Mon, Jul 7, 2008 at 1:46 PM, mark.forster [EMAIL PROTECTED] wrote: i had exactly the same requirement My solution was this: adding an option called service like so: $(.TagField input).autocomplete(null, { max: 20, highlight: false, multiple: true, multipleSeparator: ,, scroll: true, scrollHeight: 200, selectFirst:false, minChars:1, service:getData }); function getData(term,callback){ var d=['mark','testies','tester','code','hello world','hello','world']; var str=; function eachD(i,n){ str+=n+\n; } $.each(d,eachD); callback(str); } ... and changing the autocomplete code like so... .} else if((typeof options.service == function)){ options.service(lastWord(term),function(data){ var parsed = options.parse options.parse(data) || parse(data); cache.add(term, parsed); success(term, parsed); }); } else { // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match select.em. the getData method has hard coded data at the minute as i havent written the service and at the time of writing i am just testing it. Having this flexibility allows me to abstract the data loading so i can pull it from any data source, any data format and pass it into the plugin in the format it requires Hope this helps On Jun 27, 8:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Jorn, great work onautocomplete. One thing I'd like to see is the ability to pull the data from a function (instead of a static array or url). The function could return the array instead, however it wanted to go get the data. Imagine: autocomplete: function(urlOrDataOrFunction, options) { I tried to hack it in myself, making a function that returned an array of objects,using typeof urlOrData == 'function', and then invoking the function in the function request(term, success, failure) section, but I failed. Pretty spectacularly. It seems like it should work, but later item (for formatItem) comes back undefined. I'll keep working at it.
[jQuery] Re: JQuery 1.2.6 and JQuery Form Plugin in IE7
Naming conventions have always been my problem. What types of names do you (anyone) give these necessary parameters? On 7/7/08 10:59 AM, Mike Alsup [EMAIL PROTECTED] wrote: I have set up a test page that shows this problem. It works in FF but not IE. http://education.llnl.gov/uploads/testup.lasso Mike, can you look into this. If you already have, do you have an estimate as to when this will be fixed? Thanks. I can't give you an estimate because the problem arises from a change to core and not something I can fix in the plugin. However, if you comment out line 203 of the uncompressed form plugin then things should work fine. Line 203 contains the following code: method: 'POST', Note however that you need to ensure that the form's method attribute is set to POST in the markup since the plugin will no longer catch that for you. Also, I stand by my previous comment about using better input names. I realize that method is a logical name for you, but using names like method, action, type, nodeType, etc, etc is asking for trouble. And this is a perfect example of why - your code used to work and now it doesn't. Surely you can come up with names that make sense and don't collide with DOM properties. Mike
[jQuery] Re: JQuery 1.2.6 and JQuery Form Plugin in IE7
Naming conventions have always been my problem. What types of names do you (anyone) give these necessary parameters? One simple solution is to just add a prefix to your input names.
[jQuery] callback for css loaded in head
I wish to execute block of code after loaded css dinamically inserted in the head. I´m making a ajax navigation and everything working fine, but the page is loaded without css and after a period of time (not defined, sometimes very fast, sometimes slow) the css is loaded and applied in document. The system works with css and js on demand, so with javascript everything is fine because I use a callback in $.getScript. But for css there´s a efficient way? Regards, Alexandre Magno Web Developer http://blog.alexandremagno.net
[jQuery] Re: .hide() Doesn't Work Fast Enough?
It's very impressive to get your thoughts on this, John. jQuery rocks. The browser is FireFox 3.0 for Mac. Your reply got me thinking about what could be specific to the browser I'm using. I disabled all my FireFox add-ons and restarted FireFox. Hide() now correctly hides the div before the logo can be seen. :) Thanks very much for the feedback! -Vik
[jQuery] Form Field
Hi List, New to the group, so I will start off with hopefully a bug some of you may have seen before ;) = How do I stop the first 2 input fields going behind what is an option form field? http://www.memory-superstore.net/ This is an IE6 bug only, link to screenshot of bug: http://testbed.callendercreates.com/memory.png Thanks in advance for any tips, suggestions of fixes. Jim Callender
[jQuery] Re: fckeditor and jquery validation
On Mon, Jul 7, 2008 at 7:32 PM, oscarml [EMAIL PROTECTED] wrote: Hi to everybody, I have a problem validating a textarea generated by fckeditor with PHP. I have placed the fckeditor inside a form, and the problem is that if a put a char in the textarea and then press submit the validation says that is empty, and if I press again, it says is ok and sends the form. this is my code: ? include_once(fckeditor/fckeditor.php); ? script src=js/jquery.js type=text/javascript/script script src=js/jquery.validate.js type=text/javascript/script script $(document).ready(function() { $(#FCKeditor1).addClass(required); $(#mi_form).validate(); }); /script form id=mi_form ?php $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor-BasePath = 'fckeditor/' ; $oFCKeditor-Value = '' ; $oFCKeditor-ToolbarSet = 'Barra_listas'; $oFCKeditor-Create() ; ? input type=text class=required / input type=submit value=envia / /form Any suggestion? what is this: input type=text class=required / ?? no name attribute? Maybe your validation script chokes on this, and not on FCK ? could you post your page online somewhere so we can see it for ourselves ? -- Alex
[jQuery] Following jQuery on Twitter
Hi all, I thought I'd compile a list of jQuery-centric people that you can follow on Twitter on my blog. http://tinyurl.com/582scb Thanks to Marc and Richard for their help. I missed some people the first time around, but have updated the list based on their recommendations.
[jQuery] Re: Form Field
On Mon, Jul 7, 2008 at 8:12 PM, Jim Callender [EMAIL PROTECTED] wrote: Hi List, New to the group, so I will start off with hopefully a bug some of you may have seen before ;) = How do I stop the first 2 input fields going behind what is an option form field? http://www.memory-superstore.net/ This is an IE6 bug only, link to screenshot of bug: http://testbed.callendercreates.com/memory.png Thanks in advance for any tips, suggestions of fixes. Jim Callender hi there, its a common IE6 bug ActiveX bleeding, that you can address via the use of an iframe. Brandon Aaron has made a plugin that eases the implementation of the fix (using an IFRAME to force rendering the activeX back into the page flow) http://brandonaaron.net/jquery/plugins/bgiframe/docs/ -- Alexandre
[jQuery] Looking for Plugin: auto-image-scroller that allows click selection
Hello, I'm looking for a plugin that is an auto-image-scroller that allows you to click on a selection scrolling by which then you can display that image in a main div on the page or whatever. Here's an example of the functionality I'm talking about: http://demo.vevocart.com/ Images scrolling in the Today's Special box where you can click on the image and have it displayed in a main section of the page. If anyone knows of a plugin that offers this functionality, please let me know. Much appreciated. TIA Gi
[jQuery] Re: Form submit issues
Thanks alot, can't believe i haven't tried changing that form item ... feels stupig but happy it's resolved :) Chris On 5 jul, 01:40, Mike Alsup [EMAIL PROTECTED] wrote: What is wrong with this code? code$(document).ready(function() { $(#f_submit).hide(); $(#f_altsubmit).click(function(event) { $(#checkoutform)[0].submit(); return false; }); });/code In FF3 this throws an error in the Error console : Error: $(form) [0].submitis not a function but this error does not show up in Firebug. Also what is strange is that when i change the method fromsubmit() to reset() ... the reset works ... It seems myformdoesn't have thesubmitmethod in FF3 See for yourself athttp://dev.rotarygiftshop.com/cart/checkout You have an input named 'submit'. Change the name/id of that input and you'll be fine.
[jQuery] $().get() returns elements in reverse order in 1.2.5, 1.2.6
Is this a bug or simply a change in functionality I should be prepared to cope with? This code -- script src=http://jqueryjs.googlecode.com/files/jquery-1.2.5.js;/ script span1/spanspan2/spanspan3/span script language=JavaScript!--// $(function() { var arr=$(span).get(); var txt=[]; for(ai in arr) { txt.push(arr[ai].innerHTML); } alert(via get(): +txt.join(,)); $(span).each(function(i,o) { alert(via each #+i +.html=+o.innerHTML); }); }); //--/script -- Will alert you via get(): 3,2,1, however the each loop will report the innerhtmls of the elements in order 1,2,3. Earlier versions of jquery (1.2.4 and lower) will report via get(): 1,2,3. Although the order of elements is not specified in the documentation, I think that expecting them to be returned in document order is the only rational behavior. Is this an unintentional change? It seems to boil down to a change in how the array is constructed in makeArray. In 1.2.4 it was done in order via: -- for ( var i = 0, length = array.length; i length; i++ ) ret.push( array[ i ] ); -- whereas in 1.2.5 and 1.2.6 it is done by more consise, but reversing: -- while( i ) ret[--i] = array[i]; -- A simple way to fix this would be to insert ret.reverse() just before ret is returned. If there is somewhere I could have noted this as an existing bug or an intentional change, I am sorry, I have looked all over. Let me know where I should have looked. Thanks!
[jQuery] Re: JQuery 1.2.6 and JQuery Form Plugin in IE7
I have a similar problem. I've changed my server from linux (apache2.2/php5) to a windows server (with apache2.2/php5). SAME CODE works fine on linux server at IE7/FF3, but doesnt works on windows server only at IE7. I have another server (xampp, with windows vista business) that runs ok for both browsers. I try the downgrade to older jquery versions, but doesnt work as well. Anyone have any ideia of how to correct this problem? My entire intranet is using jquery/form plugin and doesnt work anymore. My code is very simple: var options = { success:function(data) { alert(data); } }; $(document).ready(function() { $('#ponto').ajaxForm(options); }); -- View this message in context: http://www.nabble.com/JQuery-1.2.6-and-JQuery-Form-Plugin-in-IE7-tp18239336s27240p18324794.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: NEW: XML to JSON Plugin
Have you looked at xotree.js ? Nice work. On Mon, Jul 7, 2008 at 10:30 AM, Alexsandro_xpt [EMAIL PROTECTED] wrote: Hi Diego, I mean ( 1 ) I Know, but would be something like that xmlpersonnameDiego/ name/person/xml already great. :) Nice plugin.!! On 5 jul, 00:06, Diego [EMAIL PROTECTED] wrote: Hi Alexsandro, Do you mean (1)convert the generate JSON back to XML? OR... (2)define a javascript object and convert it to XML? If (1): I initially built this plugin for my personal use (for my convenience) so I could easily process XML data. Because of that, I didn't bother to differentiate between attributes / nodes. ie.: xmlpersonnameDiego/name/person/xml ...gives the same output as this... xmlperson name=Diego/person/xml ...so it would be impossible to reverse the conversion. If (2): This is quite easy. And actually, it would be pretty similar to the code I wrote to show the JSON structure in HTML (Under Examples Basic/Extended Structure) I will write this when I get a chance, but I'd rather wait for the feedback on this plugin to work out the best way to do it... Cheers, Diego Alexsandro_xpt wrote: Very good!!! Are possible to do reverse? -- Alexsandro www.alexsandro.com.br On 4 jul, 12:34, Diego [EMAIL PROTECTED] wrote: I wrote this a few months but didn't have the time to share it. Now that I've re-done the documentation for 2 of my plugins I thought I'd give it a few hours, knock some examples together and share it with the whole world (ok, maybe just a few people). Basic example: var xml = 'xmlmessageHello world/message/xml'; var json = $.xml2json(xml); alert(json.message); // shows Hello world Ajax example: var file = 'data/hello.xml'; //xmlmessageHello world/message/ xml $.get(file, function(xml){ �var json = $.xml2json(xml); �alert(json.message); }); See the documentation page for more examples and demos. XML to JSON Plugin -http://fyneworks.com/jquery/xml-to-json/ As always, feedback is welcome! Cheers, Diego -- Christopher Thatcher
[jQuery] Re: Plugin better than Lighbox or Thickbox
On Mon, Jul 7, 2008 at 8:48 PM, [EMAIL PROTECTED] wrote: it is much better than LightBox it has a nice Effect when it starts to get large and then shrink ... we don't have such a thing in Lightbox On Jul 7, 12:25 am, Kevin Pepperman [EMAIL PROTECTED] wrote: That majicthumb script looks a lot like this one. http://vikjavev.no/highslide/ Charging for this is pretty lame. They would be better off making tham free and benefiting from the traffic they would generate. On Sun, Jul 6, 2008 at 5:07 PM, Alexandre Plennevaux [EMAIL PROTECTED] wrote: On Sun, Jul 6, 2008 at 3:39 PM, David Morton [EMAIL PROTECTED] wrote: Why do you think it is better? On Sun, Jul 6, 2008 at 6:59 AM, [EMAIL PROTECTED] wrote: Dear folk, do we have such a plugin like below ... I have test the Demo version it is much more better from our Lightbox Plugin, the only problem it has is with AJAX , it can not support it please let me know if there is such an ability in our jQuery http://www.magictoolbox.com/magicthumb/ -- David Morton [EMAIL PROTECTED] - bulk address [EMAIL PROTECTED] - direct to my server i can't believe they charge 20 pounds for such a script. I can make this kind of implementation using jqModal in 2 hours. -- Rita Rudner - When I eventually met Mr. Right I had no idea that his first name was Always. however attractive it may look, these are effects. To make this in jquery is as easy as spelling out the alphabet. do it yourself, it's not that hard! i would do it using jqModal, then using the onShow, onHide callbacks, and then some clever CSS. -- Alexandre
[jQuery] Re: $().get() returns elements in reverse order in 1.2.5, 1.2.6
Sorry about the duplicate post. I posted first got an error, and for some reason could not recover my original contents, so I rewrote it and reposted. Surprise surprise now, they are both posted On Jul 7, 12:04 pm, joelarson [EMAIL PROTECTED] wrote: Is this a bug or simply a change in functionality I should be prepared to cope with? This code -- script src=http://jqueryjs.googlecode.com/files/jquery-1.2.5.js;/ script span1/spanspan2/spanspan3/span script language=JavaScript!--// $(function() { var arr=$(span).get(); var txt=[]; for(ai in arr) { txt.push(arr[ai].innerHTML); } alert(via get(): +txt.join(,)); $(span).each(function(i,o) { alert(via each #+i +.html=+o.innerHTML); }); }); //--/script -- Will alert you via get(): 3,2,1, however the each loop will report the innerhtmls of the elements in order 1,2,3. Earlier versions of jquery (1.2.4 and lower) will report via get(): 1,2,3. Although the order of elements is not specified in the documentation, I think that expecting them to be returned in document order is the only rational behavior. Is this an unintentional change? It seems to boil down to a change in how the array is constructed in makeArray. In 1.2.4 it was done in order via: -- for ( var i = 0, length = array.length; i length; i++ ) ret.push( array[ i ] ); -- whereas in 1.2.5 and 1.2.6 it is done by more consise, but reversing: -- while( i ) ret[--i] = array[i]; -- A simple way to fix this would be to insert ret.reverse() just before ret is returned. If there is somewhere I could have noted this as an existing bug or an intentional change, I am sorry, I have looked all over. Let me know where I should have looked. Thanks!
[jQuery] XML $.ajax GET IE6 Help!
I have this example working great in FF but I can't get it to work in IE6. I've tried the XML with cdata tags and without. Can anyone see my issue? 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 / titleXML Test/title script src=jquery.js type=text/javascript language=javascript/ script script src=browse.js type=text/javascript language=javascript/ script /head body div id=widget/div /body /html ** JavaScript: * $(function() { $.ajax({ type: GET, url: books.xml, dataType: xml, success: function(xmlData) { xmlDataSet = xmlData; browseXML(); } }); }); function browseXML() { strToAppend = nbsp;; $(title,xmlDataSet).each(function() { strToAppend += pstrong + $(this).text() + /strongbr /; strToAppend += by + $(author,xmlDataSet).text() + /p; strToAppend += pPublisher: + $(publisher,xmlDataSet).text() + br /; strToAppend += ISBN-10: + $(isbn,xmlDataSet).text(); strToAppend += /p; }); strToAppend += p - - - /p; $(#widget).html(strToAppend); } XML ?xml version=1.0 encoding=UTF-8? bestsellers book title ![CDATA[ Plum Lovin' (A Stephanie Plum Novel) ]] /title author ![CDATA[ Janet Evanovich ]] /author publisher ![CDATA[ St. Martin's Press ]] /publisher isbn ![CDATA[ 0312306342 ]] /isbn /book /bestsellers Thanks Very Much!
[jQuery] temporarily hide options from a select box
I am trying to build a set of cascading select boxes, where the selection from one determines which options are available in the next (for example if select box Region has North America selected, then select box Country should only show countries in North America). I've found how to remove those items from the list, but if I do that then I can't get them back if a new choice is made. If I use .hide() and .show(), or .css('display','none') and .css('display','block') on the individual items then it works in Firefox but not IE (I'm testing in IE7). Any ideas? I suppose I could .clone() the original select list and keep that copy in memory only but that seems like a pain.
[jQuery] jqGrid problem
I want to create a grid, whose cells show a pop-up window when clicked. I'm using jqGrid, and using jQuery to attach an onClick object to each cell (all the windows are different) after the grid has loaded. My question(s): 1: Is there an event or other way to tell when the grid has loaded? 2: Is there a better way to do this?
[jQuery] Re: Following jQuery on Twitter
Boo! I'm so below in the popularity ranking :) I need to do something fun to bump myself up :P -- Ariel Flesler http://flesler.blogspot.com/ On 7 jul, 16:00, Shaun Kester [EMAIL PROTECTED] wrote: Hi all, I thought I'd compile a list of jQuery-centric people that you can follow on Twitter on my blog. http://tinyurl.com/582scb Thanks to Marc and Richard for their help. I missed some people the first time around, but have updated the list based on their recommendations.
[jQuery] Re: How to replace a div content?
Try setting the div html to empty first. jQuery(#elem).html().html('bmy text/b'); On Mon, Jul 7, 2008 at 10:04 AM, SimDigital [EMAIL PROTECTED] wrote: How could i replace a html content inside the div? I have 1 div (div id=elemini text/div) and everytime i click a button, i want to replace the html content inside the #ELEM to new one. I try to use: jQuery(#button).click(function() { jQuery(#elem).html('bmy text/b'); }); but everytime i click the button, the html is not replaced, resulting something like: bmy text/bbmy text/b What is the solution? -- Paul Lynde - I sang in the choir for years, even though my family belonged to another church.
[jQuery] Re: NEW: XML to JSON Plugin
Hi Alexsandro, Yeah, that could work. Watch this thread. I will post back here when I've done it... Cheers, Diego A. On Jul 7, 3:30 pm, Alexsandro_xpt [EMAIL PROTECTED] wrote: Hi Diego, I mean ( 1 ) I Know, but would be something like that xmlpersonnameDiego/ name/person/xml already great. :) Nice plugin.!! On 5 jul, 00:06, Diego [EMAIL PROTECTED] wrote: Hi Alexsandro, Do you mean (1)convert the generate JSON back to XML? OR... (2)define a javascript object and convert it to XML? If (1): I initially built this plugin for my personal use (for my convenience) so I could easily process XML data. Because of that, I didn't bother to differentiate between attributes / nodes. ie.: xmlpersonnameDiego/name/person/xml ...gives the same output as this... xmlperson name=Diego/person/xml ...so it would be impossible to reverse the conversion. If (2): This is quite easy. And actually, it would be pretty similar to the code I wrote to show the JSON structure in HTML (Under Examples Basic/Extended Structure) I will write this when I get a chance, but I'd rather wait for the feedback on this plugin to work out the best way to do it... Cheers, Diego Alexsandro_xpt wrote: Very good!!! Are possible to do reverse? -- Alexsandro www.alexsandro.com.br On 4 jul, 12:34, Diego [EMAIL PROTECTED] wrote: I wrote this a few months but didn't have the time to share it. Now that I've re-done the documentation for 2 of my plugins I thought I'd give it a few hours, knock some examples together and share it with the whole world (ok, maybe just a few people). Basic example: var xml = 'xmlmessageHello world/message/xml'; var json = $.xml2json(xml); alert(json.message); // shows Hello world Ajax example: var file = 'data/hello.xml'; //xmlmessageHello world/message/ xml $.get(file, function(xml){ �var json = $.xml2json(xml); �alert(json.message); }); See the documentation page for more examples and demos. XML to JSON Plugin -http://fyneworks.com/jquery/xml-to-json/ As always, feedback is welcome! Cheers, Diego
[jQuery] Re: NEW: XML to JSON Plugin
Hi Chris, I hadn't seen xotree before, but I found it... http://www.kawa.net/works/js/xml/objtree-e.html ...and looking at the examples, it seems to behave exactly like my plugin but it's more flexible with options and built-in ajax support. It's definitelly a good base for future development of my plugin... Cheers, Diego A. On Jul 7, 8:10 pm, chris thatcher [EMAIL PROTECTED] wrote: Have you looked at xotree.js ? Nice work. On Mon, Jul 7, 2008 at 10:30 AM, Alexsandro_xpt [EMAIL PROTECTED] wrote: Hi Diego, I mean ( 1 ) I Know, but would be something like that xmlpersonnameDiego/ name/person/xml already great. :) Nice plugin.!! On 5 jul, 00:06, Diego [EMAIL PROTECTED] wrote: Hi Alexsandro, Do you mean (1)convert the generate JSON back to XML? OR... (2)define a javascript object and convert it to XML? If (1): I initially built this plugin for my personal use (for my convenience) so I could easily process XML data. Because of that, I didn't bother to differentiate between attributes / nodes. ie.: xmlpersonnameDiego/name/person/xml ...gives the same output as this... xmlperson name=Diego/person/xml ...so it would be impossible to reverse the conversion. If (2): This is quite easy. And actually, it would be pretty similar to the code I wrote to show the JSON structure in HTML (Under Examples Basic/Extended Structure) I will write this when I get a chance, but I'd rather wait for the feedback on this plugin to work out the best way to do it... Cheers, Diego Alexsandro_xpt wrote: Very good!!! Are possible to do reverse? -- Alexsandro www.alexsandro.com.br On 4 jul, 12:34, Diego [EMAIL PROTECTED] wrote: I wrote this a few months but didn't have the time to share it. Now that I've re-done the documentation for 2 of my plugins I thought I'd give it a few hours, knock some examples together and share it with the whole world (ok, maybe just a few people). Basic example: var xml = 'xmlmessageHello world/message/xml'; var json = $.xml2json(xml); alert(json.message); // shows Hello world Ajax example: var file = 'data/hello.xml'; //xmlmessageHello world/message/ xml $.get(file, function(xml){ �var json = $.xml2json(xml); �alert(json.message); }); See the documentation page for more examples and demos. XML to JSON Plugin -http://fyneworks.com/jquery/xml-to-json/ As always, feedback is welcome! Cheers, Diego -- Christopher Thatcher
[jQuery] opera 9: known problems with opacity and hexdecimal text colors?
Hello guys. Newbie here, so sorry if this has been mentioned before. I'm trying to apply a fadein effect to a span which has text. Here's the html: a class=menuItem id=location href=template3.htm img src=images/location.jpg alt=Find us / spanLocation/span /a And here's the code I'm applying to change the opacity: $(a.menuItem img).css(opacity, .5); $(a.menuItem span).css(opacity, .5); The problem: if I have a hexadecimal defined color (differente from the basic colors - ex.: red, white, etc) the text isn't shown. It will only appear on the mouse over event because during it I change the opacity from .9 to .9. Has anyone seen this in the past? Thanks and sorry for the poor English. -- Regards, Luis Abreu email: labreu_at_gmail.com PT Blog: http://weblogs.pontonetpt.com/luisabreu EN Blog:http://msmvps.com/blogs/luisabreu/default.aspx http://www.pontonetpt.com MVP profile: http://mvp.support.microsoft.com/profile/luis.abreu From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Pepperman Sent: segunda-feira, 7 de Julho de 2008 22:48 To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to replace a div content? Try setting the div html to empty first. jQuery(#elem).html().html('bmy text/b'); On Mon, Jul 7, 2008 at 10:04 AM, SimDigital [EMAIL PROTECTED] wrote: How could i replace a html content inside the div? I have 1 div (div id=elemini text/div) and everytime i click a button, i want to replace the html content inside the #ELEM to new one. I try to use: jQuery(#button).click(function() { jQuery(#elem).html('bmy text/b'); }); but everytime i click the button, the html is not replaced, resulting something like: bmy text/bbmy text/b What is the solution? -- Paul Lynde - I sang in the choir for years, even though my family belonged to another church. No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.4.6/1538 - Release Date: 07-07-2008 07:40
[jQuery] Re: How to replace a div content?
Are #button and #elem unique within your html, or have you used either of them more than one time? On Jul 7, 5:47 pm, Kevin Pepperman [EMAIL PROTECTED] wrote: Try setting the div html to empty first. jQuery(#elem).html().html('bmy text/b'); On Mon, Jul 7, 2008 at 10:04 AM, SimDigital [EMAIL PROTECTED] wrote: How could i replace a html content inside the div? I have 1 div (div id=elemini text/div) and everytime i click a button, i want to replace the html content inside the #ELEM to new one. I try to use: jQuery(#button).click(function() { jQuery(#elem).html('bmy text/b'); }); but everytime i click the button, the html is not replaced, resulting something like: bmy text/bbmy text/b What is the solution? -- Paul Lynde - I sang in the choir for years, even though my family belonged to another church.- Hide quoted text - - Show quoted text -
[jQuery] Re: unblockUI and enter
it will not work, even if the button has focus. On Jul 7, 3:14 pm, Mike Alsup [EMAIL PROTECTED] wrote: I am using blockUI to display a simple message with a button. I would like when user presses enter the dialog to go off. interesting thing is in FF, it does work as expected, and in IE it does not, it sometimes does, it sometimes does not, and I could not figure out why. Does the button have focus? Can you post a link?
[jQuery] Re: jMaps and other G* functions
noon wrote: All jMaps functions never seen to return a handler that I can use, but only fire the callback if provided. I used jMaps to add a marker and centered the map. On this newly created marker, how can I get to the other G* methods such as openInfoWindow? When adding a marker you can pass the option pointHTML which will automatically assign a openInfoWindow to the click event of your marker. I've said to Tane (the author) I will help him come up with some more features and better docs on this plugin in the coming weeks/months :) Col
[jQuery] Re: unblockUI and enter
What exactly is not working? The button is not getting a click event, or the unblockUI call is not working? More details please (and a link if possible). On Jul 7, 6:45 pm, cambazz [EMAIL PROTECTED] wrote: it will not work, even if the button has focus. On Jul 7, 3:14 pm, Mike Alsup [EMAIL PROTECTED] wrote: I am using blockUI to display a simple message with a button. I would like when user presses enter the dialog to go off. interesting thing is in FF, it does work as expected, and in IE it does not, it sometimes does, it sometimes does not, and I could not figure out why. Does the button have focus? Can you post a link?
[jQuery] Re: temporarily hide options from a select box
It's a known problem with IE. Keeping a cloned copy of the select or keeping a list of the removed options (with where they were originally) is about the only way to do it. Karl Rudd On Tue, Jul 8, 2008 at 7:01 AM, Toby J [EMAIL PROTECTED] wrote: I am trying to build a set of cascading select boxes, where the selection from one determines which options are available in the next (for example if select box Region has North America selected, then select box Country should only show countries in North America). I've found how to remove those items from the list, but if I do that then I can't get them back if a new choice is made. If I use .hide() and .show(), or .css('display','none') and .css('display','block') on the individual items then it works in Firefox but not IE (I'm testing in IE7). Any ideas? I suppose I could .clone() the original select list and keep that copy in memory only but that seems like a pain.
[jQuery] Re: NEW: XML to JSON Plugin
yeah it would be great to see it ported to a jQuery plugin in combination with your work and then you could actually use jQuery ajax and it would be cleaner. I've used it a lot and for me the big thing is the ability to easy set what elements are treated as array's even if only one is present (because it keeps the code using it simpler, less cases), and specifying the attribute prefix (I use '@') because I can basically use e4x like syntax. I also made a modification to xotree locally to allow a flat serialization/deserialization so that the item becomes a list of name/value objects, the name being the 'javascript path' eg '[EMAIL PROTECTED]' and the value is the simple value. This was extremely useful for fast development with GoogleGears because I could have a generic table for all objects and use the powerful 'name LIKE' queries to find objects stored in the db. I'd love to help you develop this or give feedback because it would also help promote some mvc stuff I'm build for the jQ community. Thatcher On Mon, Jul 7, 2008 at 6:59 PM, Diego [EMAIL PROTECTED] wrote: Hi Chris, I hadn't seen xotree before, but I found it... http://www.kawa.net/works/js/xml/objtree-e.html ...and looking at the examples, it seems to behave exactly like my plugin but it's more flexible with options and built-in ajax support. It's definitelly a good base for future development of my plugin... Cheers, Diego A. On Jul 7, 8:10 pm, chris thatcher [EMAIL PROTECTED] wrote: Have you looked at xotree.js ? Nice work. On Mon, Jul 7, 2008 at 10:30 AM, Alexsandro_xpt [EMAIL PROTECTED] wrote: Hi Diego, I mean ( 1 ) I Know, but would be something like that xmlpersonnameDiego/ name/person/xml already great. :) Nice plugin.!! On 5 jul, 00:06, Diego [EMAIL PROTECTED] wrote: Hi Alexsandro, Do you mean (1)convert the generate JSON back to XML? OR... (2)define a javascript object and convert it to XML? If (1): I initially built this plugin for my personal use (for my convenience) so I could easily process XML data. Because of that, I didn't bother to differentiate between attributes / nodes. ie.: xmlpersonnameDiego/name/person/xml ...gives the same output as this... xmlperson name=Diego/person/xml ...so it would be impossible to reverse the conversion. If (2): This is quite easy. And actually, it would be pretty similar to the code I wrote to show the JSON structure in HTML (Under Examples Basic/Extended Structure) I will write this when I get a chance, but I'd rather wait for the feedback on this plugin to work out the best way to do it... Cheers, Diego Alexsandro_xpt wrote: Very good!!! Are possible to do reverse? -- Alexsandro www.alexsandro.com.br On 4 jul, 12:34, Diego [EMAIL PROTECTED] wrote: I wrote this a few months but didn't have the time to share it. Now that I've re-done the documentation for 2 of my plugins I thought I'd give it a few hours, knock some examples together and share it with the whole world (ok, maybe just a few people). Basic example: var xml = 'xmlmessageHello world/message/xml'; var json = $.xml2json(xml); alert(json.message); // shows Hello world Ajax example: var file = 'data/hello.xml'; //xmlmessageHello world/message/ xml $.get(file, function(xml){ �var json = $.xml2json(xml); �alert(json.message); }); See the documentation page for more examples and demos. XML to JSON Plugin -http://fyneworks.com/jquery/xml-to-json/ As always, feedback is welcome! Cheers, Diego -- Christopher Thatcher -- Christopher Thatcher
[jQuery] Re: $(...).get() order reversed between 1.2.4 and 1.2.5
The array returned by .get() does have its elements in the correct order. The bug is actually in your code: for(ai in arr) { txt.push(arr[ai].innerHTML); } You can't use a for...in loop on an array and expect to get consistent results. The order of enumeration is implementation dependent. It may be in numerical order, or it may be in the order the elements were added to the array, or anything else. You may note that you get different results in IE7 and Firefox 3. A for...in loop also enumerates non-array-element properties of the array. For example, if any JavaScript code or library adds methods to Array.prototype (and many libraries do this), those methods will also be enumerated in your for...in loop. A numeric for loop would work correctly: for( i = 0, n = arr.length; i n; ++i ) txt.push(arr[i].innerHTML); The reason .each works correctly is that it does a numeric for loop like that. What changed in 1.2.6? The code you found in makeArray does assign the elements into the correct array indices but it does them backwards chronologically. IOW, makeArray is assigning elements in this order: ret[2] = array[2]; ret[1] = array[1]; ret[0] = array[0]; That's perfectly valid code, of course, but a for...in loop on the ret array will give inconsistent results. A correct numeric for loop will not be bothered by that. In 1.2.3 the loop in makeArray ran in forward order: ret[0] = array[0]; ret[1] = array[1]; ret[2] = array[2]; All that said, I wonder if it wise for makeArray to be running this loop in reverse, just because of problems like this. Would be that much less efficient to run the loop in forward order? There's some further discussion in the ticket for this code change: http://dev.jquery.com/ticket/2619 -Mike From: joelarson I have just noticed that the order of elements returned by .get() seem to have been reversed in 1.2.5 and 1.2.6. Interestingly, each seems to run in the expected order (from first element to last as encountered in the document). To demonstrate: -- script src=http://jqueryjs.googlecode.com/files/jquery-1.2.5.js;/ script span1/spanspan2/spanspan3/span script language=JavaScript!--// $(function() { var arr=$(span).get(); var txt=[]; for(ai in arr) { txt.push(arr[ai].innerHTML); } alert(via get(): +txt.join(,)); $(span).each(function(i,o) { alert(via each #+i +.html=+o.innerHTML); }); }); //--/script -- Your first alert will show via get(): 3,2,1. Your next 3 alerts will show 1,2,3 in order as the innerhtml. This seems to come from around line 1133 of the jquery-1.2.5.js (around the same line in 1.2.6), where the way the array is filled in makeArray is: -- while( i ) ret[--i] = array[i]; -- (which obviously builds a backwards return array) whereas in jquery-1.2.4.js line 1125 is code: -- for ( var i = 0, length = array.length; i length; i++ ) ret.push( array[ i ] ); --- It seems to me that the get() must return the elements in the document specified order. Even though this is not spelled out in the specification it seems to be the only rational behavior. If my assumption is correct then, the easiest way to fix is to insert: ret.reverse(); at line 1141 of 1.2.6.js (or equivalent in future 1.2.7). I have not found any posts on this or notes anywhere, but it is possible I do not know every relavent area to check. So don't beat me up if this is known or desired behavior-- just tell me where I should have looked. Thanks!
[jQuery] Re: unblockUI and enter
unblockUI works. it wont work on enter, you have to click the button by mouse. it will however trigger when enter is pressed if using FF. sorry, I dont have a web server available thats why no link. Best regards, On Jul 8, 2:08 am, Mike Alsup [EMAIL PROTECTED] wrote: What exactly is not working? The button is not getting a click event, or the unblockUI call is not working? More details please (and a lgink if possible). On Jul 7, 6:45 pm, cambazz [EMAIL PROTECTED] wrote: it will not work, even if the button has focus. On Jul 7, 3:14 pm, Mike Alsup [EMAIL PROTECTED] wrote: I am using blockUI to display a simple message with a button. I would like when user presses enter the dialog to go off. interesting thing is in FF, it does work as expected, and in IE it does not, it sometimes does, it sometimes does not, and I could not figure out why. Does the button have focus? Can you post a link?
[jQuery] Re: strange problem
sorry, i figured out the problem. because I have another element before this one with the same id and have no any children. Jack On Jul 4, 4:15 pm, jack [EMAIL PROTECTED] wrote: Hi, all why $('#browsing_btns').children() just select nothing? - $('#browsing_btns').children().each(function(xindex){ console.log(xindex + ':'+$(this).attr('id'));}) ... td id=browsing_btns colspan=4 input id=first_pg_btn my_action=f class=button type=button value=first page/ input id=next_pg_btn my_action=n class=button type=button value=next page/ input id=prev_pg_btn my_action=p class=button type=button value=prev page/ input id=last_pg_btn my_action=t class=button type=button value=last page/ /td ... If I move all the bottons inside a span, then it works. Jack
[jQuery] returning a string of html in a matched tag
Hello, I have some xml that looks like this: result summary voters a href=user1user1/a, a href=user2user2/a /voters /summary /result I would like to have a selector that just returned the string: a href=user1user1/a, a href=user2user2/a but can't seem to get it. Here is what I have tried: $(summary voters); //returns: votersa href=user1user1/a, a href=user2user2/a/voters $(summary voters).text(); //returns: user1, user2 $(summary voters a).join(); //this seems to fail without giving a message Can anyone point me in the right drection? Sincerely, Dennison
[jQuery] Custom sort on table cell attribute value in tablesorter plugin rather than innerHTML value: help please!
Hi there jQuery folks, I am using the tablesorter plugin, which I really like. However, in several of my table cells I have oddly formatted time values that look like the following: 1d 12h 34m 25s Which maps to: 1 day, 12 hours, 34 mins and 25 seconds I cannot change how these values are displayed - they have to be in that format. However, in my code I also create an attribute to the table cell called sorttable_customval in which I insert the raw number format as a float: td sorttable_customkey=dlt sorttable_customval=65.093 1m 5s/ td I have tried to write my own add-on to the tablesorter source code to get this attribute value in the confines of the tablesorter textExtraction method: Javascript at the top of my webpage with the table == (#monitor).tablesorter({ textExtraction: 'customattribute', debug: true, widgets:['zebra'] }) The modified part of tablesorter.js (rows 233 and 234) = 221 function getElementText(config,node) { 222 223 if(!node) return ; 224 225 var t = ; 226 227 if(config.textExtraction == simple) { 228 if(node.childNodes[0] node.childNodes[0].hasChildNodes()) { 229 t = node.childNodes[0].innerHTML; 230 } else { 231 t = node.innerHTML; 232 } 233 } else if(config.textExtraction == customattribute) { 234 t = $(node).attr('sorttable_customval'); 235 } else { 236 if(typeof(config.textExtraction) == function) { 237 t = config.textExtraction(node); 238 } else { 239 t = $(node).text(); 240 } 241 } 242 return t; 243 } I thought this would work, but I get the following error in Firebug: s is undefinedjquery.tablesorter.js (line 703) return $.trim(s.toLowerCase()); The corresponding lines in jquery.tablesorter.js: 696 // add default parsers 697 ts.addParser({ 698 id: text, 699 is: function(s) { 700 return true; 701 }, 702 format: function(s) { 703 return $.trim(s.toLowerCase()); 704 }, 705 type: text 706 }); So it looks like to me that my float gets treated as text and tries to get parsed as such. I added the column number and forced a sort type when I call tablesorter: (#monitor).tablesorter({ headers: { 7:{sorter:'digit'} }, textExtraction: 'customattribute', debug: true, widgets:['zebra'] }); However, this is a custom table, where a client's cookies can define the order of the columns displayed. So defining a whole load of headers based on column number won't work. Does anyone have any idea how I can implement this custom attribute sort and ensure the addParser function parses it as a digit? Or am I going about this in totally the wrong fashion? I also tried writing my own parser: $.tablesorter.addParser({ id: 'dlt', is: function(s) { return s.parentNode.getAttribute('sorttable_customval') ; }, type: 'numeric' }); Then adding it to the tablesorter call: $(#monitor).tablesorter({ headers: { 7:{sorter:'dlt'} }, debug: true, widgets:['zebra'] }) However, I got a Firebug error that parentNode is undefined. So then I tried: return s.attr('sorttable_customval') ; Still failed. Then finally: return $(s).attr('sorttable_customval') ; which also failed. I feel like I am pretty close to figuring it out, but I just can't seem to get the final piece in place. All help appreciated!! Thanks in advance!
[jQuery] cycle plugin: last click launches URL?
Hi there, I have just made a very simple slideshow with the fantastic Cycle plugin. I have 5 images, and each time you click an image, it fades out and advances to the next one. What I want to happen is that when you click on the last one, it launches a URL. I can get the slideshow to stop when it gets to the end (nowrap) and I can fire an event when it gets there (end) but that only works when the slideshow is animating automatically. The end event doesn't fire when using next. Can anyone help me? Surely something like this is nice and simple? Thanks.
[jQuery] Re: cycle plugin: last click launches URL?
Hi there, I have just made a very simple slideshow with the fantastic Cycle plugin. I have 5 images, and each time you click an image, it fades out and advances to the next one. What I want to happen is that when you click on the last one, it launches a URL. I can get the slideshow to stop when it gets to the end (nowrap) and I can fire an event when it gets there (end) but that only works when the slideshow is animating automatically. The end event doesn't fire when using next. Can anyone help me? Surely something like this is nice and simple? You could use the 'after' callback. Details here: http://www.malsup.com/jquery/cycle/after.html Mike
[jQuery] Re: returning a string of html in a matched tag
I've used the equivalent of $(summary voters a).html() for this, but I wonder if it's really correct and works in all browsers or not? It uses innerHTML. -Mike From: [EMAIL PROTECTED] I have some xml that looks like this: result summary voters a href=user1user1/a, a href=user2user2/a /voters /summary /result I would like to have a selector that just returned the string: a href=user1user1/a, a href=user2user2/a but can't seem to get it. Here is what I have tried: $(summary voters); //returns: votersa href=user1user1/a, a href=user2user2/a/voters $(summary voters).text(); //returns: user1, user2 $(summary voters a).join(); //this seems to fail without giving a message Can anyone point me in the right drection?
[jQuery] jQuery events don't work after AJAX load
Hi folks, I have a page with a photo on it. I load the comments for this photo via an ajax request: var item_id_val = $(#item_id).val(); $.post(/show_comments, item_id: item_id_val }, function(data) { /* Update the comment_section div. */ $(#comment_section).html(data); }); That works fine, but the html data that /show_comments returns doesn't work with jQuery. For example, users can thumb up or thumb down comments, but if the html code is loaded via AJAX the .click events are not binded to that loaded data. How can I fix this problem? Any ideas or help would be greatly appreciated. Thanks, Konstantin
[jQuery] Re: jQuery events don't work after AJAX load
Possibly one of the most frequently asked questions: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F On Jul 8, 1:54 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi folks, I have a page with a photo on it. I load the comments for this photo via an ajax request: var item_id_val = $(#item_id).val(); $.post(/show_comments, item_id: item_id_val }, function(data) { /* Update the comment_section div. */ $(#comment_section).html(data); }); That works fine, but the html data that /show_comments returns doesn't work with jQuery. For example, users can thumb up or thumb down comments, but if the html code is loaded via AJAX the .click events are not binded to that loaded data. How can I fix this problem? Any ideas or help would be greatly appreciated. Thanks, Konstantin
[jQuery] Re: Links injected with jQuery not active in IE6
I think a lot of pages do this successfully. Can you post a link to a simple test page? It's kind of hard to guess what might be wrong otherwise. -Mike I am using jQuery to insert a series of links into a containing div. Upon insertion, these links are active in Firefox and Safari, but are not active (clickable) in IE6 (what a surprise.) While Internet explorer 6 does visually render the inserted code, it seems that the html elements are not recognized. If the same html is included in the initial code, the links work fine. However, when the are inserted after the DOM is loaded, they are not. Has anyone encountered similar problems, or is there a known workaround to this problem? Thanks in advance, Matt
[jQuery] Re: cycle plugin: last click launches URL?
On Jul 8, 1:39 pm, Mike Alsup [EMAIL PROTECTED] wrote: Hi there, I have just made a very simple slideshow with the fantastic Cycle plugin. I have 5 images, and each time you click an image, it fades out and advances to the next one. What I want to happen is that when you click on the last one, it launches a URL. I can get the slideshow to stop when it gets to the end (nowrap) and I can fire an event when it gets there (end) but that only works when the slideshow is animating automatically. The end event doesn't fire when using next. Can anyone help me? Surely something like this is nice and simple? You could use the 'after' callback. Details here: http://www.malsup.com/jquery/cycle/after.html Mike Sorry, I just read deeper into the source of that page, and I see how you've captured that onAfter event, please ignore my previous post. Thanks :
[jQuery] Re: cycle plugin: last click launches URL?
On Jul 8, 1:39 pm, Mike Alsup [EMAIL PROTECTED] wrote: Hi there, I have just made a very simple slideshow with the fantastic Cycle plugin. I have 5 images, and each time you click an image, it fades out and advances to the next one. What I want to happen is that when you click on the last one, it launches a URL. I can get the slideshow to stop when it gets to the end (nowrap) and I can fire an event when it gets there (end) but that only works when the slideshow is animating automatically. The end event doesn't fire when using next. Can anyone help me? Surely something like this is nice and simple? You could use the 'after' callback. Details here: http://www.malsup.com/jquery/cycle/after.html Mike Thanks Mike, but I'm a little new to this, and the solution isn't immediately obvious. The after option is listed as a transition callback (scope set to element that was shown). The demo you linked to has after: onAfter - is onAfter an event that is triggered? How do I capture that event? Sorry, this is about the 2nd thing I have done with jQuery :
[jQuery] Re: jQuery events don't work after AJAX load
Are you using the Livequery plugin to bind your events? If not, then the event binding, that presumably is setup in some other source file (other than the HTML that's coming in via your load), won't even run against the new code from the AJAX load. Using Livequery will let you keep the code separate but anytime elements that match change/come into play, it will bind (or do whatever your Livequery handler is setup to do). On Mon, Jul 7, 2008 at 6:54 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi folks, I have a page with a photo on it. I load the comments for this photo via an ajax request: var item_id_val = $(#item_id).val(); $.post(/show_comments, item_id: item_id_val }, function(data) { /* Update the comment_section div. */ $(#comment_section).html(data); }); That works fine, but the html data that /show_comments returns doesn't work with jQuery. For example, users can thumb up or thumb down comments, but if the html code is loaded via AJAX the .click events are not binded to that loaded data. How can I fix this problem? Any ideas or help would be greatly appreciated. Thanks, Konstantin -- Chris Bailey [EMAIL PROTECTED]