[jQuery] Re: Solution To Many Of Your CSS Nightmares!
thanks ricardo. you definitely understand specificity. your links confirm: A style that is designated as important will win out over contradictory styles of otherwise equal weight. and, if styles of equal weight both use !important, the last rule specified wins. http://www.htmlhelp.com/reference/css/structure.html#cascade but, as this thread has shown, id's + !important ensure the widget-css will almost always win (in the widget), and NEVER affect the site. no response i've seen in this thread has swayed me from my view that, in most cases, !important in widget-css is safe for the site, simple to use, and nearly infallible. 'nuff said. p.s. your link offers a scenario in which you might want to AVOID ! important: !important rules will override normal rules (in the browser-css), so authors are advised to use normal rules almost exclusively to ensure that users with special style needs are able to read the page. i don't agree-- i'm not going to sacrifice site richness and functionality for normal readers to accommodate special readers-- instead, i would provide alternate accessible pages for special readers, and go to town on my normal pages. (but that's a chat for another day).
[jQuery] Help me regarding cart?
Hi Can Any one Provide me a shopping cart script. Example : It should be like this http://www.ornamental-trees.co.uk/cart.php If any one having the source please share with me... Thanks in advance Waiting ... Anil.Arumalla
[jQuery] Re: simple click event won't fire
Thx for pointing that out, native events won't fire...check! I got carried away thinking the native event was firing because when i initialy used $(table.vacatures tbody tr).click( function(){ $(this).find(a:first).click(); }); I got a 'too much recursion' error, thinking that the native event fired - bubling back up to the tr and firing over and over again. That's why I tried .one(). Anyway, thx.
[jQuery] Class selectors not working when using jQuery 1.3 with Mootools 1.11
Hi I'm working on a project that used to implement Mootools 1.11. It has been decided however that we switch over to jQuery since it is much faster and more light-weight. However, because we have created numerous widgets in Mootools, we still have to use it while the jQuery equivalent widgets are being developed. We have implemented the noConflict method with various degrees of success. We have noticed that after upgrading from jQuery 1.2.6 to 1.3, that using the old Mootools 1.11 along with jQuery, renders the class selector useless. Executing something like jQuery(.myClass) or jQuery(div.myClass) returns an error: context.getElementsByClassName is not a function. It occurs in the following section: if ( document.documentElement.getElementsByClassName ) { Expr.order.splice(1, 0, CLASS); Expr.find.CLASS = function(match, context) { return context.getElementsByClassName(match[1]); }; } Strangely enough the expression if ( document.documentElement.getElementsByClassName ) yields a result of true, but context.getElementsByClassName is still undefined. The context in this case is the document object itself. I'm suspecting that it has got something to do with Mootools that is throwing a spanner into the works. Has anyone encountered a similar problem? Or has anyone got some comments on the subject?
[jQuery] Recommendation Required - Custom Classes Library
I was wondering, which Custom Classes Library is best to use along with jQuery. Up to now, I've been using Mootools to create custom classes that can be easily extended through its inheritance model. It also has custom events that I have used extensively. Which library do you recommend that has the same functionality as described above that can co-exist with jQuery peacefully? This could make for an interesting discussion
[jQuery] loading jquery
Hi, I am loading jQuery from a script inside a page and need to execute next function right after jQuery loads. What would be the best way to do this? So far I have tried using a timer to check if jQuery == 'undefined'
[jQuery] Re: loading jquery
This link might help http://ajaxpatterns.org/On-Demand_Javascript On Jan 20, 10:39 am, slava mikerin.sl...@gmail.com wrote: Hi, I am loading jQuery from a script inside a page and need to execute next function right after jQuery loads. What would be the best way to do this? So far I have tried using a timer to check if jQuery == 'undefined'
[jQuery] jquery.corners not Working in Mac FireFox 2 or Windows IE 7? Demo Page Provided
I have a page where jquery.corners works perfectly in Mac Safari, Mac Firefox 3, and Windows Firefox 3, but not in Mac Firefox 2, or in Windows IE 7. How can I correct this? An online demo is at this link: http://www.flavorzoom.com/corners_anomaly/corners_anomaly.html Thanks very much in advance to all for any info. -Vik
[jQuery] Issues with jQuery Cycle Plugin
Hello all, I'm working with the Pager feature using the jQuery Cycle Plugin(http://malsup.com/jquery/cycle/int2.html) I'm having some problems. I made two buttons at the bottom of my layout that when pressed are supposed to fade in two separate content areas. I'm pretty sure I made the correct div's and inserted the jQuery code correctly, so I'm not sure why I'm experiencing the problems I'm facing. In Firefox the two buttons don't do anything. In Internet Explorer, the second button fades in the second content area, but when I press the first button to fade in the first content area, nothing fades back in. I hope you all can help me, because I'm thoroughly confused. The page I am referring to is http://www.idea-palette.com/testfolder/pagetest3.html -Chris -- View this message in context: http://www.nabble.com/Issues-with-jQuery-Cycle-Plugin-tp21559640s27240p21559640.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Class selectors not working when using jQuery 1.3 with Mootools 1.11
This was mentioned on the jquery-dev group or somewhere else, I don't remember exactly. It's about Mootools not extending properly the document object I think, I'm sure it has been fixed in the trunk. I suspect this is it: http://github.com/jeresig/sizzle/commit/0a9df6e0b68a91dd1f59bfd6e7941843cba32a7a On Jan 20, 3:26 am, Neil Craig neil.big.cr...@gmail.com wrote: Hi I'm working on a project that used to implement Mootools 1.11. It has been decided however that we switch over to jQuery since it is much faster and more light-weight. However, because we have created numerous widgets in Mootools, we still have to use it while the jQuery equivalent widgets are being developed. We have implemented the noConflict method with various degrees of success. We have noticed that after upgrading from jQuery 1.2.6 to 1.3, that using the old Mootools 1.11 along with jQuery, renders the class selector useless. Executing something like jQuery(.myClass) or jQuery(div.myClass) returns an error: context.getElementsByClassName is not a function. It occurs in the following section: if ( document.documentElement.getElementsByClassName ) { Expr.order.splice(1, 0, CLASS); Expr.find.CLASS = function(match, context) { return context.getElementsByClassName(match[1]); }; } Strangely enough the expression if ( document.documentElement.getElementsByClassName ) yields a result of true, but context.getElementsByClassName is still undefined. The context in this case is the document object itself. I'm suspecting that it has got something to do with Mootools that is throwing a spanner into the works. Has anyone encountered a similar problem? Or has anyone got some comments on the subject?
[jQuery] Re: New link being ignored by jQuery
Hi Rick, Thanks for your response. I've got it working now. I used the LiveQuery plugin that you recommended. It took a few attempts but I've finally managed to get it working! Thanks again. Saved me a *lot* of time! Mark On Jan 19, 9:44 pm, Rick Faircloth r...@whitestonemedia.com wrote: Hi, Mark... Check into the LiveQuery plug-in and use it on your .click element. (see the instructions at the plug-in site). You can also use .live function built into jQuery 1.3, if you're using that. But I understand the .live function has some limitations that the LiveQuery doesn't have. hth, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mark MacInnes Sent: Monday, January 19, 2009 1:14 PM To: jQuery (English) Subject: [jQuery] New link being ignored by jQuery I'm using jQuery to perform some ajax when a link with a certain id is clicked on. The ajax updates a database record and then it replaces the 'a' tag with a new one. This all works fine. The new 'a' tag has the same id as the old one, but text and some other properties on it change. It's the id that activates the jQuery functionality. When the old 'a' tag is replaced with the new one the jQuery that should operate doesn't work. I understand that this is because the new 'a' tag has been added after the page loaded so jQuery doesn't know to fire when it's clicked on. Is there anything I can do that will force jQuery to fire when the new 'a' tag is clicked? I suspect this has probably been answered a million times, but I don't just can't find the right search terms.
[jQuery] Re: Class selectors not working when using jQuery 1.3 with Mootools 1.11
Thanks, that sorted out the problem. On Jan 20, 12:08 pm, Balazs Endresz balazs.endr...@gmail.com wrote: This was mentioned on the jquery-dev group or somewhere else, I don't remember exactly. It's about Mootools not extending properly the document object I think, I'm sure it has been fixed in the trunk. I suspect this is it:http://github.com/jeresig/sizzle/commit/0a9df6e0b68a91dd1f59bfd6e7941... On Jan 20, 3:26 am, Neil Craig neil.big.cr...@gmail.com wrote: Hi I'm working on a project that used to implement Mootools 1.11. It has been decided however that we switch over to jQuery since it is much faster and more light-weight. However, because we have created numerous widgets in Mootools, we still have to use it while the jQuery equivalent widgets are being developed. We have implemented the noConflict method with various degrees of success. We have noticed that after upgrading from jQuery 1.2.6 to 1.3, that using the old Mootools 1.11 along with jQuery, renders the class selector useless. Executing something like jQuery(.myClass) or jQuery(div.myClass) returns an error: context.getElementsByClassName is not a function. It occurs in the following section: if ( document.documentElement.getElementsByClassName ) { Expr.order.splice(1, 0, CLASS); Expr.find.CLASS = function(match, context) { return context.getElementsByClassName(match[1]); }; } Strangely enough the expression if ( document.documentElement.getElementsByClassName ) yields a result of true, but context.getElementsByClassName is still undefined. The context in this case is the document object itself. I'm suspecting that it has got something to do with Mootools that is throwing a spanner into the works. Has anyone encountered a similar problem? Or has anyone got some comments on the subject?
[jQuery] [jquery]$date1 = $('div /')W hat does it mean ?
$date1 = $('div /') http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiMonth.html $date1 = $('div /') .datePicker({inline:true}) .bind( 'dpMonthChanged', function(event, displayedMonth, displayedYear) { $date2.dpSetDisplayedMonth(displayedMonth+1, displayedYear); } ) .bind( 'dateSelected', function(event, date, $td, status) { $date2.dpSetSelected(date.asString(), status, false); } ); // remove the forward navigation from the first date picker $('.dp-nav-next', $date1).html(''); // create the right hand datePicker and add the relevant event listeners to sync it to the left hand one... $date2 = $('div /') .datePicker({inline:true}) .bind( 'dpMonthChanged', function(event, displayedMonth, displayedYear) { $date1.dpSetDisplayedMonth(displayedMonth-1, displayedYear); } ) .bind( 'dateSelected', function(event, date, $td, status) { $date1.dpSetSelected(date.asString(), status, false); } ); // remove the backward navigation from the first date picker $('.dp-nav-prev', $date2).html(''); // initialise the date pickers to consecutive months ($date1 defaults to this month so set $date2 to next month) var now = new Date(); $date2.dpSetDisplayedMonth(now.getMonth()+1, now.getFullYear()); // add the generated combined plugin to the document $('#multimonth').html('').append($date1, $date2);
[jQuery] sortStart and sortEnd triggers - tablesorter
Hello, I am here again and I explain you my problem: This table has the option to select the required row through a radio button. But the problem is that if I sort the table (by any column) after selecting some row, the selection goes off. I think that maybe I can use the sortStart and sortEnd triggers to maintain the state of the radio buttons in the table after sorting, but I`m still having problems. $(#tarjetas).tablesorter({widgets: ['zebra']}); table id=tarjetas class=tablesorter align=center width=100% tr tdnbsp;/td tda href=#Tarjeta/a/td td a href=#Descripcioacute;n/a/td /tr tr td id=CreditCardIndex width=30 input type=radio id=CreditCardIndex name=CreditCardIndex onclick=chequearRadio(); /td td wfs:wfwrite name=CreditCardBeanCollection property=formatedNumber scope=page//td td wfs:wfwrite name=CreditCardBeanCollection property=description scope=page//td /tr /table function chequearRadio() { for (var i=0;idocument.formaSelectCard.elements.length;i++) { var e = document.formaSelectCard.elements[i]; if ((e.type == objectType)(e.checked)){ document.formaSelectCard.selectedIndex.value = e.value; } } } Can anybody help me with this? Thanks a lot! Soledad.
[jQuery] Re: jquery.corners not Working in Mac FireFox 2 or Windows IE 7? Demo Page Provided
I dont think this plugin will rounded border in IE7. The border rounded works in Firefox and Mac because he used CSS3 property called border-radius. On Tue, Jan 20, 2009 at 07:00, Vik v...@mindspring.com wrote: I have a page where jquery.corners works perfectly in Mac Safari, Mac Firefox 3, and Windows Firefox 3, but not in Mac Firefox 2, or in Windows IE 7. How can I correct this? An online demo is at this link: http://www.flavorzoom.com/corners_anomaly/corners_anomaly.html Thanks very much in advance to all for any info. -Vik
[jQuery] Re: jquery.corners not Working in Mac FireFox 2 or Windows IE 7? Demo Page Provided
*CSS3 property border radius only works in Firefox 3 and Safari On Tue, Jan 20, 2009 at 09:19, Leonardo K leo...@gmail.com wrote: I dont think this plugin will rounded border in IE7. The border rounded works in Firefox and Mac because he used CSS3 property called border-radius. On Tue, Jan 20, 2009 at 07:00, Vik v...@mindspring.com wrote: I have a page where jquery.corners works perfectly in Mac Safari, Mac Firefox 3, and Windows Firefox 3, but not in Mac Firefox 2, or in Windows IE 7. How can I correct this? An online demo is at this link: http://www.flavorzoom.com/corners_anomaly/corners_anomaly.html Thanks very much in advance to all for any info. -Vik
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
--rendering problems of a widget, in my experience, could involve many, indeed EVERY attribute of every element in the widget. you declare your default stylesheet, then you declare your widget's sheet. if the widget is inheriting incorrectly from a parent element you've got a couple of ways around it. making every single line of the widget's CSS !important is probably the longest (not in terms of a find replace in n++, rather in terms of physical size). a nicer change would just be to give the widget's parent element an appropriate attribute val to reign in the -999px left-margin you originally gave it. --this solution is for cases where changing your default css, which will of course affect your main site rendering, is undesirable or impossible. for me, doing a global replace of ; with !important; takes about 1/2 a second. on the other hand, fine-tuning my main site css so that the widget and the site both look right could potentially take hours of trouble-shooting, trial-and-error, and juggling precedence, including specificity, order of declaration, id's and classes, and so on. the inheritance path really isn't that complicated, and if your stylesheet to that complex you don't fully understand it, inspecting an element in firebug to see where it's getting it's style from takes a couple of seconds. it's an ugly hack that has so many potential problems it's barely worth considering for anything but the simplest widget, and at that point why not just fix the widget's CSS properly. !important does not 'break' css-- it's part of the css language, intended to be used where appropriate. the last part of that sentence is the important bit! ;)
[jQuery] Simple jQuery problem with fading In/Out
Hello all, I'm trying to fade in one content area when I click on Button 1 and have the other content area fade out. As I wrote my code right now, it doesn't seem as though it's right. In Internet Explorer, It sort of works, but for some reason the content that is in content area 1 doesn't fade in. It just pops in even though the second content area fades in just fine. In Firefox, I can make content area 1 fadeout when i click on the second content area button(#button2), but then the second content area doesn't appear, nor can you make content area 1 fade back in when you press the first content area button(#button1). The jquery code I wrote myself: $(document).ready(function() { $(#area2).fadeOut(0); $(#button2).click(function() { $(#area1).fadeOut(1500, function() { $(#area2).fadeIn(1500); }); }); $(#button1).click(function() { $(#area2).fadeOut(1500, function() { $(#area1).fadeIn(1500); }); }); }); The Page with the problems is at: http://www.idea-palette.com/testfolder/pagetest3b.html -- View this message in context: http://www.nabble.com/Simple-jQuery-problem-with-fading-In-Out-tp21561440s27240p21561440.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: New link being ignored by jQuery
Glad to hear it! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mark MacInnes Sent: Tuesday, January 20, 2009 5:12 AM To: jQuery (English) Subject: [jQuery] Re: New link being ignored by jQuery Hi Rick, Thanks for your response. I've got it working now. I used the LiveQuery plugin that you recommended. It took a few attempts but I've finally managed to get it working! Thanks again. Saved me a *lot* of time! Mark On Jan 19, 9:44 pm, Rick Faircloth r...@whitestonemedia.com wrote: Hi, Mark... Check into the LiveQuery plug-in and use it on your .click element. (see the instructions at the plug-in site). You can also use .live function built into jQuery 1.3, if you're using that. But I understand the .live function has some limitations that the LiveQuery doesn't have. hth, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mark MacInnes Sent: Monday, January 19, 2009 1:14 PM To: jQuery (English) Subject: [jQuery] New link being ignored by jQuery I'm using jQuery to perform some ajax when a link with a certain id is clicked on. The ajax updates a database record and then it replaces the 'a' tag with a new one. This all works fine. The new 'a' tag has the same id as the old one, but text and some other properties on it change. It's the id that activates the jQuery functionality. When the old 'a' tag is replaced with the new one the jQuery that should operate doesn't work. I understand that this is because the new 'a' tag has been added after the page loaded so jQuery doesn't know to fire when it's clicked on. Is there anything I can do that will force jQuery to fire when the new 'a' tag is clicked? I suspect this has probably been answered a million times, but I don't just can't find the right search terms.
[jQuery] change image scr of all images in a page
hi, i have more than 20 images in a form which might be refering like this image src = images/search.gif/ i want a jquery script for replacing all image src with image src = http://s.images/images/search.gif/ please help b u d d h a
[jQuery] Re: change image scr of all images in a page
b u d d h a ha scritto: hi, i have more than 20 images in a form which might be refering like this image src = images/search.gif/ i want a jquery script for replacing all image src with image src = http://s.images/images/search.gif/ This is the code, but personally I prefer make changes like this on the server side. $('img').each(function() { $('img').attr('src': http://s.images/+$(this).attr('src')); }); -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so) - italy +39 347 7196482
[jQuery] Refreshing Menu after Adding New Structure
Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
[jQuery] Re: change image scr of all images in a page
Sorry i forgot the braces. This is the right code: $('img').each(function() { $('img').attr({'src': http://s.images/+$(this).attr('src')}); }); -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so) - italy +39 347 7196482
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
To me, 'important' is the 'goto' of CSS. On Jan 20, 6:22 am, ryan.joyce...@googlemail.com ryan.joyce...@googlemail.com wrote: --rendering problems of a widget, in my experience, could involve many, indeed EVERY attribute of every element in the widget. you declare your default stylesheet, then you declare your widget's sheet. if the widget is inheriting incorrectly from a parent element you've got a couple of ways around it. making every single line of the widget's CSS !important is probably the longest (not in terms of a find replace in n++, rather in terms of physical size). a nicer change would just be to give the widget's parent element an appropriate attribute val to reign in the -999px left-margin you originally gave it. --this solution is for cases where changing your default css, which will of course affect your main site rendering, is undesirable or impossible. for me, doing a global replace of ; with !important; takes about 1/2 a second. on the other hand, fine-tuning my main site css so that the widget and the site both look right could potentially take hours of trouble-shooting, trial-and-error, and juggling precedence, including specificity, order of declaration, id's and classes, and so on. the inheritance path really isn't that complicated, and if your stylesheet to that complex you don't fully understand it, inspecting an element in firebug to see where it's getting it's style from takes a couple of seconds. it's an ugly hack that has so many potential problems it's barely worth considering for anything but the simplest widget, and at that point why not just fix the widget's CSS properly. !important does not 'break' css-- it's part of the css language, intended to be used where appropriate. the last part of that sentence is the important bit! ;)
[jQuery] Re: change image scr of all images in a page
i tried but not wrking am placing a sample code which i used script type=text/javascript $(document).ready( $('img').each( function() { $('img').attr({'src', http://localhost/ s.demo/+$(this).attr('src')}); }); ); /script buddha On Jan 20, 5:18 pm, Giovanni Battista Lenoci gian...@gmail.com wrote: Sorry i forgot the braces. This is the right code: $('img').each(function() { $('img').attr({'src': http://s.images/+$(this).attr('src')}); }); -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so) - italy +39 347 7196482
[jQuery] Re: change image scr of all images in a page
b u d d h a ha scritto: i tried but not wrking am placing a sample code which i used script type=text/javascript $(document).ready( $('img').each( function() { $('img').attr({'src', http://localhost/ s.demo/+$(this).attr('src')}); }); ); /script Maybe I confused you. You've mixed two types of syntax. You can achieve this with 2 syntax: 1. $('img').each(function(){ $('img').attr({'src': http://localhost/s.demo/+$(this).attr('src')}); }); 2. $('img').each(function(){ $('img').attr('src',http://localhost/s.demo/+$(this).attr('src')); }); In the case n.1 you are passing an object to the attr method using the json syntax : {'key':'value'} // better if you want to change several attributes in only one call. In the case n.2 you are passing 2 params to the attr method : key, value // it's ok in your case -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so) - italy +39 347 7196482
[jQuery] [UI Slider] Specifying Initial Value
Hello, Can someone confirm if this is possible? I generate a page that has 10+ sliders on it. Each has a different initial value when the page loads. Is there a way to set the inital value as part of the div element? The reason I ask is that I'd like to do a blanket $('slider-class').slider({...opts...}) rather than having to do $('slider-class').each(function(){$(this).slider({value:somevalue})}) . I realise they are quite similar but it looks less neat when it's done. Surely there must be way to specify say div class=slider-class initialValue=3/ for example? James. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website - www.kainos.com
[jQuery] treeview with ajax
Hi I am using treeview with AJAX. But my problem is that when I combine treeview with AJAX, the treeview is always displaying it in expanded form (I want the treeview in collapsed form) Can anyone tell how to make the tree collapsed. Thanks in advance. script type=text/javascript $(document).ready(function(){ $(#tree).treeview({ animated: fast, collapsed: true, unique: true, control: #sidetreecontrol }); }) /script
[jQuery] jquery cache - checkbox event problem
Hallo, ich setze jquery 1.2 ein und nutze es recht intensiev. Soweit passt auch alles, nur die Events auf den Checkbox Elementen ist extrem langsam. Immer wenn ich den jquery-cache lösche oder im Browser F5 drücke, dann sind die Events der Checkbox Elemente auch wieder sehr schnell. Eine Testseite ist leider öffentlich nicht in dem Sinne verfügbar (ggf. mir eine Mail dann schicken) Vielleicht hat jemand Idee. Vielen Dank Rene -- translation with google Hello, I use jquery 1.2 and use it quite intensiev. Where it all fits, only the events on the checkbox elements is extremely slow. Whenever I use the jquery cache in the browser or press F5, then the events are also elements of the checkbox again very quickly. A test page is unfortunately not publicly available, in the sense (possibly me then send an e-mail) Maybe someone idea. Thank you very much Rene
[jQuery] jQuery AjaxForm: Auto setXmlHttpHeader with accepted format as json if dataType is json
As title, any chance somebody can show how to do such hack?
[jQuery] jQuery (English)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = TOTALLY FREE Friendly(Frinedy) Gifts Upto Unliminted ( 20,000 ) http://friendfinder.com/go/g982154 http://friendfinder.com/go/g982154 http://friendfinder.com/go/g982154 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[jQuery] sortable portlets
hey, i'm new to the whole jQuery scene, and i'm trying to create a small portal with frames you can rearrange (igoogle style) i've seen this demo: http://jquery-ui.googlecode.com/svn/trunk/demos/sortable/portlets.html and tweaked it a bit, but i can't figure out how (if at all possible) i can make the frames move only if i click on the frame title and not the whole frame. thanks ind advanced!
[jQuery] treeview with ajax
Hi I am using treeview with AJAX. But my problem is that when I combine treeview with AJAX, the treeview is always in not collapsed (it is in expanded tree) Can anyone tell how to make the tree collapsed. Thanks in advance. script type=text/javascript $(document).ready(function(){ $(#tree).treeview({ animated: fast, collapsed: true, unique: true, control: #sidetreecontrol }); }) /script -- View this message in context: http://www.nabble.com/treeview-with-ajax-tp21559732s27240p21559732.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Simulate BackSpace key
Thanks to all! I do my WYSWYG editor as jQuery plugin: http://plugins.jquery.com/project/RSEditor Please see and say what you think about it.
[jQuery] Identify last keeypess
Hi, I've been searching the web for an answer to this but haven't been able to find one. I have a form which is using an image as it's submit button and I want users to be able to submit the form by pressing enter. Simple enough: // submit the login form if the user hits enter $('.login_input').keypress(function(event) { if(event.keyCode == 13) { $('#login').submit(); } }); That works fine. However, if the user is presented with a list of options for the text input by their browser and they use the up and down arrows keys to highlight, then enter to select an option the form gets submitted. Not ideal! So, my question is how can I identify the last key press before the user hits enter? Ideally my logic will be something like: $('.login_input').keypress(function(event) { if(LAST KEYPRESS IS NOT UP OR DOWN ARROW) { if(event.keyCode == 13) { $('#login').submit(); } } }); Hopefully, that makes sense! Many thanks in advance for any help. Rob.
[jQuery] Re: Refreshing Menu after Adding New Structure
Hi, Chris... Sounds like you need the LiveQuery plug-in. It re-binds actions to newly inserted DOM elements. Add the LiveQuery plug-in to your .click elements (or whatever action triggers them) and that will probably fix your problem. Look here for the plug-in and instructions. http://brandonaaron.net/docs/livequery/ hth, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 7:18 AM To: jQuery (English) Subject: [jQuery] Refreshing Menu after Adding New Structure Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
[jQuery] Re: Refreshing Menu after Adding New Structure
Forgot to mention... If you're using jQuery 1.3, there is now a built-in in .live function that you can use in place of LiveQuery, but it has some limitations for now that LiveQuery doesn't. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 7:18 AM To: jQuery (English) Subject: [jQuery] Refreshing Menu after Adding New Structure Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
[jQuery] Re: sortable portlets
You can use the handle option of the sortable. In this case it would look like this: $(.column).sortable({ handle: '.portlet-header', connectWith: ['.column'] }); -- Bohdan Ganicky On Jan 20, 1:01 pm, shmuelzon shmuel...@gmail.com wrote: hey, i'm new to the whole jQuery scene, and i'm trying to create a small portal with frames you can rearrange (igoogle style) i've seen this demo:http://jquery-ui.googlecode.com/svn/trunk/demos/sortable/portlets.html and tweaked it a bit, but i can't figure out how (if at all possible) i can make the frames move only if i click on the frame title and not the whole frame. thanks ind advanced!
[jQuery] Re: Refreshing Menu after Adding New Structure
Hey Rick, That URL you posted is not valid, could you repost it please Thanks Chris On Jan 20, 1:48 pm, Rick Faircloth r...@whitestonemedia.com wrote: Forgot to mention... If you're using jQuery 1.3, there is now a built-in in .live function that you can use in place of LiveQuery, but it has some limitations for now that LiveQuery doesn't. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 7:18 AM To: jQuery (English) Subject: [jQuery] Refreshing Menu after Adding New Structure Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
[jQuery] Re: Identify last keeypess
Rob, Is this some sort of autocomplete text box or is it a select input? James From: jquery-en@googlegroups.com on behalf of rob303 Sent: Tue 20/01/2009 13:44 To: jQuery (English) Subject: [jQuery] Identify last keeypess Hi, I've been searching the web for an answer to this but haven't been able to find one. I have a form which is using an image as it's submit button and I want users to be able to submit the form by pressing enter. Simple enough: // submit the login form if the user hits enter $('.login_input').keypress(function(event) { if(event.keyCode == 13) { $('#login').submit(); } }); That works fine. However, if the user is presented with a list of options for the text input by their browser and they use the up and down arrows keys to highlight, then enter to select an option the form gets submitted. Not ideal! So, my question is how can I identify the last key press before the user hits enter? Ideally my logic will be something like: $('.login_input').keypress(function(event) { if(LAST KEYPRESS IS NOT UP OR DOWN ARROW) { if(event.keyCode == 13) { $('#login').submit(); } } }); Hopefully, that makes sense! Many thanks in advance for any help. Rob. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website - www.kainos.com
[jQuery] Re: Refreshing Menu after Adding New Structure
Also is it fairly straightforward to use. The only thing that seems to have been dropped are things like: LI class= jQuery1232455646417=3 replaced with just LI AND UL class= style=DISPLAY: none; FILTER: ; VISIBILITY: hidden; ZOOM: 1 oldblock=block jQuery1232455646417=452 replaced with UL This is why I need the JQuery to refresh and put these values back in Cheers On Jan 20, 1:57 pm, cajchris cajch...@gmail.com wrote: Hey Rick, That URL you posted is not valid, could you repost it please Thanks Chris On Jan 20, 1:48 pm, Rick Faircloth r...@whitestonemedia.com wrote: Forgot to mention... If you're using jQuery 1.3, there is now a built-in in .live function that you can use in place of LiveQuery, but it has some limitations for now that LiveQuery doesn't. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 7:18 AM To: jQuery (English) Subject: [jQuery] Refreshing Menu after Adding New Structure Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
[jQuery] Re: Get the valueof jQuery
and asp:Label generates a span tag, so it would be $(#lbl).text(); or if there is HTML involved, $(#lbl).html(); That is as long as your label isn't inside a naming container (MasterPage, GridView, UserControl, Wizard, etc) where the ID of the label gets changed On Jan 20, 7:23 am, vivek chauhanvive...@gmail.com wrote: How can i get the value of label using jQuery. i use the following code $(document).ready(function() { alert($(#lbl).val()); }); in the body tag i place the asp:Label runat=server ID=lbl Text=mainone /asp:Label i am unable to get the mainone in the alert message. where i m wrong?. Appreciate any help Happy Coding :)
[jQuery] Calendar Modal Pop Up in IE 7
Hello all, I've been working on a calendar for my web application that involves using jQuery to create a popup window with the calendar event information. Everything seems to be working great in FF3, Safari and Chrome. But of course IE7 is throwing me issues. Mainly the information in the modal box is not being displayed at all. I'm wondering if it is something inside my code. Here is what I have written. The functionality works as follows: 1) Wait for a click on a calendar event. 2) Get the eventID and send a AJAX request to server. 3) Server returns XML data of the event. 4) Create an object to contain the event information and add names. 5) Parse together the Modal Title and Modal Content. 6) Display Modal Box. Here is the code: $(function(){ $('.eventInfo').click(function(){ var eventID = $(this).attr('class'); eventID = eventID.match(/\d+/); //Get the eventdetails var myEvent = new Object(); $.ajax({ type: POST, url: ../calendar/get_event_details/, data: 'eventID='+eventID, success: function(xml){ $(xml).each(function(){ myEvent.eventID = $(this).find('eventID').text(); myEvent.eventname = $(this).find('eventname').text(); myEvent.eventstarttime = $(this).find('eventstarttime').text(); myEvent.eventendtime= $(this).find('eventendtime').text(); myEvent.guestsestimate = $(this).find('guestsestimate').text(); myEvent.status = $(this).find('status').text(); myEvent.firstname = $(this).find('firstname').text(); myEvent.lastname = $(this).find('lastname').text(); myEvent.contactID = $(this).find('contactID').text(); myEvent.locations = $(this).find('locations').text(); }); var eventDetails = div id='event_times' +myEvent.eventstarttime + - +myEvent.eventendtime+ /divdiv id='event_status'bCurrent Status:/b +myEvent.status+ / divdiv id='contactname'bContact:/b a href='?= base_url(); ? index.php/contact/details/ +myEvent.contactID+ ' +myEvent.firstname + +myEvent.lastname+ /a/divdiv id='locations'bLocation(s):/b +myEvent.locations+ /divdiv id='guests'bExpected Guests: /b +myEvent.guestsestimate+ / divdiv id='view_event' a href='?= base_url(); ?index.php/event/ details/ +myEvent.eventID+'View Event Details/a/divdiv id='ical_event' a href='?=base_url(); ?index.php/event/ create_ical_event/ +myEvent.eventID+ 'Create iCal Event/a/ div; var eventtitle = a href='?= base_url(); ?index.php/event/ details/ +myEvent.eventID+' +myEvent.eventname+ /a; $('#eventPopUp').attr('title', eventtitle); $('#ui-dialog-title-eventPopUp').html(eventtitle); $('#eventPopUp').html(eventDetails); $('#eventPopUp').dialog(); } }); $(#eventPopUp).dialog('open'); return false; }); }); Any insight in why this isn't working for me would be a huge help!
[jQuery] Can't get typed value of input
Hello, I have an input text field. I just can't get the typed value of it with: $(input#email_id).val(); It keeps giving me the initial value. Is there something I am missing? Regards Abhisek
[jQuery] Re: Can't get typed value of input
Selector looks fine perhaps sharing more of your code would be helpful On Jan 20, 9:27 am, abhisek abhisek.d...@gmail.com wrote: Hello, I have an input text field. I just can't get the typed value of it with: $(input#email_id).val(); It keeps giving me the initial value. Is there something I am missing? Regards Abhisek
[jQuery] Re: Can't get typed value of input
I believe if you have the ID in a input box you would only need to use $('#email_id').val() , in order to get the value of the input box. On Jan 20, 9:27 am, abhisek abhisek.d...@gmail.com wrote: Hello, I have an input text field. I just can't get the typed value of it with: $(input#email_id).val(); It keeps giving me the initial value. Is there something I am missing? Regards Abhisek
[jQuery] Validate: Meta class and markup validation
We've been making ever more use of the excellent jquery.validate plugin on our various sites. In order that we don't have to write a validation script for every page with a form we have been using the embedded class style of rule definition, and as the rules we need for validation have grown more complex we have switched from simple classes to using the metadata plugin and the {validate:{rule:value}} syntax. This works well, except it leads to problems when trying to validate pages with the w3c validator as XHtML 1.1. The validation fails, complaining that the curly braces {} are illegal characters in class names. This doesn't seem to happen when using an older XHTML doctype. Is there a way around this problem so that pages validate in spite of the embedded class names?
[jQuery] Re: Conflict with Mootools...
Hi Erik, If you are using the jQuery.noConflict function and set the jQuery Selector variable to $j as in: var $j = jQuery.noConflict(); You need to make sure you go through all your jQuery code and change the $() selector to $j() or whatever you set the variable to. Also note note you need to make sure you aren't using $j in any of your mootools code as well. Good luck, Steve On Jan 19, 5:35 pm, Erik R. Peterson eriks...@mac.com wrote: Thank you. I read as you instructed me and I'm still confused. My first question, is there one script i can place in the header that will eliminate the conflict? I actually read Using jQuery with Other Libraries I understand the problem, but still having problems with the fix. Can there be one script placed in the head of the page that will eliminate all the conflicts with different scripts? script type=text/javascriptvar $j = jQuery.noConflict();/script Thanks for your help. Erik On Jan 19, 2009, at 5:16 PM, MorningZ wrote: ps... reading your post for the 4th time, i realize now that the first two files are probably not related to jQuery hence they'd be safe anyways, show some code where you are trying to use jQuery and trying to initialize your HTML to use the plugins you need that would make it easier for others to help you On Jan 19, 5:11 pm, MorningZ morni...@gmail.com wrote: Rather than just myself or someone else posting what *probably* would work... how about some work to help understand what's going on? First off, make sure to read the link Karl posted... Secondly, before you do *anything* jQuery related, you want to include the library first.. you've got 3 or 4 include files that need jQuery before you even load jQuery... that would be the reason why your code doesn't work Third, and related to First, you want to set the .noConflict as soon as you can so your code is consistently using the same methods for using jQuery On Jan 19, 5:05 pm, Erik R. Peterson eriks...@mac.com wrote: Good question.. I'll fix that... Can you give me the script to fix the conflict? Erik On Jan 19, 2009, at 4:43 PM, MorningZ wrote: How come you are including both 1.2.3 and 1.2.6 versions of jQuery? On Jan 19, 4:40 pm, Erik R. Peterson eriks...@mac.com wrote: I have a lot of jquery scripts in my html and I just added a mootools script. Now none of my jquery scripts don't work. script type=text/javascript src=/src/js/rssticker.js/ script script type=text/javascript src=/src/js/slideshow.js/ script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery-1.2.3.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/ jquery.labelify.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ barack/barackslideshow.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ barack/demo.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ 1.2.1/core.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ 1.2.1/more.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ barack/morphlist.js/script I need help. Can someone show me how to use the noconflict script. Many thanks. Erik
[jQuery] Re: Refreshing Menu after Adding New Structure
Anyone with any examples on how to use this? Bit of a newby at this Cheers On Jan 20, 2:03 pm, cajchris cajch...@gmail.com wrote: Also is it fairly straightforward to use. The only thing that seems to have been dropped are things like: LI class= jQuery1232455646417=3 replaced with just LI AND UL class= style=DISPLAY: none; FILTER: ; VISIBILITY: hidden; ZOOM: 1 oldblock=block jQuery1232455646417=452 replaced with UL This is why I need the JQuery to refresh and put these values back in Cheers On Jan 20, 1:57 pm, cajchris cajch...@gmail.com wrote: Hey Rick, That URL you posted is not valid, could you repost it please Thanks Chris On Jan 20, 1:48 pm, Rick Faircloth r...@whitestonemedia.com wrote: Forgot to mention... If you're using jQuery 1.3, there is now a built-in in .live function that you can use in place of LiveQuery, but it has some limitations for now that LiveQuery doesn't. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 7:18 AM To: jQuery (English) Subject: [jQuery] Refreshing Menu after Adding New Structure Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
[jQuery] Re: Conflict with Mootools...
Thank you so much!! Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: Hi Erik, If you are using the jQuery.noConflict function and set the jQuery Selector variable to $j as in: var $j = jQuery.noConflict(); You need to make sure you go through all your jQuery code and change the $() selector to $j() or whatever you set the variable to. Also note note you need to make sure you aren't using $j in any of your mootools code as well. Good luck, Steve On Jan 19, 5:35 pm, Erik R. Peterson eriks...@mac.com wrote: Thank you. I read as you instructed me and I'm still confused. My first question, is there one script i can place in the header that will eliminate the conflict? I actually read Using jQuery with Other Libraries I understand the problem, but still having problems with the fix. Can there be one script placed in the head of the page that will eliminate all the conflicts with different scripts? script type=text/javascriptvar $j = jQuery.noConflict();/script Thanks for your help. Erik On Jan 19, 2009, at 5:16 PM, MorningZ wrote: ps... reading your post for the 4th time, i realize now that the first two files are probably not related to jQuery hence they'd be safe anyways, show some code where you are trying to use jQuery and trying to initialize your HTML to use the plugins you need that would make it easier for others to help you On Jan 19, 5:11 pm, MorningZ morni...@gmail.com wrote: Rather than just myself or someone else posting what *probably* would work... how about some work to help understand what's going on? First off, make sure to read the link Karl posted... Secondly, before you do *anything* jQuery related, you want to include the library first.. you've got 3 or 4 include files that need jQuery before you even load jQuery... that would be the reason why your code doesn't work Third, and related to First, you want to set the .noConflict as soon as you can so your code is consistently using the same methods for using jQuery On Jan 19, 5:05 pm, Erik R. Peterson eriks...@mac.com wrote: Good question.. I'll fix that... Can you give me the script to fix the conflict? Erik On Jan 19, 2009, at 4:43 PM, MorningZ wrote: How come you are including both 1.2.3 and 1.2.6 versions of jQuery? On Jan 19, 4:40 pm, Erik R. Peterson eriks...@mac.com wrote: I have a lot of jquery scripts in my html and I just added a mootools script. Now none of my jquery scripts don't work. script type=text/javascript src=/src/js/rssticker.js/ script script type=text/javascript src=/src/js/slideshow.js/ script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery-1.2.3.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/ jquery.labelify.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ barack/barackslideshow.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ barack/demo.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ 1.2.1/core.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ 1.2.1/more.js/script script type=text/javascript charset=utf-8 src=/src/js/ mootools/ barack/morphlist.js/script I need help. Can someone show me how to use the noconflict script. Many thanks. Erik
[jQuery] Re: Validate: Meta class and markup validation
Not really. In one way or the other, you have to make a trade-off - I'd just ignore the warning, knowing that there really isn't a problem. One way to reduce the problem may be class compositions: http://docs.jquery.com/Plugins/Validation/Validator/addClassRules#namerules You'd put together the various complex combinations you have into simpler classes, and use only those, without the curly braces. Or, customize the metadata plugin to use other characters for embedding - no idea whats valid for XHTML 1.1. Jörn On Tue, Jan 20, 2009 at 3:39 PM, Gordon gordon.mc...@ntlworld.com wrote: We've been making ever more use of the excellent jquery.validate plugin on our various sites. In order that we don't have to write a validation script for every page with a form we have been using the embedded class style of rule definition, and as the rules we need for validation have grown more complex we have switched from simple classes to using the metadata plugin and the {validate:{rule:value}} syntax. This works well, except it leads to problems when trying to validate pages with the w3c validator as XHtML 1.1. The validation fails, complaining that the curly braces {} are illegal characters in class names. This doesn't seem to happen when using an older XHTML doctype. Is there a way around this problem so that pages validate in spite of the embedded class names?
[jQuery] Re: Specifying Initial Value
If you include the metadata plugin ( http://plugins.jquery.com/project/metadata ), then you can specify initial values inside the HTML. div class=slider-class {slider: { value: 10 } }/div The options on init are determined in the following order (highest priority at top): options hash metadata plugin defaults On Jan 20, 7:59 am, James Hughes j.hug...@kainos.com wrote: Hello, Can someone confirm if this is possible? I generate a page that has 10+ sliders on it. Each has a different initial value when the page loads. Is there a way to set the inital value as part of the div element? The reason I ask is that I'd like to do a blanket $('slider-class').slider({...opts...}) rather than having to do $('slider-class').each(function(){$(this).slider({value:somevalue})}) . I realise they are quite similar but it looks less neat when it's done. Surely there must be way to specify say div class=slider-class initialValue=3/ for example? James. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Re: Identify last keeypess
Hi James, Thanks for the reply. It's just a standard text input: input class=login_input type=text name=user value= / When the user clicks and starts to type the browser may, depending on what's been entered before, give a list of options. Some users might use the down or up arrow keys to highlight one of the options and then hit submit to select it. This, I think, is standard browser behaviour - unless I have it wrong? Unfortunately for me, hitting enter at that point will submit the form. Any help would be much appreciated! Rob. On Jan 20, 1:56 pm, James Hughes j.hug...@kainos.com wrote: Rob, Is this some sort of autocomplete text box or is it a select input? James From: jquery-en@googlegroups.com on behalf of rob303 Sent: Tue 20/01/2009 13:44 To: jQuery (English) Subject: [jQuery] Identify last keeypess Hi, I've been searching the web for an answer to this but haven't been able to find one. I have a form which is using an image as it's submit button and I want users to be able to submit the form by pressing enter. Simple enough: // submit the login form if the user hits enter $('.login_input').keypress(function(event) { if(event.keyCode == 13) { $('#login').submit(); } }); That works fine. However, if the user is presented with a list of options for the text input by their browser and they use the up and down arrows keys to highlight, then enter to select an option the form gets submitted. Not ideal! So, my question is how can I identify the last key press before the user hits enter? Ideally my logic will be something like: $('.login_input').keypress(function(event) { if(LAST KEYPRESS IS NOT UP OR DOWN ARROW) { if(event.keyCode == 13) { $('#login').submit(); } } }); Hopefully, that makes sense! Many thanks in advance for any help. Rob. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website -www.kainos.com
[jQuery] Re: Can't get typed value of input
It doesn't work. Tested. On Jan 20, 7:34 pm, WhoButSB whobu...@gmail.com wrote: I believe if you have the ID in a input box you would only need to use $('#email_id').val() , in order to get the value of the input box. On Jan 20, 9:27 am, abhisek abhisek.d...@gmail.com wrote: Hello, I have an input text field. I just can't get the typed value of it with: $(input#email_id).val(); It keeps giving me the initial value. Is there something I am missing? Regards Abhisek
[jQuery] Re: Can't get typed value of input
Here you go: http://pastie.org/365662 On Jan 20, 7:32 pm, MorningZ morni...@gmail.com wrote: Selector looks fine perhaps sharing more of your code would be helpful On Jan 20, 9:27 am, abhisek abhisek.d...@gmail.com wrote: Hello, I have an input text field. I just can't get the typed value of it with: $(input#email_id).val(); It keeps giving me the initial value. Is there something I am missing? Regards Abhisek
[jQuery] Re: $date1 = $('div /')W hat does it mean ?
It's a shortcut for element creation. Like you can do $('body').append('div /') $('div /') gives you a div which is not in the DOM yet You can see that both jQuery objects with the divs ($date1 and $date2) end up appended to #multimonth. On Jan 20, 8:36 am, divsystem divsys...@gmail.com wrote: $date1 = $('div /') http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePicker... $date1 = $('div /') .datePicker({inline:true}) .bind( 'dpMonthChanged', function(event, displayedMonth, displayedYear) { $date2.dpSetDisplayedMonth(displayedMonth+1, displayedYear); } ) .bind( 'dateSelected', function(event, date, $td, status) { $date2.dpSetSelected(date.asString(), status, false); } ); // remove the forward navigation from the first date picker $('.dp-nav-next', $date1).html(''); // create the right hand datePicker and add the relevant event listeners to sync it to the left hand one... $date2 = $('div /') .datePicker({inline:true}) .bind( 'dpMonthChanged', function(event, displayedMonth, displayedYear) { $date1.dpSetDisplayedMonth(displayedMonth-1, displayedYear); } ) .bind( 'dateSelected', function(event, date, $td, status) { $date1.dpSetSelected(date.asString(), status, false); } ); // remove the backward navigation from the first date picker $('.dp-nav-prev', $date2).html(''); // initialise the date pickers to consecutive months ($date1 defaults to this month so set $date2 to next month) var now = new Date(); $date2.dpSetDisplayedMonth(now.getMonth()+1, now.getFullYear()); // add the generated combined plugin to the document $('#multimonth').html('').append($date1, $date2);
[jQuery] Re: Simple jQuery problem with fading In/Out
The problem is: Your tags: div id=area2 img src=images/poster_thumb1.gif / /div in comment. :)
[jQuery] Re: Refreshing Menu after Adding New Structure
Here's a good link for you: http://brandonaaron.net/blog/2007/08/19/new-plugin-live-query And here's a sample (that's right off the page above) $('a') .livequery('click', function(event) { alert('clicked'); return false; }); There are also other examples and some demos on the page above, too. Live query couldn't be easier. Just include the reference for the plug-in in your header under the main jQuery core reference, then find your code that triggers the action that injects new DOM elements and put .livequery (as above) in between the element and the click function. That's all I had to do to solve this problem. Send some of your code if you need more help. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 9:03 AM To: jQuery (English) Subject: [jQuery] Re: Refreshing Menu after Adding New Structure Also is it fairly straightforward to use. The only thing that seems to have been dropped are things like: LI class= jQuery1232455646417=3 replaced with just LI AND UL class= style=DISPLAY: none; FILTER: ; VISIBILITY: hidden; ZOOM: 1 oldblock=block jQuery1232455646417=452 replaced with UL This is why I need the JQuery to refresh and put these values back in Cheers On Jan 20, 1:57 pm, cajchris cajch...@gmail.com wrote: Hey Rick, That URL you posted is not valid, could you repost it please Thanks Chris On Jan 20, 1:48 pm, Rick Faircloth r...@whitestonemedia.com wrote: Forgot to mention... If you're using jQuery 1.3, there is now a built-in in .live function that you can use in place of LiveQuery, but it has some limitations for now that LiveQuery doesn't. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 7:18 AM To: jQuery (English) Subject: [jQuery] Refreshing Menu after Adding New Structure Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
[jQuery] Re: Identify last keeypess
haven't tested it, but what happens if you try: var lastKeyCode = 0; // submit the login form if the user hits enter $('.login_input').keypress(function(event) { if(event.keyCode == 13 lastKeyCode != UP lastKeyCode != DOWN ) { $('#login').submit(); } lastKeyCode = event.keyCode; }); by(e) Stephan
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
Uh... you realize that !important has no function in IE6, right? And that it doesn't retain the same functionality in IE7? It's also an extreme misuse of the tool. This is the situation !important was designed for: .tab_link { width: 35px; height: 20px; color: white; background: black; cursor: pointer; } div class=tab_linkClick me!/div Now, lets say I want to disable the tab. I can do so easily by applying a single class with the important rule: div class=tab_link disableClick me!/div .disable { opacity: 0.3; filter: alpha(opacity=0.3); cursor: none !important; } The method I showed there is the right style of usage for the ! important keyword. Your method is, in essence, only further complicating your code. By throwing !important's everywhere, you're not only increasing the size of the css files (which is the opposite of the goal for net scripts/stylesheets), you're also making them neigh unmaintainable. The solution to many of your css nightmares is spending the extra hour to go through and properly design/class your html instead of some cheap hack. On Jan 19, 10:55 am, ryan.joyce...@googlemail.com ryan.joyce...@googlemail.com wrote: but unless you've declared some of your default styles as !important, the widget *will* take precedence if it's called after the default CSS. the only issues i can see are relative vs. explicit pixel sizes - for ex. if you've declared pixel sizes for your fonts with some especially broad selectors (globally stating that all paragraphs in divs have a font size of 10px or whatever) whilst the widget author has used relative % sizes. Even in those cases it's be quicker, easier and neater to just change your default CSS rather than replacing every instance of ; with !important; in your imported stylesheet. the long and the short of it it that it's a very inelegant solution to a problem that isn't so much a 'problem' as 'the whole point of cascading stylesheets'. it's like looking for a solution to grass being green! On Jan 19, 3:32 pm, johny why johny...@gmail.com wrote: i don't see it as a problem. With or without !important, the site-css will cascade into the widget for elements undeclared in the widget-- the widget designer expects that. The important thing is for the widget's declared styles to take precedence, which !important achieves in most cases. (if i'm integrating the jQuery widget into a cms like, say, WordPress, i may or may not have control over exactly when the widget-css is declared.)
[jQuery] Re: Identify last keeypess
On a side note... Do you want/need autocomplete becasue it is possible to stop a textfield being capable of autocomplete. I ask simply becasue your example uses a login field and sometimes it's not security concious to allow autocomplete on some login fields. Otherwise you'll just have to log what key was pressed in an external variable EVERYTIME a key is pressed and check that variale at the start of every keypress event. James From: jquery-en@googlegroups.com on behalf of rob303 Sent: Tue 20/01/2009 14:58 To: jQuery (English) Subject: [jQuery] Re: Identify last keeypess Hi James, Thanks for the reply. It's just a standard text input: input class=login_input type=text name=user value= / When the user clicks and starts to type the browser may, depending on what's been entered before, give a list of options. Some users might use the down or up arrow keys to highlight one of the options and then hit submit to select it. This, I think, is standard browser behaviour - unless I have it wrong? Unfortunately for me, hitting enter at that point will submit the form. Any help would be much appreciated! Rob. On Jan 20, 1:56 pm, James Hughes j.hug...@kainos.com wrote: Rob, Is this some sort of autocomplete text box or is it a select input? James From: jquery-en@googlegroups.com on behalf of rob303 Sent: Tue 20/01/2009 13:44 To: jQuery (English) Subject: [jQuery] Identify last keeypess Hi, I've been searching the web for an answer to this but haven't been able to find one. I have a form which is using an image as it's submit button and I want users to be able to submit the form by pressing enter. Simple enough: // submit the login form if the user hits enter $('.login_input').keypress(function(event) { if(event.keyCode == 13) { $('#login').submit(); } }); That works fine. However, if the user is presented with a list of options for the text input by their browser and they use the up and down arrows keys to highlight, then enter to select an option the form gets submitted. Not ideal! So, my question is how can I identify the last key press before the user hits enter? Ideally my logic will be something like: $('.login_input').keypress(function(event) { if(LAST KEYPRESS IS NOT UP OR DOWN ARROW) { if(event.keyCode == 13) { $('#login').submit(); } } }); Hopefully, that makes sense! Many thanks in advance for any help. Rob. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website - www.kainos.com
[jQuery] Re: Refreshing Menu after Adding New Structure
Rick, Its not really a problem to do with clicking events etc its more to do with the general information that JQuery adds to elements being lost. Here is an example of the UL code I have after the innerHTML replace is done (the ULLIAAmex/A/LI/UL is the newly added structure): A id=m11780 title=FAQ onclick= href=http:// localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#FAQ/A UL LI A id=m11781 title=All Groups onclick= href=http://localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#All Groups/A UL LI A id=m-2 title=Amex onclick= href=http:// localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#Amex/A /LI /UL /LI LI A id=m11782 title=Top 10 onclick= href=http://localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#Top 10/A /LI LI A id=m12668 title=AECustView onclick= href=http://localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#AECustView/A /LI /UL Before the innerHTML it was: A class=sf-with-ul id=m11780 title=FAQ onclick= href=# jQuery1232463464064=85FAQSPAN class=sf-sub-indicator jQuery1232463464064=null»/SPAN/A UL style=DISPLAY: none; VISIBILITY: hidden oldblock=block LI jQuery1232463464064=86 A id=m11781 title=All Groups onclick= href=# jQuery1232463464064=87All Groups/A /LI LI jQuery1232463464064=88 A id=m11782 title=Top 10 onclick= href=# jQuery1232463464064=89Top 10/A /LI LI jQuery1232463464064=90 A id=m12668 title=AECustView onclick= href=# jQuery1232463464064=91AECustView/A /LI /UL So you can see that all the JQuery information has been lost. Is there anyway to get all of that back? As now the hover functionality on this menu does not work. It is based on the superfish menu system On Jan 20, 3:20 pm, Rick Faircloth r...@whitestonemedia.com wrote: Here's a good link for you: http://brandonaaron.net/blog/2007/08/19/new-plugin-live-query And here's a sample (that's right off the page above) $('a') .livequery('click', function(event) { alert('clicked'); return false; }); There are also other examples and some demos on the page above, too. Live query couldn't be easier. Just include the reference for the plug-in in your header under the main jQuery core reference, then find your code that triggers the action that injects new DOM elements and put .livequery (as above) in between the element and the click function. That's all I had to do to solve this problem. Send some of your code if you need more help. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 9:03 AM To: jQuery (English) Subject: [jQuery] Re: Refreshing Menu after Adding New Structure Also is it fairly straightforward to use. The only thing that seems to have been dropped are things like: LI class= jQuery1232455646417=3 replaced with just LI AND UL class= style=DISPLAY: none; FILTER: ; VISIBILITY: hidden; ZOOM: 1 oldblock=block jQuery1232455646417=452 replaced with UL This is why I need the JQuery to refresh and put these values back in Cheers On Jan 20, 1:57 pm, cajchris cajch...@gmail.com wrote: Hey Rick, That URL you posted is not valid, could you repost it please Thanks Chris On Jan 20, 1:48 pm, Rick Faircloth r...@whitestonemedia.com wrote: Forgot to mention... If you're using jQuery 1.3, there is now a built-in in .live function that you can use in place of LiveQuery, but it has some limitations for now that LiveQuery doesn't. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 7:18 AM To: jQuery (English) Subject: [jQuery] Refreshing Menu after Adding New Structure Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
[jQuery] Re: setting default value for datepicker.
There's a dedicated mailing list for help with jQuery UI plugins: http://groups.google.com/group/jquery-ui - Richard On Fri, Jan 16, 2009 at 1:10 PM, Jason Meckley jasonmeck...@gmail.comwrote: today I'm learnig jquery. I downloaded jquery-1.3.min.js and jquery-ui- personalized-1.6rc5.min.js with everything. I'm trying to get the calendar working. so far I have most elements that I need: start on saturday formatted date select year/month display with image and textbox focus there are 2 things remaining. 1. disable specific days (if date != saturday, disable) 2. set the default date. the getDate and setDate do not seem to work at all. here is my code: html head script src=jquery-1.3.min.js/script script src=jquery-ui-personalized-1.6rc5.min.js/script script $(document).ready(function() { var birthday = new Date(1980, 11, 25); $('#selected_date').datepicker({ setDate:birthday, dateFormat:mm-dd-y, changeMonth:true, changeYear:true, firstDay:6, showOn: 'both'} ); }); /script /head bodyinput type=textbox id=selected_date//body /html am I missing something, or is this functionality broken? I'm assuming when I pass in the setDate property the calendar will show that date selected and the value will be placed in the textbox.
[jQuery] Re: Simulate BackSpace key
I went to take a look at the demo, but all I got was a page of code...is there a working demo online? Thanks, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of RSol Sent: Tuesday, January 20, 2009 8:42 AM To: jQuery (English) Subject: [jQuery] Re: Simulate BackSpace key Thanks to all! I do my WYSWYG editor as jQuery plugin: http://plugins.jquery.com/project/RSEditor Please see and say what you think about it.
[jQuery] Change/Break in the JQuery 1.3 selecting xml nodes based on attribute value?
Hi There, I have been trying to integrate JQuery 1.3 into our software but found it breaking where I have previously successfully been using JQuery 1.2.6 to select xml nodes. The following test page illustrates and explains the problem. To recreate the issue you would need to create a html file containing all of the following as well as an xml file named XMLFile.xml which returns the xml noted in the comments below as well as a copy of both JQuery 1.2.6 and 1.3 as named/referenced in the head below. Does anybody know whether this might be a bug, intended behaviour (these selectors still seem to be supported although I noted the @ symbol should now be removed from the attribute name which I have done) or something I need to change in my code for the latest JQuery version? Thanks, Chris TEST PAGE html xmlns=http://www.w3.org/1999/xhtml; head !--script src=jquery_1.2.6.js type=text/javascript/ script-- script src=jquery_1.3.js type=text/javascript/script /head body Running this page with jquery 1.2.correctly performs the selection, 1.3 fails as noted below: script type=text/javascript function successXml(data) { /* With JQuery 1.3 the following falls over. IE shows --- Windows Internet Explorer --- Stop running this script? A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. --- Yes No --- And the VS.NET 2008 debugger then says: Microsoft JScript runtime error: Object doesn't support this property or method */ var res = $(result[name='MyResultNode'], data); alert(res[0].xml); }; /* NOTE XML Page returns: result name=MyResultNode object name=MyObjectNode group name=MyGroupNode value name=Head mode=enabled/ /group /object /result /* $.ajax({ url: XMLFile.xml, dataType: xml, success: successXml }); /script /body /html
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
On Jan 20, 6:15 am, johny why johny...@gmail.com wrote: p.s. your link offers a scenario in which you might want to AVOID ! important: !important rules will override normal rules (in the browser-css), so authors are advised to use normal rules almost exclusively to ensure that users with special style needs are able to read the page. i don't agree-- i'm not going to sacrifice site richness and functionality for normal readers to accommodate special readers-- instead, i would provide alternate accessible pages for special readers, and go to town on my normal pages. (but that's a chat for another day). Rather have it today :] You don't need to sacrifice anything for your 'normal' readers. Some people might have a larger font-size or high-contrast colors in their browser stylesheets because of a visual disability. You don't need to do anything for them, less anything that affects the other readers, you just need to follow the guidelines. You may feel hammered down here, but any programmer with reasonable experience knows that adding !important to every declaration is not a practical long-term solution. It's like, in Gmail, marking with a star every message you *don't* want to read. Well, we're talking a lot here about these conflicts, but in practice it shouldn't be that common - it's common sense not to use double ID declarations, or ID prefixed declarations for tags that affect the whole page.
[jQuery] Content loading with AJAX is lost in IE after click
Hi all, can you check pls, what I am doing wrong in these scripts. Check pls menu Rules and its submenu functions. In FF3 and GCh its works fine, but in IE it lost part of ajax content. address: http://83.240.47.84/skyrace2/ Thank you for your help in advance.
[jQuery] Re: Selector Help
Sweet. Thanks, Kean!! On Jan 18, 4:23 pm, Kean shenan...@gmail.com wrote: This works and will take care of unchecked conditions too. $('table tr[id^=row] :checkbox').click(function(){ $$ = $(this); $text = $$.parent().parent().find('.email, .contact'); if($$.is(':checked')) { $text[0].value = 'Email Checked'; $text[1].value = 'Contact Checked'; } else $checkbox.val(''); }); On Jan 18, 11:41 am, LexHair jdpugl...@hotmail.com wrote: I have a table structure with a multiple rows containing a checkbox input and 4 text inputs with distinct classes. I want to prefill two of the text inputs in the same row where the checkbox is checked. Example code for the first two rows: table tr id=row1 tdinput type=checkbox //td tdinput type=text class=email //td tdinput type=text class=contact //td tdinput type=text class=realname //td tdinput type=text class=sport //td /tr tr id=row2 tdinput type=checkbox //td tdinput type=text class=email //td tdinput type=text class=contact //td tdinput type=text class=realname //td tdinput type=text class=sport //td /tr /table I need help me crafting the correct selector to focus control onto the text input for the input with class=contact and class=email. I can write the function to manipulate the attributes but I can't figure out the selector. I haven't had any luck with prev ~ siblings or prev + next. Thanks in advance.
[jQuery] Re: change image scr of all images in a page
Giovanni Battista Lenoci wrote: Maybe I confused you. You've mixed two types of syntax. You can achieve this with 2 syntax: 1. $('img').each(function(){ $('img').attr({'src': http://localhost/s.demo/+$(this).attr('src')}); }); 2. $('img').each(function(){ $('img').attr('src',http://localhost/s.demo/+$(this).attr('src')); }); You have a slight issue with the samples. The first instance of $('img') inside the function() should be $(this). Shawn
[jQuery] Re: Refreshing Menu after Adding New Structure
Can you post your code that's doing the replacement for your menu? I assume that some of the jQuery code in the original menu is generated by Superfish? If so, replacing that auto-generated code could be tricky... -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 10:26 AM To: jQuery (English) Subject: [jQuery] Re: Refreshing Menu after Adding New Structure Rick, Its not really a problem to do with clicking events etc its more to do with the general information that JQuery adds to elements being lost. Here is an example of the UL code I have after the innerHTML replace is done (the ULLIAAmex/A/LI/UL is the newly added structure): A id=m11780 title=FAQ onclick= href=http:// localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#FAQ/A UL LI A id=m11781 title=All Groups onclick= href=http://localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#All Groups/A UL LI A id=m-2 title=Amex onclick= href=http:// localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#Amex/A /LI /UL /LI LI A id=m11782 title=Top 10 onclick= href=http://localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#Top 10/A /LI LI A id=m12668 title=AECustView onclick= href=http://localhost/servlet/ com.isa.balmoral.admin.process.PFrameworkServlet#AECustView/A /LI /UL Before the innerHTML it was: A class=sf-with-ul id=m11780 title=FAQ onclick= href=# jQuery1232463464064=85FAQSPAN class=sf-sub-indicator jQuery1232463464064=null»/SPAN/A UL style=DISPLAY: none; VISIBILITY: hidden oldblock=block LI jQuery1232463464064=86 A id=m11781 title=All Groups onclick= href=# jQuery1232463464064=87All Groups/A /LI LI jQuery1232463464064=88 A id=m11782 title=Top 10 onclick= href=# jQuery1232463464064=89Top 10/A /LI LI jQuery1232463464064=90 A id=m12668 title=AECustView onclick= href=# jQuery1232463464064=91AECustView/A /LI /UL So you can see that all the JQuery information has been lost. Is there anyway to get all of that back? As now the hover functionality on this menu does not work. It is based on the superfish menu system On Jan 20, 3:20 pm, Rick Faircloth r...@whitestonemedia.com wrote: Here's a good link for you: http://brandonaaron.net/blog/2007/08/19/new-plugin-live-query And here's a sample (that's right off the page above) $('a') .livequery('click', function(event) { alert('clicked'); return false; }); There are also other examples and some demos on the page above, too. Live query couldn't be easier. Just include the reference for the plug-in in your header under the main jQuery core reference, then find your code that triggers the action that injects new DOM elements and put .livequery (as above) in between the element and the click function. That's all I had to do to solve this problem. Send some of your code if you need more help. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 9:03 AM To: jQuery (English) Subject: [jQuery] Re: Refreshing Menu after Adding New Structure Also is it fairly straightforward to use. The only thing that seems to have been dropped are things like: LI class= jQuery1232455646417=3 replaced with just LI AND UL class= style=DISPLAY: none; FILTER: ; VISIBILITY: hidden; ZOOM: 1 oldblock=block jQuery1232455646417=452 replaced with UL This is why I need the JQuery to refresh and put these values back in Cheers On Jan 20, 1:57 pm, cajchris cajch...@gmail.com wrote: Hey Rick, That URL you posted is not valid, could you repost it please Thanks Chris On Jan 20, 1:48 pm, Rick Faircloth r...@whitestonemedia.com wrote: Forgot to mention... If you're using jQuery 1.3, there is now a built-in in .live function that you can use in place of LiveQuery, but it has some limitations for now that LiveQuery doesn't. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cajchris Sent: Tuesday, January 20, 2009 7:18 AM To: jQuery (English) Subject: [jQuery]
[jQuery] Re: Identify last keeypess
Thanks again. On reflection I think you are right James. I should probably disable autocomplete for this field and doing so would resolve my issue. However, I've taken a quick look at the nocomplete plugin and that's not really what I want as it breaks some other functionality I have on those inputs. Is there a simple an elegant way to do it? Thanks! Rob. On Jan 20, 3:24 pm, James Hughes j.hug...@kainos.com wrote: On a side note... Do you want/need autocomplete becasue it is possible to stop a textfield being capable of autocomplete. I ask simply becasue your example uses a login field and sometimes it's not security concious to allow autocomplete on some login fields. Otherwise you'll just have to log what key was pressed in an external variable EVERYTIME a key is pressed and check that variale at the start of every keypress event. James
[jQuery] Django flash my page automatically after a form submitting in jquery
Hi, After struggling in google for days on this problem , I hope any of you could help me solve it. My problem is that after I submit a form in jquery with $.post to the server, which is powered by Django. The post data has been sent to the server, and saved in the database, but the function of the the ajax success has not been executed because the page has been flashed. At the same time, I found a log error in the server: File /usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py, line 279, in run self.finish_response() File /usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py, line 318, in finish_response self.write(data) File /usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py, line 397, in write self.send_headers() File /usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py, line 461, in send_headers self.send_preamble() File /usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py, line 379, in send_preamble 'Date: %s\r\n' % http_date() File /usr/lib/python2.6/socket.py, line 297, in write self.flush() File /usr/lib/python2.6/socket.py, line 284, in flush self._sock.sendall(buffer) error: [Errno 32] Broken pipe So I thought it must be a Django problem; however, my data has been successfully saved to the database. Here's the jquery code used: $this.submit(function () { var sentence=$(this).find('input:eq(0)').val(); var translation=$(this).find('input:eq(1)').val(); var keyword=key; //word is a global variable $.post('addsentence/'+keyword, { ensent:sentence, cnsent:translation },function () { $('#sentadd').remove(); }) }) Here I'm going to post the two variable ensent and cnsent to the server. And my corresponding view on Django is: def add_sentence(request,word): example=Example() sentence=request.POST word=Vocabulary.objects.get(word=word) example.word=word example.original=sentence[ensent] example.translation=sentence[cnsent] example.user=request.user example.save() return render('noResponse.xml') I thought they were very easy functions, but really out of my understanding what on earth the problem is! I really need your helps. Thanks in advance. -- Samuel Wu
[jQuery] Re: change image scr of all images in a page
Shawn Grover ha scritto: You have a slight issue with the samples. The first instance of $('img') inside the function() should be $(this). Sorry, you're right... I've answered without the right attention :-P Giovanni -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so) - italy +39 347 7196482
[jQuery] Re: jquery.corners not Working in Mac FireFox 2 or Windows IE 7? Demo Page Provided
jquery.corners normally works in those browsers, as seen on their demo page at http://www.atblabs.com/jquery.corners.html . It has an algorithm to use with browsers that don't support the CSS3 border radius property.
[jQuery] Re: Content loading with AJAX is lost in IE after click
Hi, Charlie... I'm not sure of a solution, but I did notice when I compared IE7's generated source to FF3's, that IE7 has setting of display:none for the first div contained inside the div id=ajaxContent. FF3 has that div coded like this: div style=display: block; id=general So, for some reason, IE7 is getting a css setting of display:none attached to the general div, therefore nothing is showing. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Charlie22 Sent: Tuesday, January 20, 2009 10:59 AM To: jQuery (English) Subject: [jQuery] Content loading with AJAX is lost in IE after click Hi all, can you check pls, what I am doing wrong in these scripts. Check pls menu Rules and its submenu functions. In FF3 and GCh its works fine, but in IE it lost part of ajax content. address: http://83.240.47.84/skyrace2/ Thank you for your help in advance.
[jQuery] Re: Content loading with AJAX is lost in IE after click
Also, Charlie, if I use IE7's Developer Toolbar to change the div id=general from display:none to display:block, all the content shows up normally, as it does in FF3. Find out what's changing the display attr to display:none and prevent that and you should be good-to-go... Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Charlie22 Sent: Tuesday, January 20, 2009 10:59 AM To: jQuery (English) Subject: [jQuery] Content loading with AJAX is lost in IE after click Hi all, can you check pls, what I am doing wrong in these scripts. Check pls menu Rules and its submenu functions. In FF3 and GCh its works fine, but in IE it lost part of ajax content. address: http://83.240.47.84/skyrace2/ Thank you for your help in advance.
[jQuery] Re: Documentation on comparative operators?
On Jan 19, 4:28 pm, MorningZ morni...@gmail.com wrote: If you look @ the document for .is() http://docs.jquery.com/Traversing/is#expr Ah (light bulb goes off above head), now I get it. It hadn't occurred to me to look in the Traversing section of the docs. You really do have to internalise the mindset behind jQuery not only to work with it but even to be able to find your way around the docs which are rather different from API docs I'm used to (I know, it's not an API as such, but a framework). and also (if you read the docs), .val(): Get the content of the value attribute of the first matched element So it is not a jQuery object, hence you cannot do jQuery functions on it Figures. So what's the best jQuery way to compare element values, and are there comparative operators other than is()? There are comparative operators to find elements in the DOM hierarchy, but I can't see anything to compare values, or perhaps I should just use native Javascript operators. Thanks to both for the replies - appreciated. Cheers Fred
[jQuery] Re: jquery.corners not Working in Mac FireFox 2 or Windows IE 7? Demo Page Provided
works on my Windows Vista IE7 and Windows Vista Firefix 2.0.0.20 On Jan 20, 5:50 pm, Vik v...@mindspring.com wrote: jquery.corners normally works in those browsers, as seen on their demo page athttp://www.atblabs.com/jquery.corners.html. It has an algorithm to use with browsers that don't support the CSS3 border radius property.
[jQuery] Re: Conflict with Mootools...
I did everything you pointed out. It still doesn't work: script type=text/javascriptvar $j = jQuery.noConflict();/script Where do I place this script in my html? I verified none of my mootools is using $j() Very frustrated. Any help is greatly appreciated. Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: $j
[jQuery] Re: jquery.corners not Working in Mac FireFox 2 or Windows IE 7? Demo Page Provided
Tain, So that I can be sure which page you tested -- is this the page that works on your IE7 and FF 2: http://www.flavorzoom.com/corners_anomaly/corners_anomaly.html ...or is this the page: http://www.atblabs.com/jquery.corners.html ...or both? Thanks in advance for the info.
[jQuery] Re: Conflict with Mootools...
Here is my code: !-- script type=text/javascript src=/src/js/mootools/1.2.1/core.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/1.2.1/more.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/ morphlist.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/ barackslideshow.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/demo.js charset=utf-8/script -- script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/ jquery.labelify.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery-1.2.3.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript $(document).ready(function(){ $(:text).labelify(); }); /script script type=text/javascript $(function() { $(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script script type=text/javascript function change(id,newtext) { document.getElementById(id).innerHTML=newtext } /script /head body On Jan 20, 2009, at 1:26 PM, Erik R. Peterson wrote: I did everything you pointed out. It still doesn't work: script type=text/javascriptvar $j = jQuery.noConflict();/script Where do I place this script in my html? I verified none of my mootools is using $j() Very frustrated. Any help is greatly appreciated. Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: $j
[jQuery] Re: Content loading with AJAX is lost in IE after click
Thx for tips Rick, but still I have no success. IE is adding his style from reason unknown for me and isnt respect jQuery commands. I tried this code: $('#'+submenu).attr('style',''); IE is generating this code always: DIV id=pilots style=DISPLAY: none oldblock=block I am really desparete from this... On 20 Led, 18:07, Rick Faircloth r...@whitestonemedia.com wrote: Also, Charlie, if I use IE7's Developer Toolbar to change the div id=general from display:none to display:block, all the content shows up normally, as it does in FF3. Find out what's changing the display attr to display:none and prevent that and you should be good-to-go... Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Charlie22 Sent: Tuesday, January 20, 2009 10:59 AM To: jQuery (English) Subject: [jQuery] Content loading with AJAX is lost in IE after click Hi all, can you check pls, what I am doing wrong in these scripts. Check pls menu Rules and its submenu functions. In FF3 and GCh its works fine, but in IE it lost part of ajax content. address:http://83.240.47.84/skyrace2/ Thank you for your help in advance.- Skrýt citovaný text - - Zobrazit citovaný text -
[jQuery] Re: Conflict with Mootools...
Which part of the code are you using jQuery with? Because at the very top after you call the jQuery script you should set the var $j = jQuery.noConflict() method. In then in front of all the jQuery code $ selectors change them to $j, so jQuery code will be applied to them. On Tue, Jan 20, 2009 at 1:35 PM, Erik R. Peterson eriks...@mac.com wrote: Here is my code: !-- script type=text/javascript src=/src/js/mootools/1.2.1/core.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/1.2.1/more.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/ morphlist.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/ barackslideshow.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/demo.js charset=utf-8/script -- script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/ jquery.labelify.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery-1.2.3.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript $(document).ready(function(){ $(:text).labelify(); }); /script script type=text/javascript $(function() { $(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script script type=text/javascript function change(id,newtext) { document.getElementById(id).innerHTML=newtext } /script /head body On Jan 20, 2009, at 1:26 PM, Erik R. Peterson wrote: I did everything you pointed out. It still doesn't work: script type=text/javascriptvar $j = jQuery.noConflict();/script Where do I place this script in my html? I verified none of my mootools is using $j() Very frustrated. Any help is greatly appreciated. Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: $j -- --- Steve Barbera whobu...@gmail.com
[jQuery] Re: Conflict with Mootools...
Here all my jquery scripts in my head: script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/ jquery.labelify.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery-1.2.3.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script I went through all these scripts and replaced $( with $j(. I also changed the following script in my head: $(document).ready(function(){ $(:text).labelify(); }); /script script type=text/javascript $(function() { $(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script Next, do I place script type=text/javascriptvar $j = jQuery.noConflict();/script at the bottom of my head? I did this and still no success. Erik On Jan 20, 2009, at 1:37 PM, Steven Barbera wrote: Which part of the code are you using jQuery with? Because at the very top after you call the jQuery script you should set the var $j = jQuery.noConflict() method. In then in front of all the jQuery code $ selectors change them to $j, so jQuery code will be applied to them. On Tue, Jan 20, 2009 at 1:35 PM, Erik R. Peterson eriks...@mac.com wrote: Here is my code: !-- script type=text/javascript src=/src/js/mootools/1.2.1/core.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/1.2.1/more.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/ morphlist.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/ barackslideshow.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/demo.js charset=utf-8/script -- script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/ jquery.labelify.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery-1.2.3.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript $(document).ready(function(){ $(:text).labelify(); }); /script script type=text/javascript $(function() { $(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script script type=text/javascript function change(id,newtext) { document.getElementById(id).innerHTML=newtext } /script /head body On Jan 20, 2009, at 1:26 PM, Erik R. Peterson wrote: I did everything you pointed out. It still doesn't work: script type=text/javascriptvar $j = jQuery.noConflict();/ script Where do I place this script in my html? I verified none of my mootools is using $j() Very frustrated. Any help is greatly appreciated. Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: $j -- --- Steve Barbera whobu...@gmail.com
[jQuery] Re: Conflict with Mootools...
It looks like you are calling jQuery multiple times in your header: script type=text/javascript src=/src/js/jquery/jquery-1. 2.6.min.js/script and script type=text/javascript src=/src/js/jquery/lavalamp/ jquery-1.2.3.min.js/script 2 Different versions of the framework. That might be causing some of the confusion. Another good way to work is to try and add one script at a time to your page. Make sure the first script works then continue to add JS scripts to the page. IF you find a conflict then you know it has to do with that particular script. Steve On Tue, Jan 20, 2009 at 1:45 PM, Erik R. Peterson eriks...@mac.com wrote: *Here all my jquery scripts in my head:* script type=text/javascript src=/src/js/jquery/jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/jquery.labelify.js/script script type=text/javascript src=/src/js/jquery/lavalamp/jquery-1.2.3.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/jquery.lavalamp.min.js/script I went through all these scripts and replaced $( with $j(. *I also changed the following script in my head:* $(document).ready(function(){ $(:text).labelify(); }); /script script type=text/javascript $(function() { $(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script Next, do I place script type=text/javascriptvar $j = jQuery.noConflict();/script at the bottom of my head? I did this and still no success. Erik On Jan 20, 2009, at 1:37 PM, Steven Barbera wrote: Which part of the code are you using jQuery with? Because at the very top after you call the jQuery script you should set the var $j = jQuery.noConflict() method. In then in front of all the jQuery code $ selectors change them to $j, so jQuery code will be applied to them. On Tue, Jan 20, 2009 at 1:35 PM, Erik R. Peterson eriks...@mac.comwrote: Here is my code: !-- script type=text/javascript src=/src/js/mootools/1.2.1/core.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/1.2.1/more.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/ morphlist.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/ barackslideshow.js charset=utf-8/script script type=text/javascript src=/src/js/mootools/barack/demo.js charset=utf-8/script -- script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/ jquery.labelify.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery-1.2.3.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript $(document).ready(function(){ $(:text).labelify(); }); /script script type=text/javascript $(function() { $(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script script type=text/javascript function change(id,newtext) { document.getElementById(id).innerHTML=newtext } /script /head body On Jan 20, 2009, at 1:26 PM, Erik R. Peterson wrote: I did everything you pointed out. It still doesn't work: script type=text/javascriptvar $j = jQuery.noConflict();/script Where do I place this script in my html? I verified none of my mootools is using $j() Very frustrated. Any help is greatly appreciated. Erik On Jan 20, 2009, at 9:42 AM, WhoButSB wrote: $j -- --- Steve Barbera whobu...@gmail.com -- --- Steve Barbera whobu...@gmail.com
[jQuery] Re: Conflict with Mootools...
I eliminated some unnecessary scripts. This is what i have now: script type=text/javascript src=/src/js/mootools/1.2.1/core.js/ script script type=text/javascript src=/src/js/mootools/1.2.1/more.js/ script script type=text/javascript src=/src/js/mootools/barack/ morphlist.js/script script type=text/javascript src=/src/js/mootools/barack/ barackslideshow.js/script script type=text/javascript src=/src/js/mootools/barack/demo.js/ script script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript $j(document).ready(function(){ $j(:text).labelify(); }); /script script type=text/javascript $j(function() { $j(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script script type=text/javascript function change(id,newtext) { document.getElementById(id).innerHTML=newtext } /script script type=text/javascriptvar $j = jQuery.noConflict();/script I search for all $( and replaced it with $j(. MY JQUERY LAVALAMP IS NOW NOT WORKING. Frustrated! Erik On Jan 20, 2009, at 1:49 PM, Steven Barbera wrote: script type=text/javascriptvar $j = jQuery.noConflict();/script
[jQuery] Re: Conflict with Mootools...
Oooh, make sure you put the jQuery.noConflict() code at the top right after the lavalamp.min.js code. Also make sure you add the script tags around it. Steve On Tue, Jan 20, 2009 at 1:58 PM, Erik R. Peterson eriks...@mac.com wrote: I eliminated some unnecessary scripts. This is what i have now: *script type=text/javascript src=/src/js/mootools/1.2.1/core.js/script* *script type=text/javascript src=/src/js/mootools/1.2.1/more.js/script* *script type=text/javascript src=/src/js/mootools/barack/morphlist.js/script* *script type=text/javascript src=/src/js/mootools/barack/barackslideshow.js/script* *script type=text/javascript src=/src/js/mootools/barack/demo.js/script* * * *script type=text/javascript src=/src/js/jquery/jquery-1.2.6.min.js/script* *script type=text/javascript src=/src/js/jquery/lavalamp/jquery.easing.min.js/script* *script type=text/javascript src=/src/js/jquery/lavalamp/jquery.lavalamp.min.js/script* * * * * *script type=text/javascript* *$j(document).ready(function(){* * $j(:text).labelify();* *});* */script* * * *script type=text/javascript* *$j(function() {* *$j(#1, #2, #3).lavaLamp({* *fx: backout,* *speed: 800,* *click: function(event, menuItem) {* *return false;* *}* *});* *});* */script* *script type=text/javascript * *function change(id,newtext) * *{ * *document.getElementById(id).innerHTML=newtext * *} * */script * * * *script type=text/javascriptvar $j = jQuery.noConflict();/script * I search for all $( and replaced it with $j(. MY JQUERY LAVALAMP IS NOW NOT WORKING. Frustrated! Erik On Jan 20, 2009, at 1:49 PM, Steven Barbera wrote: script type=text/javascriptvar $j = jQuery.noConflict();/script -- --- Steve Barbera whobu...@gmail.com
[jQuery] Re: Content loading with AJAX is lost in IE after click
Try specifying display:block as the attribute, instead of eliminating the style completely. Perhaps that will override what IE is doing. In your code (wherever would be appropriate), try $('#general').css({'display':'block'}) and see what happens. Since you're using an AJAX call to replace your original content, be sure and do this after the AJAX call is complete. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Charlie22 Sent: Tuesday, January 20, 2009 1:37 PM To: jQuery (English) Subject: [jQuery] Re: Content loading with AJAX is lost in IE after click Thx for tips Rick, but still I have no success. IE is adding his style from reason unknown for me and isnt respect jQuery commands. I tried this code: $('#'+submenu).attr('style',''); IE is generating this code always: DIV id=pilots style=DISPLAY: none oldblock=block I am really desparete from this... On 20 Led, 18:07, Rick Faircloth r...@whitestonemedia.com wrote: Also, Charlie, if I use IE7's Developer Toolbar to change the div id=general from display:none to display:block, all the content shows up normally, as it does in FF3. Find out what's changing the display attr to display:none and prevent that and you should be good-to-go... Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Charlie22 Sent: Tuesday, January 20, 2009 10:59 AM To: jQuery (English) Subject: [jQuery] Content loading with AJAX is lost in IE after click Hi all, can you check pls, what I am doing wrong in these scripts. Check pls menu Rules and its submenu functions. In FF3 and GCh its works fine, but in IE it lost part of ajax content. address:http://83.240.47.84/skyrace2/ Thank you for your help in advance.- Skrýt citovaný text - - Zobrazit citovaný text -
[jQuery] Re: Documentation on comparative operators?
As Ricardo mentions that still isn't grasped here jQuery *is* JavaScript, but it's a framework on top to make things easier easier in all cases? heck no case in point So what's the best jQuery way to compare element values Why would there need to be a jQuery way? object1.value == object2.value would be the best way /*period*/ to compare values... there's no need to complicate things by thinking jQuery is better, because it isn't in some, if not a lot, of cases An example of the other direction (why jQuery would be better) could be had by opening up the full jQuery file and searching for val:, which shows an example of how jQuery makes life easy $(object).val() handles textboxes, selects, multi selected, and anything else that has a valid value attribute available (like for instance, you couldn't say span value=A113/span and expect it to work) that would be a situation where jQuery makes life easy but just comparing value a to value b, it doesn't get any easier/ better than JavaScript's native == operator It hadn't occurred to me to look in the Traversing section of the docs. If you're just starting out, just simply spending some time and browsing the docs would be a great way to introduce yourself to what the jQuery library is after :-) On Jan 20, 12:24 pm, fredriley fred.ri...@gmail.com wrote: On Jan 19, 4:28 pm, MorningZ morni...@gmail.com wrote: If you look @ the document for .is() http://docs.jquery.com/Traversing/is#expr Ah (light bulb goes off above head), now I get it. It hadn't occurred to me to look in the Traversing section of the docs. You really do have to internalise the mindset behind jQuery not only to work with it but even to be able to find your way around the docs which are rather different from API docs I'm used to (I know, it's not an API as such, but a framework). and also (if you read the docs), .val(): Get the content of the value attribute of the first matched element So it is not a jQuery object, hence you cannot do jQuery functions on it Figures. So what's the best jQuery way to compare element values, and are there comparative operators other than is()? There are comparative operators to find elements in the DOM hierarchy, but I can't see anything to compare values, or perhaps I should just use native Javascript operators. Thanks to both for the replies - appreciated. Cheers Fred
[jQuery] the new whitehouse.gov - jQuery powered
I just noticed that team Obama pushed a new website live today - powered with jQuery! http://www.whitehouse.gov
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
(wow. and i thought there was nothing left to say on this topic! :) SIZE ryan, SIZE has not yet been mentioned in the thread-- glad you mentioned it. with superfish, at least, the extra !important rules have no noticeable effect on my page-load time, in IE, firefox, or chrome. page-performance is important to me, so if the stylesheet was so huge that performance suffered, i WOULD take the time to find and apply ! important only to those specific widget-rules which really need veto- power. i think load-time is more of a concern with javascript, not css. at the moment, even with all those !important rules, superfish loads faster than my png's (and they ARE optimized). jQuery compressed, on the other hand, is 10 times larger than my css. these are the files required by superfish: superfish.css (with !important on every element): 5K remaining superfish files (such as images): 13K jquery-1.2.6.min.js: 55K perhaps your concern about size comes from your javascript perspective? i think this response effectively answers the 'size' issue.
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
EFFORT the reason i don't want to CHANGE the css is because my site-css was designed to display my site properly, the widget-css was designed to display the widget properly. if i make changes in either, it's opening a can of worms. inspecting an element in firebug to see where it's getting it's style from takes a couple of seconds --inspecting the element in firebug is the the start of the job. you have to figure out which styles are causing the issue, then figure out the right fix for each of them. that won't take a couple of seconds. i'm approaching this as a company who needs to get my website up and running quickly. i'm bolting together wordpress, a bunch of plugins, some widgets (like superfish), and some of my own custom programming. these disparate pieces were not designed for each other. i welcome any opportunity to make them play nice together with a minimum of effort. i love programming, but i don't love spending time on programming tasks which could be simplified or eliminated, giving me more time to focus on running my business.
[jQuery] Re: Conflict with Mootools...
Like this? script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.js/scriptscript type=text/javascriptvar $j = jQuery.noConflict();/script script type=text/javascript $(function() { $(#1, #2, #3).lavaLamp({ fx: backout, speed: 700, click: function(event, menuItem) { return false; } }); }); /script script type=text/javascript $(document).ready(function(){ $(:text).labelify(); }); /script script type=text/javascript function change(id,newtext) { document.getElementById(id).innerHTML=newtext } /script /head body script type=text/javascriptvar $j = jQuery.noConflict();/script On Jan 20, 2009, at 2:01 PM, Steven Barbera wrote: Oooh, make sure you put the jQuery.noConflict() code at the top right after the lavalamp.min.js code. Also make sure you add the script tags around it. Steve On Tue, Jan 20, 2009 at 1:58 PM, Erik R. Peterson eriks...@mac.com wrote: I eliminated some unnecessary scripts. This is what i have now: script type=text/javascript src=/src/js/mootools/1.2.1/ core.js/script script type=text/javascript src=/src/js/mootools/1.2.1/ more.js/script script type=text/javascript src=/src/js/mootools/barack/ morphlist.js/script script type=text/javascript src=/src/js/mootools/barack/ barackslideshow.js/script script type=text/javascript src=/src/js/mootools/barack/ demo.js/script script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript $j(document).ready(function(){ $j(:text).labelify(); }); /script script type=text/javascript $j(function() { $j(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script script type=text/javascript function change(id,newtext) { document.getElementById(id).innerHTML=newtext } /script script type=text/javascriptvar $j = jQuery.noConflict();/script I search for all $( and replaced it with $j(. MY JQUERY LAVALAMP IS NOW NOT WORKING. Frustrated! Erik On Jan 20, 2009, at 1:49 PM, Steven Barbera wrote: script type=text/javascriptvar $j = jQuery.noConflict();/script -- --- Steve Barbera whobu...@gmail.com
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
it's an ugly hack --people who take pride in the purity of their code might take offense at a solution which is based on expediency, rather than programming dexterity. this debate seems partly to be about programming pride vs. expediency. i wish i had the resources to hire one of you gurus, but i have to wear all hats. to me, an example of an ugly hack is hard- coding values where constants should be used, or applying patch upon patch rather than fixing the whole system. has so many potential problems --such as? every potential issue mentioned in this thread is the rare exception. no one has yet presented a serious or probable problem from !important. and in the rare cases where any of the potential problems occur, then you get to apply your expert programming skills. and of course some programmers, like some auto-mechanics or doctors, who get paid more for doing more work, love to find more problems requiring their expert skills to solve. i prefer finding solutions to prevent more work. if i could hire one of you gurus i would hire the ones who find more efficient solutions, rather than more reasons to show off their skills.
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
because none of the proposed functional problems have proven truly significant, the debate has become one of principle. Eric Garside's critique is that you're not SUPPOSED to use !important this way. my one strict rule is to never strictly follow strict rules. i believe a wise programmer understands the reasons for particular rules, follows them when it makes sense, and breaks them when it makes sense. never use GOTO is a guideline meant to prevent spaghetti-code, is one of those strict rules. it's an old debate. i myself have written ridiculously-deep, impenetrable conditional nests and other programming gymnastics to avoid the dreaded goto, resulting in code that was harder to maintain. as steve mcconnell, author of the fantastic programmers bible code complete, writes (in support of judicious use of GOTO), If you have your rain boots on, it's not worth walking around the block to avoid a mud puddle. http://www.stevemcconnell.com/ccgoto.htm i have not yet found any chorus of css-authorities warning against ! important.
[jQuery] Re: Solution To Many Of Your CSS Nightmares!
there is another well-established programming principle-- modularity. the idea is the less tightly-coupled components are, the easier it is to upgrade any one of them, or switch it out with a replacement. one technique to achieve modularity is to reduce the scope of variables-- keep the variable-name within the procedure or module where it's used, rather than making it a global variable. those who want me to debug conflicts between the widget and site (rather than make the widget self-contained) would have me keep all my variables global. why not outlaw id's and classes while we're at it? that's really cheating, isn't it? only a non-programmer would use a cheap work-around like id's and classes! if the widget is self-contained, then i can upgrade or replace the widget without worrying about style conflicts. !important is like a modular variable-- it says 'hey website css, you can't mess with me.' that's in-keeping with the principle of modularity. what if tomorrow i want to switch to AListApart, or MenuMatic, or Uvumi, or LavaLamp? what if tomorrow i want to add a thermometer or calendar widget? would you have me open up firebug all over again, and work out the css conflicts every time i switch to a different widget? jeez, i wish i was getting paid by the hour for that! isn't jQuery itself based on the concept of encapsulating functionality in self-contained units? it would be quite a mess if individual jQuery plugins broke each other, would it not? i wonder if this is a cultural-gap? javascript does not support modularity very easily, as described in Haverbeke's Eloquent JavaScript. he provides some techniques for achieving modularity in javascript here: http://eloquentjavascript.net/chapter9.html
[jQuery] Re: the new whitehouse.gov - jQuery powered
$(nation).ready(function() { $('.POTUS').not('#a_jackass').change(); }); On Tue, Jan 20, 2009 at 2:21 PM, rolfsf rol...@gmail.com wrote: I just noticed that team Obama pushed a new website live today - powered with jQuery! http://www.whitehouse.gov
[jQuery] Re: Conflict with Mootools...
Guess what!! I got it to work!! Very nice I feel like I parted the sea like moses thanks. Erik On Jan 20, 2009, at 2:01 PM, Steven Barbera wrote: Oooh, make sure you put the jQuery.noConflict() code at the top right after the lavalamp.min.js code. Also make sure you add the script tags around it. Steve On Tue, Jan 20, 2009 at 1:58 PM, Erik R. Peterson eriks...@mac.com wrote: I eliminated some unnecessary scripts. This is what i have now: script type=text/javascript src=/src/js/mootools/1.2.1/ core.js/script script type=text/javascript src=/src/js/mootools/1.2.1/ more.js/script script type=text/javascript src=/src/js/mootools/barack/ morphlist.js/script script type=text/javascript src=/src/js/mootools/barack/ barackslideshow.js/script script type=text/javascript src=/src/js/mootools/barack/ demo.js/script script type=text/javascript src=/src/js/jquery/ jquery-1.2.6.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.easing.min.js/script script type=text/javascript src=/src/js/jquery/lavalamp/ jquery.lavalamp.min.js/script script type=text/javascript $j(document).ready(function(){ $j(:text).labelify(); }); /script script type=text/javascript $j(function() { $j(#1, #2, #3).lavaLamp({ fx: backout, speed: 800, click: function(event, menuItem) { return false; } }); }); /script script type=text/javascript function change(id,newtext) { document.getElementById(id).innerHTML=newtext } /script script type=text/javascriptvar $j = jQuery.noConflict();/script I search for all $( and replaced it with $j(. MY JQUERY LAVALAMP IS NOW NOT WORKING. Frustrated! Erik On Jan 20, 2009, at 1:49 PM, Steven Barbera wrote: script type=text/javascriptvar $j = jQuery.noConflict();/script -- --- Steve Barbera whobu...@gmail.com
[jQuery] Re: Conflict with Mootools...
Nice job, its always a great relief after you've struggled with a problem to conquer it. Good luck with your JS. On Tue, Jan 20, 2009 at 2:37 PM, Erik R. Peterson eriks...@mac.com wrote: Guess what!! I got it to work!! Very nice I feel like I parted the sea like moses thanks. Erik On Jan 20, 2009, at 2:01 PM, Steven Barbera wrote: Oooh, make sure you put the jQuery.noConflict() code at the top right after the lavalamp.min.js code. Also make sure you add the script tags around it. Steve On Tue, Jan 20, 2009 at 1:58 PM, Erik R. Peterson eriks...@mac.comwrote: I eliminated some unnecessary scripts. This is what i have now: *script type=text/javascript src=/src/js/mootools/1.2.1/core.js/script* *script type=text/javascript src=/src/js/mootools/1.2.1/more.js/script* *script type=text/javascript src=/src/js/mootools/barack/morphlist.js/script* *script type=text/javascript src=/src/js/mootools/barack/barackslideshow.js/script* *script type=text/javascript src=/src/js/mootools/barack/demo.js/script* * * *script type=text/javascript src=/src/js/jquery/jquery-1.2.6.min.js/script* *script type=text/javascript src=/src/js/jquery/lavalamp/jquery.easing.min.js/script* *script type=text/javascript src=/src/js/jquery/lavalamp/jquery.lavalamp.min.js/script* * * * * *script type=text/javascript* *$j(document).ready(function(){* * $j(:text).labelify();* *});* */script* * * *script type=text/javascript* *$j(function() {* *$j(#1, #2, #3).lavaLamp({* *fx: backout,* *speed: 800,* *click: function(event, menuItem) {* *return false;* *}* *});* *});* */script* *script type=text/javascript * *function change(id,newtext) * *{ * *document.getElementById(id).innerHTML=newtext * *} * */script * * * *script type=text/javascriptvar $j = jQuery.noConflict();/script * I search for all $( and replaced it with $j(. MY JQUERY LAVALAMP IS NOW NOT WORKING. Frustrated! Erik On Jan 20, 2009, at 1:49 PM, Steven Barbera wrote: script type=text/javascriptvar $j = jQuery.noConflict();/script -- --- Steve Barbera whobu...@gmail.com -- --- Steve Barbera whobu...@gmail.com
[jQuery] Re: 1.3, attributeStartsWith and '['
I filed a bug over here: http://dev.jquery.com/ticket/3928 and have since fixed the issue. --John On Mon, Jan 19, 2009 at 2:08 PM, Balazs Endresz balazs.endr...@gmail.com wrote: Unforunately it's just turned out that there's anothor isssue behind this. You can follow the ticket if you want update on this, I guess it will be solved soon. On Jan 19, 10:46 am, Jedrzej Majko jdr...@gmail.com wrote: Hello, I have strange problem with attribute StartsWith in new version of jQuery. This code gives 'FOUND' in 1.2.6 and 'NOT FOUND' in 1.3. There's a problem with [name^='item['], [name^='item[1]'] works fine. Is this a bug, or expected behavior? Code: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / script type=text/javascript src=http://jqueryjs.googlecode.com/ files/jquery-1.3.js/script script type=text/javascript $(document).ready(function(){ if($([name^='item[']).length==0){ alert('NOT FOUND'); } else { alert('FOUND'); } }); /script /head body input type=text name=item[1] value=1/ /body /html