[jQuery] What I need to know?
Is it possible with jQuery to update a database / call a stored procedure when I update an Input box that represents Quantity of an item? I am using vanilla ASP and have not used jQuery in a while. Because it is a wish list with line-items of quantity and being able to submit one line to the cart for purchase... etc I am running into many challenges..
[jQuery] What does this do?
Sorry not a quiz... I just am having trouble remembering how I built this. What does this do? firstInt = Number($(div#upsell .upsell_feature_module:visible).attr (id)); Is it counting where in the chain of Div's the current position is? My code is: function scrollCartUpsells(num){ if (Number(num) == 1){ firstInt = Number($ (div#upsell .upsell_feature_module:visible).attr(id)); alert(firstInt); nextInt = Number(firstInt) + 1; prevInt = Number(firstInt) - 1; lastInt = Number(firstInt) + Number(spanInt); // lastInt gets display: none; } if (Number(num) == -1){ firstInt = Number($ (div#upsell .upsell_feature_module:visible).attr(id)) -1; nextInt = Number(firstInt) + 1; prevInt = Number(firstInt) - 1; lastInt = Number(firstInt) + Number(spanInt); // lastInt gets display: none; } // BUTTON VISIBILITY CONTROLS if(Number(firstInt) 0) { $(#scrollLeft).removeClass(none); } if(Number(firstInt) = 1) { $(#scrollLeft).addClass(none); if(Number($(div#upsell .upsell_feature_module:visible).attr (id)) == 1){ $(#scrollLeft).removeClass(none); } } if(Number(lastInt) = Number(endInt)) { $(#scrollRight).addClass(none); } if(Number(lastInt) Number(endInt)) { $(#scrollRight).removeClass(none); } // BUTTON VISIBILITY CONTROLS if (Number(num) == 1){ $(#+firstInt).addClass(none); $(#+firstInt).css('margin-left', '5px'); $(#+nextInt).css('margin-left', '40px'); $(#+lastInt).removeClass(none); } if (Number(num) == -1){ lastInt = Number(firstInt) + Number(spanInt); $(#+firstInt).removeClass(none); $(#+firstInt).css('margin-left', '40px'); $(#+nextInt).css('margin-left', '5px'); $(#+lastInt).addClass(none); $(#scrollRight).removeClass(none); } }
[jQuery] Re: What does this do?
Ok cool, I was wondering, isn't it supposed to return a number? because I am alerting NaN On Mar 20, 8:19 am, jQuery Lover ilovejqu...@gmail.com wrote: Gets you the first visible .upsell_feature_module's ID (in id=upcell container). Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Fri, Mar 20, 2009 at 5:01 PM, Danjojo dlcac...@gmail.com wrote: Sorry not a quiz... I just am having trouble remembering how I built this. What does this do? firstInt = Number($(div#upsell .upsell_feature_module:visible).attr (id)); Is it counting where in the chain of Div's the current position is? My code is: function scrollCartUpsells(num){ if (Number(num) == 1){ firstInt = Number($ (div#upsell .upsell_feature_module:visible).attr(id)); alert(firstInt); nextInt = Number(firstInt) + 1; prevInt = Number(firstInt) - 1; lastInt = Number(firstInt) + Number(spanInt); // lastInt gets display: none; } if (Number(num) == -1){ firstInt = Number($ (div#upsell .upsell_feature_module:visible).attr(id)) -1; nextInt = Number(firstInt) + 1; prevInt = Number(firstInt) - 1; lastInt = Number(firstInt) + Number(spanInt); // lastInt gets display: none; } // BUTTON VISIBILITY CONTROLS if(Number(firstInt) 0) { $(#scrollLeft).removeClass(none); } if(Number(firstInt) = 1) { $(#scrollLeft).addClass(none); if(Number($(div#upsell .upsell_feature_module:visible).attr (id)) == 1){ $(#scrollLeft).removeClass(none); } } if(Number(lastInt) = Number(endInt)) { $(#scrollRight).addClass(none); } if(Number(lastInt) Number(endInt)) { $(#scrollRight).removeClass(none); } // BUTTON VISIBILITY CONTROLS if (Number(num) == 1){ $(#+firstInt).addClass(none); $(#+firstInt).css('margin-left', '5px'); $(#+nextInt).css('margin-left', '40px'); $(#+lastInt).removeClass(none); } if (Number(num) == -1){ lastInt = Number(firstInt) + Number(spanInt); $(#+firstInt).removeClass(none); $(#+firstInt).css('margin-left', '40px'); $(#+nextInt).css('margin-left', '5px'); $(#+lastInt).addClass(none); $(#scrollRight).removeClass(none); } }
[jQuery] Re: What does this do?
CONTROLS if(Number(firstInt) 0) { $(#scrollLeft).removeClass(none); } if(Number(firstInt) = 1) { $(#scrollLeft).addClass(none); if(Number($(div#upsell .upsell_feature_module:visible).attr (id)) == 1){ $(#scrollLeft).removeClass(none); } } if(Number(lastInt) = Number(endInt)) { $(#scrollRight).addClass(none); } if(Number(lastInt) Number(endInt)) { $(#scrollRight).removeClass(none); } // BUTTON VISIBILITY CONTROLS if (Number(num) == 1){ $(#+firstInt).addClass(none); $(#+firstInt).css('margin-left', '5px'); $(#+nextInt).css('margin-left', '40px'); $(#+lastInt).removeClass(none); } if (Number(num) == -1){ lastInt = Number(firstInt) + Number(spanInt); $(#+firstInt).removeClass(none); $(#+firstInt).css('margin-left', '40px'); $(#+nextInt).css('margin-left', '5px'); $(#+lastInt).addClass(none); $(#scrollRight).removeClass(none); } } // END JSCRIPT FOR SCROLLING CART UPSELLS // /script /div!-- /upsell -- When my code runs I do get 2 visable products and 17 more div's with a class of None (hidden) Not sure why the code was not reusable... any help writing it better appreciated. ;) On Mar 20, 9:01 am, Danjojo dlcac...@gmail.com wrote: Ok cool, I was wondering, isn't it supposed to return a number? because I am alerting NaN On Mar 20, 8:19 am, jQuery Lover ilovejqu...@gmail.com wrote: Gets you the first visible .upsell_feature_module's ID (in id=upcell container). Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Fri, Mar 20, 2009 at 5:01 PM, Danjojo dlcac...@gmail.com wrote: Sorry not a quiz... I just am having trouble remembering how I built this. What does this do? firstInt = Number($(div#upsell .upsell_feature_module:visible).attr (id)); Is it counting where in the chain of Div's the current position is? My code is: function scrollCartUpsells(num){ if (Number(num) == 1){ firstInt = Number($ (div#upsell .upsell_feature_module:visible).attr(id)); alert(firstInt); nextInt = Number(firstInt) + 1; prevInt = Number(firstInt) - 1; lastInt = Number(firstInt) + Number(spanInt); // lastInt gets display: none; } if (Number(num) == -1){ firstInt = Number($ (div#upsell .upsell_feature_module:visible).attr(id)) -1; nextInt = Number(firstInt) + 1; prevInt = Number(firstInt) - 1; lastInt = Number(firstInt) + Number(spanInt); // lastInt gets display: none; } // BUTTON VISIBILITY CONTROLS if(Number(firstInt) 0) { $(#scrollLeft).removeClass(none); } if(Number(firstInt) = 1) { $(#scrollLeft).addClass(none); if(Number($(div#upsell .upsell_feature_module:visible).attr (id)) == 1){ $(#scrollLeft).removeClass(none); } } if(Number(lastInt) = Number(endInt)) { $(#scrollRight).addClass(none); } if(Number(lastInt) Number(endInt)) { $(#scrollRight).removeClass(none); } // BUTTON VISIBILITY CONTROLS if (Number(num) == 1){ $(#+firstInt).addClass(none); $(#+firstInt).css('margin-left', '5px'); $(#+nextInt).css('margin-left', '40px'); $(#+lastInt).removeClass(none); } if (Number(num) == -1){ lastInt = Number(firstInt) + Number(spanInt); $(#+firstInt).removeClass(none); $(#+firstInt).css('margin-left', '40px'); $(#+nextInt).css('margin-left', '5px'); $(#+lastInt).addClass(none); $(#scrollRight).removeClass(none); } }
[jQuery] Re: What does this do?
Ok.. I was missing the id=%=intA% on the element. Thanks for the help. It's working in another site now. On Mar 20, 9:29 am, MorningZ morni...@gmail.com wrote: If you are getting NaN that means not a number, probably meaning your selector isn't valid On Mar 20, 9:07 am, Danjojo dlcac...@gmail.com wrote: For clarity: script type=text/javascript src=/includes/jquery.js/script script type=text/javascript //*** for scrolling cart upsells $(document).ready(function(){ $(#scrollLeft).addClass(none);}); /script style media=all type=text/css .none { display: none;} /style div id=upsell % Dim strACCItem,strACCItemNo,strACCItemDescription,strACCItemPrice,strACCItemEDP For intA = 1 to RELATEDNUM If intA = intACCItemCount Then strACCItem = Trim(objRelateds.GetValue (ItemNo, intA)) strACCItemNo = server.urlencode(Trim (objRelateds.GetValue(ItemNo, intA))) strACCItemDescription = trim (objRelateds.GetValue(ItemDescription, intA)) strACCItemPrice = FormatCurrency(Trim (objrELATEDS.GetValue(ItemPrice, intA))) strACCItemEDP = trim (objRelateds.GetValue(ItemEDP, intA)) % div class=upsell_feature_module % if intA = 2 then % style=margin-left:32px; %end if% a class=upsell_img href=/ detail/%=strACCItemNo% img src=%=getEDPImage (strACCItemEDP,)% alt= border=0 width=84 height=84 //a div class=upsell_text a href=/detail/%=strACCItemNo %%=Replace(strAccItem, MACS_PREFIX , )%/a /div!-- /upsell_text -- /div!-- /upsell_feature -- % End If Next ' Remaining products to cycle/scroll through BUT THESE ARE HIDDEN For intA = intA to intACCItemCount strACCItem = Trim(objRelateds.GetValue (ItemNo, intA)) strACCItemNo = server.urlencode(Trim (objRelateds.GetValue(ItemNo, intA))) strACCItemDescription = trim (objRelateds.GetValue(ItemDescription, intA)) strACCItemPrice = FormatCurrency(Trim (objrELATEDS.GetValue(ItemPrice, intA))) strACCItemEDP = trim(objRelateds.GetValue (ItemEDP, intA)) % div class=upsell_feature_module none style=margin-left: 5px; a class=upsell_img href=/detail/ %=strACCItemNo% img src=%=getEDPImage (strACCItemEDP,)% alt= border=0 width=84 height=84 //a div class=upsell_text a href=/detail/%=strACCItemNo% %=Replace(strAccItem, MACS_PREFIX , )%/a /div!-- /upsell_text -- /div!-- /upsell_feature -- % Next % div style=position: absolute; width: 24px; left: 6px; top: 52px; img class=hmm onclick=scrollCartUpsells (-1); id=scrollLeft src=/images/arrow_left.gif alt=scroll left width=24 height=77/ /div div style=position: absolute; width: 24px; left: 259px; top: 52px; img class=hmm onclick=scrollCartUpsells (1); id=scrollRight src=/images/arrow_right.gif alt=scroll right width=24 height=77/ /div script type=text/javascript // BEGIN JSCRIPT FOR SCROLLING CART UPSELLS // var firstInt; var nextInt; var prevInt; var lastInt; var endInt = %=intACCItemCount%; var spanInt = %=RELATEDNUM%; //alert('spanInt = ' + spanInt); var endScroll = Number(endInt) - Number(spanInt); //alert('endScroll = ' + endScroll); var totalDiv = Number($ (div#upsell .upsell_feature_module:visible).siblings(div).size()) - 2 if(Number(totalDiv) = Number(spanInt)){ $(#scrollRight).addClass(none); } function scrollCartUpsells(num){ if (Number(num) == 1){ firstInt = Number($ (div#upsell .upsell_feature_module:visible).attr(id)); //Gets you the first visible .upsell_feature_module's ID (in id=upcell container)... alert(firstInt
[jQuery] RE: FF2.0 and IE7 simple hide and show stuff`
What am I doing wrong? (besides developing the whole thing to work in FF2.0 first) What changes can I make to get this to work in IE7? For example it does not change to 'Edit Gift Label' on ready, even though the checkbox is checked. $(document).ready(function(){ var rowNum = 0 $([EMAIL PROTECTED]'checkbox']).each(function() { rowNum = rowNum +1 showGiftCardLinkAtLoad(rowNum) }); }); function showGiftCardLinkAtLoad(rowNum){ if ($('#G' + rowNum).is(':checked')) { $(.addGiftCard + rowNum).removeClass(noshow); if ('%=editTag%' == '1') { $(.addGiftCard + rowNum).text(Edit Gift Label); } } else { $(.addGiftCard + rowNum).addClass(noshow); } } function processGiftCardChecked(rowNum){ if ($('#G' + rowNum).is(':checked')) { document.forms.recalculate.submit() } else { document.forms.recalculate.submit() } } function editGiftCard(rowNum){ $(.addGiftCard + rowNum).text(Close Gift Label); $(#gift_table).removeClass(noshow); $(.addGiftCard + rowNum).removeAttr(onclick); $(.addGiftCard + rowNum).attr(onclick,closeGiftCard( + rowNum + )); } function closeGiftCard(rowNum){ $(.addGiftCard + rowNum).text(Edit Gift Label); $(#gift_table).addClass(noshow); $(.addGiftCard + rowNum).removeAttr(onclick); $(.addGiftCard + rowNum).attr(onclick,editGiftCard( + rowNum + )); }
[jQuery] Cluetips Protips Jtips
I really like the quality of the tooltip pop-ups found here http://www.nickstakenburg.com/projects/prototip2/ What is the closest thing we have to this level of quality in jQuery? Thanks, D
[jQuery] Clicking on the whole div area.. not just the small icon image.
I am trying to get a click event on the whole div area around the image that toggles a menu. In FireFox I can click on the whole div and my functionality works. In IE7 I have to click only on the tiny arrow icon. How do I allow the whole div to control the event? $(document).ready(function() { $('ul.linkContainer:not(:first)').hide(); $('div.arrowToggle').click(function() { var $nextUL = $(this).next(); var $visibleSiblings = $nextUL.siblings('ul:visible'); if ($visibleSiblings.length ) { $visibleSiblings.slideUp('fast', function() { $nextUL.slideToggle('fast'); }); } else { $nextUL.slideToggle('fast'); } }); }); div class=arrowToggle style=position: absolute; width: 30px; height: 13px; left: 185px; border: 1px solid red; img style=width: 12px; height: 12px; float: right; src=/images/arrow_right.png/ /div
[jQuery] Re: Symantic Markup with Nice Accordion.. ..
Hi all, did i post in the wrong forum for this? Thanks, D On May 29, 1:28 pm, Danjojo [EMAIL PROTECTED] wrote: I had the original demo from a popular site to get the Accordion menu to work... I work with a team and we have designers who will want to access the markup with css perfectly. So of course we want the markup like this: div class=demo-show2 ul li style=border-top: 1px solid black; class=menuCatCategory Oneul class=linkContainer lia href=/products/c1_products/c1_sub1_productssub-Category c1_sub1/a/li /ul /li li class=menuCatCategory Twoul class=linkContainer style=display: none; lia href=/products/c2_products/c2_sub1_productssub-Category c2_sub1/a/li lia href=/products/c2_products/c2_sub2_productssub-Category c2_sub2/a/li lia href=/category/c2_products/c2_sub3_productssub-Category c2_sub3/a/li /ul /li /ul /div I want to click the Category li item and have the ul linkContainer show or not show as needed. Here is the jQuery I am trying to modify: $(document).ready(function() { $('li.menuCat ul.linkContainer:not(:first)').hide(); $('div.demo-show2ul li.menuCat').click(function() { var $nextUL = $(this).next(); var $visibleSiblings = $nextUL.siblings('div.demo- show2ulli.menuCat ul.linkContainer:visible'); if ($visibleSiblings.length ) { $visibleSiblings.slideUp('fast', function() { $nextUL.slideToggle('fast'); }); } else { $nextUL.slideToggle('fast'); } }); }); Much Help Much Appreciated
[jQuery] Re: New Plugin: Magnify
WOW, I am impressed. On May 30, 1:49 pm, Josh Nathanson [EMAIL PROTECTED] wrote: Hey all, Got a new plugin for folks to check out - it allows you to create an image magnifier like those you see on a lot of e-commerce sites. Here's the link: http://tinyurl.com/6kwzf9 Features include: - Set show event to mouseover or click - Allows preloading of larger image, or not if desired - Written mostly in plain 'ol javascript for fast performance Have fun and let me know about any bugs. -- Josh
[jQuery] Symantic Markup with Nice Accordion.. ..
I had the original demo from a popular site to get the Accordion menu to work... I work with a team and we have designers who will want to access the markup with css perfectly. So of course we want the markup like this: div class=demo-show2 ul li style=border-top: 1px solid black; class=menuCatCategory Oneul class=linkContainer lia href=/products/c1_products/c1_sub1_productssub-Category c1_sub1/a/li /ul /li li class=menuCatCategory Twoul class=linkContainer style=display: none; lia href=/products/c2_products/c2_sub1_productssub-Category c2_sub1/a/li lia href=/products/c2_products/c2_sub2_productssub-Category c2_sub2/a/li lia href=/category/c2_products/c2_sub3_productssub-Category c2_sub3/a/li /ul /li /ul /div I want to click the Category li item and have the ul linkContainer show or not show as needed. Here is the jQuery I am trying to modify: $(document).ready(function() { $('li.menuCat ul.linkContainer:not(:first)').hide(); $('div.demo-show2ul li.menuCat').click(function() { var $nextUL = $(this).next(); var $visibleSiblings = $nextUL.siblings('div.demo- show2ulli.menuCat ul.linkContainer:visible'); if ($visibleSiblings.length ) { $visibleSiblings.slideUp('fast', function() { $nextUL.slideToggle('fast'); }); } else { $nextUL.slideToggle('fast'); } }); }); Much Help Much Appreciated
[jQuery] jQuery UI
Does the jQuery UI zip package contain jQuery, or is it just a library to USE with my jQuery library?
[jQuery] rewrite .text in Internet Explorer
Any ideas how to update the following Jquery code to work in IE? It works in Firefox... Opera.. and not in Safari for window.. (so it works in 2 out of 4 browsers) // Load XML document based on language var langSheet = language_sheet_ + country + .xml $.ajax({ type: GET, url: langSheet, dataType: xml, // specify the return type as xml success: function(xmlDoc){ $(xmlDoc).find('subAboutLoc').each(function() { var item_text = $(this).text(); $('#subAboutLoc').text(item_text); }); } });
[jQuery] Re: rewrite .text in Internet Explorer
Thank you, I will give that a try... also, it has magicaly begun to work in IE cache issue?? don't know.. I almost always ctrl-reload On Oct 10, 11:09 am, Gordon [EMAIL PROTECTED] wrote: A bit of a stab in the dark I admit, but have you tried using .html() instead of .text()? On Oct 10, 12:19 pm, Danjojo [EMAIL PROTECTED] wrote: Any ideas how to update the following Jquery code to work in IE? It works in Firefox... Opera.. and not in Safari for window.. (so it works in 2 out of 4 browsers) // Load XML document based on language var langSheet = language_sheet_ + country + .xml $.ajax({ type: GET, url: langSheet, dataType: xml, // specify the return type as xml success: function(xmlDoc){ $(xmlDoc).find('subAboutLoc').each(function() { var item_text = $(this).text(); $('#subAboutLoc').text(item_text); }); } });- Hide quoted text - - Show quoted text -
[jQuery] Re: ClueTip: Nice work, Karl!
Great work!! Only recommendation would be to move your example tab closer to the front, maybe after Features? If it were me I would even move your Examples tab between the Intro and Features tabs. Awesome work!! On Oct 10, 2:23 pm, Karl Swedberg [EMAIL PROTECTED] wrote: On Oct 10, 2007, at 10:48 AM, RichUncleSkeleton wrote: I don't have a clue [geddit?] what the plugin is all about. That page you posted (and no other pages on the site) actually say what it does. And I don't see anything remotely like a 'demo'... Huh? Did you click on the Features link? The clueTip plug-in allows you to easily set a link to show a tooltip of sorts when the user's mouse hovers over the link. If the link includes a title attribute, its text becomes the heading of the clueTip. ... Did you click on the Examples link? It has 16 different examples. Is anyone else having the same problem of not seeing anything remotely like a demo or not seeing the lists of features (smart positioning, flexible behavior, many option)? http://plugins.learningjquery.com/cluetip/demo/ --Karl
[jQuery] Replacing text based on language selection
I think what I need to do will work... I just ran into a road block. One of my co-workers has filled out an XML sheet for me, with REAL japanese values i.e. subAboutLocUSロケーション/subAboutLoc subAboutWWグローバルロケーション/subAboutWW subAboutProductOverview製品概要/subAboutProductOverview subAboutTradeShows展示会/subAboutTradeShows subAboutEduTrainingセミナーamp; トレーニング/subAboutEduTraining subAboutCareerOpps就職案内/subAboutCareerOpps subAboutFinancial財政情報/subAboutFinancial subAboutSMCHistory会社沿革 History/subAboutSMCHistory subAboutOrderTrackオーダートラッキング/subAboutOrderTrack My Jquery worked on a test I did for a German Sheet where I just changed it to read German Locations if the language_sheet_de.xml had been loaded because that was the value in the subAboutLoc tag. But it is NOT working and displaying it for the Japanese style sheet. My web page still says US Locations in that menu spot. The JQuery is: // Load XML document based on language var langSheet = language_sheet_ + country + .xml $.ajax({ type: GET, url: langSheet, dataType: xml, // specify the return type as xml success: function(xmlDoc){ $(xmlDoc).find('subAboutLoc').each(function(){ var item_text = $(this).text(); $('#subAboutLoc').text(item_text); }); } }); And at the top of the XML file is: ?xml version=1.0 encoding=utf-8 ?
[jQuery] Re: Replacing text based on language selection
Update: I figured out it is actually working , but only in FireFox 2+ ANything I can do differently to adjust it to work in IE7 and IE6? We can always fall back and demo in FireFox, but I would rather learn of the solution. THanks guys. On Oct 9, 1:53 pm, Danjojo [EMAIL PROTECTED] wrote: I think what I need to do will work... I just ran into a road block. One of my co-workers has filled out an XML sheet for me, with REAL japanese values i.e. subAboutLocUSロケーション/subAboutLoc subAboutWWグローバルロケーション/subAboutWW subAboutProductOverview製品概要/subAboutProductOverview subAboutTradeShows展示会/subAboutTradeShows subAboutEduTrainingセミナーamp; トレーニング/subAboutEduTraining subAboutCareerOpps就職案内/subAboutCareerOpps subAboutFinancial財政情報/subAboutFinancial subAboutSMCHistory会社沿革 History/subAboutSMCHistory subAboutOrderTrackオーダートラッキング/subAboutOrderTrack My Jquery worked on a test I did for a German Sheet where I just changed it to read German Locations if the language_sheet_de.xml had been loaded because that was the value in the subAboutLoc tag. But it is NOT working and displaying it for the Japanese style sheet. My web page still says US Locations in that menu spot. The JQuery is: // Load XML document based on language var langSheet = language_sheet_ + country + .xml $.ajax({ type: GET, url: langSheet, dataType: xml, // specify the return type as xml success: function(xmlDoc){ $(xmlDoc).find('subAboutLoc').each(function(){ var item_text = $(this).text(); $('#subAboutLoc').text(item_text); }); } }); And at the top of the XML file is: ?xml version=1.0 encoding=utf-8 ?
[jQuery] Re: Replacing text based on language selection
Well right now my only problem is that the above Jquery code example in my original post, does not work in Internet Explorer 7. It does re-write the entire page in Japanese (good enough for my demo, later I will use a database) in FireFox browser. Any ideas how to update the Jquery code to work in IE? // Load XML document based on language var langSheet = language_sheet_ + country + .xml $.ajax({ type: GET, url: langSheet, dataType: xml, // specify the return type as xml success: function(xmlDoc){ $(xmlDoc).find('subAboutLoc').each(function() { var item_text = $(this).text(); $('#subAboutLoc').text(item_text); }); } });
[jQuery] Clear Input Search Box?
I am trying to clear an input search box's value. When the page loads the value is set. I.e.: input id=searchBox name=searchBox type=text class=input style=width: 100px; value=Search term or part # I want to set it to blank when the user clicks the box to enter a value: $(#searchBox).click(function() { $(#searchBox).attr(value,); }); I have tried a couple things but I keep getting errors.. $(#searchBox).click(function() { $(this).attr(value,); });
[jQuery] Re: Clear Input Search Box?
Thank you! IE 7 throws an error something about not supporting an object.. FireFox is happy and FireBug does not display an error. Now if someone were to type in a search word.. then focus away for whatever reason.. then click back in, the search box would clear again.. Firebug also at that point throws: c[j].apply is not a function e(Object type=click target=input#searchBox.input)jquery-svn.js (line 11) e()jquery-svn.js (line 11) [Break on this error] eval(function(p,a,c,k,e,r){e=function(c) {return(ca?'':e(parseInt(c/a)))+((c=c%a... On Oct 1, 9:23 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi there, try using .focus() instead: $(#searchBox).focus(function() { $(this).attr(value,); }); Hopefully that'll get you want you want. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Oct 1, 2007, at 8:38 AM, Danjojo wrote: I am trying to clear an input search box's value. When the page loads the value is set. I.e.: input id=searchBox name=searchBox type=text class=input style=width: 100px; value=Search term or part # I want to set it to blank when the user clicks the box to enter a value: $(#searchBox).click(function() { $(#searchBox).attr(value,); }); I have tried a couple things but I keep getting errors.. $(#searchBox).click(function() { $(this).attr(value,); });- Hide quoted text - - Show quoted text -
[jQuery] Did I get *all* of the XPath plugin?
Is this all I need to add to my external .js library to fully include the Xpath plugin? /* * Simple XPath Compatibility Plugin for jQuery 1.1 * By John Resig * Dual licensed under MIT and GPL. */ (function(jQuery){ var find = jQuery.find; jQuery.find = function(selector, context){ // Convert the root / into a different context if ( !selector.indexOf(/) ) { context = context.documentElement; selector = selector.replace(/^\/\w*/, ); if ( !selector ) return [ context ]; } // Convert // to selector = selector.replace(/\/\//g, ); // Convert / to selector = selector.replace(/\//g, ); // Naively convert [elem] into :has(elem) selector = selector.replace(/\[([EMAIL PROTECTED])\]/g, function(m, selector){ return :has( + selector + ); }); // Naively convert /.. into a new set of expressions if ( selector.indexOf(..) = 0 ) { var parts = selector.split(/\.\.?/g); var cur = jQuery(parts[0], context); for ( var i = 1; i parts.length; i++ ) cur = cur.parent(parts[i]); return cur.get(); } return find(selector, context); }; })(jQuery);
[jQuery] Re: Paste Monkey Beta Launched
Could ya'll please enlighten me??? I been cruisin't the web since the dawn of web time... and well... its ugly! Yet cute... kinda like the monkey... But what the hell is it??? :P Seriously. On Sep 28, 1:24 pm, Tane Piper [EMAIL PROTECTED] wrote: Jorn, The other valid reason is, switch of JS and view the site - the app is 100% designed to work with both js on and off, and if I used Chilli, then that wouldn't be the case. If I can get Chilli to support all the languages GeSHi supports, I could write in a conditional handler to ignore the GeSHi highlighting at render time, and render with chilli, but I really don't see the point in that. On 28/09/2007, Jörn Zaefferer [EMAIL PROTECTED] wrote: Joan Piedra schrieb: Oh that sounds reasonable. Thanks for answering, and good job at paste monkey. Btw, how is your cake_jquery_cms work going? =) Well, assuming the speed gains in Chili 1.9 that argument isn't that reasonable any more :-) -- Jörn -- Tane Piperhttp://digitalspaghetti.me.uk This email is: [ ] blogable [ x ] ask first [ ] private
[jQuery] Re: Enterprise Javascript?
It appears that there are a few items in the cooker in regards to modern web development and data access to SQL Server or MySQL etc. I will continue to keep my ear low to the ground.. On Sep 26, 9:48 pm, Robert Koberg [EMAIL PROTECTED] wrote: On Wed, 2007-09-26 at 21:11 +0100, Guy Fraser wrote: Danjojo wrote: We have Java, .NET, PHP, and CFM... What can't we do? Interact with an Enterprise database... You can use JSR 223 [1] (requires Java 1.6 or above) with the Rhino JS library and use server-side JS to speak to your DB, etc. [1]https://scripting.dev.java.net/ You don't need 1.6. The current version works in 1.4. You can get Rhino from mozilla (which is what is bundled in 1.6) at: http://www.mozilla.org/rhino/ best, -Rob
[jQuery] Reload Page?
Is it possible to reload the page right after I set the cookie? Cause I have to update all of the text in a different language.. // Flag image change on menu select, set the cookie with the spoken language choice // and reload the page in that language $(#languages).bind('change', function() { var country = $(this).val(); if(country) { // This next line uses chainable methods starting at the second .attr $('#countryFlag').attr(src, images/ + country + .gif).attr(alt, country + Flag); $.cookie('language', country, {expires: 7}); // set cookie } }); A reload might be pointless though.. since I want to use Xpath plugin to replace all the text into another language, that can all take place on the page with the DOM replace? Thank you.
[jQuery] Re: $(function()
Cool. I found the anonymous function on wikipedia http://en.wikipedia.org/wiki/Anonymous_function On Sep 25, 5:49 pm, Matt Stith [EMAIL PROTECTED] wrote: Using a function like that is called an anonymous function, and in this case you are passing the anonymous function to the jQuery object, which stores it and calls on it when the DOM is finished loading. On 9/25/07, Danjojo [EMAIL PROTECTED] wrote: 2 Questions. 1. are there the correct number of parenthesis in this code. Is there a syntax error? It runs fine.. 2. What is this idea of wrapping the code in like a blank function() with no name? The one the looks like $function() ? I don't understand it and I want to. Being a noob javascript coder I understand functions like: function myCall() { // etc } $(function() { $(#languages).bind('change', function() { var country = $(this).val(); if(country) { $('#countryFlag').attr(src, images/ + country + .gif); $.cookie('language', country, {expires: 7}); // set cookie } }); });- Hide quoted text - - Show quoted text -
[jQuery] Re: $(function()
Thank you. I commented my code and also altered my code to use $ (document).ready(function() { etc.. Totally helps me understand we are just initiating the Jquery code again to do something new, whe I see it in long form :) On Sep 25, 9:03 pm, Karl Swedberg [EMAIL PROTECTED] wrote: That function is also shorthand for this in jQuery: $(document).ready(function() { // do something when the DOM is ready }); Some people like the shorthand. I prefer the longer form because it's more clear about what it is doing. Ultimate, it's a matter of personal taste. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 25, 2007, at 5:49 PM, Matt Stith wrote: Using a function like that is called an anonymous function, and in this case you are passing the anonymous function to the jQuery object, which stores it and calls on it when the DOM is finished loading. On 9/25/07, Danjojo [EMAIL PROTECTED] wrote: 2 Questions. 1. are there the correct number of parenthesis in this code. Is there a syntax error? It runs fine.. 2. What is this idea of wrapping the code in like a blank function() with no name? The one the looks like $function() ? I don't understand it and I want to. Being a noob javascript coder I understand functions like: function myCall() { // etc } $(function() { $(#languages).bind('change', function() { var country = $(this).val(); if(country) { $('#countryFlag').attr(src, images/ + country + .gif); $.cookie('language', country, {expires: 7}); // set cookie } }); });- Hide quoted text - - Show quoted text -
[jQuery] g has no properties?
I am doing a simple imageChange onLinkHover... I get the following error in Firebug everytime I hover over a link. But the image swaps work GREAT in all browsers. Except for the fact I see the error getting thrown in the browsers I am fine. g has no properties handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e()jquery-svn.js (line 11) [Break on this error] eval(function(p,a,c,k,e,r){e=function(c) {return(ca?'':e(parseInt(c/a)))+((c=c%a... The jQuery code to swap images is: $(.showPic).hover(function() { $(#imgLinkAct).attr(src, images/cylinder.jpg); }); $(.showPic2).hover(function() { $(#imgLinkAct).attr(src, images/mgp_swap.jpg); }); $(.showPic3).hover(function() { $(#imgLinkAct).attr(src, images/mhc_swap.jpg); }); $(.showPic4).hover(function() { $(#imgLinkAct).attr(src, images/shock_swap.jpg); }); $(.showPic5).hover(function() { $(#imgLinkAct).attr(src, images/emy2_swap.jpg); }); $(.showPic6).hover(function() { $(#imgLinkAct).attr(src, images/ncy2_swap.jpg); }); $(.showPic7).hover(function() { $(#imgLinkAct).attr(src, images/crq_swap.jpg); }); $(.showPic8).hover(function() { $(#imgLinkAct).attr(src, images/clean_room_swap.jpg); }); });
[jQuery] Re: newb: How to get google groups like layout
Yes with a combination of jQuery and CSS you can do it... Rounded corners are still a tricky artform... in my oppinion. http://www.google.com/search?source=ighl=enq=jquery+rounded+corners On Sep 25, 7:38 pm, crybaby [EMAIL PROTECTED] wrote: All the boxes, background colors, and rounded corners done using javaScript or css? Can I do similar layout, look and feel, with jQuery alone(without images) or combination of jQuery and CSS? thanks
[jQuery] Re: input type text toUpperCase() jquery question
omgosh.. I did not even know CSS could do that! Is that CSS-2? or -3? On Sep 26, 9:18 am, Andy Matthews [EMAIL PROTECTED] wrote: Why would you even want to use Javascript for this? Just use CSS: input { text-decoration: uppercase; } _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Frank Tudor Sent: Tuesday, September 25, 2007 12:30 PM To: jQuery (English) Subject: [jQuery] Re: input type text toUpperCase() jquery question Anybody? On 9/25/07, FrankTudor [EMAIL PROTECTED] wrote: As a user types in content to this this text field I would like tho force the text to uppercase to as keys are pressed. How would this be done? and is toUpperCase a real jquery function? if not wbhat would be a simple way to hndle this with either CSS or someother method... Here is what I have and obviously I am stuck... script type=text/javascript $(document).ready(function() { $('.highball').keypress( function() { $('.highball').toUpperCase() } ); } ); /script input type=text style= class=ac_input highball autocomplete=off id=CityLocal value= type=text Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery (English) group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~--~~~~--~~--~--~---
[jQuery] Re: g has no properties?
Hmmm.. well that would kill 2 birds with one stone... My boss was thinking on hover off it should go back to the original image.. I guess... I don't know... where I land on that UI issue On Sep 26, 9:29 am, Andy Matthews [EMAIL PROTECTED] wrote: Oh... I just thought of something. The hover method is actually supposed to have two functions built into it. One for over, and the other for out. I wonder if that's why you're getting the error. Should look like this: $(.swapImages).hover(function() { var newSRC = $(this).attr(rel); $(this).attr(src,newSRC);},function(){ // something else goes here }); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Danjojo Sent: Wednesday, September 26, 2007 8:17 AM To: jQuery (English) Subject: [jQuery] g has no properties? I am doing a simple imageChange onLinkHover... I get the following error in Firebug everytime I hover over a link. But the image swaps work GREAT in all browsers. Except for the fact I see the error getting thrown in the browsers I am fine. g has no properties handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e()jquery-svn.js (line 11) [Break on this error] eval(function(p,a,c,k,e,r){e=function(c) {return(ca?'':e(parseInt(c/a)))+((c=c%a... The jQuery code to swap images is: $(.showPic).hover(function() { $(#imgLinkAct).attr(src, images/cylinder.jpg); }); $(.showPic2).hover(function() { $(#imgLinkAct).attr(src, images/mgp_swap.jpg); }); $(.showPic3).hover(function() { $(#imgLinkAct).attr(src, images/mhc_swap.jpg); }); $(.showPic4).hover(function() { $(#imgLinkAct).attr(src, images/shock_swap.jpg); }); $(.showPic5).hover(function() { $(#imgLinkAct).attr(src, images/emy2_swap.jpg); }); $(.showPic6).hover(function() { $(#imgLinkAct).attr(src, images/ncy2_swap.jpg); }); $(.showPic7).hover(function() { $(#imgLinkAct).attr(src, images/crq_swap.jpg); }); $(.showPic8).hover(function() { $(#imgLinkAct).attr(src, images/clean_room_swap.jpg); }); });- Hide quoted text - - Show quoted text -
[jQuery] Re: input type text toUpperCase() jquery question
thats the same thing I was wondering.. if you submitted the form field via server-side code would it also see the text as uppercase... something to watch out for Frank. On Sep 26, 9:38 am, Karl Swedberg [EMAIL PROTECTED] wrote: It's CSS 2. But it should be this: input { text-transform: uppercase; } However, that will only change the way the text is displayed, not the actual case of the text itself. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 26, 2007, at 9:32 AM, Danjojo wrote: omgosh.. I did not even know CSS could do that! Is that CSS-2? or -3? On Sep 26, 9:18 am, Andy Matthews [EMAIL PROTECTED] wrote: Why would you even want to use Javascript for this? Just use CSS: input { text-decoration: uppercase; } _ From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Frank Tudor Sent: Tuesday, September 25, 2007 12:30 PM To: jQuery (English) Subject: [jQuery] Re: input type text toUpperCase() jquery question Anybody? On 9/25/07, FrankTudor [EMAIL PROTECTED] wrote: As a user types in content to this this text field I would like tho force the text to uppercase to as keys are pressed. How would this be done? and is toUpperCase a real jquery function? if not wbhat would be a simple way to hndle this with either CSS or someother method... Here is what I have and obviously I am stuck... script type=text/javascript $(document).ready(function() { $('.highball').keypress( function() { $('.highball').toUpperCase() } ); } ); /script input type=text style= class=ac_input highball autocomplete=off id=CityLocal value= type=text Frank- Hide quoted text - - Show quoted text -
[jQuery] Re: g has no properties?
I think I am starting to get lost... The links are supposed to be triggering the jQuery function... what class or id do they use? div class=MenuContent style=background: #FFF; height: 210px; p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ cylinder.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mgp_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mhc_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ shock_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ emy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ ncy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ crq_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ clean_room_swap.jpg class=swapImages/ /p p style=margin-left: 2%; a href=linear_actuators.html class=showPicLinear Actuators/ abr/ a href=# class=showPic2Guided Actuators/abr/ a href=# class=showPic3Grippers amp; Escapements/abr/ a href=# class=showPic4Actuator Accessories/abr/ a href=# class=showPic5Electric Actuators/abr/ a href=# class=showPic6Rodless Actuators/abr/ a href=# class=showPic7Rotary Actuators/abr/ a href=# class=showPic8Specialty Actuators/abr//p /div On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote: The problem here is that .hover() takes two arguments, one for mouseover and one for mouseout. So it should look like this: .hover(function() { // Stuff to do when the mouse enters the element;}, function() { // Stuff to do when the mouse leaves the element; }); If you just want to do something on mouseover, use the (appropriately named) .mouseover() method instead: .mouseover(function() { // Stuff to do when the mouse enters the element }) --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 26, 2007, at 9:17 AM, Danjojo wrote: I am doing a simple imageChange onLinkHover... I get the following error in Firebug everytime I hover over a link. But the image swaps work GREAT in all browsers. Except for the fact I see the error getting thrown in the browsers I am fine. g has no properties handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e()jquery-svn.js (line 11) [Break on this error] eval(function(p,a,c,k,e,r){e=function(c) {return(ca?'':e(parseInt(c/a)))+((c=c%a... The jQuery code to swap images is: $(.showPic).hover(function() { $(#imgLinkAct).attr(src, images/cylinder.jpg); }); $(.showPic2).hover(function() { $(#imgLinkAct).attr(src, images/mgp_swap.jpg); }); $(.showPic3).hover(function() { $(#imgLinkAct).attr(src, images/mhc_swap.jpg); }); $(.showPic4).hover(function() { $(#imgLinkAct).attr(src, images/shock_swap.jpg); }); $(.showPic5).hover(function() { $(#imgLinkAct).attr(src, images/emy2_swap.jpg); }); $(.showPic6).hover(function() { $(#imgLinkAct).attr(src, images/ncy2_swap.jpg); }); $(.showPic7).hover(function() { $(#imgLinkAct).attr(src, images/crq_swap.jpg); }); $(.showPic8).hover(function() { $(#imgLinkAct).attr(src, images/clean_room_swap.jpg); }); });- Hide quoted text - - Show quoted text -
[jQuery] Re: Forms with asp.net
What do you mean by jQuery forms? On Sep 26, 10:49 am, Sharique [EMAIL PROTECTED] wrote: Hi, Did anybody has tried jquery forms with asp.net? -- Sharique
[jQuery] Re: g has no properties?
What I am trying now should work shouldn't it? $(.swapImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); } p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ /p p style=margin-left: 2%; a href=linear_actuators.html rel=images/cylinder.jpg class=swapImagesLinear Actuators/abr/ a href=# rel=images/mgp_swap.jpg class=swapImagesGuided Actuators/abr/ a href=# rel=images/mhc_swap.jpg class=swapImagesGrippers amp; Escapements/abr/ a href=# rel=images/shock_swap.jpg class=swapImagesActuator Accessories/abr/ a href=# rel=images/emy2_swap.jpg class=swapImagesElectric Actuators/abr/ a href=# rel=images/ncy2_swap.jpg class=swapImagesRodless Actuators/abr/ a href=# rel=images/crq_swap.jpg class=swapImagesRotary Actuators/abr/ a href=# rel=images/clean_room_swap.jpg class=swapImagesSpecialty Actuators/abr/ /p On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote: I think I am starting to get lost... The links are supposed to be triggering the jQuery function... what class or id do they use? div class=MenuContent style=background: #FFF; height: 210px; p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ cylinder.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mgp_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mhc_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ shock_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ emy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ ncy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ crq_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ clean_room_swap.jpg class=swapImages/ /p p style=margin-left: 2%; a href=linear_actuators.html class=showPicLinear Actuators/ abr/ a href=# class=showPic2Guided Actuators/abr/ a href=# class=showPic3Grippers amp; Escapements/abr/ a href=# class=showPic4Actuator Accessories/abr/ a href=# class=showPic5Electric Actuators/abr/ a href=# class=showPic6Rodless Actuators/abr/ a href=# class=showPic7Rotary Actuators/abr/ a href=# class=showPic8Specialty Actuators/abr//p /div On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote: The problem here is that .hover() takes two arguments, one for mouseover and one for mouseout. So it should look like this: .hover(function() { // Stuff to do when the mouse enters the element;}, function() { // Stuff to do when the mouse leaves the element; }); If you just want to do something on mouseover, use the (appropriately named) .mouseover() method instead: .mouseover(function() { // Stuff to do when the mouse enters the element }) --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 26, 2007, at 9:17 AM, Danjojo wrote: I am doing a simple imageChange onLinkHover... I get the following error in Firebug everytime I hover over a link. But the image swaps work GREAT in all browsers. Except for the fact I see the error getting thrown in the browsers I am fine. g has no properties handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e()jquery-svn.js (line 11) [Break on this error] eval(function(p,a,c,k,e,r){e=function(c) {return(ca?'':e(parseInt(c/a)))+((c=c%a... The jQuery code to swap images is: $(.showPic).hover(function() { $(#imgLinkAct).attr(src, images/cylinder.jpg); }); $(.showPic2).hover(function() { $(#imgLinkAct).attr(src, images/mgp_swap.jpg); }); $(.showPic3).hover(function() { $(#imgLinkAct).attr(src, images/mhc_swap.jpg); }); $(.showPic4).hover(function() { $(#imgLinkAct).attr(src, images/shock_swap.jpg); }); $(.showPic5).hover(function() { $(#imgLinkAct).attr(src, images/emy2_swap.jpg); }); $(.showPic6).hover(function() { $(#imgLinkAct).attr(src, images/ncy2_swap.jpg); }); $(.showPic7).hover(function() { $(#imgLinkAct).attr(src, images/crq_swap.jpg); }); $(.showPic8).hover(function() { $(#imgLinkAct).attr(src, images/clean_room_swap.jpg
[jQuery] Re: g has no properties?
So I should be using onMouseOver instead of onHover? Thank you. On Sep 26, 11:06 am, Danjojo [EMAIL PROTECTED] wrote: What I am trying now should work shouldn't it? $(.swapImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); } p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ /p p style=margin-left: 2%; a href=linear_actuators.html rel=images/cylinder.jpg class=swapImagesLinear Actuators/abr/ a href=# rel=images/mgp_swap.jpg class=swapImagesGuided Actuators/abr/ a href=# rel=images/mhc_swap.jpg class=swapImagesGrippers amp; Escapements/abr/ a href=# rel=images/shock_swap.jpg class=swapImagesActuator Accessories/abr/ a href=# rel=images/emy2_swap.jpg class=swapImagesElectric Actuators/abr/ a href=# rel=images/ncy2_swap.jpg class=swapImagesRodless Actuators/abr/ a href=# rel=images/crq_swap.jpg class=swapImagesRotary Actuators/abr/ a href=# rel=images/clean_room_swap.jpg class=swapImagesSpecialty Actuators/abr/ /p On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote: I think I am starting to get lost... The links are supposed to be triggering the jQuery function... what class or id do they use? div class=MenuContent style=background: #FFF; height: 210px; p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ cylinder.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mgp_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mhc_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ shock_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ emy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ ncy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ crq_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ clean_room_swap.jpg class=swapImages/ /p p style=margin-left: 2%; a href=linear_actuators.html class=showPicLinear Actuators/ abr/ a href=# class=showPic2Guided Actuators/abr/ a href=# class=showPic3Grippers amp; Escapements/abr/ a href=# class=showPic4Actuator Accessories/abr/ a href=# class=showPic5Electric Actuators/abr/ a href=# class=showPic6Rodless Actuators/abr/ a href=# class=showPic7Rotary Actuators/abr/ a href=# class=showPic8Specialty Actuators/abr//p /div On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote: The problem here is that .hover() takes two arguments, one for mouseover and one for mouseout. So it should look like this: .hover(function() { // Stuff to do when the mouse enters the element;}, function() { // Stuff to do when the mouse leaves the element; }); If you just want to do something on mouseover, use the (appropriately named) .mouseover() method instead: .mouseover(function() { // Stuff to do when the mouse enters the element }) --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 26, 2007, at 9:17 AM, Danjojo wrote: I am doing a simple imageChange onLinkHover... I get the following error in Firebug everytime I hover over a link. But the image swaps work GREAT in all browsers. Except for the fact I see the error getting thrown in the browsers I am fine. g has no properties handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11) e()jquery-svn.js (line 11) [Break on this error] eval(function(p,a,c,k,e,r){e=function(c) {return(ca?'':e(parseInt(c/a)))+((c=c%a... The jQuery code to swap images is: $(.showPic).hover(function() { $(#imgLinkAct).attr(src, images/cylinder.jpg); }); $(.showPic2).hover(function() { $(#imgLinkAct).attr(src, images/mgp_swap.jpg); }); $(.showPic3).hover(function() { $(#imgLinkAct).attr(src, images/mhc_swap.jpg); }); $(.showPic4).hover(function() { $(#imgLinkAct).attr(src, images/shock_swap.jpg); }); $(.showPic5).hover(function() { $(#imgLinkAct).attr(src, images/emy2_swap.jpg); }); $(.showPic6).hover(function() { $(#imgLinkAct).attr(src, images/ncy2_swap.jpg
[jQuery] Re: g has no properties?
Sorry.. I can't go back and edit my own messages on google groups... I understand now. If only want mouseover behaviour then use it. If I want more mouseover and mouseout use hover. Although in trying to proserve the #id's original source value I cannot get it to work //method $(.swapImages).hover(function(){ var orgSRC = $(#imgLinkAct).attr(src); var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,orgSRC); }) but if I hard code it which I dont want to do, I have a working demo. //method $(.swapImages).hover(function(){ //var orgSRC = $(#imgLinkAct).attr(src); var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,images/NCQ8_swap.jpg); }) On Sep 26, 11:15 am, Danjojo [EMAIL PROTECTED] wrote: So I should be using onMouseOver instead of onHover? Thank you. On Sep 26, 11:06 am, Danjojo [EMAIL PROTECTED] wrote: What I am trying now should work shouldn't it? $(.swapImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); } p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ /p p style=margin-left: 2%; a href=linear_actuators.html rel=images/cylinder.jpg class=swapImagesLinear Actuators/abr/ a href=# rel=images/mgp_swap.jpg class=swapImagesGuided Actuators/abr/ a href=# rel=images/mhc_swap.jpg class=swapImagesGrippers amp; Escapements/abr/ a href=# rel=images/shock_swap.jpg class=swapImagesActuator Accessories/abr/ a href=# rel=images/emy2_swap.jpg class=swapImagesElectric Actuators/abr/ a href=# rel=images/ncy2_swap.jpg class=swapImagesRodless Actuators/abr/ a href=# rel=images/crq_swap.jpg class=swapImagesRotary Actuators/abr/ a href=# rel=images/clean_room_swap.jpg class=swapImagesSpecialty Actuators/abr/ /p On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote: I think I am starting to get lost... The links are supposed to be triggering the jQuery function... what class or id do they use? div class=MenuContent style=background: #FFF; height: 210px; p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ cylinder.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mgp_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mhc_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ shock_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ emy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ ncy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ crq_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ clean_room_swap.jpg class=swapImages/ /p p style=margin-left: 2%; a href=linear_actuators.html class=showPicLinear Actuators/ abr/ a href=# class=showPic2Guided Actuators/abr/ a href=# class=showPic3Grippers amp; Escapements/abr/ a href=# class=showPic4Actuator Accessories/abr/ a href=# class=showPic5Electric Actuators/abr/ a href=# class=showPic6Rodless Actuators/abr/ a href=# class=showPic7Rotary Actuators/abr/ a href=# class=showPic8Specialty Actuators/abr//p /div On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote: The problem here is that .hover() takes two arguments, one for mouseover and one for mouseout. So it should look like this: .hover(function() { // Stuff to do when the mouse enters the element;}, function() { // Stuff to do when the mouse leaves the element; }); If you just want to do something on mouseover, use the (appropriately named) .mouseover() method instead: .mouseover(function() { // Stuff to do when the mouse enters the element }) --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 26, 2007, at 9:17 AM, Danjojo wrote: I am doing a simple imageChange onLinkHover... I get the following error in Firebug everytime I hover over a link. But the image swaps work GREAT in all browsers. Except
[jQuery] Re: Change background based of time of day using jquery
Fun idea.. I might try that for the world of warcraft guild site I am building. On Sep 26, 10:51 am, Glen Lipka [EMAIL PROTECTED] wrote: Instead of document.write('body bgcolor=orange text=#FF') Use $(body).css(background-color,blue) or $(body).addClass(noon) I think the time part could potentially be a switch, but that's just readability. Glen On 9/25/07, bsuttis [EMAIL PROTECTED] wrote: I'm curious if I could use jquery to change my body's background based on time of day. I'm not looking to do this server-side with php, I would like the background to change based on the visitor's time, not the server's. I've found this code, just wondering if I can jquery-ize: script var now = new Date(); var hours = now.getHours(); var psj=0; //18-19 night if (hours 17 hours 20){ document.write('body bgcolor=orange text=#FF') } //20-21 night if (hours 19 hours 22){ document.write('body bgcolor=orangered text=#FF') } //22-4 night if (hours 21 || hours 5){ document.write('body bgcolor=black text=#FF') } //9-17 day if (hours 8 hours 18){ document.write('body bgcolor=deepskyblue text=#FF') } //7-8 day if (hours 6 hours 9){ document.write('body bgcolor=skyblue text=#FF') } //5-6 day if (hours 4 hours 7){ document.write('body bgcolor=steelblue text=#FF') } /script- Hide quoted text - - Show quoted text -
[jQuery] Re: g has no properties?
Cool.. works nicely. The only downside is that I had 9 panels or categories that each had their own set of links and rollover images. And now the code would not be resusable. Weird how functions will not recognize a variable set in another function, is there really no way around it? Oh I bet I would have to set up functions that past arguments? Could I somehow pass the orgSrc value to the 2nd function? //method $(.swapImages).hover(function(){ var orgSRC = $(#imgLinkAct).attr(src); var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(orgSrc){ $(#imgLinkAct).attr(src,orgSRC); }) On Sep 26, 12:10 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi, You're getting close. I think it'll work if you put the var orgSRC line above the .hover() method. That way, on mouseout you're always returning the src attribute to the same value: var orgSRC = $(#imgLinkAct).attr(src); //method $(.swapImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,orgSRC); }); -- Karl On Sep 26, 2007, at 11:28 AM, Danjojo wrote: Sorry.. I can't go back and edit my own messages on google groups... I understand now. If only want mouseover behaviour then use it. If I want more mouseover and mouseout use hover. Although in trying to proserve the #id's original source value I cannot get it to work //method $(.swapImages).hover(function(){ var orgSRC = $(#imgLinkAct).attr(src); var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,orgSRC); }) but if I hard code it which I dont want to do, I have a working demo. //method $(.swapImages).hover(function(){ //var orgSRC = $(#imgLinkAct).attr(src); var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,images/NCQ8_swap.jpg); }) On Sep 26, 11:15 am, Danjojo [EMAIL PROTECTED] wrote: So I should be using onMouseOver instead of onHover? Thank you. On Sep 26, 11:06 am, Danjojo [EMAIL PROTECTED] wrote: What I am trying now should work shouldn't it? $(.swapImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); } p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ /p p style=margin-left: 2%; a href=linear_actuators.html rel=images/ cylinder.jpg class=swapImagesLinear Actuators/abr/ a href=# rel=images/mgp_swap.jpg class=swapImagesGuided Actuators/abr/ a href=# rel=images/mhc_swap.jpg class=swapImagesGrippers amp; Escapements/abr/ a href=# rel=images/shock_swap.jpg class=swapImagesActuator Accessories/abr/ a href=# rel=images/emy2_swap.jpg class=swapImagesElectric Actuators/abr/ a href=# rel=images/ncy2_swap.jpg class=swapImagesRodless Actuators/abr/ a href=# rel=images/crq_swap.jpg class=swapImagesRotary Actuators/abr/ a href=# rel=images/clean_room_swap.jpg class=swapImagesSpecialty Actuators/abr/ /p On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote: I think I am starting to get lost... The links are supposed to be triggering the jQuery function... what class or id do they use? div class=MenuContent style=background: #FFF; height: 210px; p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ cylinder.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mgp_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ mhc_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ shock_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ emy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ ncy2_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ crq_swap.jpg class=swapImages/ img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/ clean_room_swap.jpg class=swapImages/ /p p style=margin-left: 2%; a href=linear_actuators.html class=showPicLinear Actuators/ abr/ a href=# class
[jQuery] Re: g has no properties?
Sometimes, once I get started down the reusability path I think there must be no end. Perhaps in this case I have to draw the line.. and so the multiple panels that independently swap out images on their set of links would look like so. var orgActSRC = $(#imgLinkAct).attr(src); var orgValveSRC = $(#imgLinkValve).attr(src); //method $(.swapActImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,orgActSRC); }) //method $(.swapValveImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkValve).attr(src,newSRC); },function(){ $(#imgLinkValve).attr(src,orgValveSRC); }) On Sep 26, 1:35 pm, Danjojo [EMAIL PROTECTED] wrote: Cool.. works nicely. The only downside is that I had 9 panels or categories that each had their own set of links and rollover images. And now the code would not be resusable. Weird how functions will not recognize a variable set in another function, is there really no way around it? Oh I bet I would have to set up functions that past arguments? Could I somehow pass the orgSrc value to the 2nd function? //method $(.swapImages).hover(function(){ var orgSRC = $(#imgLinkAct).attr(src); var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(orgSrc){ $(#imgLinkAct).attr(src,orgSRC); }) On Sep 26, 12:10 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi, You're getting close. I think it'll work if you put the var orgSRC line above the .hover() method. That way, on mouseout you're always returning the src attribute to the same value: var orgSRC = $(#imgLinkAct).attr(src); //method $(.swapImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,orgSRC); }); -- Karl On Sep 26, 2007, at 11:28 AM, Danjojo wrote: Sorry.. I can't go back and edit my own messages on google groups... I understand now. If only want mouseover behaviour then use it. If I want more mouseover and mouseout use hover. Although in trying to proserve the #id's original source value I cannot get it to work //method $(.swapImages).hover(function(){ var orgSRC = $(#imgLinkAct).attr(src); var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,orgSRC); }) but if I hard code it which I dont want to do, I have a working demo. //method $(.swapImages).hover(function(){ //var orgSRC = $(#imgLinkAct).attr(src); var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); },function(){ $(#imgLinkAct).attr(src,images/NCQ8_swap.jpg); }) On Sep 26, 11:15 am, Danjojo [EMAIL PROTECTED] wrote: So I should be using onMouseOver instead of onHover? Thank you. On Sep 26, 11:06 am, Danjojo [EMAIL PROTECTED] wrote: What I am trying now should work shouldn't it? $(.swapImages).hover(function(){ var newSRC = $(this).attr(rel); $(#imgLinkAct).attr(src,newSRC); } p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75/ /p p style=margin-left: 2%; a href=linear_actuators.html rel=images/ cylinder.jpg class=swapImagesLinear Actuators/abr/ a href=# rel=images/mgp_swap.jpg class=swapImagesGuided Actuators/abr/ a href=# rel=images/mhc_swap.jpg class=swapImagesGrippers amp; Escapements/abr/ a href=# rel=images/shock_swap.jpg class=swapImagesActuator Accessories/abr/ a href=# rel=images/emy2_swap.jpg class=swapImagesElectric Actuators/abr/ a href=# rel=images/ncy2_swap.jpg class=swapImagesRodless Actuators/abr/ a href=# rel=images/crq_swap.jpg class=swapImagesRotary Actuators/abr/ a href=# rel=images/clean_room_swap.jpg class=swapImagesSpecialty Actuators/abr/ /p On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote: I think I am starting to get lost... The links are supposed to be triggering the jQuery function... what class or id do they use? div class=MenuContent style=background: #FFF; height: 210px; p class=centered style=height: 80px; img id=imgLinkAct src=images/NCQ8_swap.jpg width=97 height=75
[jQuery] Enterprise Javascript?
We have Java, .NET, PHP, and CFM... As developers we can do pretty much any UI we want with javascript (jquery), css, and semantic markup... What can't we do? Interact with an Enterprise database... Unfortunately at the point we need a real RDBM database backend, we are forced to choose one of the server-side languages above in order to continue development. I have not missed a news flash anywhere where this is NOT the case have I? Thanks,
[jQuery] Re: Enterprise Javascript?
Both great examples!! I can think of one other caveat at least that I am familiar with. Using just a development computer and a web browser is there any way to INCLUDE files so I dont have to keep editing the same navigation/ module sections in each page? On Sep 26, 2:02 pm, Jake McGraw [EMAIL PROTECTED] wrote: Actually, if you'd like to use js to access a database, may I suggest Adobe AIR? Basically, in allows you to embed JS/HTML into an installable application, which allows you to move away from the browser security model and do all kinds of crazy stuff like cross site scripting, off-line operation and direct database interaction. I just attended the Adobe onAIR conference in NYC, there is a lot of interest in this new technology and I think jQuery could play a major role in desktop applications if this becomes popular. www.adobe.com/go/air - jake On 9/26/07, Danjojo [EMAIL PROTECTED] wrote: We have Java, .NET, PHP, and CFM... As developers we can do pretty much any UI we want with javascript (jquery), css, and semantic markup... What can't we do? Interact with an Enterprise database... Unfortunately at the point we need a real RDBM database backend, we are forced to choose one of the server-side languages above in order to continue development. I have not missed a news flash anywhere where this is NOT the case have I? Thanks,- Hide quoted text - - Show quoted text -
[jQuery] Re: for selector: XPath to CSS converter?
Very cool! I would like to see it. When I open the language_sheet_en.xml in FireFox and click the little Firebug icon but it shows a banner Firebug is disabled What did I do wrong? On Sep 26, 12:34 pm, Benjamin Sterling [EMAIL PROTECTED] wrote: If open you xml doc in firefox and then use firebug to inspect an element it will give you the full path to that element and that can be used at the selector. On 9/26/07, Muescha [EMAIL PROTECTED] wrote: is there a handy XPath to CSS converter available? i like to past to the converter a XPath from the FireFox Plugin XPather and get the CSS selector syntax. -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com
[jQuery] Re: New Plugin: Picklists
I think I can help with a suggestion. When I came in as a first time user. I worked the first example up top fine (the one with just the submit button). Very fast, nice. Then I went to the second one. At first thought it was similar. Add a few then saw I could remove. So I tried removing from the top select pane 2 or 3 times. I would move the Remove Item button down below the bottom pane so it is obvious it is used to remove items from that pane. I like it a lot. I would just call it MultiSelect. On Sep 25, 6:28 am, george.gsgd [EMAIL PROTECTED] wrote: Ah, that's interesting, hadn't thought of using it other than onload, will have a look at that, thanks. I think I've got to use html() to transfer the options so I can preserve any optgroups, but I'll have a good look at your code. On Sep 24, 6:25 pm, Leonardo K [EMAIL PROTECTED] wrote: I have a suggestion: Example: If u have a select multiple with few options already selected. When the plugin is activeted it move all options to another select but it lose all options selected before. Instead of this: function moveAllOptions(from, to) { jQuery(#+to).html(jQuery(#+from).html()) .find('option:selected') .attr(selected, false); jQuery(#+from).html(''); } change for: function moveAllOptions(from, to) { var dest = jQuery(#+to); jQuery(#+from).find(option).each(function(){ dest.append(this); }); jQuery(#+from).html(''); if (dest.find(option:selected).size() = 1) addTo(to, from); } I dont know if I make myself clear. On 9/24/07, Stephan Beal [EMAIL PROTECTED] wrote: On Sep 24, 4:12 pm, george.gsgd [EMAIL PROTECTED] wrote: Can anyone help me come up with a better name for this? I struggled to come up with 'Picklists', and I'm not sure it's particularly descriptive or obvious... a) Linked Selection? b) Chained Selection? c) ... err... Natural Selection? ;) d) s2s: Select To Select (sounds like an ATT calling plan) That's pretty slick, by the way. :)- Hide quoted text - - Show quoted text -
[jQuery] $.ajax ?
Before I use the $.ajax function, do I need to install a codebase for it? I notice it is similar to Klaus Hartl cookie plugin, where I install his codebase, then use it later like var country = $.cookie('language'); When I start to use this code it seems almost like the rest of the working jQuery portions of the web page stop working. $.ajax({ url: language_sheet_en.xml, dataType: xml; success: function(xmlDocument){ $(xmlDocument).find(...).dosomeThing(...); } }); Do I need to install an ajax library or is it allready available in my jQuery build: * jQuery 1.1.3.1 Thank you.
[jQuery] Re: Open and search a .XML file
I am continuing to read the documentation at http://docs.jquery.com/Specifying_the_Data_Type_for_AJAX_Requests On Sep 24, 4:02 pm, Danjojo [EMAIL PROTECTED] wrote: Hi, thank you for helping me begin down this path. Before I use the $.ajax function, do I need to install a codebase for it? I notice it is similar to Klaus Hartl cookie plugin, where I install his codebase, then use it later like var country = $.cookie('language'); When I start to use this code it seems almost like the rest of the working jQuery portions of the web page stop working. //$.ajax({ //url: language_sheet_en.xml, //dataType: xml; //success: function(xmlDocument){ // $(xmlDocument).find(...).dosomeThing(...); //} //}); Do I need to install an ajax library or is it allready available in my jQuery build: * jQuery 1.1.3.1 Thank you. On Sep 20, 2:18 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Danjojo schrieb: Can anyone provide me a link of how to open an xml file using JQuery? Try this: $.ajax({ url: file.xml, dataType: xml, success: function(xmlDocument) { $(xmlDocument).find(...).dosomeThing(...); } }); http://docs.jquery.com/Ajax/jQuery.ajax#options -- Jörn- Hide quoted text - - Show quoted text -
[jQuery] Re: jQuery and XML revisited (tutorial)
Thank you. I will have a look. On Sep 24, 9:21 pm, Giant Jam Sandwich [EMAIL PROTECTED] wrote: This is a tutorial I posted this evening. I thought I might throw it up here in case anyone was interested. http://blog.reindel.com/2007/09/24/jquery-and-xml-revisited/ Brian Reindel d'bug @ blog.reindel.com
[jQuery] Re: How to use google group ?
The other Frenchman is hiding. :) Your message showed up fine. On Sep 25, 5:43 am, Fabrizio [EMAIL PROTECTED] wrote: Hello , I try to use this google group and it's the first time I use a google group. I wrote 3 differents message. I have a reply on only one of this but I never seen my new message on the list of the discussion. If some body could help to teacth me how the group and the discussion works ? I m French so if a frenchy could reply just one time in french i'll be very glad !!! Thank you !!! Fabrizio
[jQuery] $.ajax url: ?
Hi guys, In the same way I have used the cookie value to set which country flag image is used, could I also alter the url: value in the $.ajax funtion? var country = $.cookie('language'); // get cookie $('#countryFlag').attr(src, images/ + country + .gif); $.ajax({ type: GET, url: language_sheet_en.xml, dataType: xml, success: function(xmlDocument){ alert(Hello World); //$(xmlDocument).find(...).dosomeThing(...) } }); So if japan was selected in the language drop down box the document name would become language_sheet_jp.xml Thank you.
[jQuery] Re: IT Assistant
The site is too slow. Look into some benchmarks. On Sep 24, 7:17 am, Gordon [EMAIL PROTECTED] wrote: Well it's finally ready enough to go live so now I can plug the big jQuery-driven project I've been working on. It's called IT Assistant and is intended to make shopping to IT equipment easier (and more fun from the comments I've had back on it so far :) ). http://www.pcwb.com/assistants/ the product selector page is almost entirely jQuery driven. The follow up pages (accessories, upgrades, etc) are server-side based but they do make use of Thickbox for displaying Flash movies.
[jQuery] In regards to xml design
If I am purposing to consume XML it seems logical that the XML be designed the best that it can FIRST before consuming with more complex javascript, xpath, or your flavor of the month. In that regard is what I have desinged easy to consume using jquery/ ajax? topNavLinks topNavLinkHomeSMC Home/topNavLinkHome topNavLinkLoginLogin/topNavLinkLogin topNavLinkTrackingOrder Tracking/topNavLinkTracking topNavLinkMyPartsMy Parts List/topNavLinkMyParts topNavLinkContactContact/topNavLinkContact topNavLinkHelpHelp/topNavLinkHelp topNavLinkAccountYour Account/topNavLinkAccount /topNavLinks Or would I have an easier time (esspecially being more of a developer than a programmer) if my xml was done like this. topNavLinks topLink valUrl=''homeSMC Home/topLink topLink valUrl=''loginLogin/topLink topLink valUrl=''orderOrder Tracking/topLink topLink valUrl=''partsMy Parts List/topLink topLink valUrl=''contactContact/topLink topLink valUrl=''helpHelp/topLink topLink valUrl=''accountYour Account/topLink /topNavLinks From a dom perspective would it be easier to process the secont xml example? Or would the first one be just as easy whereby you could return the innertext value of every child of topNavLinks ?? Hope I am clear enough. Thank you.
[jQuery] Replace XPath Selectors and Removed DOM Traversal Methods
Was the main reason for the removal of XPath from the jQuery library to keep the core library small?
[jQuery] $(function()
2 Questions. 1. are there the correct number of parenthesis in this code. Is there a syntax error? It runs fine.. 2. What is this idea of wrapping the code in like a blank function() with no name? The one the looks like $function() ? I don't understand it and I want to. Being a noob javascript coder I understand functions like: function myCall() { // etc } $(function() { $(#languages).bind('change', function() { var country = $(this).val(); if(country) { $('#countryFlag').attr(src, images/ + country + .gif); $.cookie('language', country, {expires: 7}); // set cookie } }); });
[jQuery] Upgrading to jQuery 1.2 article
I would just like to say that the following article on upgrading to 1.2 and rewriting for the removed Dom traversal methods and Xpath electors was very well written. http://www.learningjquery.com/2007/09/upgrading-to-jquery-12#more-71 I understand quite alot about the jQuery changes by reading it. It seems overall the goal in 1.2 was to make the library compatible with itself, since CSS/Javascript syntax is so different than XPath syntax in the end they were incompatible with each other.
[jQuery] Re: ANNOUNCE: Meijer.com launches -- using jQuery
I mean what I posted above is easy to do since your using JQuery and all... Peace. On Sep 19, 11:08 am, Karl Swedberg [EMAIL PROTECTED] wrote: Brian, Excellent! As a resident of Grand Rapids, Michigan, I'm very happy to see this GR-based superstore using jQuery. :) Nice work! Strange thing, though -- almost every link to another page returns a 404 because they're pointing towww.meijer.com/... but when I change the url to meijer.com/... they work. Hopefully it'll work itself out. Maybe it's a dns propagation thing or something like that. Anyway, not your problem. ;-) Cheers, --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 19, 2007, at 8:02 AM, Giant Jam Sandwich wrote: I am no longer with the agency that built Meijer.com, but I am proud to announce the launch, and the fact that jQuery is doing 98% of the heavy lifting. Take a peek at the persistent cart, product previews, and the slider on the homepage. Just about everything you experience here is a precursor to the plugins I built, and that is only what you can see. There is lots going on behind the scenes. This was an intense effort, but as always, there are numerous changes I would make to the implementation. You know how it goes -- one of those what exactly was I thinking when I did that moments. Still, if you want to know how to use jQuery for some intense functionality, check out the /js/utility_javascript.jsp, and then view the source. If you experience technical difficulties, please do not contact me -- get in touch with CS at Meijer :) Brian Reindel d'bug @ blog.reindel.com- Hide quoted text - - Show quoted text -
[jQuery] Re: ANNOUNCE: Meijer.com launches -- using jQuery
HI.. nice promo. Not really a troll but just an fyi.. the menu along the top. The background color only changes to white if you actually hover over the link in the menu selection. This really should change to white if any part of the div is selected. Just my 2 cents... cant help it.. sorry lol... just a pet peeve of mine. For such a major site like that I thought it should be pointed out, even if never read by anyone. :) Cheers. On Sep 19, 11:08 am, Karl Swedberg [EMAIL PROTECTED] wrote: Brian, Excellent! As a resident of Grand Rapids, Michigan, I'm very happy to see this GR-based superstore using jQuery. :) Nice work! Strange thing, though -- almost every link to another page returns a 404 because they're pointing towww.meijer.com/... but when I change the url to meijer.com/... they work. Hopefully it'll work itself out. Maybe it's a dns propagation thing or something like that. Anyway, not your problem. ;-) Cheers, --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 19, 2007, at 8:02 AM, Giant Jam Sandwich wrote: I am no longer with the agency that built Meijer.com, but I am proud to announce the launch, and the fact that jQuery is doing 98% of the heavy lifting. Take a peek at the persistent cart, product previews, and the slider on the homepage. Just about everything you experience here is a precursor to the plugins I built, and that is only what you can see. There is lots going on behind the scenes. This was an intense effort, but as always, there are numerous changes I would make to the implementation. You know how it goes -- one of those what exactly was I thinking when I did that moments. Still, if you want to know how to use jQuery for some intense functionality, check out the /js/utility_javascript.jsp, and then view the source. If you experience technical difficulties, please do not contact me -- get in touch with CS at Meijer :) Brian Reindel d'bug @ blog.reindel.com- Hide quoted text - - Show quoted text -
[jQuery] .XML access
Can anyone provide me a link of how to open a .xml file using JQuery? Do we have anything in the documentation or sample libraries yet? Thank you.
[jQuery] iPhone + jQuery
Hey there is a good article to be read at A List Apart: http://www.alistapart.com/articles/putyourcontentinmypocketpart2 I guess Javascript renders much slower on the iphone. I bet jQuery performs like a rock-star on the iPhone though.
[jQuery] Multi-Lingual Methodology
Can I create custom HTML attributes and have Jquery/DOM support in IE6+ ? Example: a class=utilityLinks href=index.html xmlVal=topNavLinkHomeHome/a | a class=utilityLinks href=# xmlVal=topNavLinkLoginLogin/a The idea here is that I would fire a function on load that would traverse the entire HTML document doing a unique lookup everywhere it finds the xmlVal attribute and replacing the elements text value (with a foreign language). The lookup would access a separate XML document for the foreign language values. I know this is not 100% jquery based, but once I determine what I want to do is possible. I plan to learn how to do it using my existing jQuery library in the web application. Advice appreciated.
[jQuery] Open and search a .XML file
Can anyone provide me a link of how to open an xml file using JQuery?
[jQuery] Re: Select LIst with Jquery
I tried the example. In IE7, when I change the Select List to Japanese, the flag in the ID above does not change. If I select English first, then select Japanese the flag will change. What am I missing? I have for JQuery: $(function() { $(#languages).bind('change', function() { var country = $(this).val(); if(country) { $('#countryFlag').attr(src, images/ + country + .gif); } }); }); And for markup: img id=countryFlag src=images/us.gif select id=languages style=width: 100px; option value=Language/option option value=usEnglish/option option value=jpJapanese/option /select On Jul 20, 2:43 pm, Klaus Hartl [EMAIL PROTECTED] wrote: Danjojo wrote: I have some basic markup: img id=countryFlag src=images/us.gif select style=width: 100px; onchange=javascript: alert('hello world!'); option value=0Language/option option value=1English/option option value=2Japanese/option /select I have done some basic Jquery that changes or alters basic classes, Id's, or element attributes. But I am not sure how to use Jquery in a function manner yet. How do I get the src for the flag image to change, id countryFlag, when Japanese is selected? I suggest to let the image file names and option values match. Then you could try the following: $(function() { $('#languages').bind('change', function() { var country = $(this).val(); if (country) { $('#countryFlag').attr('src', country + '.gif'); } }); }); select id=languages option value=Language/option option value=usEnglish/option ... /select That's all. You should be aware that in IE and Opera, when using the keyboard to navigate through the select, the change event is fired everytime it the next item gets selected (as opposed to other browsers where it is required to hit enter first). That may be not critical here, but it is for example if you use a select as navigation. To go a little further: To me the flag is purely presentational, as the selected language is clearly indicated by the selected item. Thus I'd use classes for displaying the flag and use CSS to display the flag... --Klaus- Hide quoted text - - Show quoted text -
[jQuery] Cookies with JQuery?
Am I able to set client-side cookies with JQuery? That would be REALLY great!! I could store the Language state in this cookie. $(function() { $(#languages).bind('change', function() { var country = $(this).val(); if(country) { $('#countryFlag').attr(src, images/ + country + .gif); } }); }); Believe it or not I never got good or was able to write cookies in javascript, they seemed incredibly overly-complex for my liking.. being an .asp hacker over the years *if* I needed state I would store them in the Session object.
[jQuery] Re: Select LIst with Jquery
Ahh the code works fine. The problem seems to be that when shift-refreshing the browser, the selected item in the select list does not reset to the selected option. select id=languages style=width: 100px; option value=trans selected=selectedLanguage/option option value=usEnglish/option option value=jpJapanese/option /select Even setting it to selected does not help. If I last chose English, then when I shift refresh the browser English is still selected. :( On Jul 20, 2:43 pm, Klaus Hartl [EMAIL PROTECTED] wrote: Danjojo wrote: I have some basic markup: img id=countryFlag src=images/us.gif select style=width: 100px; onchange=javascript: alert('hello world!'); option value=0Language/option option value=1English/option option value=2Japanese/option /select I have done some basic Jquery that changes or alters basic classes, Id's, or element attributes. But I am not sure how to use Jquery in a function manner yet. How do I get the src for the flag image to change, id countryFlag, when Japanese is selected? I suggest to let the image file names and option values match. Then you could try the following: $(function() { $('#languages').bind('change', function() { var country = $(this).val(); if (country) { $('#countryFlag').attr('src', country + '.gif'); } }); }); select id=languages option value=Language/option option value=usEnglish/option ... /select That's all. You should be aware that in IE and Opera, when using the keyboard to navigate through the select, the change event is fired everytime it the next item gets selected (as opposed to other browsers where it is required to hit enter first). That may be not critical here, but it is for example if you use a select as navigation. To go a little further: To me the flag is purely presentational, as the selected language is clearly indicated by the selected item. Thus I'd use classes for displaying the flag and use CSS to display the flag... --Klaus- Hide quoted text - - Show quoted text -
[jQuery] Re: clueTip updates and new theme
Amazing work, clue-tips (hyperlink hints), are one of my favorite things to come out of all the changes of late.. I hope to try them out soon.. On Jul 20, 3:07 pm, Glen Lipka [EMAIL PROTECTED] wrote: Right now, I think this is a great plugin. Very easy to set up and useful/usable. Feature request :) Wouldn't it be cool if it animated from the link to be full size? Like fadeIn() or show(). That would be hot! Glen On 7/20/07, Web Specialist [EMAIL PROTECTED] wrote: Karl, Wonderful! Cheers 2007/7/16, Karl Swedberg [EMAIL PROTECTED]: Hi again, Just wanted to let you know that I did a bunch of work on the clueTip plugin this weekend and made some progress in a few areas. A couple people requested that the clueTips look more like Cody Lindley's jTips. Your wish is my command: http://test.learningjquery.com/clue/demo/alt-demo.html Here is a run-down of what I've modified: - waitImage feature/option is now implemented - added arrows option that sets background-position-y to line up an arrow background image with the hovered element. - the clueTip heading (h3) now comes before div id=cluetip-inner, not first child of it. Makes it much easier to apply sane CSS. - fixed a positioning glitch when using the truncate option - added alternate theme based on Cody Lindley's jTip and demo files to show it (alt-demo...) - changed $(document).width() to the more appropriate $(window).width() for positioning clueTip x coordinate - div id=cluetip now gets class=clue-left if positioned to the left of the hovered element; gets class=clue-right if positioned to the right. Useful for styling the clueTip differently based on where it displays I haven't committed any of this to SVN yet because I'm hoping to work out the IE6 drop shadow/CSS issues first. But everything is up on my test server, so if you want to poke around, feel free: http://test.learningjquery.com/clue/ --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com- Hide quoted text - - Show quoted text -
[jQuery] Re: Cookies with JQuery?
Got it using, Klaus's cookie plugin. $(function() { $(#languages).bind('change', function() { var country = $(this).val(); if(country) { $('#countryFlag').attr(src, images/ + country + .gif); $.cookie('language', country); // set cookie } }); }); On Jul 20, 3:32 pm, Danjojo [EMAIL PROTECTED] wrote: Am I able to set client-side cookies with JQuery? That would be REALLY great!! I could store the Language state in this cookie. $(function() { $(#languages).bind('change', function() { var country = $(this).val(); if(country) { $('#countryFlag').attr(src, images/ + country + .gif); } }); }); Believe it or not I never got good or was able to write cookies in javascript, they seemed incredibly overly-complex for my liking.. being an .asp hacker over the years *if* I needed state I would store them in the Session object.
[jQuery] Change the content of a DIV section
div id=topPromo p class=centeredimg src=images/top_promo.jpg/p /div How do I go about using Jquery to change the contents of a div? Sometimes I may want it to be: div id=topPromo pLipsum ernum hoki doki.../p /div Other times: div id=topPromo p class=centeredimg src=images/new_product_pictuer.jpg/p /div I have the basics of JQuery going and have done some basic tutorials like. $(document).ready(function() { // highlights image borders we have specified with the imgBorder class $(.imgBorder).hover(function() { $(this).addClass(boldOutline); },function(){ $(this).removeClass(boldOutline); });