[jQuery] Re: IE8
timothytoe schrieb: One thing I noticed is that the JavaScript is still painfully slow, but perhaps there is a lot of debug stuff in there slowing it down. What takes 7 seconds in Safari and 8 in Firefox 3b3 takes 25 seconds in IE8! (28 seconds in IE6). That's ~11% better in ~8 years Not too bad. :-) micha
[jQuery] Re: Looping through child nodes
Thanks, this looks great. Kris On Mar 6, 7:27 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Drake, This sounds like a job for the Cycle plugin. :-) http://malsup.com/jquery/cycle/ A lot of the examples on the site are for images, but you can use elements with text in them as well. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 5, 2008, at 4:19 PM, Drake Aedus wrote: I'm pretty new to jQuery, and I'm having a lot of fun with it. I tried a quick search and didn't find anything really helpful, so maybe this is a good question, or maybe I'm having a brain-fart... What I am trying to do, is loop through a list of child nodes, and only display one at a time. It is easy enough to go through the node list and change classes on a timeout, but I can't figure out how to skip from the last child, back to the first without using as much code as it would take without jQuery. Thanks anyone and everyone for your time. Kris- Hide quoted text - - Show quoted text -
[jQuery] Re: calling a php function with jquery
Thanks a lot, i found an exemple with get too. It works perfectly. Thanks a lot 2008/3/6, the_woodsman [EMAIL PROTECTED]: Erm, there's a few hurdles in front of you... In short, you have to: - make a URL that runs the php script- this should work via your browser (helloscript.php?user=bob, perhaps), - call this URL via ajax, and insert the output into the current page. On Mar 5, 5:18 pm, everdream [EMAIL PROTECTED] wrote: Hello ! I have a php function : helloUser in the file : myFunctions.php. This is my function : ... function helloUser($user) { return Welcome $user !;} ... I'm using jquery for an application but i don't know how to call a php function and give parameter (here :$user) and recover the result (here : welcome ...). Can somebody help me? Thanks a lot. -- View this message in context:http://www.nabble.com/calling-a-php-function-with-jquery-tp15853808s2... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Dynamically generated HTML and effects on CSS
still can't seem to locate the problem... anyone?
[jQuery] Re: optimization in jquery
Without any specifics there's no way of saying. What are you trying to do, what does your code look like, and what does your HTML look like? On Mar 6, 2:45 am, Jean-Sébastien [EMAIL PROTECTED] wrote: hi, when i work on a big div tag (containing lots of others elements) browser freeze, during few seconds. is there a way to optimize this. and more generally what are the best practices to optimize jquery functions.
[jQuery] Re: wracking my brains on how to get error messages inline
I think you have to display: block and float: left the labels in a div container div style=clear:both label style=display: block; float:left; input ... /div
[jQuery] Re: problems with event triggering in IE6, presumably 5.5 as well.
Update: adding overflow:hidden to my trigger DIVs and tossing in a load of non-breaking spaces seems to do the trick tolerably, but this feels like a cludgy solution. On Mar 5, 10:01 pm, hedgomatic [EMAIL PROTECTED] wrote: Hi, I'm working on getting what should be a simple rollover effect done in jquery, and it works like a charm in firefox and safari, but IE is not having any of it. the page in question is here:http://www.awayfromkeyboard.com/nymphomania/ here's the relevant code: jQuery: $(document).ready(function(){ $(#trigger_news).mouseover( function () { $ (#news).addClass(news_on); }); $(#trigger_news).mouseout( function () { $ (#news).removeClass(news_on); $(#news).addClass(news); }); }); CSS: #trigger_news { position:absolute; top:133px; left:237px; z-index:3; width:138px; height:33px; } .news { position: absolute; top:103px; left:237px; width:323px; height: 132px; z-index:2; display: none; } .news_on { position: absolute; top:103px; left:237px; width:323px; height:132px; z-index:2; display: block; background-image:url('event- states/news.jpg'); } HTML: DIV ID=trigger_news/DIV DIV ID=news CLASS=news/DIV the problem seems to be that the layered divs I'm using to capture the user's mouseover event are empty, and IE is very unhappy about it. Put some text in there, and IE will accept that if you're hovering over the text specifically, but nowhere else. Put a giant border on the DIV, IE will respond when you hover over the border. Putting an image in there gets it to behave appropriately, but transparent pngs or gifs won't work, since IE5.5/6 doesn't support image transparency on any z- index other than 0 (at least to my knowledge). I could make images of the four navigation items as well as hover states for each, but it's already a pretty heavy site in terms of filesize and that generally strikes me as a bit sloppy. I've also tried capturing the events with image maps, and IE likes this a little bit better in that it will sometimes display the image I want, but overall the results from that approach were unreliable and flaky. any ideas/suggestions on another solution, or something I'm missing in regards to this one?
[jQuery] Re: optimization in jquery
// store selector-results in variables and reuse $sel = $('.foo-class') $sel.click $sel.find('.bar') $sel.somePlugin // specify selectors as hard as possible $('body div.foo div.bar a.foobar') is more specific and significantly faster than $('a.foobar') // use the scope $('div.foobar').click(function() { // using this as scope to start searching for .bar $('.bar', this).each( ... ) or $(this).find('.bar').each( ... ) });
[jQuery] Re: jQuery AJAX Dynamic File Download
I would set these headers in the excel.php script, and create a link directly to it. It is more or less a straight file download, created dynamically. header(Cache-Control: no-cache); header('Content-Type: application/octet-stream'); header(Content-Disposition: attachment; filename=MyExcelFile.xls); - Original Message - From: Travis Fisher [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, March 05, 2008 7:00 PM Subject: [jQuery] jQuery AJAX Dynamic File Download I've got an export functionality built into my site, whereby users can choose which rows of a data table to export. They export by clicking an Actions dropdown and choosing Export. This triggers an AJAX call that posts which ids to export to a PHP script, which, in turn, builds an Excel document on the fly and delivers it to the user. Here is my code: input type=checkbox id=selected1 name=Interviews[] value=21 / input type=checkbox id=selected2 name=Interviews[] value=22 / ... inputs = []; $(#dataTableBody input[id^=selected]:checked).each(function() { inputs.push(this.name + '=' + escape(this.value)); }); $.ajax({ type: POST, data: inputs.join(''), url: /gateway/excel.php, success: function(){ return true; }, error: function(XMLHttpRequest, textStatus, errorThrown){ return false; } }); In Firebug, I'm getting the data in TSV format, but I'm not being presented the download dialog within my browser. If this was a straight file download, I would link directly to it, but the file has to be built dynamically. Can I set the dataType option in the ajax call to be file or something? What are my options? -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.4/1312 - Release Date: 2008-03-04 21:46
[jQuery] Re: jQuery AJAX Dynamic File Download
no, do a window.open() on the excel.php-url ... XHR is not meant to involve user-interaction (open/save) on unknown mime-types.
[jQuery] Form plugin and attaching extra stuff to query string
At the moment, I unobtrusively submit a certain form via AJAX if possible and when I do that I need to tell the server to respond with a AJAX suitable return message. I do that by appending async_save=1 to the form. Here's how I actually do it: $(form).append('input type=hidden name=async_save value=1'); $(form).ajaxSubmit({ success: function(response) { alert(response); }, }); Is there a better way to add this extra parameter without having add an element to the DOM like this? -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
[jQuery] Re: jQuery.Plugin, first release.
Hi, 1- First of all, do you frequently use jspax for your jQuery plugins ? no one said this plugin is the first of its kind. Yes I do. I have recieved reports from developers that have poblems with jsPax and IE, but none of their testcases did show their problems for me. For my part I never have experienced any poblems with it - except for the time I was developing it, of course. 2- jspax requires you to organize it all in packages, and require them when the moment comes. It also requires to structure your code with callbacks. When you summon a package, you need to pass in a callback. I tried that some time ago, it's not that easy and makes the code kinda weird. Well, weirdness of code seems to be an emotional measure to some extend. Actually I find, that code that uses jsPax is very well stuctured. If you don't like the callback stuff, you can use JSAN that loads its packages synchronously. This plugin requires you to register for the plugins, the namespaces they take. You need to specify what functions it adds to $ and $.fn. So I as a plugin user need to know which functions a plugin adds? I haven't written that plugin. I only use part of its functionality. I whant to be able to replace it with a newer version which might add additional functions. I don't think that this is really a so great Idea. @Christof (cool name) :-) 2-The code can resolve dependencies, that's the option require which is an array of ids of plugins required, that is all explained in the project page. While I was developing jsPax I found out, that resolving dependencies can be quite tough. I have not read your code in full detail, but are you shure, you have checked all possible cases (like, e.g. two scripts loaded as a dependency for a third one both depend on the same fourth script, timing issues with such situations, etc.)? 3-It should work with all the browsers jQuery claims to fully support. No new technique is used here to load the packages, just jQuery. OK, I even load jQuery as a jsPax package. 4-The only thing you need for each plugin, is the list of functions/ namespaces it registers. Well, I may not really have them. I may only have a packed version of a plugin together with mediocre documentation. For no plugin I have seen so far that is an issue, but it might be in future. What still makes me feel bad is, that in your main script you need to write down all the function names all the plugins you use provide. In some cases it might be not much more code to stuff the packed plugin on top of your main script instead. In contrast to that with jsPax I only have to write down the package names in the main script file - no function names, etc. Of course that means, your really cool usage of simply calling the needed functions is not possible with plain jsPax. I could add a link to a list of pre made registrations, that I add as I get them reported by plugin owners or users. Then you have as many script tags in your head as you have without lazy loading: script src=jquery.js/script script src=pluginplugin.js/script script src=plugin1_registration.js/script script src=plugin2_registration.js/script script src=plugin3_registration.js/script script src=plugin4_registration.js/script ... script src=main.js/script That means, you have to know all dependencies of all plugins. 5-That's a very specific question, this is the first release, a draft you could say. I don't think this point has much importance. I could for instance check that. But the dev is the one registering, so it's not likely to happen. Maybe a plugin registeres another plugin that already is registered in the main script file. I do think that those things will happen. I understand, that you did take that issue out for the first beta release. For further releases you should take it into account. Christof
[jQuery] Re: Looping through child nodes
On Mar 6, 7:19 am, Drake Aedus [EMAIL PROTECTED] wrote: I'm pretty new to jQuery, and I'm having a lot of fun with it. I tried a quick search and didn't find anything really helpful, so maybe this is a good question, or maybe I'm having a brain-fart... What I am trying to do, is loop through a list of child nodes, and only display one at a time. It is easy enough to go through the node list and change classes on a timeout, but I can't figure out how to skip from the last child, back to the first without using as much code as it would take without jQuery. Presumably you have a counter and an array of things to cycle over, to simply reset the counter to zero when it reaches the last member of the array: i = ++i % array.length; -- Rob
[jQuery] jQuery listen plugin help
I am trying to bind to the submit function of a form using the jQuey Listen plugin. $.listen('submit', '#eventForm', function(){ alert(Submit Clicked); } This is working fine in firefox but not in Internet Explorer. Does anyone have any ideas? Calvin
[jQuery] Re: roundcorners+gradient+progression= ...
(http://methvin.com/jquery/jq-corner-demo.html)
[jQuery] Re: Sortables and radio buttons issue
Jamie, I have a simple sortable list of div's with one containing a group of radio buttons, such as: div id=container divItem 1 input type=radio name=obj value=K /input type=radio name=obj value=D //div divItem 2/div divItem 3/div divItem 4/div divItem 5/div /div If I check one of the radio buttons and then drag the first Item, once the div is dropped the value of the radio button gets unset. Why is that? It appears that in Firefox 2.0.0.12 on Windows Vista that if I set a CHECKED value for one of the radio buttons it doesn't get recognized and then when the Item is sorted the radio buttons revert to their previous unchecked state. In IE7 on Vista, the CHECKED attribute is recognized as desired, but if I click on the other radio button and therefore change what was set by default once the item has been sorted the radio button reverts to its original default state. So it appears that when sorting div that contain radio buttons all of the radio buttons are reset to their default states as dictated by the HTML. How do I fix this so that the value changes are carried forward when an item has been changed and then subsequently sorted afterwards? I tried fooling around with something like this: $([EMAIL PROTECTED]'obj']).click( function(){ $ ([EMAIL PROTECTED]'obj']).removeAttr('checked'); // Remove all checked radio buttons first $(this).attr('checked','checked'); //Check the appropriate radio button }); Didn't work. The removeAttr works properly, but the add attribute portion doesn't. However, if I use a bogus attribute instead of checked it works (as far as removing and adding the bogus attribute in the appropriate spot). I'm stumped... And just fyi, this is my first time using jQuery, so speak relatively juvenile and I promise not to get too offended. :-) Thanks in advance! Without knowing how your doing the drag-n-drop, it's hard to say. I'll assume somewhere along the way the dragged element is getting cloned--which can cause the loss of form state: http://blog.pengoworks.com/index.cfm/2007/7/16/IE6--IE7-quirks-with-cloneNod e-and-form-elements -Dan
[jQuery] Re: Form plugin and attaching extra stuff to query string
Is there a better way to add this extra parameter without having add an element to the DOM like this? The better way is to have the server detect that the request was submitted via ajax and respond accordingly. You can determine this on the server by inspecting the X-Requested-With header. It will have a value of XMLHttpRequest when the request originates via XHR. Mike
[jQuery] Re: optimization in jquery
Hi H0tzen I disagree with you, I think 'a.foobar' is usually faster than your first selector. It's always relative, because you might have hundreds of a. Then you should first filter most out specifying a container, and then do the straight filter. Each part of the selector requires jQuery to check each matcheded element in the collection. I might be wrong, hope not. Cheers Ariel Flesler On 6 mar, 07:32, h0tzen [EMAIL PROTECTED] wrote: // store selector-results in variables and reuse $sel = $('.foo-class') $sel.click $sel.find('.bar') $sel.somePlugin // specify selectors as hard as possible $('body div.foo div.bar a.foobar') is more specific and significantly faster than $('a.foobar') // use the scope $('div.foobar').click(function() { // using this as scope to start searching for .bar $('.bar', this).each( ... ) or $(this).find('.bar').each( ... ) });- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: Form plugin and attaching extra stuff to query string
Is that just because it's jQuery or does that apply in general to all browsers doing AJAX? It's a technique used by all the major JavaScript libraries.
[jQuery] Re: Form plugin and attaching extra stuff to query string
You could also push more info into the data array, using the 'beforeSubmit' right ? Although, is Mike's option is a possibility, that's always cleaner. Cheers Ariel Flesler On 6 mar, 10:52, Mike Alsup [EMAIL PROTECTED] wrote: Is there a better way to add this extra parameter without having add an element to the DOM like this? The better way is to have the server detect that the request was submitted via ajax and respond accordingly. You can determine this on the server by inspecting the X-Requested-With header. It will have a value of XMLHttpRequest when the request originates via XHR. Mike
[jQuery] Re: jQuery.Plugin, first release.
Hi Christof It's certainly better if the developer organizes it's code. Using a package manager, or w/e script fulfills that need. Some frameworks, already are organized into packages, and they usually have a package loader integrated. Now, jQuery is not structured in packages, it's a core. You could consider the plugins as package, but there's no jQuery module to load them orderly (that I know of). You can certainly just use $.getScript() and there you have your package loader. You worry about the requires and provides. Well, this is just another approach, integrated with jQuery, I don't think it's completely fair to straight compare it with generic loaders. This might not be what you specifically need, doesn't mean it's useless. You are not the only possible user. I'm glad you have a good technique to load your jQuery plugins, I doubt everyone already has one. As for what you replied on plugin registration. I agree that the user doesn't need to know the namespaces. Maybe doing that DB of registrations is one possible solution. As to your example, you don't need to put each one in a script. You can gather all those you need, concatenate and minify them. I doubt it will take more than 2-4kb for around 15-20 plugins. If you have 200kb of code to load (happened to me). I'm sure it's far better to have 3kb initially in one http request, than 20 requests of 10kb or 1 plain call for 200kb. The dependencies system can handle nested dependencies, also 2 plugins requiring the same dependency while it's loading. It can surely fail in some cases, as I said, this is the first release, it was mostly as a proof of concept, to get some feedback. Some of your concerns I consider too specific. Thanks for your comment Ariel Flesler On 6 mar, 06:50, Christof Donat [EMAIL PROTECTED] wrote: Hi, 1- First of all, do you frequently use jspax for your jQuery plugins ? no one said this plugin is the first of its kind. Yes I do. I have recieved reports from developers that have poblems with jsPax and IE, but none of their testcases did show their problems for me. For my part I never have experienced any poblems with it - except for the time I was developing it, of course. 2- jspax requires you to organize it all in packages, and require them when the moment comes. It also requires to structure your code with callbacks. When you summon a package, you need to pass in a callback. I tried that some time ago, it's not that easy and makes the code kinda weird. Well, weirdness of code seems to be an emotional measure to some extend. Actually I find, that code that uses jsPax is very well stuctured. If you don't like the callback stuff, you can use JSAN that loads its packages synchronously. This plugin requires you to register for the plugins, the namespaces they take. You need to specify what functions it adds to $ and $.fn. So I as a plugin user need to know which functions a plugin adds? I haven't written that plugin. I only use part of its functionality. I whant to be able to replace it with a newer version which might add additional functions. I don't think that this is really a so great Idea. @Christof (cool name) :-) 2-The code can resolve dependencies, that's the option require which is an array of ids of plugins required, that is all explained in the project page. While I was developing jsPax I found out, that resolving dependencies can be quite tough. I have not read your code in full detail, but are you shure, you have checked all possible cases (like, e.g. two scripts loaded as a dependency for a third one both depend on the same fourth script, timing issues with such situations, etc.)? 3-It should work with all the browsers jQuery claims to fully support. No new technique is used here to load the packages, just jQuery. OK, I even load jQuery as a jsPax package. 4-The only thing you need for each plugin, is the list of functions/ namespaces it registers. Well, I may not really have them. I may only have a packed version of a plugin together with mediocre documentation. For no plugin I have seen so far that is an issue, but it might be in future. What still makes me feel bad is, that in your main script you need to write down all the function names all the plugins you use provide. In some cases it might be not much more code to stuff the packed plugin on top of your main script instead. In contrast to that with jsPax I only have to write down the package names in the main script file - no function names, etc. Of course that means, your really cool usage of simply calling the needed functions is not possible with plain jsPax. I could add a link to a list of pre made registrations, that I add as I get them reported by plugin owners or users. Then you have as many script tags in your head as you have without lazy loading: script src=jquery.js/script script src=pluginplugin.js/script script src=plugin1_registration.js/script
[jQuery] Re: jQuery listen plugin help
Hi Calzone Seems IE doesn't bubble the event submit, if that's the case, then this plugin can't handle that event, until a workaround is found :) As an option, you could listen for clicks on the submit button. Maybe you need to check for Enter's (keypress) on the fields. With a few checks, you could handle submits this way. Cheers Ariel Flesler On 6 mar, 09:50, Calzone [EMAIL PROTECTED] wrote: I am trying to bind to the submit function of a form using the jQuey Listen plugin. $.listen('submit', '#eventForm', function(){ alert(Submit Clicked); } This is working fine in firefox but not in Internet Explorer. Does anyone have any ideas? Calvin
[jQuery] Re: Form plugin and attaching extra stuff to query string
On 06/03/2008, Mike Alsup [EMAIL PROTECTED] wrote: Is that just because it's jQuery or does that apply in general to all browsers doing AJAX? It's a technique used by all the major JavaScript libraries. Thanks a lot! I didn't know that. -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
[jQuery] Re: jQuery.Plugin, first release.
Hi, Now, jQuery is not structured in packages, it's a core. You could consider the plugins as package, but there's no jQuery module to load them orderly (that I know of). That was one of the reasons I wrote jsPax. I chose not to use jQuery in jsPax, because I still have some applications that profit from jsPax but don't use jQuery. This might not be what you specifically need, doesn't mean it's useless. You are not the only possible user. Of course. I didn't mean anything as an offense. That doesn't keep me from thinking if I can imagine a usecase where your solution is better than existing ones. Actually there is something that is a lot cooler: the fact, that you simply call the plugin functions and don't have to care about that after registration. In such a case my approach would be to see first if an existing solution for something similar could be extended. Of course you can still come to the conclusion, that extending would have more drawbacks than doing it yourself - that's why I didn't use JSAN. I'm glad you have a good technique to load your jQuery plugins, I doubt everyone already has one. Of course everyone can use jsPax. Everyone can use JSAN, of course. Of course everyone can use your code as well - no problem with that. As for what you replied on plugin registration. I agree that the user doesn't need to know the namespaces. Maybe doing that DB of registrations is one possible solution. But every developer needs to manage his own database then. The URLs are different for every application. Thus the developer needs to change his database for every application. The dependencies system can handle nested dependencies, also 2 plugins requiring the same dependency while it's loading. It can surely fail in some cases, as I said, this is the first release, it was mostly as a proof of concept, to get some feedback. Some of your concerns I consider too specific. It is more that these are concerns I had to spend quite some thoughts to geht them fully solved in jsPax. Christof
[jQuery] Re: IE8
Hehe. I _really_ hope the JScript gets faster in upcoming releases. It seems as if their DOM stuff got faster but I haven't checked. On Mar 6, 12:47 am, Michael Stuhr [EMAIL PROTECTED] wrote: timothytoe schrieb: One thing I noticed is that the JavaScript is still painfully slow, but perhaps there is a lot of debug stuff in there slowing it down. What takes 7 seconds in Safari and 8 in Firefox 3b3 takes 25 seconds in IE8! (28 seconds in IE6). That's ~11% better in ~8 years Not too bad. :-) micha
[jQuery] $().load( ) issue: url has no properties
Anyone knows what this error message means ? url has no properties pointing to jquery.js line 2401, which is the $().load() ajax call definition. (and specifically: that line: var off = url.indexOf( ); ) i don't understand the error because i'm providing an URL and it works correctly out of the ajax call. In fact that function was working before i made some severe changes elsewhere in the code. Any hint / directions where to look for errors ? Thank you, -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: Form plugin and attaching extra stuff to query string
On 06/03/2008, Mike Alsup [EMAIL PROTECTED] wrote: Is there a better way to add this extra parameter without having add an element to the DOM like this? The better way is to have the server detect that the request was submitted via ajax and respond accordingly. You can determine this on the server by inspecting the X-Requested-With header. It will have a value of XMLHttpRequest when the request originates via XHR. Is that just because it's jQuery or does that apply in general to all browsers doing AJAX? Mike -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
[jQuery] Re: [POLL] Online jQuery Training from John Resig
Not yet Jake. Rey... Jake McGraw wrote: Any ideas on the fee? - jake On Thu, Mar 6, 2008 at 9:57 AM, Rey Bango [EMAIL PROTECTED] wrote: For those that missed this email the first time: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team
[jQuery] Re: [POLL] Online jQuery Training from John Resig
Any ideas on the fee? - jake On Thu, Mar 6, 2008 at 9:57 AM, Rey Bango [EMAIL PROTECTED] wrote: For those that missed this email the first time: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team
[jQuery] [POLL] Online jQuery Training from John Resig
For those that missed this email the first time: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team
[jQuery] opacity issues with IE8
May be a bit premature, but I was testing some of my sites in IE8 beta ( 8.0.6001.17184) and all the effects using opacity are not working correctly. I checked all the fade effects on the docs and they don't fade in or out, and the thickbox, jqModal, LightBox plugins' overlays are showing as a solid color. Should a ticket be submitted or should I wait till IE8 is further along. just fyi, I am using the VPC that MS provides for IE8/7/6 testing. -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com http://www.benjaminsterling.com
[jQuery] Re: jQuery AJAX Dynamic File Download
I second this. There's no need to do AJAX here. Just linking directly to the PHP page with these headers will prompt for download and NOT refresh the browser. (It will look like AJAX) On Mar 6, 2:25 am, Patrik Nikkanen [EMAIL PROTECTED] wrote: I would set these headers in the excel.php script, and create a link directly to it. It is more or less a straight file download, created dynamically. header(Cache-Control: no-cache); header('Content-Type: application/octet-stream'); header(Content-Disposition: attachment; filename=MyExcelFile.xls); - Original Message - From: Travis Fisher [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, March 05, 2008 7:00 PM Subject: [jQuery] jQuery AJAX Dynamic File Download I've got an export functionality built into my site, whereby users can choose which rows of a data table to export. They export by clicking an Actions dropdown and choosing Export. This triggers an AJAX call that posts which ids to export to a PHP script, which, in turn, builds an Excel document on the fly and delivers it to the user. Here is my code: input type=checkbox id=selected1 name=Interviews[] value=21 / input type=checkbox id=selected2 name=Interviews[] value=22 / ... inputs = []; $(#dataTableBody input[id^=selected]:checked).each(function() { inputs.push(this.name + '=' + escape(this.value)); }); $.ajax({ type: POST, data: inputs.join(''), url: /gateway/excel.php, success: function(){ return true; }, error: function(XMLHttpRequest, textStatus, errorThrown){ return false; } }); In Firebug, I'm getting the data in TSV format, but I'm not being presented the download dialog within my browser. If this was a straight file download, I would link directly to it, but the file has to be built dynamically. Can I set the dataType option in the ajax call to be file or something? What are my options? -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.4/1312 - Release Date: 2008-03-04 21:46
[jQuery] Re: Dynamically generated HTML and effects on CSS
I've never played with the css direction properties, nor facebox, nor can I see your example, but I do know that the correct css syntax is: div { direction: rtl } rather than 'dir', so you might look at that rolf [EMAIL PROTECTED] wrote: still can't seem to locate the problem... anyone? -- View this message in context: http://www.nabble.com/Dynamically-generated-HTML-and-effects-on-CSS-tp15835622s27240p15876780.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: optimization in jquery
hi, in my case the element is selected with an i id, so i guess it's found relatively quickly. but this div is about 800 html lines (doesn't mean anything but i can't count tags). In fact i just made some ajax pagination inside the div. On Mar 6, 3:00 pm, Ariel Flesler [EMAIL PROTECTED] wrote: Hi H0tzen I disagree with you, I think 'a.foobar' is usually faster than your first selector. It's always relative, because you might have hundreds of a. Then you should first filter most out specifying a container, and then do the straight filter. Each part of the selector requires jQuery to check each matcheded element in the collection. I might be wrong, hope not. Cheers Ariel Flesler On 6 mar, 07:32, h0tzen [EMAIL PROTECTED] wrote: // store selector-results in variables and reuse $sel = $('.foo-class') $sel.click $sel.find('.bar') $sel.somePlugin // specify selectors as hard as possible $('body div.foo div.bar a.foobar') is more specific and significantly faster than $('a.foobar') // use the scope $('div.foobar').click(function() { // using this as scope to start searching for .bar $('.bar', this).each( ... ) or $(this).find('.bar').each( ... ) });- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: IE8
anyone else getting errors at line 2666 of jQuery during ajax requests in IE8? xml.open(s.type, s.url, s.async, s.username, s.password); the debugger says, Breaking on JScript runtime error - Permission denied --adam On Mar 6, 9:40 am, timothytoe [EMAIL PROTECTED] wrote: Hehe. I _really_ hope the JScript gets faster in upcoming releases. It seems as if their DOM stuff got faster but I haven't checked. On Mar 6, 12:47 am, Michael Stuhr [EMAIL PROTECTED] wrote: timothytoe schrieb: One thing I noticed is that the JavaScript is still painfully slow, but perhaps there is a lot of debug stuff in there slowing it down. What takes 7 seconds in Safari and 8 in Firefox 3b3 takes 25 seconds in IE8! (28 seconds in IE6). That's ~11% better in ~8 years Not too bad. :-) micha
[jQuery] [Srollable HTML Table] Using this plugin, can someone recommend how to get it to also scroll horizontally?
I'm using the jquery scrollable table plugin found here http://www.webtoolkit.info/scrollable-html-table-plugin-for-jquery.html http://www.webtoolkit.info/scrollable-html-table-plugin-for-jquery.html (if someone knows a better one to use, I'll try that as well. The above really isn't a jquery plugin, it just proxies a call to the base js.) The js works fine for scrolling vertically, but I'd also like it scroll horizontally if I set all the columns to no-wrap and it's too large for the area. Before I start mucking around trying to figure out what I need to change, has anyone modified the code to let it scroll horizontally? (I didn't see a link on the site to add comments or ask questions, so I'm asking here.) There isn't a lot to the js, so I'm posting it below if anyone knows what I need to change. Thanks. code function ScrollableTable (tableEl, tableHeight, tableWidth) { this.initIEengine = function () { this.containerEl.style.overflowY = 'auto'; if (this.tableEl.parentElement.clientHeight - this.tableEl.offsetHeight 0) { this.tableEl.style.width = this.newWidth - this.scrollWidth +'px'; } else { this.containerEl.style.overflowY = 'hidden'; this.tableEl.style.width = this.newWidth +'px'; } if (this.thead) { var trs = this.thead.getElementsByTagName('tr'); for (x=0; xtrs.length; x++) { trs[x].style.position ='relative'; trs[x].style.setExpression(top, this.parentElement.parentElement.parentElement.scrollTop + 'px'); } } if (this.tfoot) { var trs = this.tfoot.getElementsByTagName('tr'); for (x=0; xtrs.length; x++) { trs[x].style.position ='relative'; trs[x].style.setExpression(bottom, (this.parentElement.parentElement.offsetHeight - this.parentElement.parentElement.parentElement.clientHeight - this.parentElement.parentElement.parentElement.scrollTop) + 'px'); } } eval(window.attachEvent('onresize', function () { document.getElementById(' + this.tableEl.id + ').style.visibility = 'hidden'; document.getElementById(' + this.tableEl.id + ').style.visibility = 'visible'; } )); }; this.initFFengine = function () { this.containerEl.style.overflow = 'hidden'; this.tableEl.style.width = this.newWidth + 'px'; var headHeight = (this.thead) ? this.thead.clientHeight : 0; var footHeight = (this.tfoot) ? this.tfoot.clientHeight : 0; var bodyHeight = this.tbody.clientHeight; var trs = this.tbody.getElementsByTagName('tr'); if (bodyHeight = (this.newHeight - (headHeight + footHeight))) { this.tbody.style.overflow = '-moz-scrollbars-vertical'; for (x=0; xtrs.length; x++) { var tds = trs[x].getElementsByTagName('td'); tds[tds.length-1].style.paddingRight += this.scrollWidth + 'px'; } } else { this.tbody.style.overflow = '-moz-scrollbars-none'; } var cellSpacing = (this.tableEl.offsetHeight - (this.tbody.clientHeight + headHeight + footHeight)) / 4; this.tbody.style.height = (this.newHeight - (headHeight + cellSpacing * 2) - (footHeight + cellSpacing * 2)) + 'px'; }; this.tableEl = tableEl; this.scrollWidth = 16; this.originalHeight = this.tableEl.clientHeight; this.originalWidth = this.tableEl.clientWidth; this.newHeight = parseInt(tableHeight); this.newWidth = tableWidth ? parseInt(tableWidth) : this.originalWidth; this.tableEl.style.height = 'auto'; this.tableEl.removeAttribute('height'); this.containerEl = this.tableEl.parentNode.insertBefore(document.createElement('div'), this.tableEl); this.containerEl.appendChild(this.tableEl); this.containerEl.style.height = this.newHeight + 'px'; this.containerEl.style.width = this.newWidth + 'px'; var thead = this.tableEl.getElementsByTagName('thead'); this.thead = (thead[0]) ? thead[0] : null; var tfoot = this.tableEl.getElementsByTagName('tfoot'); this.tfoot = (tfoot[0]) ? tfoot[0] : null; var tbody = this.tableEl.getElementsByTagName('tbody'); this.tbody = (tbody[0]) ? tbody[0] : null; if (!this.tbody) return; if (document.all document.getElementById !window.opera) this.initIEengine(); if (!document.all document.getElementById
[jQuery] neewbe help, Bassistance Validation Plugin
Hello all, It's my second time I post here, I hope help me. My problem is about Bassistance Validation Plugin. I wish use a ballon to show the error message for each onfocus input elements. But I can't manipulate onfocusin event. Someone can help? I do some thing here. see: blog.alexsandro.com.br/aa.htm [] Alexsandro
[jQuery] Re: Superfish Menu - IE6 not displaying dropdown correctly.
Ok, I've narrowed the issue down to a JavaScript memory leak. A memory leak makes sense because of the sporadic behavior of the menu. I found the memory leak using the tool available at this link: http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx . See the image below to see the leaks found in the menu. Any help fixing this issue would be greatly appreciated. http://www.nabble.com/file/p15874557/MenuMemoryLeaks.jpg Thanks! Jen Jen Mostert wrote: Hi Joel, Thank you for the quick reply. I just checked and I'm still getting the same issue this morning. I'm fairly new to jQuery and Superfish (was just assigned to this project last month) so I'm not familiar enough with the current code to identify where I should start to debug the problem. Hopefully someone on the list will see the same issue and can point me in the right direction. As for the animation issue, I looked at the page in our testing lab on an IE7 machine and saw that it flickered and was anything but smooth. I know I saw a post on here about flickering menus in IE7. I can take a look at that. Do you have any other suggestions in regards to the animation issue in IE6? Thanks again for your help. I read a lot of your posts yesterday, and was amazed at how much time you devote to helping people. Jen Joel Birch wrote: Hello Jen, Thanks for providing descriptive steps to follow to reproduce the problem. However, I'm sorry, but I can't seem to successfully reproduce the behaviour you describe in IE6, and I've spent some time attempting to do so. The only issue I can see is unrelated to what you describe - the animation is not really working smoothly. Maybe you have solved the issue you reported since posting it? Or maybe someone else on this list can confirm what you describe and can shed some light on it? I wish I could be more helpful :/ Joel Birch. -- View this message in context: http://www.nabble.com/Superfish-Menu---IE6-not-displaying-dropdown-correctly.-tp15721292s27240p15874557.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Embed youtube using jmedia
I have been trying desperately to use jMedia to embed youtube videos onto my site, but everytime it doesn't replace the code. But if I put in a normal video, it works fine. Does anyone now how to accomplish this? JAVASCRIPT script type=text/javascript $(document).ready(function(){ $(#flash_test).jmedia( {version:7}, {src:http://www.youtube.com/v/hbr6wMiL83Y;, width:425, height:350 }); }); /script HTML - div id=flash_testFlash Test/div
[jQuery] Lightbox v0.4 Button Placement
Hi All, Does anyone know how to move the buttons in the JQuery Lightbox v0.4 (http://leandrovieira.com/projects/jquery/lightbox/)? I would like to have the Close button in the top right corner, the next button in the bottom right corner and the previous button in the bottom left corner. Thanks, -Roman
[jQuery] Re: Sortables and radio buttons issue
Well, it seems to be that ANY time you have an input tag inside of a draggable DIV the state is lost. These radio buttons are not in a form. They are only used to adding a class to the DIV. Here is the most simplified form of the problem. http://www.reepfamily.com/jquery/test.html. Select one of the radio buttons and then drag/drop it. I've tried all sorts of hackish ways to fix it and none seem to work. Here is the latest attempt: $(document).ready(function(){ $(input).click(function(){ var myName = $(this).attr('name'); $([EMAIL PROTECTED]'+myName +']).removeAttr('checked').removeClass('set'); $(this).addClass('set'); $(.set).attr('checked','checked'); }); $(#objective_sortable_list).sortable({stop: function() { $(.set).attr('checked','checked'); } }); }); My thinking was since its getting lost, maybe I can set a class and then when the drag is stopped I can reapply the checked attribute. Didn't work. I'm getting pretty frustrated at this point. Ideas?
[jQuery] ajax/jquery
Hey guys, Basically, i just wanted some advise on a project that i am working on for a big client of mine. Ive got a folder full of notes regards to accessibilty and how to make the website fully compliant. The problem is, that we decided to use ajax/jQuery to provide alot of the functionality on the website, but i am still searching around if ajax would be the way forward if the client is wanting a 100% accessible website. Nothing from me has been coded yet, and its just ideas that i am researching on at the moment, which ajax was mentioned. My question is that, is there a backup plan if i did code the website using ajax using jquery but if js was disabled then how would it function. i.e. rather then the ajax call passing data into a div, the page would reload and take the action it needs to. Hope that makes sense and any advise/tips and tricks would be greatful. Thanks Raj
[jQuery] IE7 problem
Hi there, I'm regua. I've written a plugin for the WordPress blogging platform that uses Ajax to post comments (and display them after posting) + does a simple validation, and it's based on jQuery. It works well in all major browser, except Internet Explorer 7 (not sure about IE6). I'm running a Linux so it's impossible for me to test it (I've tried emulating IE7, but the plugin surprisingly works on the emulated browser...), and so I'm asking you if I'd made any mistakes in my code. Here it is: jQuery(document).ready(function(){ jQuery.noConflict(); jQuery('#commentform').after('div id=error/div'); jQuery('#submit').after('img src=wp-content/plugins/ajax-comment- posting/loading.gif id=loading alt=Loading... /'); jQuery('#loading').hide(); var form = jQuery('#commentform'); var err = jQuery('#error'); form.submit(function() { if(form.find('#author')[0]) { if(form.find('#author').val() == '') { err.html('span class=errorPlease enter your name./span'); return false; } // end if if(form.find('#email').val() == '') { err.html('span class=errorPlease enter your email address./ span'); return false; } // end if var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA- Z0-9]{2,4})+$/; if(!filter.test(form.find('#email').val())) { err.html('span class=error id=errdPlease enter a valid email address./span'); return false; } // end if } // end if if(form.find('#comment').val() == '') { err.html('span class=errorPlease enter your comment./span'); return false; } // end if jQuery(this).ajaxSubmit({ beforeSubmit: function() { jQuery('#loading').show(); jQuery('#submit').attr('disabled','disabled'); }, // end beforeSubmit error: function(request){ err.empty(); if (request.responseText.search(/titleWordPress rsaquo; Error\/ title/) != -1) { var data = request.responseText.match(/p(.*)\/p/); err.html('span class=error'+ data[1] +'/span'); } else { var data = request.responseText; err.html('span class=error'+ data[1] +'/span'); } jQuery('#loading').hide(); jQuery('#submit').removeAttr(disabled); return false; }, // end error() success: function(data) { try { var response = jQuery(data); if (response.find('.commentlist')[0]) { if (jQuery(document).find('.commentlist')[0]) { jQuery('.commentlist').html(response.find('.commentlist')); } else { jQuery('#respond').before(response.find('.commentlist')); } // end if if (jQuery(document).find('#comments')[0]) { jQuery('#comments').html(response.find('#comments')); } else { jQuery('.commentlist').before(response.find('#comments')); } // end if err.empty(); form.remove(); jQuery('#respond').hide(); err.html('span class=successYour comment has been added./ span'); jQuery('#submit').removeAttr(disabled); jQuery('#loading').hide(); } // end if } catch (e) { jQuery('#loading').hide(); jQuery('#submit').removeAttr(disabled); alert('An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it.\n\tMahatma Gandhi\n\n'+e); } // end try } // end success() }); // end ajaxSubmit()
[jQuery] Re: IE8
I'm doing a $.get() in IE8 without trouble, but I've only tried locally (local Apache, PHP on Windows XP). On Mar 6, 7:35 am, ajpiano [EMAIL PROTECTED] wrote: anyone else getting errors at line 2666 of jQuery during ajax requests in IE8? xml.open(s.type, s.url, s.async, s.username, s.password); the debugger says, Breaking on JScript runtime error - Permission denied --adam On Mar 6, 9:40 am, timothytoe [EMAIL PROTECTED] wrote: Hehe. I _really_ hope the JScript gets faster in upcoming releases. It seems as if their DOM stuff got faster but I haven't checked. On Mar 6, 12:47 am, Michael Stuhr [EMAIL PROTECTED] wrote: timothytoe schrieb: One thing I noticed is that the JavaScript is still painfully slow, but perhaps there is a lot of debug stuff in there slowing it down. What takes 7 seconds in Safari and 8 in Firefox 3b3 takes 25 seconds in IE8! (28 seconds in IE6). That's ~11% better in ~8 years Not too bad. :-) micha
[jQuery] skipping over some th while using tableSorter plugin
Hello I have a table like this http://i32.tinypic.com/287oolg.jpg from the pic...3, 4 and 5 are all th but all have columns underneath them, and the underneath columns are the ones that need sorting. If i use tableSorter plugin then it is adding sorting capability to all th tags. Is there any way to 'skip' certain th tags?? This is the code that i am using for table sorter. $(#myTable).tablesorter({ cssAsc: 'headerSortUp1', cssDesc: 'headerSortDown1', cssHeader: 'header', widgets: ['zebra'], sortList: [[0,0]], headers: { 1: { sorter:'nums' }, 3: { sorter:'nums' }, 5: { sorter:'nums' }, 6: { sorter:'nums' }, 8: { sorter:'nums' }, 10: { sorter:'nums' }, 12: { sorter:'nums' } } and code for my table is as follows table captionTable title/caption thead tr th rowspan=31/th th rowspan=32/th th colspan=23/th th colspan=74/th th colspan=45 members/th /tr tr th rowspan=23a/th th rowspan=23b/th th rowspan=24a/th th colspan=24b/th th colspan=44c/th th rowspan=25a/th th rowspan=25b/th th rowspan=25c/th th rowspan=25d/th /tr tr th4ba/th th4bb/th th4ca/th th4cb/th th4cc/th th4cd/th /tr /thead tbody tr td/td !--total of 15 td's-- /tr /tbody /table I'd appreciate any help!
[jQuery] Re: IE8
Scratch that. During the long calculation I show a chart to keep people from being bored. It's negligible in FF, but turns out to be a huge cost in IE (using excanvas). So I'm going to only show it in IE 1/4 as often. Still have to give people something to look at. On Mar 6, 6:40 am, timothytoe [EMAIL PROTECTED] wrote: Hehe. I _really_ hope the JScript gets faster in upcoming releases. It seems as if their DOM stuff got faster but I haven't checked. On Mar 6, 12:47 am, Michael Stuhr [EMAIL PROTECTED] wrote: timothytoe schrieb: One thing I noticed is that the JavaScript is still painfully slow, but perhaps there is a lot of debug stuff in there slowing it down. What takes 7 seconds in Safari and 8 in Firefox 3b3 takes 25 seconds in IE8! (28 seconds in IE6). That's ~11% better in ~8 years Not too bad. :-) micha
[jQuery] Re: Returning false if $.ajax() experiences an error
Hi did you try to do it is parallel ? $(#someId).click(function(){ sendAjaxrequest(); return false; }); On Mar 6, 1:42 am, AsymF [EMAIL PROTECTED] wrote: If a link has a click event I can stop that from firing by just returning false so that the browser stays on the current page. How would I do this when the click event is supposed to send a synchronous AJAX call using $.ajax()? I only want the click event to return false and stop the link from being followed if the AJAX request experiences an error.
[jQuery] Re: [POLL] Online jQuery Training from John Resig
I'm declining to answer the poll since I couldn't decide unless I had some sense of the training agenda, cost and even date/time. In the mean time I'll subscribe to John's blog, buy every book he writes and tell everyone else to do the same. :) Scott On Wed, Mar 5, 2008 at 11:55 PM, Rey Bango [EMAIL PROTECTED] wrote: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team -- -- Scott Trudeau scott.trudeau AT gmail DOT com http://sstrudeau.com/ AIM: sodthestreets
[jQuery] Re: [POLL] Online jQuery Training from John Resig
Hey, Rey... Will the events be recorded for later viewing? I would love the chance to view them, but usually don't have time to participate live, and if I do, I so easily forget to participate. I think it would be especially important to be able to access the files and code from an archive later, too. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Thursday, March 06, 2008 9:58 AM To: jquery-en@googlegroups.com Subject: [jQuery] [POLL] Online jQuery Training from John Resig For those that missed this email the first time: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team
[jQuery] Re: [POLL] Online jQuery Training from John Resig
Scott, The question was left vague on purpose to be able to determine if there's a demand for it or not. So basically, if you were able to receive some form of advanced training from John for a fee at some point in the future, would you pay to attend? Rey.. Scott Trudeau wrote: I'm declining to answer the poll since I couldn't decide unless I had some sense of the training agenda, cost and even date/time. In the mean time I'll subscribe to John's blog, buy every book he writes and tell everyone else to do the same. :) Scott On Wed, Mar 5, 2008 at 11:55 PM, Rey Bango [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team -- -- Scott Trudeau scott.trudeau AT gmail DOT com http://sstrudeau.com/ AIM: sodthestreets
[jQuery] Re: Form plugin and attaching extra stuff to query string
You could also push more info into the data array, using the 'beforeSubmit' right ? Although, is Mike's option is a possibility, that's always cleaner. You can add extra data in the beforeSubmit handler, or more conveniently, in the plugin fn: $('#myForm').ajaxForm({ // use data prop to add extra data data: { name1: 'value1', name2: 'value2' }, success: function(){ /* whatever */ } });
[jQuery] Safari strange bug
Just wanted to say that I love this plug in and how it works and I use it often in my own projects. Anyway the bug is only safari related and a working example can be seen here www.sutra.hr. In safari i get the following bug: The first image is duplicated on the whole carousel gallery although in the source the actual images are really there. Its really strange and ive never seen it before, nor have a found a similar case on the internet. Now i must mention that i am not a JS guru so any help would be very helpfull, because this is just driving me crazy. thanks
[jQuery] Xpath and length() doesn't seem to work under IE7?
This isn't a problem as such, just something I'm curious about. Under IE7 I've found that when I use xpath, the length() method doesn't seem to work, but size() does. E.g. $( '//[EMAIL PROTECTED] indexL2]//a').length(); doesn't seem to work, but $ ( '//[EMAIL PROTECTED] indexL2]//a').size(); does. I was just wondering why that is? Is it something to do with the fact that the xpath has to be converted to regular DOM getters for IE in the jquery code?
[jQuery] Issues with Backwards Traversing the DOM
So I'm having an issue attempting to traverse back in a li element to grab the text inside a header tag and insert that text as the title attribute's value in a link. The markup will more more sense: div id=mainCol ul li h1Header 1/h1 pSome nice text here./p pa href=url title=Click Here!/a/p /li li h1Header 2/h1 pSome nice text here./p pa href=url/a/p /li /ul /div !-- End of Main Column -- $(document).ready(function(){ // Add title to each link in the main content column's unordered list for each list element by using the h1 tag's text. $('#mainCol ul li a').each(function(){ // Grab the header text of this link's header parent $(this).parents().size()); }); }); // End of ready function. Clearly this script won't execute what I need, but the size is 0 and I can't seem to traverse up the DOM to grab the h1 tag's text with combinations using parent, parents, siblings, etc.. Any suggestions?
[jQuery] Re: Sortables and radio buttons issue
Actually, I figured out the issue. I needed to put the radio buttons inside of a form tag and that fixed it. Thanks for the help!
[jQuery] Re: $().load( ) issue: url has no properties
Alexandre, this happened to me a couple of days ago. Turns out I was trying to send an object to the load method, but you have to send separate arguments. In other words, you can't do this: $().load({ url: myurl, data: { stuff: junk }, function() { alert(' hey! '); } }); You have to do this: $().load(myurl, {data: here}, function () { //whatnot } ); Only the baseline ajax and ajaxSetup functions take an object as an argument. -- Josh - Original Message - From: Alexandre Plennevaux [EMAIL PROTECTED] To: Jquery-en jquery-en@googlegroups.com Sent: Thursday, March 06, 2008 6:28 AM Subject: [jQuery] $().load( ) issue: url has no properties Anyone knows what this error message means ? url has no properties pointing to jquery.js line 2401, which is the $().load() ajax call definition. (and specifically: that line: var off = url.indexOf( ); ) i don't understand the error because i'm providing an URL and it works correctly out of the ajax call. In fact that function was working before i made some severe changes elsewhere in the code. Any hint / directions where to look for errors ? Thank you, -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: [POLL] Online jQuery Training from John Resig
Hi Rick, At the moment all we're trying to determine is if there's an interest. If there is, then we'll flesh out the logistics later. Rey... Rick Faircloth wrote: Hey, Rey... Will the events be recorded for later viewing? I would love the chance to view them, but usually don't have time to participate live, and if I do, I so easily forget to participate. I think it would be especially important to be able to access the files and code from an archive later, too. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Thursday, March 06, 2008 9:58 AM To: jquery-en@googlegroups.com Subject: [jQuery] [POLL] Online jQuery Training from John Resig For those that missed this email the first time: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team
[jQuery] Re: skipping over some th while using tableSorter plugin
I was able to skip headers by doing headers: { 1: { sorter: false }, but seems like that sorting isnt working on 4bb (from the image in above post). Is there somthing special that needs to be done if a column has 2 columns in it? Thanks! On Mar 6, 11:04 am, Bhaarat Sharma [EMAIL PROTECTED] wrote: Hello I have a table like this http://i32.tinypic.com/287oolg.jpg from the pic...3, 4 and 5 are all th but all have columns underneath them, and the underneath columns are the ones that need sorting. If i use tableSorter plugin then it is adding sorting capability to all th tags. Is there any way to 'skip' certain th tags?? This is the code that i am using for table sorter. $(#myTable).tablesorter({ cssAsc: 'headerSortUp1', cssDesc: 'headerSortDown1', cssHeader: 'header', widgets: ['zebra'], sortList: [[0,0]], headers: { 1: { sorter:'nums' }, 3: { sorter:'nums' }, 5: { sorter:'nums' }, 6: { sorter:'nums' }, 8: { sorter:'nums' }, 10: { sorter:'nums' }, 12: { sorter:'nums' } } and code for my table is as follows table captionTable title/caption thead tr th rowspan=31/th th rowspan=32/th th colspan=23/th th colspan=74/th th colspan=45 members/th /tr tr th rowspan=23a/th th rowspan=23b/th th rowspan=24a/th th colspan=24b/th th colspan=44c/th th rowspan=25a/th th rowspan=25b/th th rowspan=25c/th th rowspan=25d/th /tr tr th4ba/th th4bb/th th4ca/th th4cb/th th4cc/th th4cd/th /tr /thead tbody tr td/td !--total of 15 td's-- /tr /tbody /table I'd appreciate any help!
[jQuery] treeview - weird refresh onload
hey guys. i am trying to use tree view on a test/stage site http://63.144.103.199/industrial/enclosures/wallmount/index.cfm i am using coldfusion with cfif statements to open close tree branches. my problem so far is that i get a weird refresh thing going on where it expands entire tree with no style. with bkg repeat. then once loaded it looks fine. it is sporadic, and i don't know what to look into... the nav is being called by a cfinclude. not sure if there is a better way to do this. i wanted to do a accordion nav, but i am going to have like 5 levels deep, once i flush this out... btw we are heiring another web guy, if your in ohio..
[jQuery] Re: IE8
turns out that error is symptomatic of a remote get... i thought was doing a local one as well, but i was at http://ipaddress/ instead of http://hostname/ --adam On Mar 6, 11:17 am, timothytoe [EMAIL PROTECTED] wrote: I'm doing a $.get() in IE8 without trouble, but I've only tried locally (local Apache, PHP on Windows XP). On Mar 6, 7:35 am, ajpiano [EMAIL PROTECTED] wrote: anyone else getting errors at line 2666 of jQuery during ajax requests in IE8? xml.open(s.type, s.url, s.async, s.username, s.password); the debugger says, Breaking on JScript runtime error - Permission denied --adam On Mar 6, 9:40 am, timothytoe [EMAIL PROTECTED] wrote: Hehe. I _really_ hope the JScript gets faster in upcoming releases. It seems as if their DOM stuff got faster but I haven't checked. On Mar 6, 12:47 am, Michael Stuhr [EMAIL PROTECTED] wrote: timothytoe schrieb: One thing I noticed is that the JavaScript is still painfully slow, but perhaps there is a lot of debug stuff in there slowing it down. What takes 7 seconds in Safari and 8 in Firefox 3b3 takes 25 seconds in IE8! (28 seconds in IE6). That's ~11% better in ~8 years Not too bad. :-) micha
[jQuery] bind/click/blur/focus method?
Hey all. I have an input element used for search.. eg input id=foo name=foo value= type=text When the dom is loaded, I'm changing the value of this input to 'Search keyword..' and I've added an event handler for the 'focus' event, so that the value of the input changes to blank if you focus on it. I've tried adding a second function hoping to change the value back to 'Search keyword..' if you click anywhere else (so the focus is no longer on the input). The code below however isn't doing that for me. $(document).ready(function() { $('input#foo').value('search keyword...'); $('input#foo').focus(function() { $(this).val(''); }, function() { $(this).val('Search keyword..'); }); }); Should I be using a different method? Bind perhaps? I've tried click and get the same results as focus.
[jQuery] Embed youTube video using jMedia plugin
Sorry if I posted this earlier, but ,y ocmputer crashed on post, and I could not find the posted message. I am trying to use the jMedia plugin to embed a youtube video on my page, but when I try, it doesn't do the replace (although if I use a normal swf, it works fine). Has anyone done this before that can help? HTML - div id=flash_testyou need to get flash or enable javascript/div JAVASCRIPT $(document).ready(function(){ $(#flash_test).jmedia( {version:8,0}, {src:http://www.youtube.com/v/hbr6wMiL83Y;, width:352, height:288 }); });
[jQuery] Group selectors and apply one filter.
Hi all, I'm new to JQuery and want to do the following: Given the following html: div id=parent div/div div/div div/div div/div span/span a/a /div I want to select the last 'div' or 'span' child of div using the ':last' filter. Is this possible? Something like: $( '#parent ).children( '( div, span ):last' ) $( '#parent ).children( 'div:last, span:last' ) doesn't work and returns the last div. Thanks!
[jQuery] Re: [POLL] Online jQuery Training from John Resig
+1 for I'd attend (and I answered the poll in the same way). I would like to know that for my fee, I could be given access to a recording of the session for my later review and study. I realize you guys aren't to that point yet, but if I pay, and perhaps I'm not able to attend (which could be likely unless it was held on a weekend) or even if I do attend, but then want to study what was discussed later, I'd like to be able to review the entire class. IMO this is a great idea. Chris Rey Bango wrote: Scott, The question was left vague on purpose to be able to determine if there's a demand for it or not. So basically, if you were able to receive some form of advanced training from John for a fee at some point in the future, would you pay to attend? Rey.. Scott Trudeau wrote: I'm declining to answer the poll since I couldn't decide unless I had some sense of the training agenda, cost and even date/time. In the mean time I'll subscribe to John's blog, buy every book he writes and tell everyone else to do the same. :) Scott On Wed, Mar 5, 2008 at 11:55 PM, Rey Bango [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team -- -- Scott Trudeau scott.trudeau AT gmail DOT com http://sstrudeau.com/ AIM: sodthestreets -- -- http://cjordan.us
[jQuery] Re: $().load( ) issue: url has no properties
hi thanks! but i found the bug to be actually elsewhere in my rubbish code :) On Thu, Mar 6, 2008 at 6:30 PM, Josh Nathanson [EMAIL PROTECTED] wrote: Alexandre, this happened to me a couple of days ago. Turns out I was trying to send an object to the load method, but you have to send separate arguments. In other words, you can't do this: $().load({ url: myurl, data: { stuff: junk }, function() { alert(' hey! '); } }); You have to do this: $().load(myurl, {data: here}, function () { //whatnot } ); Only the baseline ajax and ajaxSetup functions take an object as an argument. -- Josh - Original Message - From: Alexandre Plennevaux [EMAIL PROTECTED] To: Jquery-en jquery-en@googlegroups.com Sent: Thursday, March 06, 2008 6:28 AM Subject: [jQuery] $().load( ) issue: url has no properties Anyone knows what this error message means ? url has no properties pointing to jquery.js line 2401, which is the $().load() ajax call definition. (and specifically: that line: var off = url.indexOf( ); ) i don't understand the error because i'm providing an URL and it works correctly out of the ajax call. In fact that function was working before i made some severe changes elsewhere in the code. Any hint / directions where to look for errors ? Thank you, -- Alexandre Plennevaux LAb[au] http://www.lab-au.com -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: [POLL] Online jQuery Training from John Resig
Count me in as interested On Wed, Mar 5, 2008 at 10:55 PM, Rey Bango [EMAIL PROTECTED] wrote: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com
[jQuery] Re: [POLL] Online jQuery Training from John Resig
I know my blog isn't of much note, but consider this subject blogged! http://cjordan.us/index.cfm/2008/3/6/John-Resig-to-Give-Online-jQueryJavaScript-Training Chris Rey Bango wrote: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team -- -- http://cjordan.us
[jQuery] Re: Xpath and length() doesn't seem to work under IE7?
Isn't length a property, not a function (use $(...).length, not $ (...).length() ) On Mar 6, 10:12 am, Yansky [EMAIL PROTECTED] wrote: This isn't a problem as such, just something I'm curious about. Under IE7 I've found that when I use xpath, the length() method doesn't seem to work, but size() does. E.g. $( '//[EMAIL PROTECTED] indexL2]//a').length(); doesn't seem to work, but $ ( '//[EMAIL PROTECTED] indexL2]//a').size(); does. I was just wondering why that is? Is it something to do with the fact that the xpath has to be converted to regular DOM getters for IE in the jquery code?
[jQuery] Re: [POLL] Online jQuery Training from John Resig
I'd be interested as well. Probably myself and several of my coworkers. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris Jordan Sent: Thursday, March 06, 2008 11:47 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: [POLL] Online jQuery Training from John Resig I know my blog isn't of much note, but consider this subject blogged! http://cjordan.us/index.cfm/2008/3/6/John-Resig-to-Give-Online-jQueryJavaScr ipt-Training Chris Rey Bango wrote: The jQuery team is looking to gauge interest in jQuery training delivered in a live, online format by jQuery project lead John Resig. Nobody knows jQuery better than John and in terms of JavaScript, he's considered one of the best in the world. So a training class delivered by him would surely help anyone become more proficient in JavaScript and jQuery. So, if you could take a couple of minutes to participate in the following poll, that would be a big help in determining how to proceed: http://www.polldaddy.com/poll.aspx?p=388570 Thanks, The jQuery Team -- -- http://cjordan.us
[jQuery] Re: Group selectors and apply one filter.
$('#parent').find('span,div').filter(':last'); or $('#parent').find('span,div').slice(-1); Ariel Flesler On 6 mar, 14:37, apramanik [EMAIL PROTECTED] wrote: Hi all, I'm new to JQuery and want to do the following: Given the following html: div id=parent div/div div/div div/div div/div span/span a/a /div I want to select the last 'div' or 'span' child of div using the ':last' filter. Is this possible? Something like: $( '#parent ).children( '( div, span ):last' ) $( '#parent ).children( 'div:last, span:last' ) doesn't work and returns the last div. Thanks!
[jQuery] global functions
Hi, Love jQuery! I have two functions nested within $(document).ready() statements. One is an inline script, one is in a library. How do I make one function global to the other? Thanks, John
[jQuery] Bassistence Validation Help
How can I manipute focusInvalid events?
[jQuery] re[jQuery] move nbsp?
I have some HTML being generated by a JSP tag (no control of tag) - it generates two consecutive non-breaking-spaces inside of a TD, and before a DIV. This is causing a layout issue, I'd like to traverse and delete the NBSPs - I can't seem to figure this out so far since they are text element...any ideas? Thanks! -- View this message in context: http://www.nabble.com/remove--nbsp--tp15863555s27240p15863555.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] .serialize() not working on DOM form
Hi- I am using google maps, and I have a form I am creating on the fly as follows: var inputForm = document.createElement('form'); inputForm.setAttribute('id','new_property'); inputForm.setAttribute('action',''); inputForm.onsubmit = function() {storeNewProperty(); return false;}; inputForm.innerHTML = 'label for=new_nameName/label' + 'input type=text id=new_name style=width:100%;font- size:10pt; /' + 'input type=submit value=Save /' map.openInfoWindow(latlng,inputForm); However, once the form has been created, I am attempting to get the data from it prior to performing an Ajax call. What I find very problematic is that while the lines below work: var currName = jQuery('#new_name).attr('value'); var formID = jQuery('#new_property').attr('id'); indicating that the form and its inputs can be found, the lines below do NOT work: var formString = jQuery(#new_property).serialize(); var formString = jQuery(#new_property:input).serialize(); Am I just using the wrong syntax? Or is this a known problem? I'm not really wanted to serialize all my forms by hand, and no, I don't want to use the form plugin at the moment. I really just want to know why I can't get serialize() to work
[jQuery] Re: [POLL] Online jQuery Training from John Resig
i would defiantly be interested. btw, just joined the list. posted twice from google site but it hasn't come through? is it faster through email, or is it moderated. thanks -paul
[jQuery] Re: bind/click/blur/focus method?
D'oh! Found the answer @ http://groups.google.com/group/jquery-en/browse_thread/thread/491b63a04680ba50/c564d60307f13e1e?lnk=gstq=unfocus#c564d60307f13e1e The solution was to not provide 2 functions, but rather setup a blur method on the element if anyone else runs into this. On Mar 6, 12:01 pm, mederOmuraliev [EMAIL PROTECTED] wrote: Hey all. I have an input element used for search.. eg input id=foo name=foo value= type=text When the dom is loaded, I'm changing the value of this input to 'Search keyword..' and I've added an event handler for the 'focus' event, so that the value of the input changes to blank if you focus on it. I've tried adding a second function hoping to change the value back to 'Search keyword..' if you click anywhere else (so the focus is no longer on the input). The code below however isn't doing that for me. $(document).ready(function() { $('input#foo').value('search keyword...'); $('input#foo').focus(function() { $(this).val(''); }, function() { $(this).val('Search keyword..'); }); }); Should I be using a different method? Bind perhaps? I've tried click and get the same results as focus.
[jQuery] Re: Group selectors and apply one filter.
So my thinking was that, to use a different example, $( '#parent' ).children( 'span:last' ) would be faster then $( '#parent' ).children( 'span' ).filter( ':last' ) The latter would traverse the children and create an array of span elements, then apply the filter. The former would just iterate over the children and find the last 'span' element. Anyways, I'll just browse through the source to figure out what it's actually doing. Thanks for your help! On Mar 6, 10:34 am, Ariel Flesler [EMAIL PROTECTED] wrote: $('#parent').find('span,div').filter(':last'); or $('#parent').find('span,div').slice(-1); Ariel Flesler On 6 mar, 14:37, apramanik [EMAIL PROTECTED] wrote: Hi all, I'm new to JQuery and want to do the following: Given the following html: div id=parent div/div div/div div/div div/div span/span a/a /div I want to select the last 'div' or 'span' child of div using the ':last' filter. Is this possible? Something like: $( '#parent ).children( '( div, span ):last' ) $( '#parent ).children( 'div:last, span:last' ) doesn't work and returns the last div. Thanks!
[jQuery] Re: Xpath and length() doesn't seem to work under IE7?
Ah yes you're right. I got confused by the api page because it has () after length. http://remysharp.com/jquery-api/length On Mar 7, 4:59 am, Danny [EMAIL PROTECTED] wrote: Isn't length a property, not a function (use $(...).length, not $ (...).length() ) On Mar 6, 10:12 am, Yansky [EMAIL PROTECTED] wrote: This isn't a problem as such, just something I'm curious about. Under IE7 I've found that when I use xpath, the length() method doesn't seem to work, but size() does. E.g. $( '//[EMAIL PROTECTED] indexL2]//a').length(); doesn't seem to work, but $ ( '//[EMAIL PROTECTED] indexL2]//a').size(); does. I was just wondering why that is? Is it something to do with the fact that the xpath has to be converted to regular DOM getters for IE in the jquery code?
[jQuery] Re: [POLL] Online jQuery Training from John Resig
Hmm, interesting indeed. I said I'm interested but whether or not I would do it depends on most of the things mentioned above: cost time ability to get recordings The last one is especially important to me, as I have an infant and as anyone with kids can attest, trying to get something done at this stage in the game is a crap shoot.
[jQuery] Re: Vertically aligning a div
You sir are a star! I've trimmed the code so it applies only vertically and it's working well except when the viewport is taken lower than 550px in height. Again, trying to get my head around syntax here. I'm sure it's simply a case of stopping the behaviour if $(window) is equal to or less than the object, but not sure how to achieve that. On Mar 6, 2:55 am, Hamish Campbell [EMAIL PROTECTED] wrote: My solution from: http://groups.google.com/group/jquery-ui/browse_thread/thread/35a33d1... and in action atwww.deft.co.nz $(document).ready(function() { jQuery.fn.centerScreen = function(loaded) { var obj = this; if(!loaded) { obj.css('top', $(window).height()/2- this.height()/2); obj.css('left', $(window).width()/2- this.width()/2); $(window).resize(function() { obj.centerScreen(!loaded); }); } else { obj.stop(); obj.animate({ top: $(window).height()/2- this.height()/2, left: $ (window).width()/2-this.width()/2}, 200, 'linear'); } } }); Now you can apply centreScreen to divs that have layout [eg $ ('#page').centreScreen()]. On document.ready it will centre the element, then on window.resize it will move (linear animation) the div to the new centre. Seems to work nicely in IE7 and FF2. There are a few potential bigs - it should really check for layout, and apply it if it is missing for example - but it works well enough. When implenting, you'd do the usual MS hacks, then let this take over. Other possible extensions: maybe an option to centre to parent element as well as window, un-centre, offsets etc. On Mar 6, 11:31 am, TheOriginalH [EMAIL PROTECTED] wrote: Hi, very new to jQuery, but suspect it can probably help me out. I have a div of a fixed height (auto scroll where content exceeds that height), that I would like to center vertically on the page. I'm assuming I can use jQuery to work out the height of the browser window, subtract the height of the div and then apply margin-top and margin-bottom at 50% of that result to achieve what I'm after - but am very lost as to the syntax involved. Any help gratefully received! TIA
[jQuery] Problem width tabs + splitter
Hi! I've try to mix tabs + splitter but didn't works in IE6/7 In FF works great! but I don't know what to do to solved in IE6 The microsoft script debbuger, report that de line 597 has an error on the jquery-1.1.3.1.js file. I copy this part of code... in jquery-1.1.3.1.js file in attr method if ( value != undefined ) { /* only for see the values for (i=0;i2;i++){ console.log(i); console.log(name); console.log(value); }; */ elem[name] = value; in this line m s d breaks } I created a link width the demo page...is someone want to see..is in http://elcirculorojo.890m.com/index.html Cheers!...
[jQuery] jQuery test suite and jsUnit compatibility
Hi all, On the Fluid Project, we have been using Edward Hieatt's jsUnit (http://www.jsunit.net/ ) for unit testing all of our code. A number of problems--including the inability to use Firebug to debug failing tests--caused us to look elsewhere for a less intrusive JavaScript testing framework. The jQuery testing suite is great! I've ported all of my tests over to it, and have been really happy with the results. Along with this, I've made some simple extensions to the jQuery testing suite (which I've started calling jqUnit for convenience) that I wanted to share with the wider community and get your feedback. First of all, I've attached a patch to testrunner.js, which moves all its functions into a closure for privacy and exposes the public test API within a namespace called jqUnit. This will help avoid conflicts in the global namespace. Since I pass $ in as an argument, it also ensures that we don't have any problems in noConflicts mode. This patch isn't an example of beautiful refactoring, but I wanted to favour clarity--if people find this interesting, I can clean up the code and indenting. Secondly, I've written a number of adaptor functions to provide compatibility for my old jsUnit tests. These provide xUnit-style asserts, and are just wrappers around the underlying jQuery assert functions such as ok(). Perhaps these are useful for others who are porting from jsUnit? Lastly, I've added support for setUp() and tearDown() functions which get run before and after each test. I've created a simple object called TestCase. Its constructor takes three arguments: the module's name, your setUp function, and your tearDown function. Is this useful to anyone? Colin testrunner.js.patch Description: Binary data var jqUnit = jqUnit || {}; (function ($) { var jsUnitCompat = { assertEquals: function (msg, expected, actual) { jqUnit.equals (actual, expected, msg); }, assertTrue: function (msg, expected) { jqUnit.ok (expected, msg); }, assertFalse: function (msg, expected) { jqUnit.ok (!expected, msg); }, assertUndefined: function (msg, expected) { jqUnit.equals ((typeof expected), 'undefined', msg); }, assertNotUndefined: function (msg, expected) { jqUnit.ok (!(typeof expected === 'undefined'), msg); }, assertNull: function (msg, expected) { jqUnit.equals (expected, null, msg); }, assertNotNull: function (msg, expected) { jqUnit.ok (!(expected === null), msg); } }; // Mix these compatibility functions into the jqUnit namespace. $.extend(jqUnit, jsUnitCompat); // TestCase object function TestCase (moduleName, setUpFn, tearDownFn) { this.moduleName = moduleName; this.setUp = setUpFn || null; this.tearDown = tearDownFn || null; jqUnit.module(this.moduleName); }; TestCase.prototype.test = function (string, testFn) { if (this.setUp) { this.setUp (); } jqUnit.test (string, testFn); if (this.tearDown) { this.tearDown (); } }; // Mix the TestCase type into the jqUnit namespace. $.extend(jqUnit, {TestCase: TestCase}); }) (jQuery); Title: Test Title Goes Here Test Title Goes Here --- Colin Clark Technical Lead, Fluid Project http://fluidproject.org
[jQuery] Make List Element Clickable
I would like to make the element list element clickable on the hovering of the list element. I can't seem to traverse the DOM and grab the a tag's href value for the CURRENT list element that is being hovered over. $(#mainCol ul li).hover(function() { $(this).addClass(highlight).css(cursor,pointer).click(function() { //location.href= will be used when this works! var x = $(this).attr('href'); alert(x); }); },function(){ //On mouse out remove the class we have added on the mouse over $(this).removeClass(highlight); }); div id='mainCol' ul li h1Header/h1 pSome Text/p pa href='http://www.somelink.com'Click Here/a/p /li ...more list elements with same format as above /ul /div
[jQuery] Re: .serialize() not working on DOM form
indicating that the form and its inputs can be found, the lines below do NOT work: var formString = jQuery(#new_property).serialize(); var formString = jQuery(#new_property:input).serialize(); Those lines look like they should work. How exactly does it fail? Does it return an empty string? Did you try stepping through the serialize fn in the debugger to see why it failed?
[jQuery] Re: Problem width tabs + splitter
The demo is broken, I get an error page due... which version of Tabs do you use? --Klaus On Mar 6, 8:37 pm, cesar c [EMAIL PROTECTED] wrote: Hi! I've try to mix tabs + splitter but didn't works in IE6/7 In FF works great! but I don't know what to do to solved in IE6 The microsoft script debbuger, report that de line 597 has an error on the jquery-1.1.3.1.js file. I copy this part of code... in jquery-1.1.3.1.js file in attr method if ( value != undefined ) { /* only for see the values for (i=0;i2;i++){ console.log(i); console.log(name); console.log(value); }; */ elem[name] = value; in this line m s d breaks } I created a link width the demo page...is someone want to see..is inhttp://elcirculorojo.890m.com/index.html Cheers!...
[jQuery] Re: global functions
var blah; $(document).ready( function() { blah = function() { // do something... }; }); // ... somewhere after blah(); Karl Rudd On Fri, Mar 7, 2008 at 5:15 AM, John Herr [EMAIL PROTECTED] wrote: Hi, Love jQuery! I have two functions nested within $(document).ready() statements. One is an inline script, one is in a library. How do I make one function global to the other? Thanks, John
[jQuery] Re: Jörn's autocomplete: submitting to a fu nction
Aaron Barker schrieb: I don't quite get submit to a function yet. Do you want to use a function that provides the data for the autocomplete list? Or call the function with the selected value as an argument? [...] Apologies if this isn't clear, or not really doable. I'm trying to get my head around it myself, so I'm sure I'm having difficulty explaining it well. Okay, so what about this approach? The first option needs modifications or some trickery. One trick you could try: Proxy $.ajax (http://docs.jquery.com/Types#Proxy_Pattern) and delegate all autocompleted requests to your function, call the success-option manually. Jörn
[jQuery] Re: [POLL] Online jQuery Training from John Resig
Now, that's funny! Leanan, I don't think you realized your own pun, but as a father of two grown kids, I still remember being amazed at how often infants soil their diapers! It's a crap shoot, indeed! :o) Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Leanan Sent: Thursday, March 06, 2008 1:35 PM To: jQuery (English) Subject: [jQuery] Re: [POLL] Online jQuery Training from John Resig Hmm, interesting indeed. I said I'm interested but whether or not I would do it depends on most of the things mentioned above: cost time ability to get recordings The last one is especially important to me, as I have an infant and as anyone with kids can attest, trying to get something done at this stage in the game is a crap shoot.
[jQuery] Re: how to get the size of the image file before user upload it.
[EMAIL PROTECTED] wrote on 3/5/2008 1:40 PM: Flash is the only known way to get any dimension related information from an image before it is uploaded. Or a Java-based uploader, like JUpload: http://jupload.biz/ JUpload can resize and convert the image to the desired format/size before the user uploads it; handy if your users are not tech-savvy enough to do it themselves. - Bil
[jQuery] Re: Make List Element Clickable
Joe, I would like to make the element list element clickable on the hovering of the list element. I can't seem to traverse the DOM and grab the a tag's href value for the CURRENT list element that is being hovered over. $(#mainCol ul li).hover(function() { $(this).addClass(highlight).css(cursor,pointer).click(function() { //location.href= will be used when this works! var x = $(this).attr('href'); The this object is going to refer to your li tag. You can get what you want be doing: var x = $(a, this).attr('href'); - or - var x = $(this).find(a).attr('href'); You also might want to use a selector of a to make sure you only grab anchor tags that are direct descendents of the li tag. Also, I'd recommend using Firefox and the Firebug extension. Dumping items to the console is a very good way to find out what object this is referring to. -Dan
[jQuery] jquery treeview - navigation refresh problem -
hey guys. dont mean to repost i posted on the site but it didnt come through in email.. not sure if this is due to massive amount of cfif's or some thing with jquery.. i am trying to use tree view on a test/stage site http://63.144.103.199/industrial/enclosures/wallmount/index.cfm its slow.. i am using cfif statements to open close tree branches by setting the class of the li. my problem so far is that i get a weird refresh thing going on where it expands entire tree with no style. with bkg repeat. then once loaded it looks fine. it is sporadic, and i don't know what to look into... the nav is being called by a cfinclude. not sure if there is a better way to do this. i wanted to do a accordion nav, but i am going to have like 5 levels deep, once i flush this out... any pointers would be great! -paul
[jQuery] Jquery rating plugin
Heres the situation. I have multiple objects to vote on, on one page. The objects are dynamically generated from the database, and they each have a unique id. When a user clicks one of the ratings i need to store the rating in the db via $.post. The thing is how do i figure out which rating has been clicked, and how do i know how many forms to even write out? This has bothered me long enough hopefully somebody can help?
[jQuery] clueTip not displaying ajax data
I am using clueTip to open an html page which renders dynamic data. The page loads fine, but it doesn't make any of the ajax calls. Even just javascript alerts won't work. It seems like it just isn't executing any code. Any ideas on this?
[jQuery] Tabs Slideviewer and IE 6,7
I love slideviewer and tabs. but in i.e. when the divs are hidden it doesn't recognize those divs as part of the dom tree to start the photogallery. Anyone have any idea of a work around ?
[jQuery] Re: [ANNOUNCE] Jonathan Snook Live on UStream.tv
Any word on whether this was recorded or not? Matt Penner -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Wednesday, March 05, 2008 6:59 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: [ANNOUNCE] Jonathan Snook Live on UStream.tv Jonathan said that he will try to record it. Rey Andy Matthews wrote: Rey... Will this presentation be recorded for future viewing? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Tuesday, March 04, 2008 12:45 PM To: jquery-en@googlegroups.com Subject: [jQuery] [ANNOUNCE] Jonathan Snook Live on UStream.tv Jonathan Snook will be conducting a live chat tomorrow (3/5/08) at 10:00am EST (15:00 GMT) via UStream. Here are the details: * Location: http://www.ustream.tv/channel/snookca * Date/Time: 3/5/08 at 10:00am EST (15:00 GMT) * Topic: QA relating to Jonathan's development work with Adobe AIR, and questions regarding JavaScript, frameworks (PHP or JavaScript), or about freelancing. If you're not familiar with Jonathan, he is one of the top client-side veterans around having published books, articles and contributed to many projects. He's also the lead for the Snitter project, a Twitter client developed in JavaScript using jQuery and Adobe AIR. This is definitely a good opportunity to pick the brain of one of the top professionals around.
[jQuery] Re: .serialize() not working on DOM form
On Mar 6, 1:36 pm, Mike Alsup [EMAIL PROTECTED] wrote: indicating that the form and its inputs can be found, the lines below do NOT work: var formString = jQuery(#new_property).serialize(); var formString = jQuery(#new_property:input).serialize(); Those lines look like they should work. How exactly does it fail? Does it return an empty string? Did you try stepping through the serialize fn in the debugger to see why it failed? It fails by returning an empty string. I stepped through the serialize fn in FireBug, but didn't see anything meaningful to me.
[jQuery] Re: global functions
I see, thanks. Register the function as a variable. I'm still getting my head wrapped around how liquid this all is. John Herr
[jQuery] Re: Xpath and length() doesn't seem to work under IE7?
@Yansky - you're right. I've got an update to the API browser which will include selectors as well as functions and properties and I'll make sure the parentheses are only added to functions. Cheers. On Mar 6, 7:30 pm, Yansky [EMAIL PROTECTED] wrote: Ah yes you're right. I got confused by the api page because it has () after length.http://remysharp.com/jquery-api/length On Mar 7, 4:59 am, Danny [EMAIL PROTECTED] wrote: Isn't length a property, not a function (use $(...).length, not $ (...).length() ) On Mar 6, 10:12 am, Yansky [EMAIL PROTECTED] wrote: This isn't a problem as such, just something I'm curious about. Under IE7 I've found that when I use xpath, the length() method doesn't seem to work, but size() does. E.g. $( '//[EMAIL PROTECTED] indexL2]//a').length(); doesn't seem to work, but $ ( '//[EMAIL PROTECTED] indexL2]//a').size(); does. I was just wondering why that is? Is it something to do with the fact that the xpath has to be converted to regular DOM getters for IE in the jquery code?
[jQuery] Targeting pseudo classes with jQuery
I have a menu which is working nicely. When an item is clicked, I'm using jQuery to change the CSS color to indicate it is current. To keep things neat, I have also changed the color of all similar items back to the default (otherwise ALL items would be highlighted as you went through the menu. Unfortunately this has the side effect of killing the natural css hover pseudo class :( I've messed with the .hover function, but the implementation I've used then kills the coloring on click (as when you mouse away from hover, it returns to the default). Anyone come across this and know how to fix it? TIA, H
[jQuery] Re: [ANNOUNCE] Jonathan Snook Live on UStream.tv
Hey Matt, Jonathan told me that he hit the wrong button and the recording was lost. Very bummed. :( Rey Penner, Matthew wrote: Any word on whether this was recorded or not? Matt Penner -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Wednesday, March 05, 2008 6:59 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: [ANNOUNCE] Jonathan Snook Live on UStream.tv Jonathan said that he will try to record it. Rey Andy Matthews wrote: Rey... Will this presentation be recorded for future viewing? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Tuesday, March 04, 2008 12:45 PM To: jquery-en@googlegroups.com Subject: [jQuery] [ANNOUNCE] Jonathan Snook Live on UStream.tv Jonathan Snook will be conducting a live chat tomorrow (3/5/08) at 10:00am EST (15:00 GMT) via UStream. Here are the details: * Location: http://www.ustream.tv/channel/snookca * Date/Time: 3/5/08 at 10:00am EST (15:00 GMT) * Topic: QA relating to Jonathan's development work with Adobe AIR, and questions regarding JavaScript, frameworks (PHP or JavaScript), or about freelancing. If you're not familiar with Jonathan, he is one of the top client-side veterans around having published books, articles and contributed to many projects. He's also the lead for the Snitter project, a Twitter client developed in JavaScript using jQuery and Adobe AIR. This is definitely a good opportunity to pick the brain of one of the top professionals around.