[jQuery] Re: Destroy Interval at DOM Object removal
Hi! I killed my plugin-idea and rewrote the whole thing and now I have it working. Thanks for your advice, ricardobeat! The result can be seen on http://www.coolstuff.se/Humunga_Tunga. Open an image och forward to #4. The code is in product.js. Best regards, Pom
[jQuery] Re: Destroy Interval at DOM Object removal
That's pretty cool. To make it a bit more difficult, why not add vertical movement aswell, and if you did the vertical movement in all angles, you could create a controllable 3D object. Pom wrote: Hi! I killed my plugin-idea and rewrote the whole thing and now I have it working. Thanks for your advice, ricardobeat! The result can be seen on http://www.coolstuff.se/Humunga_Tunga. Open an image och forward to #4. The code is in product.js. Best regards, Pom
[jQuery] Re: Superfish - sf-breadcrumb question
Hi John, I think you need to find out why you seem to be needing to manually add that class in order for the menu to work properly. This is not something I have encountered before, so maybe your menu is set up in a somewhat unconventional way? If you have a link to the page we may be able to help you figure something out. Joel Birch.
[jQuery] Re: Exchange a Superfish menu with an Accordion.
You are correct that Superfish does not have a disable function. You would have to manually remove the classes from the DOM, and also unbind the hover, blur and focus events on the anchors. Joel Birch.
[jQuery] Re: strange IE behavior with Superfish
Hi Kevin, The Superfish demo CSS sets the submenu width on the ul element and has the nested elements to 100% of that. Any horizontal padding should then be set on the anchor elements. Your menu sets the ul width, then specifically sets the nested li elements to the same width (150px). This would be fine (although not as flexible), except that you then add horizontal padding to those list items which adds to the overall width, making them wider than their parent ul. This will cause the effect you are seeing in IE. Better to use the recommended way of laying out the menus as it is thoroughly tested to avoid a minefield of such problems across a wide variety of browsers. Joel Birch.
[jQuery] Re: jeditable and XHTML?
I can't see anything wrong with the JS, can you perhaps provide a more complete picture? .: Are you calling the JS when the DOM is ready? .: Are you posting the changes to a URL that is prepared to handle it? .: Are you using the latest versions of the scripts? Regards M On Nov 13, 11:23 pm, Rodent of Unusual Size [EMAIL PROTECTED] wrote: Is there a known problem with jQuery/jeditable and XHTML? I keep running into this 'invalid string' message with JS and XHTML. First Dojo, now here.. it's getting discouraging. What am I doing wrong? Anyway, is there anything obviously wrong with the fragment athttp://apache.pastebin.ca/1254469? When I click in an appropriately-classed element, the current text disappears, but then the error crops up. I want to use jeditable to edit fields in a table, but right now I'm trying to get it to work on any old XHTML.. And yes, I know IE doesn't do XHTML well/at all. And no, I don't care. :-/ Thanks! -- #ken P-)} Ken Coar, Sanagendamgagwedweinini http://Ken.Coar.Org/ Author, developer, opinionist http://Apache-Server.Com/ Millennium hand and shrimp!
[jQuery] Re: pure CSS hover problem
Simply add a width on the submenu ul elements so that they all span the full width of the menu. Those uls should also have a solid background. Joel Birch.
[jQuery] Re: Superfish + IE7 dean edwards project
Sorry, but I won't be working on this. It seems more like a fault of the IE7 script really, considering that its purpose is to make IE6 behave like IE7, and Superfish works fine in IE7. Joel Birch.
[jQuery] Re: superfish z-index problem
If you provide a set of files that I can instantly run locally without having to alter urls, etc., I'll be able to edit them and try to debug your problem. Joel Birch.
[jQuery] Problem ClueTip Plug-In and local parameter
Hello, I'm using the ClueTip Plug-In to display a Form, when the mouse is over a Link. This works fine, but there is a big problem: In local Mode ClueTip seams to make a copy of my Form and displays it. :-( Why ClueTip works this way? I use a simple JavaScript Function to send all my form using a Ajax Request. But this is not working, because my Form exists two times... Hope somebody can help me. Greetings, Stefan Sturm
[jQuery] Re: Superfish - sf-breadcrumb question
Got it working; ended up adding class=sfHover sf-breadcrumb to all the main nav items. May not be the correct way to do it, but for this round it'll do. Seems that the nav rendering is completed before the jquery addClass can be added. Page is on a clients secured server so I can't give out the url.
[jQuery] Re: event binding at bottom of page instead of ready() pitfalls?
I have no link but used that approach for plazes.com. The only pitfall I came across is that some plugin's (in my case the datepicker) internally use the ready event, which can cause some troubles. Apart from that, perceived page loading/rendering was much much faster, especially since I put Google Maps loading at the very end. --Klaus On 14 Nov., 01:28, decostop [EMAIL PROTECTED] wrote: Anyone have a link to some good info on or an experience based opinion on what risks I might face if I were to do my event binding at the bottom of my html instead of in the DOM ready? Not pretty but the objective would be to get the events working when the page is loaded, but right before some slow 3rd party JS which delays the DOM from being considered ready.
[jQuery] Re: jQuery / XML / IE
Much appreciated On Nov 13, 5:09 pm, ken [EMAIL PROTECTED] wrote: http://dev.jquery.com/ticket/3143 http://docs.jquery.com/Specifying_the_Data_Type_for_AJAX_Requests(the code block) On Thu, Nov 13, 2008 at 10:37 AM, Jemo [EMAIL PROTECTED] wrote: OK, this works marvelously in Safari and Firefox for the Mac as well as Firefox for the PC but it doesn't work worth spit in IE. I would appreciate any assistance. It's just reading form a simple XML file to output information in divs. http://rationalogic.com/xml/
[jQuery] Re: Adjusting the position and offset of the text
OK that makes sense. Thank you! Still waiting for an answer on the font placement issue. I've read through the source, and checked the css and i just can't figure this out. On Nov 13, 6:12 am, Karl Swedberg [EMAIL PROTECTED] wrote: Not sure about the first question, but you should be able to apply the tooltip to multiple elements by giving all of them the same class name and then attaching the tooltip() method to that class. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Nov 13, 2008, at 2:16 AM, fastnoc wrote: Can anyone help here? On Nov 12, 7:39 am, fastnoc [EMAIL PROTECTED] wrote: I didn't notice this right away. I thought it would be in the css but that's not the case. I've created my own images for the background and I need to adjust where the text starts and an offset for the right side (padding) as well. next, In order to use this multiple times on one page you must create new instances each time. I'm using this all over my site, so the first line is getting long. Is there a better, more efficient way to do this? $(#fancy, #fancy2, #fancy3, #green, #registration, #list, #tablecycle).tooltip({ http://groups.google.com/group/jquery-en/browse_thread/thread/f39ccd1...
[jQuery] How to pass arguments from link to ajax function
Hai Friedns, i have following three links on my page , a href=javascript:submit_data(2008-10-05,2008-11-04) 2008-10-05 - 2008-11-04/a a href=javascript:submit_data(2008-09-05,2008-10-04) 2008-09-05 - 2008-10-04/a a href=javascript:submit_data(2008-08-05,2008-09-04) 2008-08-05 - 2008-09-04/a Whenever i click these links it should be posted with corresponding values (start_date end_date) to the ajax function using jquery. My questions is, how can i send the values as the arguments from the links to the jquery ajax function? Thanks Regards, Balavignesh.
[jQuery] jQuery Tooltip plugin speech bubbles over image map
I am attempting to adapt the tooltip plugin to work with an image map, but I can only get 'standard' pop ups to function over map objects. Has anyone been able to make the tooltip plugin work with an image map and speech bubbles (fancy decorated popups)? Ideally I would like to get this working, and possibly with a :hover for the map areas for highlighting.
[jQuery] Cluetip and xml
Hello all, I start with ajax (jquery) and xml. I need to use cluetip in a table like this example: http://beckelman.net/Demos/jQueryTruncateAndClueTip/default.aspx As against that I do must be in Cluetip information from several different fields. Would you like a piece of code explaining the procedure to do with php? Do you have examples to this need ? Thank you in advance Benoit
[jQuery] Jquery uploader script problem
Hi to all, i've a little problem with this script, i can't make it works in ie. The problem is that it always opens a new windows when i submit the upload form, even if i use the target property to a just created iframe. In FF, it will target the iframe as expected. Can you help me? Here's the code: function createIFrame() { $(iframe/iframe) .attr(id, uploadFrame) .attr(name, uploadFrame) //.attr(src, javascript:false) not working .css(position, absolute) .css(visibility, hidden) .appendTo(body); } function iFrameCallBack(e) { if ( e ) { $(#uploadFrame).load(e); } } function removeIFrame() { $(#uploadFrame).remove(); } function insertNewUpload() { uploadCounter += 1; // Creating the form for the new file upload $(form/form) .appendTo(#allegati) .attr(action, upload) .attr(method, POST) .attr(id, uploadform + uploadCounter) .attr(enctype, multipart/form-data) .attr(target, uploadFrame); // Creating the input for the file $(input type='file'/input) .appendTo(#uploadform+uploadCounter) .attr(name, file + uploadCounter) .attr(size, 50) .change(function(e) { fileUpload($(this)) }); } function removeUpload($elm) { createIFrame(); $elm.parent().submit(); iFrameCallBack(confirmDelete($elm)); removeIFrame(); } function fileUpload($elm) { createIFrame(); $elm.parent().submit(); iFrameCallBack(confirmUpload($elm)); removeIFrame(); insertNewUpload(); return false; } function confirmDelete($elm) { $elm.parent().remove(); } function confirmUpload($elm) { $elm.parent().css(backgroundColor, #DFFFDF); // Creating the remove file button $(input type='button'/input) .appendTo($elm.parent()) .attr(value, rimuovi) .addClass(std_btn) .css(width, 6em) .css(font-size, 1em) .click(function(e) { removeUpload($(this)); }); var s = span +$elm.val()+/span; var h = input type=\hidden\ class=\delete\ name=\delete\ value=\+$elm.val()+\/; $(s).appendTo($elm.parent()); $(h).appendTo($elm.parent()); $elm.remove(); }
[jQuery] Re: How to pass arguments from link to ajax function
try putting the dates in single quotes, like this (assuming they are to be two separate values): a href="" class="moz-txt-link-rfc2396E" href="_javascript_:submit_data('2008-10-05','2008-11-04');">"_javascript_:submit_data('2008-10-05','2008-11-04');" 2008-10-05 - 2008-11-04/a balavignesh wrote: Hai Friedns, i have following three links on my page , a href="" class="moz-txt-link-rfc2396E" href="_javascript_:submit_data(2008-10-05,2008-11-04)">"_javascript_:submit_data(2008-10-05,2008-11-04)" 2008-10-05 - 2008-11-04/a a href="" class="moz-txt-link-rfc2396E" href="_javascript_:submit_data(2008-09-05,2008-10-04)">"_javascript_:submit_data(2008-09-05,2008-10-04)" 2008-09-05 - 2008-10-04/a a href="" class="moz-txt-link-rfc2396E" href="_javascript_:submit_data(2008-08-05,2008-09-04)">"_javascript_:submit_data(2008-08-05,2008-09-04)" 2008-08-05 - 2008-09-04/a Whenever i click these links it should be posted with corresponding values (start_date end_date) to the ajax function using jquery. My questions is, how can i send the values as the arguments from the links to the jquery ajax function? Thanks Regards, Balavignesh.
[jQuery] Issue with FF back button
Hi, We have a form at www.floresdodia.com/checkout.php which uses very simple ajax validation with jquery. We only validate if the field is empty or not. Problem is when someone fills all fields and proceeds to the next page and want to edit something by pressing the back button, Firefox does not allow to resubmit the page. Its something like submit button has been disabled. Would anyone please help me here. I am a jquery novice. Regards
[jQuery] jquery.ajax POST is getting a 400 error intermittently
Hi, I am using jQuery ajax, served up on AIX, IBM HTTP Server and Websphere Application server When making a jQuery.ajax type:'POST', sometimes the reponse is: HTTP/ 1.1 400. This is not happening consistently. I see the 400 status code in the web server logs. Has anybody else run into this issue before? Here is the jquery ajax call code $.ajax({ url: url, type: 'POST', data: { client: $('#txt1').val(), trigger: 'reload', product:product }, dataType: 'xml', async: false, timeout: 1, success: function(responseXML){ parseAjaxoutput(responseXML); } }); '#txt1' is an input type hidden element or a select box. Appreciate your help.
[jQuery] jquery.ajax POST is getting a 400 error intermittently
I am using jQuery ajax, served up on AIX, IBM HTTP Server and Websphere Application server When making a jQuery.ajax type:'POST', sometimes the reponse is: HTTP/ 1.1 400. This is not happening consistently. I see the 400 status code in the web server logs. Has anybody else run into this issue before? Here is the jquery ajax call code $.ajax({ url: url, type: 'POST', data: { client: $('#txt1').val(), trigger: 'reload', product:product }, dataType: 'xml', async: false, timeout: 1, success: function(responseXML){ parseAjaxoutput(responseXML); } }); '#txt1' is an input type hidden element or a select box. Appreciate your help.
[jQuery] menu on hover
Theres any plugin to implement a sitemap like http://www.elpais.com (the last link in the footer of the page Asociadoss) or like http://www.lanacion.com.ar/ (link at the bottom MAPA DEL SITIO near the rss icon) thx.
[jQuery] Re: Animating table rows
On Fri, Nov 14, 2008 at 1:20 AM, Shawn Grover [EMAIL PROTECTED]wrote: Another option is to wrap each of your TDs within the row with a DIV. Then you can do something like $(#myRow div.animateMe).slideUp(); Then the row has no vertical height because it's content is now invisible. Do you mean wrap the *contents* of each TD with a div? Because putting the TD inside a div would be invalid. - Richard
[jQuery] Re: this and z-index changes
jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($(this).css(z-index))); } }); } }); I added a line so I could watch the z-index movements of the draggable windows. I found that they are all on separate layers but for some reason instead of each of them above the one you bring to front dropping one, some will drop two while others don't move. I'm not sure why this is happening, it's almost as if some windows are run through the .each() multiple times while others don't move. Or when others go through it they affect the first one through it. Help would be highly appreciated! On Nov 13, 1:08 pm, CodingCyborg [EMAIL PROTECTED] wrote: I recently have been playing around with a Desktop module that was on nettuts and made a modification for it that doesn't fully work. There are many draggable windows, and in order for them to function like a real desktop they need to have z-index changes such that if you close one on top the last one you had on top is right below it. I believe my error comes in with this or possibly something else, but when you pull one to the front it causes some or all of the others to end up in the same z-index causing them to not stay in order of recently viewed. jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500;//the + 500 is to make sure they are above other objects on the page zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows);//brings to front $('.draggableWindow').each(function(){//supposed to drop others back one... newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); } }); } });
[jQuery] How to set a group of elements bold if it's related element has something in it
Hi, I'm really not even sure where to start with this one so am really hoping someone can help shed some light on it... I've got a a bunch of input fields called inputTime1, inputTime2, inputTime3, inputTime4 and I've got a 'parallel' bunch of hidden fields called inputNotes1, inputNotes2, inputNotes3, inputNotes4 I need to set the inputTime1.css to bold if inputNotes1 is NOT empty and the same for inputTime2 and inputNotes2, etc. Can this be done in a simple jQuery statement? Cheers and thanks in advance! N
[jQuery] Re: How to correctly set a dblclick(..) on a dynamically added table row ?
This is still dogging me - what's the correct way to add rows to a table? 1) clone last row 2) clone a row you removed (for purposes of future cloning) 3) create the row from scratch - Paul On Nov 8, 2008, at 4:11 PM, Paul Hammant wrote: Below is a demo of the problem i have. Reduced to the minimal HTML I think. I start with a row in a table, but on load, I remove it and store it. Then i dynamically insert some row based on a clone of the original. As I add each row i add a double-click to a popup form (via blockUI). The first time you double click a row it works. The second time everything freezes during the popup. There must be some rules around row removal and re-adding, or dynamically attaching a dblclick(..) event that I'm unaware of. What am I missing ? - Paul -- html titlejQuery bug demo?/title script type=text/javascript src=jquery-1.2.6.pack.js/script script type=text/javascript src=jquery.blockUI.min.js/script script $(document).ready(function() { // take row from table, for futire use. rowToClone = $('#mytable tr:last').remove(); insertRow(1, double-click this line first); insertRow(2, then double-click this line); $(#cancelRead).click(function() { document.readMyForm.reset(); $.unblockUI(); }); }); function doubleClick() { var readRow = $('#readRow'); $.blockUI(readRow, {width:'540px', height:'300px'}); } function insertRow(id, foo) { var newRow = rowToClone.clone(); newRow.attr(id, id); $('td[class*=class1]', newRow).html(foo); newRow.dblclick(doubleClick); // Is this an OK thing to do $('#mytable').append(newRow); } /script body table id=mytable cellpadding=0 cellspacing=0 tbody tr class=myRow id=1 td class=class1PLACEHOLDER/td /tr /tbody /table div id=readRow style=display:none;cursor:default; h2Hello!/h2 form id=readMyForm name=readMyForm input type=button id=cancelRead value=Close /form /div /body /html
[jQuery] IE6 crashes while loading xml through $.get function
I'm loading an xml file of 88kb through jQuery's GET function. But IE6 crashes. Is there a better way to load an xml file than the one I'm using? Code below: $(document).ready(function(){ $.get(personeel.xml,function(xml){ var naam = new Array(); $('record',xml).each(function(i) { naam[i] = [{ familienaam : $(this).children('familienaam').text(), voornaam : $(this).children('voornaam').text(), straat : $(this).children('straat').text(), post : $(this).children('post').text(), woonplaats : $(this).children('woonplaats').text(), telefoon : $(this).children('telefoon').text(), tweedetelefoon : $(this).children('tweedetelefoon').text(), email : $(this).children('email').text(), opdracht : $(this).children('opdracht').text(), foto : $(this).children('familienaam').text() + $ (this).children('voornaam').text() + .jpg }]; }); $(#zoek).autocomplete(naam,{ formatItem: function(item) { return item[0].voornaam + + item [0].familienaam + ( + item[0].opdracht + ); }, matchContains:true, max:100, scrollHeight:250 }).result(function(event, item) { $(#resultaat).html( //output results on page ); }); }); });
[jQuery] Re: a probable bug with keyboard events
Finally a ticket: http://ui.jquery.com/bugs/ticket/3587 Jörn On Mon, Oct 20, 2008 at 2:59 AM, alex bodnaru [EMAIL PROTECTED] wrote: backspace support added. alex On Mon, Oct 20, 2008 at 02:08, alex bodnaru [EMAIL PROTECTED] wrote: don't tell me i forgot to attach the file ;) On Sun, Oct 19, 2008 at 18:15, alex bodnaru [EMAIL PROTECTED] wrote: hello dan, everybody. i have posted yesterday on this list a few improvements to autocomplete for your review, which i'd be glad to see committed if ok. as it turned out, the work was more delicate, but with your expert guidance i got the hoped result. here is jquery.autocomplete.js, as patched to ignore noisy key presses and to additionally append fields values to the ajax query. last but not least, i have given the input widget focus after selection from the list, since this widget is made for people who wish to use the keyboard. additionally, maybe a configuration option will allow automatic move to the next field, to save even more fuss from the user. please take a look an freely use my work. best regards, alex On Sun, Oct 19, 2008 at 17:40, alex bodnaru [EMAIL PROTECTED] wrote: hi dan, thanks for your answer. i'm logging the keydown event on the input in the plugin autocomplete. the keydown is there to react to movement, return and delete, and in the default condition it may check for eventual changes in the input field. but, pressing of a hebrew character immediately after the keymap switching with alt-shift (which is itself captured by keydown as alt) is not getting in keydown at all, however it changed the field value. anyway, the keyCode of hebrew chars in keydown is always 0. i will try to move handling of non movement keypresses in keypress, and soon report. best regards, alex On Sun, Oct 19, 2008 at 15:47, Dan Switzer [EMAIL PROTECTED] wrote: Alex, What keyboard event are you logging? Some events are only captured by a keypress event and will be ignored by the keydown event. -Dan On Sun, Oct 19, 2008 at 5:12 AM, alex bodnaru [EMAIL PROTECTED] wrote: hello friends, i ran into a corner case with jquery autocomplete which i'd like to seek a solution for: my system is bilingual (en-he) gnome debian linux, with firefox 3.0.3. with focus on an autocomplete field, i'm switching the keymap to hebrew, using alt-shift. logging the event keyCode to the firebug console, i get one 18 value, followed sometimes by a 0 additional event. the next character i'm typing into the field is being shown, but does not trigger a keycode event, hence the autocompletion doesn't react. this doesn't happen when i switch the language to english, probably because ascii characters have non-zero keyCodes. but the following character i'm typing acts ok. no, this is not because minChars. i assume that the alt-shift is leaving the event manager in an ambiguous state, which invalidates an unicode char, but is being later cleaned by typing another char, or bksp/del. could you help? best regards, alex
[jQuery] Re: Cluetip and xml
Hi Benoit, So, you want to do the same thing you're already doing, but using an xml file instead of the title attribute for the content? If I'm understanding you correctly, you can set dataType to 'xml' in the ajaxSettings option and then filter the result of the ajax call and return what you want in the ajaxProcess option. Something like this: $('.noteTD').cluetip({ ajaxSettings: { dataType: 'xml' }, ajaxProcess: function(data) { // $(data).find ... // return something; } }); Hope that helps. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 14, 2008, at 3:11 AM, [EMAIL PROTECTED] wrote: Hello all, I start with ajax (jquery) and xml. I need to use cluetip in a table like this example: http://beckelman.net/Demos/jQueryTruncateAndClueTip/default.aspx As against that I do must be in Cluetip information from several different fields. Would you like a piece of code explaining the procedure to do with php? Do you have examples to this need ? Thank you in advance Benoit
[jQuery] Re: Jörn's autocomplete - advanced filtering and matching
Could you provide more detail about the expected behaviour? Jörn On Tue, Nov 11, 2008 at 8:35 PM, Simbarashe [EMAIL PROTECTED] wrote: I have been experimenting with the autocomplete, and so far am impressed with the performance. There is one thing, however, that I would like to do that I cannot figure out myself. My list items are supplied by a sql script that finds entries using both freetext and like matching. This means that, for instance in my situation, searching a list of plants will yield the following results as the person types: l -- a list of plants beginning with l li -- a list of plants beginning with li lil -- a list of plants that contain lil (query changes for terms longer than 2 characters) lily -- a list of plants that contain or match lily (including 'lilies' from the freetext search) Now if I backspace and pickup again: lil -- a list of plants that contain lil (query changes for terms longer than 2 characters) lili -- a list of plants that contain lil, which is actually NO RESULTS but if I continue to 'lilies' I will get results again. In the case that I get no results, I don't want to show the NO MATCHES result, because that does not help my end-user. I would rather keep my last list available. In other words, how do I filter the results client-side so that they ALWAYS have some option to choose from?
[jQuery] Re: jeditable and XHTML?
On Nov 14, 5:58 am, mbraybrook [EMAIL PROTECTED] wrote: I can't see anything wrong with the JS, can you perhaps provide a more complete picture? .: Are you calling the JS when the DOM is ready? Yes. .: Are you posting the changes to a URL that is prepared to handle it? It never gets to that point. .: Are you using the latest versions of the scripts? Yes. Complete example/test case at http://plugins.jquery.com/node/4830
[jQuery] Re: [Autocomplete] Reducing remote calls
Created a ticket for now: http://ui.jquery.com/bugs/ticket/3588 Jörn On Sun, Nov 9, 2008 at 9:36 PM, Mon Zafra [EMAIL PROTECTED] wrote: Hi list, I'm using the excellent autocomplete plugin from bassistance.de. The cache and subset matching features are very useful. I would like to take the subset matching a bit further. I want to prevent the script from querying the server if the query string does not match anything from a previous result set in which the current query is a potential subset of. I apologize for being unclear, I know I'm misusing the terms here. I hope I could explain it better with an example. A user types 'foo', which calls a server script that returns ['foo', 'foobar', 'foobarbaz']. The user then types 'b'. Because of subset matching, a query for 'foob' is not sent anymore, and the current set is still used. If the user then types 'u', which matches nothing in the result set, the script takes a trip to the server. That trip is useless since all words with 'foo' have already been obtained. A query for 'foobu' will not return anything. My goal is to prevent that trip to ease the server load a little. Another thing, I bound a blur handler for the autocompleted element which calls search() so that I could display a message if there are no matches found, as per a recommendation I found in this list's archive. My problem is that the search() method triggers another server query, which is useless since I already know that there are no matches. Is there a better way to display a 'no match' message which doesn't need to ask the server? Any guidance regarding these matters would be highly appreciated. Thanks, -- -- Mon
[jQuery] Puzzling problem with form buttons upon submission
I ran into a rather curious problem today with jQuery (link to the code at the bottom). The form: - I created a simple form with 1 hidden field and 4 buttons: - 2 input buttons of type=submit and type=button - 2 button/button buttons, also type=submit and type=button. - The 4 buttons have their class attribute set to class=submit - The form is submitted to an iframe within the page. Therefore upon submission, the page should not entirely reload, only the iframe gets updated. The jQuery script: - The script simply grabs all submit buttons and attach certain actions to their click event. To be more specific: submit the form, then remove it. Nothing more complicated than that. $().ready(function(){ $('.submit').click(function(){ $form = $(this).parent(); $form.submit().remove(); }); }); The desired results: - Normally, once the user press one of the submit buttons, it is expected that the form will be submitted (via iframe), a small confirmation message would appear in the iframe and finally the form would be removed from the dom. What actually happens: - Only 2 of the buttons work as expected: the 2 non submit ones, i.e. input type=button and button type=button - The 2 submit buttons on the other hand don't submit anything. The form simply gets removed. If anyone familiar enough with jQuery can indicate what is going on here, I would be grateful. I've been using the library for 3 days and although i think it's an awesome piece of code, there are obviously a few things that i fell to grasp. The code: http://pastebin.com/m32d651ff If you use php, you can copy and paste it as is in a file under your webserver and run it. There's only about 3 lines of php, to verify if the form was submitted and output a message. You can easily convert it to any other web language. Any help would be appreciated, but before answering please take the extra 45 seconds necessary to paste the code under your webserver and run it. This might save us all a great deal of time usually spent exchanging to clarify wrong assumptions.
[jQuery] Superfish arrows and drop shadow
Hi, I've recently put the superfish dropdown menu onto an application and everything works well. I've linked it to hover intent and I'm using the vertical display method. However, for some reason I am not getting the arrows or the drop shadow, is there something I'm missing? My ul is created dynamically and gives out the following: div id=tabs ul id=menu class=sf-menu sf-vertical lia class=sf-with-ul href=#General/a ul lia href=default.aspxHome/a/li /ul lia class=sf-with-ul href=#Maintenance/a ul lia href=applicationadministration.aspxApplication Administraion/a/li lia href=ptadministration.aspxProject Task Administration/ a/li lia href=useradministration.aspxUser Administration/a/li /ul lia class=sf-with-ul href=#Timesheets/a ul lia href=dailytimesheet.aspxDaily Timesheet/a/li /ul /ul /div Any help is very appreciated. Thanks
[jQuery] Re: Problem ClueTip Plug-In and local parameter
Hi Stefan, for local content, the plugin clones the element to be displayed and places it in the clueTip container. It works this way so that it can make use of the cloneWithEvents argument: ... .clone(true) There were bug reports about local contents losing their event bindings when dumped into a clueTip. Using .clone(true) seemed to solve that problem. If your ajax form submission function binds to a form based on id, perhaps you could modify that to bind based on class. Not sure if that will solve your problem, since I can't see the whole picture, but hopefully it'll point you in the right direction. Also, there's an onShow option in the plugin that takes a function. You could look into that for binding the event to the form in the clueTip. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 14, 2008, at 6:11 AM, Stefan Sturm wrote: Hello, I'm using the ClueTip Plug-In to display a Form, when the mouse is over a Link. This works fine, but there is a big problem: In local Mode ClueTip seams to make a copy of my Form and displays it. :-( Why ClueTip works this way? I use a simple JavaScript Function to send all my form using a Ajax Request. But this is not working, because my Form exists two times... Hope somebody can help me. Greetings, Stefan Sturm
[jQuery] jquery.ajax POST is getting a 400 error intermittently
I am using jQuery ajax, served up on AIX, IBM HTTP Server and Websphere Application server When making a jQuery.ajax type:'POST', sometimes the reponse is: HTTP/ 1.1 400. This is not happening consistently. I see the 400 status code in the web server logs. Has anybody else run into this issue before? Here is the jquery ajax call code $.ajax({ url: url, type: 'POST', data: { client: $('#txt1').val(), trigger: 'reload', product:product }, dataType: 'xml', async: false, timeout: 1, success: function(responseXML){ parseAjaxoutput(responseXML); } }); '#txt1' is an input type hidden element or a select box. Appreciate any help.
[jQuery] Re: livequery not binding to ajax loaded links in ie6 and ie7?
On Thu, Nov 13, 2008 at 10:26 PM, n00bert [EMAIL PROTECTED] wrote: Hi Brandon, I put an alert in like so: $('#content div.thumb a').livequery('click', function(e) { alert ('clicked'); e.preventDefault(); var href = $(this).attr('href'); $('#mainMenu ul li ul li a[href$=' + href + ']').triggerHandler ('click'); return false; }); Safari, Firefox and Opera all show the alert when clicked. ie6 and ie7 do not. In firebug, there are no errors. Any clues? But are there any errors in IE? -- Brandon Aaron
[jQuery] Re: Superfish arrows and drop shadow
Is that the mark-up output from the server, or is it the generated source as shown in Firebug, ie. after the Superfish JS has run? You did call the plugin's initialisation code I hope? Are the paths to the shadow and arrow images correct? If you show us your page I'm sure we can figure it out far more easily. Joel Birch.
[jQuery] jquery.ajax POST is getting a 400 error intermittently
I am using jQuery ajax, served up on AIX, IBM HTTP Server and Websphere Application server When making a jQuery.ajax type:'POST', sometimes the reponse is: HTTP/ 1.1 400. This is not happening consistently. I see the 400 status code in the web server logs. Has anybody else run into this issue before? Here is the jquery ajax call code $.ajax({ url: url, type: 'POST', data: { client: $('#txt1').val(), trigger: 'reload', product:product }, dataType: 'xml', async: false, timeout: 1, success: function(responseXML){ parseAjaxoutput(responseXML); } }); '#txt1' is an input type hidden element or a select box. Appreciate your help.
[jQuery] Re: Tab divs disappear
Thanks, I did try wrapping the panel container and it caused the javascript to stop working. I guess I'll keep trying some other ideas to try to fix this. What your seeing now is a little improved, because I gave the main container a fixed height. Before that, the entire page would move around when that panel disappeared. On Nov 13, 6:12 pm, Klaus Hartl [EMAIL PROTECTED] wrote: I can't see how the disappearing lasts one second. Between the animations there has to take place a switch of course, that makes the tab navigation jump to the top. You could overcome that problem with some CSS trickery (like absolutely position the nav to the bottom of a container that has fixed height or alternatively - a bit easier moreover - just wrap the tab panels in a container that has fixed height. --Klaus On 13 Nov., 22:46, aaron [EMAIL PROTECTED] wrote: Sorry, wrong links. http://www.usm.edu/pr/web/beta/index.php http://www.usm.edu/pr/web/beta/index2.php On Nov 13, 3:26 pm, Klaus Hartl [EMAIL PROTECTED] wrote: In any case - as I already stated - rotate with Ajax tabs is not supported at the moment. --Klaus On 13 Nov., 22:25, Klaus Hartl [EMAIL PROTECTED] wrote: Maybe I am just blind, but I couldn't find tabs, and got a We couldn't find your document. instead...? --Klaus On 13 Nov., 21:23, aaron [EMAIL PROTECTED] wrote: Unfortunately, that isn't working either. Let me link my page and maybe you can see what is going on. I have two versions. One is using Tabs 3 with the rotate option: http://www.usm.edu/pr/web/index.php One is using jquery UI Tabs with the rotate option and Ajax:http://www.usm.edu/pr/web/index2.php You can see how the entire div just disappears for a second before the new one is loaded. On Nov 12, 11:52 am, aaron [EMAIL PROTECTED] wrote: Ahh, thanks, the light bulb just clicked on. In order for AJAX to work, the html code is different, not the initialization code. I think I kept glossing over that in the documentation. On Nov 12, 11:29 am, Klaus Hartl [EMAIL PROTECTED] wrote: Do your anchors inside the tabs list look like this: a href=/some/url.../a or like this: a href=#identifier.../a ? The initialization is the same, no matter if Ajax tabs or in-page. --Klaus On 12 Nov., 17:09, aaron [EMAIL PROTECTED] wrote: I'm not sure what you mean, what initialization code should I use? I tried putting the AJAX options in there, but got the same result. On Nov 11, 3:48 pm, Klaus Hartl [EMAIL PROTECTED] wrote: And you're not using Ajax tabs? Rotate and Ajax together is not supported right now. --Klaus On 11 Nov., 20:39, aaron [EMAIL PROTECTED] wrote: $(function() { $('#tabs_container ul').tabs( {fx: { opacity: 'toggle' } }).tabs('rotate', 5000); }); On Nov 7, 4:20 pm, Klaus Hartl [EMAIL PROTECTED] wrote: On 7 Nov., 21:43, subnet_rx [EMAIL PROTECTED] wrote: I'm using jQuery UI tabs and I'm rotating them automatically. The problem is, for half a second, the div disappears till the next one loads. This modifies the size of the page and the page jumps around while this is going on. The divs only contain static content, and I've tried AJAX cache options, but they don't work. I just want them to fade out and fade in. What initialization code should I be using? What initialization code should do you use? --Klaus
[jQuery] Re: mcDropDown: How to reload?
Christian, On Thu, Nov 13, 2008 at 11:07 PM, CED [EMAIL PROTECTED] wrote: Anyone know how to force a mcdropdown element to reload? I am trying to update the mcdropdown via another action. McDropDown returns the element if its already been defined. There currently is no way to do this easily. You can either modify the source code to give you the ability to alter the list, or you can modify the list element programmatically (just pay attention to the code in the $.mcDropDownMenu() to make sure you duplicate that logic when adding new elements to the list.) -Dan
[jQuery] Re: Superfish arrows and drop shadow
Thats the markup. When you say 'You did call the plugin's initialisation code I hope?' what do you mean exactly. I'm a bit of a beginner as you probably have guessed. Also where are the images stored? I haven't got any images for the arrow and shadow myself, am I meant to? Sorry, the page is only local atm so cant show you. Thanks
[jQuery] Re: Adjusting the position and offset of the text
Sure thing. If you're using Jörn's tooltip plugin, you might have better luck getting an answer if you start a new thread and start the subject with [tooltip]. --Karl On Nov 14, 2008, at 7:02 AM, fastnoc wrote: OK that makes sense. Thank you! Still waiting for an answer on the font placement issue. I've read through the source, and checked the css and i just can't figure this out. On Nov 13, 6:12 am, Karl Swedberg [EMAIL PROTECTED] wrote: Not sure about the first question, but you should be able to apply the tooltip to multiple elements by giving all of them the same class name and then attaching the tooltip() method to that class. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Nov 13, 2008, at 2:16 AM, fastnoc wrote: Can anyone help here? On Nov 12, 7:39 am, fastnoc [EMAIL PROTECTED] wrote: I didn't notice this right away. I thought it would be in the css but that's not the case. I've created my own images for the background and I need to adjust where the text starts and an offset for the right side (padding) as well. next, In order to use this multiple times on one page you must create new instances each time. I'm using this all over my site, so the first line is getting long. Is there a better, more efficient way to do this? $(#fancy, #fancy2, #fancy3, #green, #registration, #list, #tablecycle).tooltip({ http://groups.google.com/group/jquery-en/browse_thread/thread/f39ccd1 ...
[jQuery] Re: Destroy Interval at DOM Object removal
wow, very cool! I'm glad my 'advice' was useful to you! - ricardo On Nov 14, 8:21 am, Pom [EMAIL PROTECTED] wrote: Hi! I killed my plugin-idea and rewrote the whole thing and now I have it working. Thanks for your advice, ricardobeat! The result can be seen onhttp://www.coolstuff.se/Humunga_Tunga. Open an image och forward to #4. The code is in product.js. Best regards, Pom
[jQuery] Re: Superfish arrows and drop shadow
It does seem most likely that you haven't actually activated the plugin code and all you are seeing is the pure CSS fallback version of the menu. If you go to the Superfish documentation pages you will find plenty of information about setting up menus in a variety of ways, but specifically, look at Step 3 of the Quick Start Guide on the entry page. You need to include that code to trigger the plugin's JS that you linked to in a script tag. http://users.tpg.com.au/j_birch/plugins/superfish/ Also, once the initialisation code has run, it will add various classes to your menu markup, including the anchors' sf-with-ul class where relevant, so you do not need to add that to your markup manually. Regarding the images, they come as part of the standard download (zip archive) and are used for the arrow and the shadow. In the superfish.css file the images are referred to like this, for example: background: url('../images/shadow.png') no-repeat bottom right; This means that you either need to put the images in an 'images' folder, one level higher than the directory that the CSS file is in, or you can change the path to point to the images if you prefer to keep them elsewhere. Hope this helps. Joel Birch.
[jQuery] Re: Issue with FF back button
Aparajita wrote on 11/14/2008 5:36 AM: Problem is when someone fills all fields and proceeds to the next page and want to edit something by pressing the back button, Firefox does not allow to resubmit the page. Its something like submit button has been disabled. I experienced that problem too, where one day a simple form (no JS) that I've used for years suddenly couldn't be resubmitted if I hit the back button unless I reloaded the page. I never did figure out the problem, but as mysteriously as it started, it recently stopped and it now works again. I just did a quick search, and this may actually be the cause of my issue: http://forums.mozillazine.org/viewtopic.php?t=612043 A recent upgrade of Firefox disabled the RealPlayer add-on (not compatible), so perhaps that was the fix... - Bil
[jQuery] Re: How to set a group of elements bold if it's related element has something in it
input type=hidden name=inputTime1 class=inputTime / input type=hidden name=inputTime2 class=inputTime / input type=hidden name=inputTime3 class=inputTime / input type=hidden name=inputTime4 class=inputTime / input type=hidden name=inputNotes1 class=inputNotes / input type=hidden name=inputNotes2 class=inputNotes / input type=hidden name=inputNotes3 class=inputNotes / input type=hidden name=inputNotes4 class=inputNotes / $(document).ready(function(){ var inputNotes = $('.inputNotes'); $('.inputTime').each(function(i){ if(inputNotes.eq(i).val() == ) $(this).css('fontWeight','bold') }); }); On Nov 14, 11:07 am, nmiddleweek [EMAIL PROTECTED] wrote: Hi, I'm really not even sure where to start with this one so am really hoping someone can help shed some light on it... I've got a a bunch of input fields called inputTime1, inputTime2, inputTime3, inputTime4 and I've got a 'parallel' bunch of hidden fields called inputNotes1, inputNotes2, inputNotes3, inputNotes4 I need to set the inputTime1.css to bold if inputNotes1 is NOT empty and the same for inputTime2 and inputNotes2, etc. Can this be done in a simple jQuery statement? Cheers and thanks in advance! N
[jQuery] Re: this and z-index changes
I haven't looked througly at your code, but I see you're using global variables, that might be an issue: $('.draggableWindow').mousedown(function(){ var numWindows=$('.draggableWindow').length + 500; var zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ var newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ //being greater doesn't mean it's only 1 unit greater newZ2 = zindexlt2-2; //just to be safe $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($ (this).css(z-index))); } }); } }); On Nov 14, 11:13 am, CodingCyborg [EMAIL PROTECTED] wrote: jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($(this).css(z-index))); } }); } }); I added a line so I could watch the z-index movements of the draggable windows. I found that they are all on separate layers but for some reason instead of each of them above the one you bring to front dropping one, some will drop two while others don't move. I'm not sure why this is happening, it's almost as if some windows are run through the .each() multiple times while others don't move. Or when others go through it they affect the first one through it. Help would be highly appreciated! On Nov 13, 1:08 pm, CodingCyborg [EMAIL PROTECTED] wrote: I recently have been playing around with a Desktop module that was on nettuts and made a modification for it that doesn't fully work. There are many draggable windows, and in order for them to function like a real desktop they need to have z-index changes such that if you close one on top the last one you had on top is right below it. I believe my error comes in with this or possibly something else, but when you pull one to the front it causes some or all of the others to end up in the same z-index causing them to not stay in order of recently viewed. jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500;//the + 500 is to make sure they are above other objects on the page zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows);//brings to front $('.draggableWindow').each(function(){//supposed to drop others back one... newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); } }); } });
[jQuery] Re: Superfish arrows and drop shadow
Haha I can be an idiot sometime! The reason I wasn't seeing the shadow or arrow was because rather than downloading the zip file I had simply downloaded the code files seperately. I was calling the initialisation code etc (as explained by your very easy to use demos) but by my own foolish mistake I didnt download the images. Thanks a lot for your help, the menu looks and works really well. I knew there'd be a simple answer ;-) Thanks
[jQuery] Nesting toddle div's
Hi, Im new to jQuery and looking for a bit of help. Im trying to have toggleable content within toggleable content. http://pastie.org/314861 Code It's just not working for me, when I click the first toggle all is revealed? Am I way off? Something to do with propagation? Thanks Brian -- View this message in context: http://www.nabble.com/Nesting-toddle-div%27s-tp20502521s27240p20502521.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Combining jQuery and jQuery UI
Thanks for doing that, and for some reason that works just fine - I don't know what's different about what you did, but it works. I suppose it's that particular minify script, so I'll have to keep that in mind for the future. Thanks again! On Nov 12, 10:56 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Chris, Sorry for the delay in getting back to you. I just tested a page on my server, concatenating and minifying all the files you mentioned -- jQuery core, all the UI files, nymodal plugin, and clueTip plugin. I'm not seeing a problem. Here is a link to the min/concat script I use:http://code.google.com/p/minify/ Here is the test page:http://www.learningjquery.com/examples/concat.html Here is the array of files that are being minified/concatenated: 'js_ui' = array('//js/jquery-1.2.6.min.js', '//ui/ui.core.js', '//ui/effects.core.js', '//ui/effects.blind.js', '//ui/effects.bounce.js', '//ui/effects.clip.js', '//ui/effects.drop.js', '//ui/effects.explode.js', '//ui/effects.fold.js', '//ui/effects.highlight.js', '//ui/effects.pulsate.js', '//ui/effects.scale.js', '//ui/effects.shake.js', '//ui/effects.slide.js', '//ui/effects.transfer.js', '//ui/ui.accordion.js', '//ui/ui.colorpicker.js', '//ui/ui.datepicker.js', '//ui/ui.dialog.js', '//ui/ui.draggable.js', '//ui/ui.droppable.js', '//ui/ui.progressbar.js', '//ui/ui.resizable.js', '//ui/ui.selectable.js', '//ui/ui.slider.js', '//ui/ui.sortable.js', '//ui/ui.spinner.js', '//ui/ui.tabs.js', '//examples/jquery.nyroModal-1.3.0.js', '//examples/jquery.cluetip.js', ), Not sure what else to do. Let me know if I can help, but so far I'm not able to replicate the problem. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Nov 11, 2008, at 9:49 AM, c.barr wrote: It's been a while without a response and I just wanted to bump this again to see if anyone found out why this was happening or how to get around this issue. On Oct 22, 8:37 am, c.barr [EMAIL PROTECTED] wrote: Also, I've got two plugins I'd like to combine together to save some space, but it's also breaking every time. Cluetip 0.9.8 and NyroModal 1.2.8http://plugins.jquery.com/project/cluetip/http://nyromodal.nyrodev.co... I can combine these just fine, and NyroModal seems to work, but it always breaks on the Cluetip functions saying insertionType is not defined On Oct 21, 2:26 pm, c.barr [EMAIL PROTECTED] wrote: Yes, it's being listed first. Can someone else please try and do this to verify it? I just want to make sure I'm not missing something simple. On Oct 21, 12:16 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Are you making sure that the jquery core file is at the top of that concatenated file? that's the only other thing I can think of that would produce the error. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Oct 20, 2008, at 4:26 PM,c.barrwrote: They already have the semicolons straight from jQuery, so no changes were needed. Any other suggestions? On Oct 16, 5:16 pm, Mike Alsup [EMAIL PROTECTED] wrote: I'd like to combine and compress my jQuery and jQuery UI files into a single minified file, but I've noticed that every time I do this It just breaks and gives me $ is not defined. If I do a copy/paste of the two uncompressed files together, it works fine but it's a 100kb file! When I got to minify or pack this file, that's when it always breaks. I've tried Dean Edwards packer, JSmin, and YUI all with the same results. The same goes for any jQuery plugins I've downloaded. I'm using a several that I need avalible on all pages, and I'd like to combine them - these also break when I do this. Am I missing something here? Make sure each file has a leading and a trailing semicolon.
[jQuery] Re: this and z-index changes
So then, how would i go about making it so the variables are, in a sense, deleted after each .each() run such that its fresh when it goes through again? or is it the zindexIt2 that isn't getting pulled down into the .each() function? On Fri, Nov 14, 2008 at 9:03 AM, ricardobeat [EMAIL PROTECTED] wrote: I haven't looked througly at your code, but I see you're using global variables, that might be an issue: $('.draggableWindow').mousedown(function(){ var numWindows=$('.draggableWindow').length + 500; var zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ var newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ //being greater doesn't mean it's only 1 unit greater newZ2 = zindexlt2-2; //just to be safe $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($ (this).css(z-index))); } }); } }); On Nov 14, 11:13 am, CodingCyborg [EMAIL PROTECTED] wrote: jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($(this).css(z-index))); } }); } }); I added a line so I could watch the z-index movements of the draggable windows. I found that they are all on separate layers but for some reason instead of each of them above the one you bring to front dropping one, some will drop two while others don't move. I'm not sure why this is happening, it's almost as if some windows are run through the .each() multiple times while others don't move. Or when others go through it they affect the first one through it. Help would be highly appreciated! On Nov 13, 1:08 pm, CodingCyborg [EMAIL PROTECTED] wrote: I recently have been playing around with a Desktop module that was on nettuts and made a modification for it that doesn't fully work. There are many draggable windows, and in order for them to function like a real desktop they need to have z-index changes such that if you close one on top the last one you had on top is right below it. I believe my error comes in with this or possibly something else, but when you pull one to the front it causes some or all of the others to end up in the same z-index causing them to not stay in order of recently viewed. jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500;//the + 500 is to make sure they are above other objects on the page zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows);//brings to front $('.draggableWindow').each(function(){//supposed to drop others back one... newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); } }); } });
[jQuery] Re: Combining jQuery and jQuery UI
I wish I could edit posts I did just notice something - the file size here is much larger than what the 4 files were on their own - why is this? On their own: jQuery:.55k jQuery.UI:.63k Cluetip:.29k NyroModal:...27k Total: about 180k The new combined file is 316k - nearly three times the size. It's nice to have it all in one place, but my goal was to reduce http requests and transfer size. Any insight on how to get this down further? On Nov 12, 10:56 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Chris, Sorry for the delay in getting back to you. I just tested a page on my server, concatenating and minifying all the files you mentioned -- jQuery core, all the UI files, nymodal plugin, and clueTip plugin. I'm not seeing a problem. Here is a link to the min/concat script I use:http://code.google.com/p/minify/ Here is the test page:http://www.learningjquery.com/examples/concat.html Here is the array of files that are being minified/concatenated: 'js_ui' = array('//js/jquery-1.2.6.min.js', '//ui/ui.core.js', '//ui/effects.core.js', '//ui/effects.blind.js', '//ui/effects.bounce.js', '//ui/effects.clip.js', '//ui/effects.drop.js', '//ui/effects.explode.js', '//ui/effects.fold.js', '//ui/effects.highlight.js', '//ui/effects.pulsate.js', '//ui/effects.scale.js', '//ui/effects.shake.js', '//ui/effects.slide.js', '//ui/effects.transfer.js', '//ui/ui.accordion.js', '//ui/ui.colorpicker.js', '//ui/ui.datepicker.js', '//ui/ui.dialog.js', '//ui/ui.draggable.js', '//ui/ui.droppable.js', '//ui/ui.progressbar.js', '//ui/ui.resizable.js', '//ui/ui.selectable.js', '//ui/ui.slider.js', '//ui/ui.sortable.js', '//ui/ui.spinner.js', '//ui/ui.tabs.js', '//examples/jquery.nyroModal-1.3.0.js', '//examples/jquery.cluetip.js', ), Not sure what else to do. Let me know if I can help, but so far I'm not able to replicate the problem. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Nov 11, 2008, at 9:49 AM, c.barr wrote: It's been a while without a response and I just wanted to bump this again to see if anyone found out why this was happening or how to get around this issue. On Oct 22, 8:37 am, c.barr [EMAIL PROTECTED] wrote: Also, I've got two plugins I'd like to combine together to save some space, but it's also breaking every time. Cluetip 0.9.8 and NyroModal 1.2.8http://plugins.jquery.com/project/cluetip/http://nyromodal.nyrodev.co... I can combine these just fine, and NyroModal seems to work, but it always breaks on the Cluetip functions saying insertionType is not defined On Oct 21, 2:26 pm, c.barr [EMAIL PROTECTED] wrote: Yes, it's being listed first. Can someone else please try and do this to verify it? I just want to make sure I'm not missing something simple. On Oct 21, 12:16 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Are you making sure that the jquery core file is at the top of that concatenated file? that's the only other thing I can think of that would produce the error. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Oct 20, 2008, at 4:26 PM,c.barrwrote: They already have the semicolons straight from jQuery, so no changes were needed. Any other suggestions? On Oct 16, 5:16 pm, Mike Alsup [EMAIL PROTECTED] wrote: I'd like to combine and compress my jQuery and jQuery UI files into a single minified file, but I've noticed that every time I do this It just breaks and gives me $ is not defined. If I do a copy/paste of the two uncompressed files together, it works fine but it's a 100kb file! When I got to minify or pack this file, that's when it always breaks. I've tried Dean Edwards packer, JSmin, and YUI all with the same results. The same goes for any jQuery plugins I've downloaded. I'm using a several that I need avalible on all pages, and I'd like to combine them - these also break when I do this. Am I missing something here? Make sure each file has a leading and a trailing semicolon.
[jQuery] Re: livequery not binding to ajax loaded links in ie6 and ie7?
Hi Brandon, no errors in ie at all. I've uploaded the site I'm working on at http://rosiespencer.co.uk When it loads, click a small thumb. The menu should slide down and the contents of #content are replaced via ajax. Some larger thumbs appear. This is where it breaks in ie. In other browsers if you click one of the bigger thumbs, #content is replaced as expected. Thanks again for your help, Sameer On Nov 14, 2:23 pm, Brandon Aaron [EMAIL PROTECTED] wrote: On Thu, Nov 13, 2008 at 10:26 PM, n00bert [EMAIL PROTECTED] wrote: Hi Brandon, I put an alert in like so: $('#content div.thumb a').livequery('click', function(e) { alert ('clicked'); e.preventDefault(); var href = $(this).attr('href'); $('#mainMenu ul li ul li a[href$=' + href + ']').triggerHandler ('click'); return false; }); Safari, Firefox and Opera all show the alert when clicked. ie6 and ie7 do not. In firebug, there are no errors. Any clues? But are there any errors in IE? -- Brandon Aaron
[jQuery] Re: this and z-index changes
Sorry, I misread the change in code and the comments you added. Doing: newZ2 = zindexlt2-2; Would place all windows that were previously above the window you just brought to front on the same z-index, which I don't want. The reason for the newZ2--; is that all above it go down one level, and then the one that was clicked jumps to the very top of all of them. This allows for all windows above it to go down one, so they all stay on separate levels, but in the same order. On Nov 14, 9:03 am, ricardobeat [EMAIL PROTECTED] wrote: I haven't looked througly at your code, but I see you're using global variables, that might be an issue: $('.draggableWindow').mousedown(function(){ var numWindows=$('.draggableWindow').length + 500; var zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ var newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ //being greater doesn't mean it's only 1 unit greater newZ2 = zindexlt2-2; //just to be safe $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($ (this).css(z-index))); } }); } }); On Nov 14, 11:13 am, CodingCyborg [EMAIL PROTECTED] wrote: jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($(this).css(z-index))); } }); } }); I added a line so I could watch the z-index movements of the draggable windows. I found that they are all on separate layers but for some reason instead of each of them above the one you bring to front dropping one, some will drop two while others don't move. I'm not sure why this is happening, it's almost as if some windows are run through the .each() multiple times while others don't move. Or when others go through it they affect the first one through it. Help would be highly appreciated! On Nov 13, 1:08 pm, CodingCyborg [EMAIL PROTECTED] wrote: I recently have been playing around with a Desktop module that was on nettuts and made a modification for it that doesn't fully work. There are many draggable windows, and in order for them to function like a real desktop they need to have z-index changes such that if you close one on top the last one you had on top is right below it. I believe my error comes in with this or possibly something else, but when you pull one to the front it causes some or all of the others to end up in the same z-index causing them to not stay in order of recently viewed. jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500;//the + 500 is to make sure they are above other objects on the page zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows);//brings to front $('.draggableWindow').each(function(){//supposed to drop others back one... newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); } }); } });
[jQuery] Re: How to correctly set a dblclick(..) on a dynamically added table row ?
This looks like it may be an issue with blockUI. Are you using v1.33? Have you tried the latest, v2.10? - Richard On Fri, Nov 14, 2008 at 8:45 AM, Paul Hammant [EMAIL PROTECTED] wrote: This is still dogging me - what's the correct way to add rows to a table? 1) clone last row 2) clone a row you removed (for purposes of future cloning) 3) create the row from scratch - Paul On Nov 8, 2008, at 4:11 PM, Paul Hammant wrote: Below is a demo of the problem i have. Reduced to the minimal HTML I think. I start with a row in a table, but on load, I remove it and store it. Then i dynamically insert some row based on a clone of the original. As I add each row i add a double-click to a popup form (via blockUI). The first time you double click a row it works. The second time everything freezes during the popup. There must be some rules around row removal and re-adding, or dynamically attaching a dblclick(..) event that I'm unaware of. What am I missing ? - Paul -- html titlejQuery bug demo?/title script type=text/javascript src=jquery-1.2.6.pack.js/script script type=text/javascript src=jquery.blockUI.min.js/script script $(document).ready(function() { // take row from table, for futire use. rowToClone = $('#mytable tr:last').remove(); insertRow(1, double-click this line first); insertRow(2, then double-click this line); $(#cancelRead).click(function() { document.readMyForm.reset(); $.unblockUI(); }); }); function doubleClick() { var readRow = $('#readRow'); $.blockUI(readRow, {width:'540px', height:'300px'}); } function insertRow(id, foo) { var newRow = rowToClone.clone(); newRow.attr(id, id); $('td[class*=class1]', newRow).html(foo); newRow.dblclick(doubleClick); // Is this an OK thing to do $('#mytable').append(newRow); } /script body table id=mytable cellpadding=0 cellspacing=0 tbody tr class=myRow id=1 td class=class1PLACEHOLDER/td /tr /tbody /table div id=readRow style=display:none;cursor:default; h2Hello!/h2 form id=readMyForm name=readMyForm input type=button id=cancelRead value=Close /form /div /body /html
[jQuery] Re: this and z-index changes
Something else that may help find the problem: I currently have groups of windows. When you bring a window in one group to the front it brings all windows in that group to the top layers overall. Though they stay on separate layers they are being brought to front together. The other groups are all dropping behind, but the windows are staying on their separate layers, and in the order I left them. All draggable windows have two classes. First is .draggableWindow Next is the class for that group of windows. Each window has it's own ID. So possibly to avoid identity of this I should set a variable for the ID of the window that was actually clicked? On Nov 14, 9:03 am, ricardobeat [EMAIL PROTECTED] wrote: I haven't looked througly at your code, but I see you're using global variables, that might be an issue: $('.draggableWindow').mousedown(function(){ var numWindows=$('.draggableWindow').length + 500; var zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ var newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ //being greater doesn't mean it's only 1 unit greater newZ2 = zindexlt2-2; //just to be safe $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($ (this).css(z-index))); } }); } }); On Nov 14, 11:13 am, CodingCyborg [EMAIL PROTECTED] wrote: jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($(this).css(z-index))); } }); } }); I added a line so I could watch the z-index movements of the draggable windows. I found that they are all on separate layers but for some reason instead of each of them above the one you bring to front dropping one, some will drop two while others don't move. I'm not sure why this is happening, it's almost as if some windows are run through the .each() multiple times while others don't move. Or when others go through it they affect the first one through it. Help would be highly appreciated! On Nov 13, 1:08 pm, CodingCyborg [EMAIL PROTECTED] wrote: I recently have been playing around with a Desktop module that was on nettuts and made a modification for it that doesn't fully work. There are many draggable windows, and in order for them to function like a real desktop they need to have z-index changes such that if you close one on top the last one you had on top is right below it. I believe my error comes in with this or possibly something else, but when you pull one to the front it causes some or all of the others to end up in the same z-index causing them to not stay in order of recently viewed. jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500;//the + 500 is to make sure they are above other objects on the page zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows);//brings to front $('.draggableWindow').each(function(){//supposed to drop others back one... newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); } }); } });
[jQuery] Re: Stumped with a each() / height() problem
That's correct. jQuery is consistent in that in a callback function, 'this' is always a DOMElement. In order to get jQuery methods, you have to wrap it in the $. - Richard On Fri, Nov 14, 2008 at 1:03 AM, DejanNenov [EMAIL PROTECTED] wrote: To answer my own question: there is a difference between the javascrip this and the jQuery $ (this) - beware of it :) Cheers, Dejan On Nov 13, 10:34 pm, DejanNenov [EMAIL PROTECTED] wrote: Hello All - I am stumped with the following problem - within an each() loop it seems that this.height() is not working - or - more likely - I am doing something so obviously wrong I cannot see it :) Here is the code: function adjustRowHeights() { var maxH = 0; console.log('Array Size=' + masterEngLangArray.length); // this is OK - reports 15 for (id in masterEngLangArray) { console.log(id+'='+$(.formRow-+id).height()); //this is OK reports height 17 maxH = 0; $(.formRow-+id).each(function() { if (this.height() maxH) { // PROBLEM -- here Firebug reports error: this.height() is not a function maxH = this.height(); } }); $(.formRow-+id).height(maxH); } } The DOM looks like this: div style=overflow: auto; id=langEditForm div class=langEditorTableHeader id=langEditFormEng div style=width: 100%; id=langEditFormEngHeader Programmer's Reference: English /div div class=formRow-0 langEditFormEngCellAADashboard/div div class=formRow-1 langEditFormEngCellAccount/div div class=formRow-2 langEditFormEngCellBulgarian/div div class=formRow-3 langEditFormEngCellDashboard/div div class=formRow-4 langEditFormEngCellDiplomacy/div div class=formRow-5 langEditFormEngCellEconomy/div div class=formRow-6 langEditFormEngCellEnglish/div div class=formRow-7 langEditFormEngCellHelp/div div class=formRow-8 langEditFormEngCellLogin/div div class=formRow-9 langEditFormEngCellRegister/div div class=formRow-10 langEditFormEngCellSpanish/div div class=formRow-11 langEditFormEngCellStrategy/div div class=formRow-12 langEditFormEngCellTactics/div div class=formRow-13 langEditFormEngCellTranslate From:/div div class=formRow-14 langEditFormEngCellTranslate To:/div /div div class=langEditorTableHeader id=langEditFormFrom div style=width: 100%; id=langEditFormFromHeaderAchinese/ div div class=formRow-0 langEditFormFromCellundefined/div div class=formRow-1 langEditFormFromCellAccountACE/div div class=formRow-2 langEditFormFromCellBulgarian/div div class=formRow-3 langEditFormFromCellDashboard/div div class=formRow-4 langEditFormFromCellDiplomacy/div div class=formRow-5 langEditFormFromCellEconomy/div div class=formRow-6 langEditFormFromCellEnglish/div div class=formRow-7 langEditFormFromCellHelp/div div class=formRow-8 langEditFormFromCellLogin/div div class=formRow-9 langEditFormFromCellRegister/div div class=formRow-10 langEditFormFromCellSpanish/div div class=formRow-11 langEditFormFromCellStrategy/div div class=formRow-12 langEditFormFromCellTactics/div div class=formRow-13 langEditFormFromCellTranslate From:/div div class=formRow-14 langEditFormFromCellTranslate To:/div /div div class=langEditorTableHeader id=langEditFormTo div style=width: 100%; id=langEditFormToHeader To-Langauge: Choose One /div /div /div
[jQuery] [validate] Two page form won't validate on IE
Hi there I'm having trouble getting the Validation plug in to work on this page http://dev2.savingforchildren.co.uk/mjs/health/index.epl I have two forms - the second one appears when the first one is successfully completed. The first form validates correctly (you only need to choose a day, month and year from the dropdowns) However, when using IE no validation is applied to the second form (ie you can leave the whole page blank and it is accepted). Firefox works fine Any help much apprecited Thanks, Michael
[jQuery] Re: this and z-index changes
I have confirmed that when one of a group of windows is clicked, it runs as if every window in that group was clicked at the same time and runs the code for each of them. This causes quite an awkward outcome, but I have no idea why its happening, nor how to stop it. On Nov 14, 9:03 am, ricardobeat [EMAIL PROTECTED] wrote: I haven't looked througly at your code, but I see you're using global variables, that might be an issue: $('.draggableWindow').mousedown(function(){ var numWindows=$('.draggableWindow').length + 500; var zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ var newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ //being greater doesn't mean it's only 1 unit greater newZ2 = zindexlt2-2; //just to be safe $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($ (this).css(z-index))); } }); } }); On Nov 14, 11:13 am, CodingCyborg [EMAIL PROTECTED] wrote: jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($(this).css(z-index))); } }); } }); I added a line so I could watch the z-index movements of the draggable windows. I found that they are all on separate layers but for some reason instead of each of them above the one you bring to front dropping one, some will drop two while others don't move. I'm not sure why this is happening, it's almost as if some windows are run through the .each() multiple times while others don't move. Or when others go through it they affect the first one through it. Help would be highly appreciated! On Nov 13, 1:08 pm, CodingCyborg [EMAIL PROTECTED] wrote: I recently have been playing around with a Desktop module that was on nettuts and made a modification for it that doesn't fully work. There are many draggable windows, and in order for them to function like a real desktop they need to have z-index changes such that if you close one on top the last one you had on top is right below it. I believe my error comes in with this or possibly something else, but when you pull one to the front it causes some or all of the others to end up in the same z-index causing them to not stay in order of recently viewed. jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500;//the + 500 is to make sure they are above other objects on the page zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows);//brings to front $('.draggableWindow').each(function(){//supposed to drop others back one... newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); } }); } });
[jQuery] Re: has anyone come across a plugin like this ?
Nice job! Count me in on such a plug-in request On Nov 14, 3:01 am, ricardobeat [EMAIL PROTECTED] wrote: Here's my take - very limited (17 minutes :D): http://jsbin.com/ovisa On Nov 13, 7:42 pm, Jay [EMAIL PROTECTED] wrote: Thought it was pretty cool, so I threw my own plug in together in a little over an hour to mimic what he did there. It's pretty simple but should work in ie6/7,ff,safari. You can set a few different options, and I'm sure this could be expanded upon to give it a lot more power. Anyway, here you go. style type=text/css ul { list-style: none; } ul li { margin-right: 5px; display: block; float: left; overflow: hidden; font-size: 12px; height: 20px; } ul li a { float: left; display: block; position: relative; overflow: hidden; height: 20px; } /style script type=text/javascript $(function(){ $('#breadcrumb').jCrumb({}); }); (function($){ $.fn.jCrumb = function(options) { var defaults = { listLimit : 650, itemMin : 15, expandTime : 800, collapseTime : 800 }; var opts = $.extend(defaults, options); return this.each(function(){ var obj = $(this); if(obj.width()opts.listLimit) { var children = $('li', obj); children.each(function(i){ if(i0 i(children.length-1)) { var el = $(this); el.data('width', el.width()) .children('a').width(el.data('width')).wrap('span /') .parent().css({display: 'block', position: 'relative', overflow: 'hidden', width: opts.itemMin+'px'}) .hover( function() { $(this).stop().animate({ width: el.data ('width') },{ duration: opts.expandTime, easing: swing, queue: false }); }, function() { $(this).stop().animate({ width: opts.itemMin +'px' }, { duration: opts.collapseTime, easing: swing, queue: false }); } ); } }); } }); } })(jQuery); /script /head body ul id=breadcrumb lia href=#Home/a/li lia href=#Short/a/li lia href=#Random Breadcrumb Super Super Super Super Long/a/ li lia href=#Random Breadcrumb Blach/a/li lia href=#Random Breadcrumb Length Long/a/li lia href=#Random/a/li /ul /body On Nov 13, 3:41 pm, George [EMAIL PROTECTED] wrote: Count me in for the Plug-In request :) It's pretty cool and the whole site is done very well, I put it in to my Favorites so later I could revisit and 'steal' some design ideas. PS: I am a .NET developer myself and so far find it to be more superior (if I can say that) to Perl. The problem you might have is only because of lack of experience with .NET (no offence). The more you program on .NET the more you going to like it. I am talking from experience here. I was bitching and complaining couple years ago... now I would refuse to work if it's not on .NET There is nothing in .NET that prevents you from doing things like they done in Perl. So do not be down on it :) George.
[jQuery] fade in effects
Good Morning! I'm redesigning a site and I wanted to incorporate a super fish nav bar. I've got it placed on this page under the video, just for testing, but the fade in effects aren't working. http://jessworks.com/reddans2/ The menus should fade in and fade out. Now they are just appearing. I'm sure I'm missing something very simple, could someone please take a look at it for me! I'm styling it, so if it's missing for a minute, or looks crazy, I'm just back there tinkering. Thanks!
[jQuery] issue with jQuery's trigger function
Hi, I am using jQuery 1.2.6, and also have Prototype 1.6.0.1 and Scriptaculous 1.8.1 in my page. I know there are issues getting this to work, but i have noConflict() running. Anyway, I am using jQuery's tablesorter plugin and when I call trigger(update) to refresh my table it wipes out my table completely. After running the Webkit javascript debugger, I was able to trace it to the trigger function in jQuery: line #2041: elem[ type ](); Apparently, when I step into this function call, it actually jumps to prototype.js to handle it. Has anyone else seen this happen, or have any ideas on how I can fix? Unfortunately, removing prototype and scriptaculous is not an option. Thanks -- View this message in context: http://www.nabble.com/issue-with-jQuery%27s-trigger-function-tp20504225s27240p20504225.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: [validate] Two page form won't validate on IE
I see the valid calls in your code, but none where you actually initialize the validation via $(...).validate(). Could you extract a testpage? Jörn On Fri, Nov 14, 2008 at 4:48 PM, Michael Smith [EMAIL PROTECTED] wrote: Hi there I'm having trouble getting the Validation plug in to work on this page http://dev2.savingforchildren.co.uk/mjs/health/index.epl I have two forms - the second one appears when the first one is successfully completed. The first form validates correctly (you only need to choose a day, month and year from the dropdowns) However, when using IE no validation is applied to the second form (ie you can leave the whole page blank and it is accepted). Firefox works fine Any help much apprecited Thanks, Michael
[jQuery] Re: Jquery rounded corners
Unfortunately with that script (I think Methvin's?) it only takes the background color from the parent element when making the corners. The other solution out there (curvy corners) is extremely slow. I haven't personally found an ideal solution where the background needs to be an image or gradient. On Nov 13, 4:31 pm, ramiro77 [EMAIL PROTECTED] wrote: Is anyone using the rounded corners script ? If so, I am having some alias trouble. I have a background image set for my page ... it appears that the script gets the BG color of the Body tag and uses that for its aliasing ... is there anyway to set it to transparent ?
[jQuery] Re: Nesting toddle div's
You may want to start by validating your html. You're missing a closing /div, so it's not clear how you intend it to be nested. Once you've corrected that, let us know if you still have a problem. - Richard On Fri, Nov 14, 2008 at 10:26 AM, sinkingfish [EMAIL PROTECTED] wrote: Hi, Im new to jQuery and looking for a bit of help. Im trying to have toggleable content within toggleable content. http://pastie.org/314861 Code It's just not working for me, when I click the first toggle all is revealed? Am I way off? Something to do with propagation? Thanks Brian -- View this message in context: http://www.nabble.com/Nesting-toddle-div%27s-tp20502521s27240p20502521.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: PrettyCheckboxes not working with radio array names
Here is what i found http://www.quirksmode.org/dom/w3c_core.html#microsoft Scroll down to getElementsByName() section According to it the getElementsByName() is supported pretty well, except some minor things whcih is usually not the case anyway. Like in Opera div id='name' will be returned as well.. So you just need to make sure that you do not have extra tags with the same id as the name you assigned to your radio control. George On Nov 13, 11:22 pm, Ahhk [EMAIL PROTECTED] wrote: Brilliant! I'll take any incompatibilities of getElementByName over the totally broken radios any day! I never thought to change that to a standard method. Thank you so much. That was driving me nuts! George-147 wrote: I just had a wild idea and it looks like working replace following code in prettyCheckboxes $('input[name='+$toCheck.attr('name')+']').each(function(){ $('label[for=' + $(this).attr('id')+']').removeClass ('checked'); }); with $(document.getElementsByName($toCheck.attr('name'))).each(function(){ $('label[for=' + $(this).attr('id')+']').removeClass('checked'); }); I basically replace the $('input[name='+$toCheck.attr('name')+']') with $(document.getElementsByName($toCheck.attr('name'))) wich is the same thing. And it's working now But i do not know about compatibilities of getElementsByName Works in FF 3 and IE 7 not sure about all other safari George. On Nov 13, 6:12 pm, Ahhk [EMAIL PROTECTED] wrote: Wow, ok...thanks! I didnt think it was a jQuery issue and am surprised that jQuery, with as robust and fantastic as it is, wouldn't support array names for form elements. That seems like a major oversight to me :/ But, maybe I'm one of only a few people who actually use array names/IDs. hr. It's SO much easier processing the data that way (numerically) instead of having to concatenate var names. George-147 wrote: I am with you now the problem is that you have weird name, with '[]' in it. this line $('input[name='+$toCheck.attr('name')+']') fails and returns empty collection. The problem is described here http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_... Unfortunatelly i failed to make it work with the solution there i am afraid that to many [] in the selector confusing JQuery. In their example they did it with the id so there were no additional [ ] brackets. $('input[name=q\\[1\\]]') returns me empty collection as well.. but you might try to ask this group more specific question on how to make JQuery selectors work with the name like that q[1] George. Ahhk wrote: Thanks, but I didnt say I didnt want them to have the same name, I said that the script didnt work when the names were arrays. When the radio button groups have an name with an array, the script breaks and you can select/deselect multiple radio buttons within the group. Here's an example: label for=q1-11/labelinput type=radio name=q[1] value=1 id=q1-1 / label for=q1-22/labelinput type=radio name=q[1] value=2 id=q1-2 / label for=q1-33/labelinput type=radio name=q[1] value=3 id=q1-3 / label for=q1-44/labelinput type=radio name=q[1] value=4 id=q1-4 / label for=q2-11/labelinput type=radio name=q[2] value=1 id=q2-1 / label for=q2-22/labelinput type=radio name=q[2] value=2 id=q2-2 / label for=q2-33/labelinput type=radio name=q[2] value=3 id=q2-3 / label for=q2-44/labelinput type=radio name=q[2] value=4 id=q2-4 / label for=q3-11/labelinput type=radio name=q3 value=1 id=q3-1 / label for=q3-22/labelinput type=radio name=q3 value=2 id=q3-2 / label for=q3-33/labelinput type=radio name=q3 value=3 id=q3-3 / label for=q3-44/labelinput type=radio name=q3 value=4 id=q3-4 / label for=q4-11/labelinput type=radio name=q4 value=1 id=q4-1 / label for=q4-22/labelinput type=radio name=q4 value=2 id=q4-2 / label for=q4-33/labelinput type=radio name=q4 value=3 id=q4-3 / label for=q4-44/labelinput type=radio name=q4 value=4 id=q4-4 / The first two groups DONT work right, but the last two groups DO work. array name: q[4] vs non-array name: q4 With the first two groups, I can select all or some of the radio buttons in the group. This appears to be purely a cosmetic/UI issue since only the value of the last one selected in the group gets submitted in the post (as it should). Something in the script doesnt support the array names. George-147 wrote: Sorry instead of Why do you want to give them the same name? I meant to say Why do you not want to give them the same name? George. On Nov 13, 3:06 pm, George [EMAIL PROTECTED] wrote: The problem that regular radio buttons are working only when they have the same name. No wonder prettty ones not working too... :) Why do you want
[jQuery] Re: Animating table rows
.fadeIn() and .fadeOut() seem to work OK in Firefox, but in IE they seem to do the same as .show() and .hide() - they just pop in. Same goes for .slideDown() and .slideUp() in IE. Try it out with the demo I linked to above. So apparently effects are very limited in tables - and even more so in IE. I suppose I'll have to just do a .show() and .hide() since it works, and thats what happens in IE anyway. Any other advice or insight would be appreciated
[jQuery] Re: How to set a group of elements bold if it's related element has something in it
ah nice one... thanks for your help Ricardo... So I have to literally loop through each one... OK, thank you. On Nov 14, 2:55 pm, ricardobeat [EMAIL PROTECTED] wrote: input type=hidden name=inputTime1 class=inputTime / input type=hidden name=inputTime2 class=inputTime / input type=hidden name=inputTime3 class=inputTime / input type=hidden name=inputTime4 class=inputTime / input type=hidden name=inputNotes1 class=inputNotes / input type=hidden name=inputNotes2 class=inputNotes / input type=hidden name=inputNotes3 class=inputNotes / input type=hidden name=inputNotes4 class=inputNotes / $(document).ready(function(){ var inputNotes = $('.inputNotes'); $('.inputTime').each(function(i){ if(inputNotes.eq(i).val() == ) $(this).css('fontWeight','bold') }); }); On Nov 14, 11:07 am, nmiddleweek [EMAIL PROTECTED] wrote: Hi, I'm really not even sure where to start with this one so am really hoping someone can help shed some light on it... I've got a a bunch of input fields called inputTime1, inputTime2, inputTime3, inputTime4 and I've got a 'parallel' bunch of hidden fields called inputNotes1, inputNotes2, inputNotes3, inputNotes4 I need to set the inputTime1.css to bold if inputNotes1 is NOT empty and the same for inputTime2 and inputNotes2, etc. Can this be done in a simple jQuery statement? Cheers and thanks in advance! N
[jQuery] Re: jeditable and XHTML?
On Nov 14, 2008, at 1:23 AM, Rodent of Unusual Size wrote: Is there a known problem with jQuery/jeditable and XHTML? I keep running into this 'invalid string' message with JS and XHTML. First Dojo, now here.. it's getting discouraging. What am I doing wrong? Do you have example page somewhere online? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Nesting toddle div's
Thanks for the reply Richard, unfortunately that wasn't the issue. Ive tided up my example to make it clearer : http://pastie.org/314976 http://pastie.org/314976 So at startup you should see 'Click me' then upon clicking, 'I'm Hidden' 'Click ME To see more' will be revealed. After clicking 'Click ME To see more', 'Nested Hidden' would be revealed. Thanks for the help Richard D. Worth-2 wrote: You may want to start by validating your html. You're missing a closing /div, so it's not clear how you intend it to be nested. Once you've corrected that, let us know if you still have a problem. - Richard On Fri, Nov 14, 2008 at 10:26 AM, sinkingfish [EMAIL PROTECTED] wrote: Hi, Im new to jQuery and looking for a bit of help. Im trying to have toggleable content within toggleable content. http://pastie.org/314861 Code It's just not working for me, when I click the first toggle all is revealed? Am I way off? Something to do with propagation? Thanks Brian -- View this message in context: http://www.nabble.com/Nesting-toddle-div%27s-tp20502521s27240p20502521.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Nesting-toggle-div%27s-tp20502521s27240p20505081.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jeditable and XHTML?
On Nov 14, 2008, at 1:23 AM, Rodent of Unusual Size wrote: Anyway, is there anything obviously wrong with the fragment at http://apache.pastebin.ca/1254469 ? BTW. You have an extra , in the code. Remove it from the last configuration parameter tooltip : 'Click to edit', -- Mika Tuupola http://www.appelsiini.net/
[jQuery] AJAX with IE and method POST
Hi guys/girls, I just wanted to post here my problems (and solution) I had been struggling with last 2 days. I was doing JQuery AJAX POST and it was not working in IE wile working in FireFox. Sometimes you will get 12030 error (Server unexpectedly terminated connection) from IE's XMLHttpRequest object. I discovered that in order for IE's XMLHttpRequest object to properly read return stream the input stream must be completely read by the server (even if you are not interested in it). Some frameworks do it automatically and some do not. For example ASP.NET does not do it automatically. I was trying to do POST to .ashx handler and was getting errors. So adding this code to my handler fixed the problem. System.IO.Stream st = context.Request.InputStream; byte []buf = new byte[100]; while (true) { int iRead = st.Read(buf, 0, 100); if( iRead == 0 ) break; } st.Close(); So I am just posing it for Google to spider it and people to be able to find it. Cause when I googled I found a lot of people having problem with 12030 error but no solution. Good luck, George
[jQuery] Re: Animating table rows
Here's how to slideUp hide a row with the inner wrapping divs: $(tr).click(function() { var tr = $(this); tr.children(td).each(function() { $(this).wrapInner(div/div).children(div).slideUp(function() { tr.hide(); }); }); }); - Richard On Fri, Nov 14, 2008 at 12:21 PM, c.barr [EMAIL PROTECTED] wrote: .fadeIn() and .fadeOut() seem to work OK in Firefox, but in IE they seem to do the same as .show() and .hide() - they just pop in. Same goes for .slideDown() and .slideUp() in IE. Try it out with the demo I linked to above. So apparently effects are very limited in tables - and even more so in IE. I suppose I'll have to just do a .show() and .hide() since it works, and thats what happens in IE anyway. Any other advice or insight would be appreciated
[jQuery] Re: [Autocomplete] Reducing remote calls
Hi Jorn, Thanks for all your hard work on the plugin! I'm hesitant to call this a bug report or a feature request since I was just looking to solve my specific problems. I haven't really looked at it in a more general way, i.e. if my scenario applies in other cases often enough to warrant it being implemented in the main branch. But if you are considering it, then that's great! I wish I could help more, but I feel I'm not competent enough in jQuery and Javascript in general to offer suggestions. About my original problem, I sidestepped it by delegating the remote call to a separate input, then passing the returned data to the autocomplete-able input. On Fri, Nov 14, 2008 at 9:54 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: Created a ticket for now: http://ui.jquery.com/bugs/ticket/3588 Jörn
[jQuery] JQuery Auto Complete?
hello! I'm using the JQuery auto complete ( jquery.autocomplete.js ). and I'm wondering how can I submit a form once an item has been selected? currently when an item is select you have to hit enter twice, once to get the item into the search field, and once to submit the search. I'd like to submit the search on the first enter. I see the option for : onItemSelect how can I use this to submit the form? thanks inadvance for your time! -Ken
[jQuery] Re: this and z-index changes
Right. This is getting a bit complex. Judging by your code things should be going well, could you put up a test page? the global vars suggestion was a shot in the dark, if you a run loop they will be overwritten for every iteration unless the assignment doesn't execute. On Nov 14, 2:23 pm, CodingCyborg [EMAIL PROTECTED] wrote: I have confirmed that when one of a group of windows is clicked, it runs as if every window in that group was clicked at the same time and runs the code for each of them. This causes quite an awkward outcome, but I have no idea why its happening, nor how to stop it. On Nov 14, 9:03 am, ricardobeat [EMAIL PROTECTED] wrote: I haven't looked througly at your code, but I see you're using global variables, that might be an issue: $('.draggableWindow').mousedown(function(){ var numWindows=$('.draggableWindow').length + 500; var zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ var newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ //being greater doesn't mean it's only 1 unit greater newZ2 = zindexlt2-2; //just to be safe $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($ (this).css(z-index))); } }); } }); On Nov 14, 11:13 am, CodingCyborg [EMAIL PROTECTED] wrote: jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($(this).css(z-index))); } }); } }); I added a line so I could watch the z-index movements of the draggable windows. I found that they are all on separate layers but for some reason instead of each of them above the one you bring to front dropping one, some will drop two while others don't move. I'm not sure why this is happening, it's almost as if some windows are run through the .each() multiple times while others don't move. Or when others go through it they affect the first one through it. Help would be highly appreciated! On Nov 13, 1:08 pm, CodingCyborg [EMAIL PROTECTED] wrote: I recently have been playing around with a Desktop module that was on nettuts and made a modification for it that doesn't fully work. There are many draggable windows, and in order for them to function like a real desktop they need to have z-index changes such that if you close one on top the last one you had on top is right below it. I believe my error comes in with this or possibly something else, but when you pull one to the front it causes some or all of the others to end up in the same z-index causing them to not stay in order of recently viewed. jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500;//the + 500 is to make sure they are above other objects on the page zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows);//brings to front $('.draggableWindow').each(function(){//supposed to drop others back one... newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); } }); } });
[jQuery] Re: jeditable and XHTML?
On Nov 14, 2008, at 1:23 AM, Rodent of Unusual Size wrote: I want to use jeditable to edit fields in a table, but right now I'm trying to get it to work on any old XHTML.. Can you try latest from github: http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditable.js?raw=true It was a stoopid mistake of using tags such as button instead of button / in several places. Your test case passed ok now with my tests when xhtml is served as application/xhtml+xml. Thanks for the heads up! -- Mika Tuupola http://www.appelsiini.net/
[jQuery] ANN: screenshots.debian.net (jQuery-based website)
Hi, all... I use and love jQuery for pimping our intranet applications at work. This time the application is public and open-sourced so I thought I'd drop a note here and also say thanks to the jQuery and plugin developers. The site is http://screenshots.debian.net It features jQuery, Jörn's Autocomplete plugin (when uploading packages), the jGrowl plugin (for status messages after uploading or for moderation) and the infamous but amazing Flyout plugin (for the image zoom effect). I already received a lot of feedback. And although I use rather little amounts of Javascript people are still amazed. Cheers Christoph -- A guess is just a guess until you turn it into a pie chart. Then it's an analysis. (Scott Adams) signature.asc Description: This is a digitally signed message part.
[jQuery] Question about $.data()
Hi all, Quick question about the $.data() function... Is there a way to see everything that's currently stored in one of these data objects? Since the function (and its compliment, $.data.removeData()) allow for setting/retrieving/deleting key/value pairs, it seems natural that one would want to do something like this: for (var x in $jQueryObject.data) { do something with x; } Is it possible to iterate through the data cache? If not, why not? Thanks in advance and regards, --Bill
[jQuery] Cluetip caching with option set to false
Hey all, I'm trying to use the Cluetip plug in and I'm having what I hope is a simple to fix problem. The plug in seems to be caching even though i have it set not to. Every time i hover over my link it pulls the same data. I'm in ASP.NET so i set a breakpoint on the server side code and it only gets executed the first time after i clear browser history. This tool tip is associated with another element that will impact the value of the pop up so i need it to get the latest data every time. Here is my cluetip line - $(document).ready(function() { $('a.audit').cluetip({cluetipClass: 'rounded', dropShadow: false, sticky: true, ajaxCache: false, arrows: true}); }); That's pretty much borrowed from the demo on the site. Any thoughts?
[jQuery] slideToggle on checkbox
Hi everybody, my first post here - please bear with me ;)... I am working on a form, using .slideToggle to show/hide another part of the form - if a checkbox is checked. Got it to work with the following code: $('#honorbox').hide(); //hide initially $('input#honor_someone').click(function() { this.checked; $(#honorbox).slideToggle('slow'); this.blur(); }); Problem: this is a multipart form - if the user checks that box , fills in the details and continues on, but then comes back using the back button, the checkbox is checked, but #honorbox is hidden and will show only on unchecking... Probably a simple thing, but as a german would say, I stand on the hose ... probably have to add an if statement to that initial .hide()? Thanks, Richard
[jQuery] Re: AJAX with IE and method POST
did you forget to pass data (data:{}) in the ajax call? I have had that trip me up when doing posts via ajax. On Nov 14, 10:35 am, George [EMAIL PROTECTED] wrote: Hi guys/girls, I just wanted to post here my problems (and solution) I had been struggling with last 2 days. I was doing JQuery AJAX POST and it was not working in IE wile working in FireFox. Sometimes you will get 12030 error (Server unexpectedly terminated connection) from IE's XMLHttpRequest object. I discovered that in order for IE's XMLHttpRequest object to properly read return stream the input stream must be completely read by the server (even if you are not interested in it). Some frameworks do it automatically and some do not. For example ASP.NET does not do it automatically. I was trying to do POST to .ashx handler and was getting errors. So adding this code to my handler fixed the problem. System.IO.Stream st = context.Request.InputStream; byte []buf = new byte[100]; while (true) { int iRead = st.Read(buf, 0, 100); if( iRead == 0 ) break; } st.Close(); So I am just posing it for Google to spider it and people to be able to find it. Cause when I googled I found a lot of people having problem with 12030 error but no solution. Good luck, George
[jQuery] Tabs: get selected tab?
Hello, I am using Tabs from jQueryUI. I have a callback function for when the selected tab is shown: $('ul.tabs').tabs({ show: function(event, ui) { // do stuff } }); When the tab is shown, I need to pre-populate its form with values based on cookie data. How can I tell which tab is shown? Or, more specifically, how can I get the shown tab container? Do I have to query for it manually with $('div.ui-tabs-panel:visible)? Thanks! -Hector
[jQuery] Re: JQuery Auto Complete?
there is a result callback that is fired after you choose an element in the AC list. bind to that and carry on your form submit... $(...).autocomplete(options).result(fn); --adam On Nov 14, 12:13 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello! I'm using the JQuery auto complete ( jquery.autocomplete.js ). and I'm wondering how can I submit a form once an item has been selected? currently when an item is select you have to hit enter twice, once to get the item into the search field, and once to submit the search. I'd like to submit the search on the first enter. I see the option for : onItemSelect how can I use this to submit the form? thanks inadvance for your time! -Ken
[jQuery] Re: JQuery Auto Complete?
sorry, i'm a bit of a n00b with JQuery. would that be added onto my current autocomplete call? my is my code now: $().ready(function() { $(#SearchTxt).autocomplete(AjaxSearch.php, { width: 190, onItemSelect: SubmitSearchForm, selectFirst: false }); }); so I would add it on like: $().ready(function() { $(#SearchTxt).autocomplete(AjaxSearch.php, { width: 190, onItemSelect: SubmitSearchForm, selectFirst: false }).result(fn); }); then where 'fn' is, I could add in a function to check that the field has a value and submit it? or would that be an additional call? On Nov 14, 2:46 pm, ajpiano [EMAIL PROTECTED] wrote: there is a result callback that is fired after you choose an element in the AC list. bind to that and carry on your form submit... $(...).autocomplete(options).result(fn); --adam On Nov 14, 12:13 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello! I'm using the JQuery auto complete ( jquery.autocomplete.js ). and I'm wondering how can I submit a form once an item has been selected? currently when an item is select you have to hit enter twice, once to get the item into the search field, and once to submit the search. I'd like to submit the search on the first enter. I see the option for : onItemSelect how can I use this to submit the form? thanks inadvance for your time! -Ken- Hide quoted text - - Show quoted text -
[jQuery] Re: [validate] Two page form won't validate on IE
Hi, I've added some validate() calls now. I assumed that this wasn't necessary when I explicitly call valid() but perhaps I've got that wrong. Anyways, it doesn't appear to have changed things. The valid call on the second form is always returning true (for IE), even if the required fields are empty. On Firefox it's doing the right thing. When you say extract a testpage, what do you mean? Remove as much from the page as possible whilst keeping the problem? Thanks Michael On Fri, Nov 14, 2008 at 4:54 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: I see the valid calls in your code, but none where you actually initialize the validation via $(...).validate(). Could you extract a testpage? Jörn On Fri, Nov 14, 2008 at 4:48 PM, Michael Smith [EMAIL PROTECTED] wrote: Hi there I'm having trouble getting the Validation plug in to work on this page http://dev2.savingforchildren.co.uk/mjs/health/index.epl I have two forms - the second one appears when the first one is successfully completed. The first form validates correctly (you only need to choose a day, month and year from the dropdowns) However, when using IE no validation is applied to the second form (ie you can leave the whole page blank and it is accepted). Firefox works fine Any help much apprecited Thanks, Michael
[jQuery] Re: Tabs: get selected tab?
Use ui.index to access the currently active tab's index, zero being the first tab and so on. $('ul.tabs').tabs({ show: function(event, ui) { if (ui.index == 0) { // do stuff } else if (ui.index == 1) { // do other stuff } } }); On Nov 14, 2:39 pm, Hector Virgen [EMAIL PROTECTED] wrote: Hello, I am using Tabs from jQueryUI. I have a callback function for when the selected tab is shown: $('ul.tabs').tabs({ show: function(event, ui) { // do stuff } }); When the tab is shown, I need to pre-populate its form with values based on cookie data. How can I tell which tab is shown? Or, more specifically, how can I get the shown tab container? Do I have to query for it manually with $('div.ui-tabs-panel:visible)? Thanks! -Hector
[jQuery] A real modal window... is it possible?
Is it possible to make a window like jqModal, etc, etc, BUT WITH A REAL MODAL way of work? I mean the flow of code must STOP until the window be closed! Does it exist?
[jQuery] Re: A real modal window... is it possible?
If the flow of code stopped, there would be no way to close the window. - Richard On Fri, Nov 14, 2008 at 3:11 PM, Wagner [EMAIL PROTECTED] wrote: Is it possible to make a window like jqModal, etc, etc, BUT WITH A REAL MODAL way of work? I mean the flow of code must STOP until the window be closed! Does it exist?
[jQuery] Re: jeditable autocomplete - time to revisit?
That is exactly why I posted. I noticed that you had done a lot of work on inputs. Unfortunately I could not figure out how to do it myself from reading through your website. Thanks again for your help. -jl On Nov 13, 1:51 am, Mika Tuupola [EMAIL PROTECTED] wrote: On Nov 12, 2008, at 9:25 PM, [EMAIL PROTECTED] wrote: Wow, that was sooo simple. Works like a charm! Impressive.. Now, thats the way a plugin should work. Nice work Mike. Thank you :) Usually when someone has the need to do something special (such as useautocomplete) withJeditablethere is no need to touch Jeditablecode itself. All you need to do is to write a custom input. The reason why I created the plugin architecture (plugins for plugin) was to avoid bloat. Take 10 people and they have at least eight different needs. Making all their needs a configurable option would bloat the code. Thus the solution: Make all basic features configurable and create API with which people can extend the features how ever they want. -- Mika Tuupolahttp://www.appelsiini.net/
[jQuery] Re: AJAX with IE and method POST
No i did not...I did pass exactly this '{}' (empty JSON data). As i said the problem was that i were not reading the InputStream till the end cause i knew that data would be empty. And it messes up IE's XMLHttpRequest object so it can not read properly output from the server. George. On Nov 14, 2:22 pm, Mike Nichols [EMAIL PROTECTED] wrote: did you forget to pass data (data:{}) in the ajax call? I have had that trip me up when doing posts via ajax. On Nov 14, 10:35 am, George [EMAIL PROTECTED] wrote: Hi guys/girls, I just wanted to post here my problems (and solution) I had been struggling with last 2 days. I was doing JQuery AJAX POST and it was not working in IE wile working in FireFox. Sometimes you will get 12030 error (Server unexpectedly terminated connection) from IE's XMLHttpRequest object. I discovered that in order for IE's XMLHttpRequest object to properly read return stream the input stream must be completely read by the server (even if you are not interested in it). Some frameworks do it automatically and some do not. For example ASP.NET does not do it automatically. I was trying to do POST to .ashx handler and was getting errors. So adding this code to my handler fixed the problem. System.IO.Stream st = context.Request.InputStream; byte []buf = new byte[100]; while (true) { int iRead = st.Read(buf, 0, 100); if( iRead == 0 ) break; } st.Close(); So I am just posing it for Google to spider it and people to be able to find it. Cause when I googled I found a lot of people having problem with 12030 error but no solution. Good luck, George- Hide quoted text - - Show quoted text -
[jQuery] Re: Tabs: get selected tab?
Thanks for your reply, Tristan. Unfortunately, that solution only works if the tabs are never changed. For example, if tomorrow my client asks me to switch tab 2 with tab 4, I will have to update my html *and* javascript. I would prefer to not have to update the javascript, which would be possible if the ui object could return the shown tab element directly. For example, something like this would be perfect: $('ul.tabs').tabs({ show: function(event, ui) { var shownTab = ui.shownTab; // disable form elements on the shown tab shownTab.find('input', 'select').attr('disabled', 'disabled'); } }); Is there anything like that available? Thanks! -Hector On Fri, Nov 14, 2008 at 11:56 AM, Tristan [EMAIL PROTECTED] wrote: Use ui.index to access the currently active tab's index, zero being the first tab and so on. $('ul.tabs').tabs({ show: function(event, ui) { if (ui.index == 0) { // do stuff } else if (ui.index == 1) { // do other stuff } } }); On Nov 14, 2:39 pm, Hector Virgen [EMAIL PROTECTED] wrote: Hello, I am using Tabs from jQueryUI. I have a callback function for when the selected tab is shown: $('ul.tabs').tabs({ show: function(event, ui) { // do stuff } }); When the tab is shown, I need to pre-populate its form with values based on cookie data. How can I tell which tab is shown? Or, more specifically, how can I get the shown tab container? Do I have to query for it manually with $('div.ui-tabs-panel:visible)? Thanks! -Hector
[jQuery] Re: Tabs: get selected tab?
On Fri, Nov 14, 2008 at 3:31 PM, Hector Virgen [EMAIL PROTECTED] wrote: Thanks for your reply, Tristan. Unfortunately, that solution only works if the tabs are never changed. For example, if tomorrow my client asks me to switch tab 2 with tab 4, I will have to update my html *and* javascript. I would prefer to not have to update the javascript, which would be possible if the ui object could return the shown tab element directly. For example, something like this would be perfect: $('ul.tabs').tabs({ show: function(event, ui) { var shownTab = ui.shownTab; // disable form elements on the shown tab shownTab.find('input', 'select').attr('disabled', 'disabled'); } }); Is there anything like that available? Thanks! From http://docs.jquery.com/UI/Tabs#Events $('.ui-tabs-nav').bind('tabsselect', function(event, ui) { ui.options // options used to intialize this widget *ui.tab // anchor element of the selected (clicked) tab* ui.panel // element, that contains the contents of the selected (clicked) tab ui.index // zero-based index of the selected (clicked) tab }); - Richard
[jQuery] Re: Tabs: get selected tab?
Thanks! I didn't notice that under the Events section. :) -Hector On Fri, Nov 14, 2008 at 12:35 PM, Richard D. Worth [EMAIL PROTECTED]wrote: On Fri, Nov 14, 2008 at 3:31 PM, Hector Virgen [EMAIL PROTECTED] wrote: Thanks for your reply, Tristan. Unfortunately, that solution only works if the tabs are never changed. For example, if tomorrow my client asks me to switch tab 2 with tab 4, I will have to update my html *and* javascript. I would prefer to not have to update the javascript, which would be possible if the ui object could return the shown tab element directly. For example, something like this would be perfect: $('ul.tabs').tabs({ show: function(event, ui) { var shownTab = ui.shownTab; // disable form elements on the shown tab shownTab.find('input', 'select').attr('disabled', 'disabled'); } }); Is there anything like that available? Thanks! From http://docs.jquery.com/UI/Tabs#Events $('.ui-tabs-nav').bind('tabsselect', function(event, ui) { ui.options // options used to intialize this widget *ui.tab // anchor element of the selected (clicked) tab* ui.panel // element, that contains the contents of the selected (clicked) tab ui.index // zero-based index of the selected (clicked) tab }); - Richard
[jQuery] Re: Animating table rows
That's awesome man! I worked with it a bit to get it working with adding a row as well, and this seems to work just fine! Here's a live demo: http://jsbin.com/apode Tested and working in Firefox, Opera, Safari, and IE! On Nov 14, 11:57 am, Richard D. Worth [EMAIL PROTECTED] wrote: Here's how to slideUp hide a row with the inner wrapping divs: $(tr).click(function() { var tr = $(this); tr.children(td).each(function() { $(this).wrapInner(div/div).children(div).slideUp(function() { tr.hide(); }); }); }); - Richard On Fri, Nov 14, 2008 at 12:21 PM, c.barr [EMAIL PROTECTED] wrote: .fadeIn() and .fadeOut() seem to work OK in Firefox, but in IE they seem to do the same as .show() and .hide() - they just pop in. Same goes for .slideDown() and .slideUp() in IE. Try it out with the demo I linked to above. So apparently effects are very limited in tables - and even more so in IE. I suppose I'll have to just do a .show() and .hide() since it works, and thats what happens in IE anyway. Any other advice or insight would be appreciated
[jQuery] Re: Animating table rows
Slick! Thanks for sharing. - Richard On Fri, Nov 14, 2008 at 3:50 PM, c.barr [EMAIL PROTECTED] wrote: That's awesome man! I worked with it a bit to get it working with adding a row as well, and this seems to work just fine! Here's a live demo: http://jsbin.com/apode Tested and working in Firefox, Opera, Safari, and IE! On Nov 14, 11:57 am, Richard D. Worth [EMAIL PROTECTED] wrote: Here's how to slideUp hide a row with the inner wrapping divs: $(tr).click(function() { var tr = $(this); tr.children(td).each(function() { $(this).wrapInner(div/div).children(div).slideUp(function() { tr.hide(); }); }); }); - Richard On Fri, Nov 14, 2008 at 12:21 PM, c.barr [EMAIL PROTECTED] wrote: .fadeIn() and .fadeOut() seem to work OK in Firefox, but in IE they seem to do the same as .show() and .hide() - they just pop in. Same goes for .slideDown() and .slideUp() in IE. Try it out with the demo I linked to above. So apparently effects are very limited in tables - and even more so in IE. I suppose I'll have to just do a .show() and .hide() since it works, and thats what happens in IE anyway. Any other advice or insight would be appreciated
[jQuery] Re: this and z-index changes
http://arkaydea.com/zIndexTest.php That is the closest thing I can get to the real thing. On Nov 14, 12:38 pm, ricardobeat [EMAIL PROTECTED] wrote: Right. This is getting a bit complex. Judging by your code things should be going well, could you put up a test page? the global vars suggestion was a shot in the dark, if you a run loop they will be overwritten for every iteration unless the assignment doesn't execute. On Nov 14, 2:23 pm, CodingCyborg [EMAIL PROTECTED] wrote: I have confirmed that when one of a group of windows is clicked, it runs as if every window in that group was clicked at the same time and runs the code for each of them. This causes quite an awkward outcome, but I have no idea why its happening, nor how to stop it. On Nov 14, 9:03 am, ricardobeat [EMAIL PROTECTED] wrote: I haven't looked througly at your code, but I see you're using global variables, that might be an issue: $('.draggableWindow').mousedown(function(){ var numWindows=$('.draggableWindow').length + 500; var zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ var newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ //being greater doesn't mean it's only 1 unit greater newZ2 = zindexlt2-2; //just to be safe $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($ (this).css(z-index))); } }); } }); On Nov 14, 11:13 am, CodingCyborg [EMAIL PROTECTED] wrote: jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows); $('.draggableWindow').each(function(){ newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); $(this).children('h1').text(parseInt($(this).css(z-index))); } }); } }); I added a line so I could watch the z-index movements of the draggable windows. I found that they are all on separate layers but for some reason instead of each of them above the one you bring to front dropping one, some will drop two while others don't move. I'm not sure why this is happening, it's almost as if some windows are run through the .each() multiple times while others don't move. Or when others go through it they affect the first one through it. Help would be highly appreciated! On Nov 13, 1:08 pm, CodingCyborg [EMAIL PROTECTED] wrote: I recently have been playing around with a Desktop module that was on nettuts and made a modification for it that doesn't fully work. There are many draggable windows, and in order for them to function like a real desktop they need to have z-index changes such that if you close one on top the last one you had on top is right below it. I believe my error comes in with this or possibly something else, but when you pull one to the front it causes some or all of the others to end up in the same z-index causing them to not stay in order of recently viewed. jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500;//the + 500 is to make sure they are above other objects on the page zindexIt2 = parseInt($(this).css(z-index)); if(zindexIt2 numWindows){ $(this).css(z-index,numWindows);//brings to front $('.draggableWindow').each(function(){//supposed to drop others back one... newZ2=$(this).css(z-index); if(newZ2 zindexIt2){ newZ2--; $(this).css(z-index,newZ2); } }); } });
[jQuery] Re: issue with jQuery's trigger function
Have you tried the svn version of jQuery? That might have solved the problem. http://docs.jquery.com/Downloading_jQuery#Subversion_.28SVN.29 --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 14, 2008, at 11:49 AM, Shazzaam wrote: Hi, I am using jQuery 1.2.6, and also have Prototype 1.6.0.1 and Scriptaculous 1.8.1 in my page. I know there are issues getting this to work, but i have noConflict() running. Anyway, I am using jQuery's tablesorter plugin and when I call trigger(update) to refresh my table it wipes out my table completely. After running the Webkit javascript debugger, I was able to trace it to the trigger function in jQuery: line #2041: elem[ type ](); Apparently, when I step into this function call, it actually jumps to prototype.js to handle it. Has anyone else seen this happen, or have any ideas on how I can fix? Unfortunately, removing prototype and scriptaculous is not an option. Thanks -- View this message in context: http://www.nabble.com/issue-with-jQuery%27s-trigger-function-tp20504225s27240p20504225.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.