[jQuery] Re: Getting element index, then adding text later to that index location
I'm not quite following this. If you have a DOM element (i.e. this in your click function), and you want to do something with it later, simply save a reference to the element itself. Why do you want to use an index into a jQuery result array? Also, in a page with many elements, those * selectors are going to be pretty slow. Do I understand correctly that you want to identify the topmost parent element (i.e. a direct child of the BODY) that was clicked? I think I would do it something like this. There may be a simpler way, but off the top of my head this should work and would also be very efficient: $(function() { // Return element if it is a direct child of the BODY, or the // topmost parent of element (a direct child of BODY). function toplevel( element ) { var $parents = $(element).parents(); var i = $parents.index( document.body ); return i 0 ? $parents[i-1] : element; } $('body').click( function( event ) { var element = toplevel( event.target ); console.log( element.id, element ); }); }); I want to get an element by an unique index, then at a later time do something to that element, such as add text. I was trying the following code: $(document).ready(function(){ $(*, document.body).click(function () { var index = $(*, document.body).index(this); $(*:eq( + index +), document.body).css(color, red); }); }); But when I click, it adds the red text color to all parents too. I changed the code too print the index number and it appends several index numbers to the element I click and the parents. I want to get the index number of the top most element that I click on. That element may have children or may not. So, how do I get only the top most element index that I clicked on?
[jQuery] Re: Using tabs - how do I get tabs to load on a nested page?
Why not using a for or wile loop for the repetetive adding? $(function() { $(#example ul).tabs({ cache: true, load: function(e, ui) { $(#seasons ul).tabs(); for (var year = 2008; year = 1996; year--) $(.seasonSelector).tabs(add, ./season.php? season= + year, year + Season); ... } }); }); --Klaus On Jul 1, 4:10 am, Sam [EMAIL PROTECTED] wrote: Thanks, that took care of it. $(function(){ $(#example ul).tabs({ cache: true, load: function(e, ui) { $(#seasons ul).tabs(); $(.seasonSelector).tabs(add, ./season.php? season=2008, 2008 Season); $(.seasonSelector).tabs(add, ./season.php? season=2007, 2007 Season); $(.seasonSelector).tabs(add, ./season.php? season=2006, 2006 Season); $(.seasonSelector).tabs(add, ./season.php? season=2005, 2005 Season); $(.seasonSelector).tabs(add, ./season.php? season=2004, 2004 Season); $(.seasonSelector).tabs(add, ./season.php? season=2003, 2003 Season); $(.seasonSelector).tabs(add, ./season.php? season=2002, 2002 Season); $(.seasonSelector).tabs(add, ./season.php? season=2001, 2001 Season); $(.seasonSelector).tabs(add, ./season.php? season=2000, 2000 Season); $(.seasonSelector).tabs(add, ./season.php? season=1999, 1999 Season); $(.seasonSelector).tabs(add, ./season.php? season=1998, 1998 Season); $(.seasonSelector).tabs(add, ./season.php? season=1997, 1997 Season); $(.seasonSelector).tabs(add, ./season.php? season=1996, 1996 Season); } }); $(.selector).tabs(add, './overall2.php', 'Overall Results'); $(.selector).tabs(add, './newReport.php', 'Add New Result'); $(.selector).tabs(add, './last200.php', 'Last 200'); $(.selector).tabs(add, './showPie.php', 'by City'); $(.selector).tabs(add, './stats.php', 'Other Stats'); $(.selector).tabs(add, './seasons.php', 'Season Records'); $(.selector).tabs(add, './newGames.php', 'Recent Results'); $(.selector).tabs(add, './theHat.php', 'Hat Results'); }); On Jun 29, 4:00 pm, Klaus Hartl [EMAIL PROTECTED] wrote: You probably need to tabify in the load callback: $('#example').tabs({ load: function(e, ui) { $('ul', ui.panel).tabs(); // adapt selector here... } }); --Klaus On Jun 29, 5:48 pm, Sam [EMAIL PROTECTED] wrote: The tabs work fine on the first page, but I need a second group of tabs on the by Season tab. The code is there, but the tabs don't generate on document ready. front page: http://www.texas-asl.com/ladder/ladder.php by Seasons tab page: http://www.texas-asl.com/ladder/seasons.php
[jQuery] Re: IE error on jquery braces {}
The javascript protocol is obsolete in DOM Level 0 event handlers. Here's how I would write that piece of code: $(span/).addClass('tag').click(function() { showBookmarks(i); }).text(i).appendTo(#leftcol); Saves you the hassle with quoting and looks much cleaner, at least to me. --Klaus On Jul 1, 2:00 am, Heavy [EMAIL PROTECTED] wrote: Thanks, Karl you know your stuff. That was a big time saver. On Jun 30, 4:37 pm, Karl Rudd [EMAIL PROTECTED] wrote: In JavaScript class is a reserved keyword so you need to quote it. As a rule I quote all keys, just to be on the safe side. $(span/).attr({ class: tag, onclick: javascript:showBookmarks( + \ + i + \ + );}).text(i).appendTo(#leftcol); Karl Rudd On Tue, Jul 1, 2008 at 6:21 AM, Heavy [EMAIL PROTECTED] wrote: Anyone know why the following line throws an error in IE7 and works fine in FF3 and Opera9.5? The complete HTML and JS and be found here: http://veryheavy.org $(span/).attr({class:tag, onclick:javascript:showBookmarks( + \ + i + \ + );}).text(i).appendTo(#leftcol); IE seems to puke on the braces {} Any ideas?
[jQuery] Re: Cookie domain and path
See http://dev.jquery.com/changeset/5759 Jörn On Tue, Jul 1, 2008 at 1:02 AM, jcruz [EMAIL PROTECTED] wrote: That seems like it would work fine as well. In the above patch, the user only needs to set the options they want to use. Unset options result the default cookie settings used by the cookie plugin. On Jun 30, 1:30 am, Jörn Zaefferer [EMAIL PROTECTED] wrote: How about a single option cookieOptions which would contain the expires, path etc. properties. That way thetreeviewplugin can just pass throughcookieoptions. The default would be undefined, resulting in the defaultcookiesettings that thecookieplugin uses. Jörn On Mon, Jun 30, 2008 at 2:18 AM, jcruz [EMAIL PROTECTED] wrote: Submitted a patch athttp://dev.jquery.com/ticket/3101 On Jun 29, 12:40 pm, jcruz [EMAIL PROTECTED] wrote: This is for theTreeview1.4 On Jun 29, 12:34 pm, jcruz [EMAIL PROTECTED] wrote: When setting a value for cookieId, is it possible to specify acookie domain and path?
[jQuery] tutorial: how to convert from thickbox to jqModal + how to load external url in jqModal
I hope that my little blurb will be useful to some of you :) http://www.pixeline.be/blog/2008/javascript-loading-external-urls-in-jqmodal-jquery-plugin/ Let me know if you have any comments, questions, ok ? -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] What is the opposite of the jQuery.param() method? (to deserialise an object)
Hi all, If we use the $.param(myobject) method to serialise an object, how can we deserialise that string back to an object? Maybe that function exists somewhere and I'm having a mental block. Please help! In the absence of such a method I would do something like this: jQuery.extend({ // The opposiite of jQuery's native $.param() method. Deserialises a param string to an object: // Note: TODO: Allow for multiple params with same name (to become an array attribute). unparam : function(params){ var objResult = {}; $.each(params.split(), function(){ var prm=this.split(=); objResult[prm[0]] = prm[1]; }); return objResult; } });
[jQuery] Google Analytics Cross domain link tracking: My pain and (hopefully) as nice solution
Hi, This is jQuery related so bear with me! I'm CCing someone who asked about this recently as I think this may help them. Apologies to you if this is out of turn :) I was recently asked by a client to implement cross domain link tracking. Fair enough, Google does this in their analytics system, however there are several limitations to this: 1. Their link tracking does not support target=blah attributes of a elements. 2. Their link tracking does not simply plug in to optional popup windows (degrading nicely if no J/S) 3. Their form tracking does not work with GET forms (despite their claims that it does). NB for point 3. I found, in testing, that their function manipulates the action= attribute of the form to include the necessary GET arguments. I found that everything after the ? is stripped off a GET form's action attribute - at least in FF2/3 and Konquerer. The correct solution is to append hidden elements to the form prior to submission. I have solved all of these issue and implemented an example (attached - hopefully) that shows the various methods in action with lots of comments. I use jQuery primarily for its event handling and registration stuff. I use the order of the event registration strategically, but I appreciate that there is no guarantee that the order of registration will be preserved through to invocation. It does seem to work in practice. There are a couple of tweaks for IE due to the fact that it does not pick up on an altered href during a click handler that allows bubbling up. On the whole it worked for me on FF2/3 and IE 6/7. I didn't do further testing. I hope this helps some people :) Col Title: Google Analytics Proper Form Tracking + jQuery and Popups Here is a link of class gaTrackLink: Hello Here is a link of class gaTrackLink with target=_blank: Hello Here is a link of class gaTrackLink that pops up: Hello Below is a form of class gaTrackForm via GET Below is a form of class gaTrackForm via POST
[jQuery] Re: Minor fixes required in order to play nice with other libraries that extend Object (code inside)
Hi Jörn, The problem in fact is Ext Related, yet can be reproduced without Ext: any library that expands the Array prototype with a function can be the wrongdoer. Create a new blank document (nothing needs to be in it), open up firebug and paste in the code below: Array.prototype.letsBreakStuff = function(){return this}; correct = [ baa, bah!, bar, bar!, beblog, bezar, blog, blub, blub!, boo, bramus ]; As you can see this in fact does work correct. However, I'm a great JSON-addict, and my autocompletion data - just as any other call - is returned in the Object Literal Notation (and then run through a custom parse function to get an autocomplete compatible array). Now, open up Firebug again and paste in this code: Array.prototype.letsBreakStuff = function(){return this}; wrong = { data:[ baa, bah!, bar, bar!, beblog, bezar, blog, blub, blub!, boo, bramus ] } Check wrong.data, you'll see that the last item is the letsBreakStuff function. To make it all complete: the reason I named Ext is that I got the remove function as last item on wrong.data ... which is added by Ext: Ext.applyIf(Array.prototype,{indexOf:function(C){for(var B=0,A=this.length;BA;B++){if(this[B]==C){return B}}return -1},remove:function(B){var A=this.indexOf(B);if(A!=-1){this.splice(A, 1)}return this}}); Hope you now see why exactly I suggested that little patch ;) Regards, Bramus! On Jun 24, 3:57 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: I don't quite the how the issue is related to ExtJS. It sounds like you pass functions instead of strings to the autocomplete plugin, which is the actual issue here. Could you upload a testpage and post the URL here? Jörn On Tue, Jun 24, 2008 at 1:03 PM, Bramus! [EMAIL PROTECTED] wrote: Filed a ticket on dev.jquery including a .diff file:http://dev.jquery.com/ticket/3080 ;-) Regards, B! PS: [autocomplete] prefix seems to be cut off subject? On Jun 24, 11:15 am, Bramus! [EMAIL PROTECTED] wrote: Hi Jörn et all here at the list, I'm using the autocomplete plugin in a project I'm working on and I must say: it works great!. However: one part of the project uses ExtJS (their tree component is great) and that's where things go wrong. Problem is that somewhere in ExtJS they extend Object with a remove() function, breaking jQuery.autocomplete. After a little quest I found that - quite obviously - autocomplete breaks on string manipulations (Function.toLowerCase() doesn't really exist ;)) and has a minor issue when displaying the items whenever some library has extended Object. Here below are the 2 minor changes I implemented in order to make things work just fine again. Could you tuck 'm into the release as I can't commit any changes to the trunk. Change #1: Display issue: $.Autocompleter.Select, function fillList(): replace: if (!data[i]) with: if (!data[i] || (data[i].value.constructor === Function)) Change #2: Selection issue: $.Autocompleter.Cache, function matchSubset() at line#1 of this function (directly after the opening { ) add: if (s.constructor === Function) return false; Regards, Bramus!
[jQuery] Strange jQuery cross-browser problem
Hi list, We are developing a site at http://www.trashortreasure.com.au/ When you click on an icon on a Google map, the info window opens and when you click on read more it should open a thickbox. Problem is that some of our users report the feature not working in FF3. Then for some it doesn't work in IE6. For others it works. Most of them got it to work in IE7. That's a strange FF3 and IE6 consistency problem. I was wondering if you can you have a go with it and see if you can spot anything unusual? Thanks a bunch Vladimir
[jQuery] clash in code? jQuery document ready and window.onload
hi, im new to jQuery and to programming in general so i hope this isnt a stupid question. A have an accordion which is animated to open and close when a user clicks a header div. The accordion holds a decent amount of content which takes some time load in ie (and only ie for some reason) before the javascript takes effect and closes the accordion to hide all the data inside them. Using the $(document).ready(function() I was able to have the page load with the accordion closed (content hidden but headers visible). I was very pleased with that. Im now trying to have an animated gif load in when the dom is ready and swap the gif for the accordion div once the page loads completely. To accomplish this Im trying to use $ (document).ready(function() to show the gif and hide the accordion div and then use window.onload to hide the gif and show the accordion div as well as create the new instance of my accordion passing through some parameters. The css manipulation works fine its the accordions functionality that stops working and loads open for all the content to be seen. script type=text/javascript src=scripts/js/accordian-src.js/ script script type=text/javascript src=scripts/js/jquery-1.2.6.min.js/ script script $(document).ready(function(){ $('div#basic-accordian').hide(); /* show gif */ $('div#load').show(); /* hide accordion */ }); window.onload = function(){ $('div#load').hide(); /* hide gif */ $('div#basic-accordian').show('slow'); /* show accordion */ new Accordian('basic-accordian',5,'header_highlight'); /* supposed to activate the accordion */ } /script Anyone have any idea why the accordion stops working? if i remove all the jquery code and js file the window.onload loads the accordion correctly after the page loads. Once the jQuery code and js file are put back in the accordion stops working. Could it be a clash in code or am i just structuring it incorrectly or missing something? if i haven't provided enough information i can provide more. Hope someone can help this is driving me crazy chris
[jQuery] [treeview] hundreds of requests for images in IE6.
Hello, I am using the jQuery treeview plugin and when expanding nodes in IE6 the browser is making large amounts of requests for the supporting images. Is there a way around this so that each image is only requested once. I noticed that this also happens with the samples. Thanks. Darren.
[jQuery] Is there a way to add namespace to every css class?
Hi, Is there a way to add namespace to every css class? a. Dynamically on the page? b. If it is not possible dynamically, how to do it not dynamically. For example - Original css-- .nav {.some css atribute } .main {.some css atribute } .box {.some css atribute } --- I want to change the above css to below css --- Converted CSS --- .newNameSpace .nav {.some css atribute } .newNameSpace .main {.some css atribute } .newNameSpace .box {.some css atribute } -- thank you in advance, Albert -- View this message in context: http://www.nabble.com/Is-there-a-way-to-add-namespace-to-every-css-class--tp18211257s27240p18211257.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] How to display a Dialog Box (with confirmation buttons) when external link is clicked
jQuery Newbie question. I work for a state government and need to display a message letting the user know a link is to an external site. In the past I have obviously used a javascript alert() but would rather use something nicer which could hopefully allow the use of a background image and readable text. I have been playing around with the dialog piece of the jquery ui but find that it is beyond my skill level at this point. If you have some code (or can point me to some code) that would a. Display a dialog box when a link of a certain type was clicked in the center of the browser window. b. Contain confirmation buttons in the dialog. If either buttons were clicked, the dialog box would be hidden or destroyed. c. If the Yes button was clicked I would like to open the link they were clicking on. Thank you very much for reading this message and in advance for your assistance, Michael
[jQuery] Re: [jquery validate] Validating disabled inputs
Ok, let me explain what I'm aiming. I have a form with 4 inputs: 2 of them are normal ones: enabled so user can write on them 2 other: disabled because the value is gonna be inside is not typed by the user directly, is filled from a grid placed in a modal window. So, when user double click in the grid, the text appear in the disabled input, in order to the user being able to read it, but not to change directly. But I still have to control that they guy has openned the modal window and clicked on the grid. I hope I was clearly enough. Any idea for avoiding validation of disabled input? Thanks On 1 jul, 01:33, Theodore Ni [EMAIL PROTECTED] wrote: If you really want to validate all disabled form fields also, the relevant line in the plugin is .not(:submit, :reset, [disabled]) to which you can add or remove functionality. Again, as Jörn has said, usually disabled elements are not meant to be validated, so make sure it's what you really want. Ted On Mon, Jun 30, 2008 at 5:28 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: Disabled inputs aren't validated because they are disabled. 99% of the time, disabled elements must be ignored during validation, so that is what the plugin does. Jörn On Mon, Jun 30, 2008 at 8:21 PM, oscarml [EMAIL PROTECTED] wrote: Hi, I have a problem with disabled input when I try to validate them. I use class=required but the validation plugin doesn´t detect when is empty. Any idea?
[jQuery] patience is an art well learnt when one is at the mercy
patience is an art well learnt when one is at the mercy of nature do as romans live as romans god showers on you * http://glamourworldpriya.blogspot.com/ *
[jQuery] Re: Re[jQuery] moving character from title attribute
Works a treat. Gracias ! Karl Swedberg-2 wrote: Hi there, I think you can do it this way: $(#myDiv [title*='_']).attr('title',function () { return this.title.replace(/_/g,' '); }); --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jun 30, 2008, at 10:03 AM, 5atfink wrote: I'm sure this is easy but at a loss how to do it.. I need to strip out the underscore character _ from... div id=myDiv title=name_surname resulting in div id=myDiv title=name surname I've got as far as targeting it fine using... $(#myDiv [title*='_']).attr({ // at a loss what to do here }); Any pointers anyone? Thanks -- View this message in context: http://www.nabble.com/Removing-character-from-title-attribute-tp18194975s27240p18194975.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Removing-character-from-title-attribute-tp18194975s27240p18210946.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Extract the function signature from a list collection
On a page, I have a list of dynamically generated image links 1, 2.. N that are displayed on the page as follows: div class=imgBg img id=imgProd src= alt=/ /div div id=imgEnum ul lispan class=sqr1 onmouseover=updImage('Images/aaa.01.jpg');1/span/li lispan class=sqr1 onmouseover=updImage('Images/aaa.02.jpg'); 2/span/li ... lispan..N/span/li /ul /div Clicking on an image index causes the image to be displayed in div 'imgProd' via js function updImage(). (This works fine): function updImage(imgUrl){ document.getElementById(imgProd).src=imgUrl; } Problem: On loading, I would like the first image of the list to be copied to imgProd via jquery. How do I extract the mouseover function signature of the first item ie. updImage('Images/aaa.01.jpg'); ? I tried filtering out the list and narrow it to the first span item in the hope of extracting the function signature, but I am stuck since js debugging is not supported in VWD Express 2008: jQuery(document).ready(function() { $(#imgEnum ul li span).get(0); var $this = $(this); //alert(document.getElementById(this.id).innerHTML); }); Thanks for any hints.
[jQuery] Retrieve function signature from a list
I have a list of dynamically generated image hyperlinks that are displayed on a page as follows: div class=imgBg img id=imgProd src= alt=/ /div div id=imgEnum ul lispan class=sqr1 onmouseover=updImage('Images/aaa.01.jpg');1/span/li lispan class=sqr1 onmouseover=updImage('Images/aaa.02.jpg'); 2/span/li ... lispan..N/span/li /ul /div Problem: This scheme works fine when hovering over the image indexes. On loading, I would like the first image of the list to be copied to imgProd via jquery. How do I extract the mouseover function signature of the first item ie. updImage('Images/aaa.01.jpg'); ? I tried filtering out the li list and narrow it to the first item via the below code. varImgUR produces the correct signature: updImage('/WebHost4Life.Lsite1/Images/Products/Thumbs/ Audree01_md.jpg'); jQry signature extract code: jQuery(document).ready(function() { // Extract span cnt from first list element var sp0 =$(#imgEnum ul li span).get(0); // Get mouseover fct signature and execute it. var sigimgURL =sp0.attributes[0].nodeValue; eval(sigimgURL); }); Function eval()yields the error: sigimgUrl is not defined How can I make this run or alternatively is there a more elegant jQuery approcach to
[jQuery] AJAX Load posting script defined datas
I'm a jquery beginer. I want to use the load function in a special way, the datas should be defined by th sript, depending on which part of my form I'm posting. My code is the following : $(.form_param).change(function(){ var param_val = $(this).val(); var param_nom = $(this).attr(name); $(#moniteur).load(session_maj.php, {param_nom: param_val}); }); The .form_param class is the class of the form elements (select, checkbox...), and I get the value (param_val) on change, an the name of the element (param_nom). I would like to post it, saying something like : {param_nom: param_val}. The problème is that in this way, the name of the posted data is always param_nom ; I get $_POST['param_nom'] Is there a way to do what I want in a simple Jquery way ? Patrick
[jQuery] [treeview] hundreds of requests for images in IE6.
Hello, I am using the jQuery treeview plugin and am noticing that every time I expand and collapse nodes the browser is making hundreds of requests for the images associated with the tree. I notice it also happens on the treeview demo page. Does anyone have a workaround for this? Many Thanks. Darren
[jQuery] cluetip drop shadow problem
hi, is there a way to get drop shadows on cluetips without a fixed width? i need width:auto because the content of the cluetip differs in width and the cluetip have to scale with the content. but with width:auto the shadow just disappears, at least in ie6. any ideas?
[jQuery] jScrollPane - maintainPosition malfunction
nope, i spoke too soon.. for the life of me, i can not get jScrollPane's maintainPosition to work, and in searching for this keyword, i find i am not alone. i put together the most concise example i can imagine; http://beta.dsub.net/ as far as i can tell, maintainPosition will only work properly when the jScrollPane is effectively 0px from the top of the window. the value of the inaccuracy seems tied to the vertical offset, so if i could better understand the math that's going on, perhaps i could think about a workaround, but i am at a loss.. thank you for your time, again any input on this matter is greatly appreciated.. -Luxi On Jun 26, 8:23 pm, Luxiouronimo [EMAIL PROTECTED] wrote: this is due to padding on the scrollPane element. move the padding to a parent and jScrollPane willmaintainPositionas it is supposed to when re-initialized. ..this is noted somewhere near the docs about limitations and not applying positional elements to it.. On Jun 16, 12:39 pm, Luxiouronimo [EMAIL PROTECTED] wrote: i can't find any examples wherein this works.. i'm using treeview to expand ul's and li's.. i set a toggle function for my treeview, and i can reinitialize my .jScrollPane after my items expand/collapse, but i can'tmaintainPosition.. the scrollbar position resets to the top.. it doesn't appear to be working in the #pane4 example here..:http://kelvinluck.com/assets/jquery/jScrollPane/basic.html any input is sincerely appreciated
[jQuery] Multiple tabs on one page..?
Hey all, There's a few ways that I could pull off this kind of effect... But I have used the jUI Tabs plugin - www.webhero.co.uk/test The problem is, as you may find, that not all of the tabs work correctly! The first 2 or 3 do, but the last never does - and for what seems to be no reason! I want to keep this fading effect on open and closing, and I would also like the tabs to start off closed, but it doesn't seem to work. [code] $('#1 ul, #2 ul, #3 ul, #4 ul').tabs({ selected: null }); // start with all tabs hidden $('#1 ul, #2 ul, #3 ul, #4 ul').tabs({ unselect: true, fx: { height: 'toggle', opacity: 'toggle'} }); // selected tab closes on click [/code] Although, when everything is included on the one page without the main template etc. it works fine..! - http://www.webhero.co.uk/test2.php Could something be interfering? edit: (it seems to be where the #bg overlaps that last tab in the background? I'm not sure.. but if that is why, how can I fix?!) Thanks for your help! -- View this message in context: http://www.nabble.com/Multiple-tabs-on-one-page..--tp18212017s27240p18212017.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: zebra striping + flashing/blinking effect?
A zebra stripe doesn't need any Javascript given IE7, either. The tr:hover bit is accepted by the browser if your doctype is set to strict mode. On Jun 30, 10:15 pm, sketchy [EMAIL PROTECTED] wrote: I recently got acquainted with jquery and implemented this tutorial on zebra striping to my site:http://docs.jquery.com/Tutorials:Zebra_Striping_Made_Easy and its awesome but i was wondering it its possible to add like a blinking/flashing effect to one or a couple of the rows. The effect would start when the visitor opens the page and then stop when they leave. My knowledge on jquery is quite limited right now so it would great if someone could help me out. Thanks
[jQuery] Re: Lightbox alternative that supports .php files
you can also use facebox with external files, objects or divs. http://famspam.com/facebox
[jQuery] Re: jqModal - How to close the modal box from an iframe
tlphipps wrote: Based on my experiences with thickbox, I don't believe this is true. I have code in thickbox iframes which will close the thickbox window whenever I call it. I use something like: document.top.tb_remove() (can't remember exact syntax) Ok, starting from your suggestion that is not working actually, I tried some combinations of document, top and parent. After a few misses, I found out that you can access the parent window from inside an iframe with this code : parent.top From here, one can access the document element with : parent.top.document But most of the calls of custom Javascript functions don't need the document element. So the calls would look like this : parent.top.foobar() Thanks for the clue, tlphipps ! Hypolite -- View this message in context: http://www.nabble.com/jqModal---How-to-close-the-modal-box-from-an-iframe-tp18183904s27240p18212464.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: dimensions, RTL and IE offset problem
Hmm... adding a DOCTYPE tag at the top of the html seems to resolve this. Can anyone shed light on this? However, now I have a different problem: when content grows to the left, offset().left seems to grow by the overflow size. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/ TR/html4/strict.dtd html head script type=text/javascript src=jquery.js /script script $(function() { for(var i=0; i 300; i++) { $(#overflow_text).append('x'); } offset = $(#coverme).offset(); $(#moveme).css(offset); }); /script /head body dir=rtl div style=background-color: blue; height: 200px; width: 200px id=coverme/div div style=background-color: green; height: 100px; width: 100px; position: absolute; id=moveme/div p id=overflow_text/p /body On Jun 30, 8:38 am, iTsadok [EMAIL PROTECTED] wrote: There seems to be a skew when using offset() in a right-to-left layout, but only in Internet Explorer. These boxes align perfectly in Firefox and Safari, but IE7 puts the green box lower and to the right. Setting the margin doesn't seem to have any effect. html head script src=jquery.js /script script $(function() { $(#moveme).css($(#coverme).offset()); }); /script /head body dir=rtl div style=background-color: blue; height: 200px; width: 200px id=coverme/div div style=background-color: green; height: 100px; width: 100px; position: absolute; id=moveme/div /body
[jQuery] Re: Strange jQuery cross-browser problem
Vladimir, We are developing a site at http://www.trashortreasure.com.au/ When you click on an icon on a Google map, the info window opens and when you click on read more it should open a thickbox. Problem is that some of our users report the feature not working in FF3. Then for some it doesn't work in IE6. For others it works. Most of them got it to work in IE7. That's a strange FF3 and IE6 consistency problem. I was wondering if you can you have a go with it and see if you can spot anything unusual? My guess is it's not a browser problem, but a JS problem. I just took a look at your tb_show() function and that thing is huge. You also have everything in a try/catch block with the catch just doing nothing--which is probably what's happening. You might want to add a statement to your catch block that sends the error to your server--that way you can view the exceptions being thrown. -Dan
[jQuery] tutorial: how to convert from thickbox to jqModal + how to load external url in jqModal
I hope that my little blurb will be useful to some of you: in this article i explain how to use jqModal with anchors pointing to external url, or in iframe mode, to put it differently. I also describe how to convert an old thickbox implementation into a jqModal implementation without touching the html. http://www.pixeline.be/blog/2008/javascript-loading-external-urls-in-jqmodal-jquery-plugin/ Let me know if you have any comments, questions, ok ? -- Alexandre Plennevaux LAb[au]
[jQuery] Re: Best way to detect between jQuery triggered event and actual browser-based event...
Hmmm...that hasn't come up for me yet. Seems like the way you're doing it would be the way to go for now. Maybe in the next jQuery version they could add a key internalTrigger or something like that to the event object when the trigger method is run. Needing to determine the difference is a corner case, but it's an issue I've run into from time-to-time. For example, I've got a plug-in where I've got a click event set to toggle the current visibility of an element. However, if I call that event programmatically I always want to make sure that it shows the element (and doesn't toggle the state.) As I said, it's a corner case but one I've run into a few times in the past 6 months. -Dan
[jQuery] Re: jqModal r12 release
On Mon, Jun 30, 2008 at 8:29 PM, Alexandre Plennevaux [EMAIL PROTECTED] wrote: aloha Brice! Further to my previous message, i've been trying some but didn't get much success with this, maybe you can help me: basically, my app is full of thickbox calls where urls are parts of the url query string, such as writing.php?todo=displayamp;writing_id=5KeepThis=trueTB_iframe=truewidth=90%height=99% thickbox parameters happens starting with keepThis onwards. So to use jqmodal, i assigned jqmodal target parameter to the iframe element, but nothing shows inside the iframe (although the jqmodal works). Can you tip me in the right direction ? Here is my js call: //thickbox replacement $('#modalWindow').jqm({ modal: true, trigger: 'a.thickbox', target: $('#jqmContent')[0], width: '1600' }); and my html: div id=modalWindow class=jqmWindow div id=jqmTitleTitle of modal window button class=jqmCloseClose X/button/div iframe id=jqmContent/iframe /div Thanks for your insight ! Alexandre Plennevaux On Mon, Jun 30, 2008 at 9:20 AM, Alexandre Plennevaux [EMAIL PROTECTED] wrote: hi Brice, i need to convert my admin -in-development from thickbox, so basically make a wrapper function that interfaces nicely all my thickbox calls to jModal. if i manage to, i'll post a how-to... the only thing i'm not sure i can manage is the modal window width/height change per call, but i'll have to double check on that. On Mon, Jun 30, 2008 at 6:14 AM, Brice Burgess [EMAIL PROTECTED] wrote: Alexandre, The neat thing about jqModal is it's flexibility. Really anything is possible... but may take some extra code (CSS, onShow Callbacks, etc.) to achieve the desired effect. It is a good idea to extend jqModal... say to mimic the (very good looking) effects and functionality of ShadowBox. These extensions could be made available @ the demo page... and I'd likely modify jqModal to accept extending the default onShow/onHide/onLoad callbacks. If you send an example page of what you'd like to achieve, perhaps I could demonstrate the jqModal method. ~ Brice On Jun 27, 1:33 pm, Alexandre Plennevaux [EMAIL PROTECTED] wrote: Brice, i have a feature request: the possibilty to use proportional width instead of fixed width, so we can tell it to take like 90% of the available width space. Useful in some cases for complex UI. sorry if it is possible already, didn't manage to so far. thanks !!! On Tue, Jun 24, 2008 at 1:38 AM, MorningZ [EMAIL PROTECTED] wrote: Brice: Thanks a lot for all the hard work, your plugin is one of the most used ones in my applications Glad to see it playing nicely with the new jQuery version -- Alexandre Plennevaux LAb[au] http://www.lab-au.com -- Alexandre Plennevaux LAb[au] http://www.lab-au.com -- Alexandre Plennevaux LAb[au] http://www.lab-au.com hi brice, i'm done! you can read my tutorial here: http://www.pixeline.be/blog/2008/javascript-loading-external-urls-in-jqmodal-jquery-plugin/ let me know if you spot anything wrong, ok? if you want, there is an example page here : http://www.pixeline.be/experiments/ThickboxToJqModal/ -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: Issue using a long array in jquery autocomplete
Hi, thanks for the reply. I can't post the page since the site is being developed locally. I figured out several things that may prove useful however. I tried using a group of the data to see if this was the problem. IE6 returned the same error: Unterminated String Contstant but I noticed that the line it had a problem with had a German character ( ü ) in it. An element before this in the list also had this character but threw up no problem. The word in which the character is used was (something)führer so I rename all elements with the word führer and replaced them with fuhrer. The smaller array now worked. I tried applying the same technique (as a stop gap) to the larger array but again IE6 was complaining about an unterminated string constant. I then removed all cases of the character ü and replaced them with u. Now IE has the error Expected ']' about halfway through the array. There is no syntax error around these lines - I've checked a few times. Is there a chance that these foreign characters are causing the errors within the script? On Jun 30, 3:59 pm, gf [EMAIL PROTECTED] wrote: On Jun 30, 3:38 am, Gearóid O'Ceallaigh [EMAIL PROTECTED] wrote: Hi, I'm using bassistance's autocomplete on a website (plugin page found here:http://plugins.jquery.com/project/autocompletex). Its perfect for I need since it allows the data for the autocomplete to be loaded from a local array. However, whilst the autocomplete works fine in most browsers - it seems that the length of the array is throwing up an error in IE6. The array contains maybe 500+ elements of data but even if I put them on a single line in the code, the error still gets thrown up. Has anyone else ever had this problem? It's possible but not real likely that IE6 has a bug preventing it from handling that many elements. Without seeing the error nobody can say for sure. Having programmed for a long-long time, my instinct is to say more likely it's some sort of quoting or delimiting bug in the array definition. With that many elements it's hard to scan through them by eye unless you have laid them out in a very organized fashion. Our eyes and brain are good at finding changes in a pattern of orderly rows and columns, not at finding a missing comma or quote in pages of characters. So, I always line my arrays up vertically into columns as much as possible. (A programming editor like vim with the align module makes it really easy.) My next thought is I would use an Ajax query to reduce the array of 500 down to something a lot more manageable. You don't say how big each element is, but that many elements will slow page load and rendering making your user's browser bog down a bit. Do you have the offending page somewhere that others can see it so they can try to figure out what's wrong? Don't post the code here as it'll cause screams as people open up that many lines of code.
[jQuery] Re: Using tabs - how do I get tabs to load on a nested page?
Of course that is better - thanks for the good catch. On Jul 1, 1:44 am, Klaus Hartl [EMAIL PROTECTED] wrote: Why not using a for or wile loop for the repetetive adding? $(function() { $(#example ul).tabs({ cache: true, load: function(e, ui) { $(#seasons ul).tabs(); for (var year = 2008; year = 1996; year--) $(.seasonSelector).tabs(add, ./season.php? season= + year, year + Season); ... } }); }); --Klaus On Jul 1, 4:10 am, Sam [EMAIL PROTECTED] wrote: Thanks, that took care of it. $(function(){ $(#example ul).tabs({ cache: true, load: function(e, ui) { $(#seasons ul).tabs(); $(.seasonSelector).tabs(add, ./season.php? season=2008, 2008 Season); $(.seasonSelector).tabs(add, ./season.php? season=2007, 2007 Season); $(.seasonSelector).tabs(add, ./season.php? season=2006, 2006 Season); $(.seasonSelector).tabs(add, ./season.php? season=2005, 2005 Season); $(.seasonSelector).tabs(add, ./season.php? season=2004, 2004 Season); $(.seasonSelector).tabs(add, ./season.php? season=2003, 2003 Season); $(.seasonSelector).tabs(add, ./season.php? season=2002, 2002 Season); $(.seasonSelector).tabs(add, ./season.php? season=2001, 2001 Season); $(.seasonSelector).tabs(add, ./season.php? season=2000, 2000 Season); $(.seasonSelector).tabs(add, ./season.php? season=1999, 1999 Season); $(.seasonSelector).tabs(add, ./season.php? season=1998, 1998 Season); $(.seasonSelector).tabs(add, ./season.php? season=1997, 1997 Season); $(.seasonSelector).tabs(add, ./season.php? season=1996, 1996 Season); } }); $(.selector).tabs(add, './overall2.php', 'Overall Results'); $(.selector).tabs(add, './newReport.php', 'Add New Result'); $(.selector).tabs(add, './last200.php', 'Last 200'); $(.selector).tabs(add, './showPie.php', 'by City'); $(.selector).tabs(add, './stats.php', 'Other Stats'); $(.selector).tabs(add, './seasons.php', 'Season Records'); $(.selector).tabs(add, './newGames.php', 'Recent Results'); $(.selector).tabs(add, './theHat.php', 'Hat Results'); }); On Jun 29, 4:00 pm, Klaus Hartl [EMAIL PROTECTED] wrote: You probably need to tabify in the load callback: $('#example').tabs({ load: function(e, ui) { $('ul', ui.panel).tabs(); // adapt selector here... } }); --Klaus On Jun 29, 5:48 pm, Sam [EMAIL PROTECTED] wrote: The tabs work fine on the first page, but I need a second group of tabs on the by Season tab. The code is there, but the tabs don't generate on document ready. front page: http://www.texas-asl.com/ladder/ladder.php by Seasons tab page: http://www.texas-asl.com/ladder/seasons.php
[jQuery] Re: trouble with fadeIn and fadeOut on a element in ie6 and ie7, works in firefox
Wanted to mention it works in Firefox 3 and Safari 3.
[jQuery] Re: Google Analytics Cross domain link tracking: My pain and (hopefully) as nice solution
Colin Guthrie wrote: I have solved all of these issue and implemented an example (attached - hopefully) that shows the various methods in action with lots of comments. I did of course forget to change the URL of the jquery inclusion before I posted: d'oh! Just correct this if you are playing with it. I tested in 1.2.3 FWIW (still have compatibility issues with 1.2.6) Col
[jQuery] Fadein with ajax load()
I'm using an ajax load() with an onChange event: $('#id-of-my-div').load('somescript.php?name='+escape($(this).val())); Which is lovely, but how can I add a fadeIn to it so that every time my div is updated, it fades into the div in a sultry provocative fashion? Thanks.
[jQuery] Re: Validating disabled inputs
Use readonly instead of disabled See: http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html
[jQuery] Re: (Newbie Help) Cluetip not showing up
Hi again, You have a couple problems here. 1. None of the rounded corner examples are using a selector that will select the link you're trying to activate with a clueTip. If you only want one clueTip to appear, and you want it to appear when hovering over that first image (or, more precisely, it's containing link), try this: $(document).ready(function() { $('a[title^=rounded]').cluetip({cluetipClass: 'rounded'}); }); You can get rid of everything else in that js file. For more information about selecting elements on a page, see: http://docs.jquery.com/Selectors 2. You have demo/ajax4.htm in the rel attribute -- but that file doesn't exist. If you want to pull in tooltip content from another page (which, given the rel attribute in there, I'm assuming you want to do), the other page has to exist. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jun 30, 2008, at 10:59 PM, datatv wrote: OK, I found it but that brings up the default. I still can't figure out why the rounded corners tool tip won't appear. On Jun 30, 5:46 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi, It looks like you've included the entire demo script, but you really only need one line inside a $(document).ready() function. The first two lines that use the .cluetip() method in your script file are these: $('a.title').cluetip({splitTitle: '|'}); $('a.basic').cluetip(); Notice that the first one applies the cluetip to a link with class=title and the second to a link with class=basic . Your html doesn't have either of these classes in it. I think that could be your problem. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jun 30, 2008, at 7:14 PM, datatv wrote: I just started using Cluetip and I can't get the tip to show up at all even though I've tried the example on the Cluetip website (for rounded corners) to the letter. Can anybody look at my code and see where I might have screwed up? http://www.datatv.com/sw/SW_wp_sampler.html If you rollover the first icon on the top left (underneath the header) the cluetip is supposed to appear. Thanks in advance to anyone who can assist.
[jQuery] Re: Minor fixes required in order to play nice with other libraries that extend Object (code inside)
Okay, so the issue is that letsBreakStuff gets iterated together with the rest of the array, while it should be ignored, as it doesn't have a numerical index, right? How does that relate to your patch? Jörn On Tue, Jul 1, 2008 at 11:36 AM, Bramus! [EMAIL PROTECTED] wrote: Hi Jörn, The problem in fact is Ext Related, yet can be reproduced without Ext: any library that expands the Array prototype with a function can be the wrongdoer. Create a new blank document (nothing needs to be in it), open up firebug and paste in the code below: Array.prototype.letsBreakStuff = function(){return this}; correct = [ baa, bah!, bar, bar!, beblog, bezar, blog, blub, blub!, boo, bramus ]; As you can see this in fact does work correct. However, I'm a great JSON-addict, and my autocompletion data - just as any other call - is returned in the Object Literal Notation (and then run through a custom parse function to get an autocomplete compatible array). Now, open up Firebug again and paste in this code: Array.prototype.letsBreakStuff = function(){return this}; wrong = { data:[ baa, bah!, bar, bar!, beblog, bezar, blog, blub, blub!, boo, bramus ] } Check wrong.data, you'll see that the last item is the letsBreakStuff function. To make it all complete: the reason I named Ext is that I got the remove function as last item on wrong.data ... which is added by Ext: Ext.applyIf(Array.prototype,{indexOf:function(C){for(var B=0,A=this.length;BA;B++){if(this[B]==C){return B}}return -1},remove:function(B){var A=this.indexOf(B);if(A!=-1){this.splice(A, 1)}return this}}); Hope you now see why exactly I suggested that little patch ;) Regards, Bramus! On Jun 24, 3:57 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: I don't quite the how the issue is related to ExtJS. It sounds like you pass functions instead of strings to the autocomplete plugin, which is the actual issue here. Could you upload a testpage and post the URL here? Jörn On Tue, Jun 24, 2008 at 1:03 PM, Bramus! [EMAIL PROTECTED] wrote: Filed a ticket on dev.jquery including a .diff file:http://dev.jquery.com/ticket/3080 ;-) Regards, B! PS: [autocomplete] prefix seems to be cut off subject? On Jun 24, 11:15 am, Bramus! [EMAIL PROTECTED] wrote: Hi Jörn et all here at the list, I'm using the autocomplete plugin in a project I'm working on and I must say: it works great!. However: one part of the project uses ExtJS (their tree component is great) and that's where things go wrong. Problem is that somewhere in ExtJS they extend Object with a remove() function, breaking jQuery.autocomplete. After a little quest I found that - quite obviously - autocomplete breaks on string manipulations (Function.toLowerCase() doesn't really exist ;)) and has a minor issue when displaying the items whenever some library has extended Object. Here below are the 2 minor changes I implemented in order to make things work just fine again. Could you tuck 'm into the release as I can't commit any changes to the trunk. Change #1: Display issue: $.Autocompleter.Select, function fillList(): replace: if (!data[i]) with: if (!data[i] || (data[i].value.constructor === Function)) Change #2: Selection issue: $.Autocompleter.Cache, function matchSubset() at line#1 of this function (directly after the opening { ) add: if (s.constructor === Function) return false; Regards, Bramus!
[jQuery] Mirrored radio button select/disable problem
Hi, I've run out of brain power when it comes to a particular jQuery problem I've got - has anyone done something similar to this: I have two sets of radio buttons, both with the same list of items, and selecting one should disable it's respective duplicate in the other list. e.g. - (*) Choice 1 (selected) - () Choice 2 - () Choice 3 - (-) Choice 1 (disabled) - () Choice 2 - () Choice 3 Choosing something in either list should free up / enable the other options. I can't think of a way to do it without being un-elegant, which is something I want to stay awy from. Thanks, Luc Pestille Web Designer in2, Thames House, Mere Park, Dedmere Road, Marlow, Bucks, SL7 1PB tel: +44 (1628) 899700 | fax: +44 (1628) 899701 | email: mailto:[EMAIL PROTECTED] | web: http://www.in2.co.uk/ This message (and any associated files) is intended only for the use of jquery-en@googlegroups.com and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not jquery-en@googlegroups.com you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored. Any views or opinions presented are solely those of the author jquery-en@googlegroups.com and do not necessarily represent those of the company. image/gif
[jQuery] Re: jqModal r12 release
Alexandre, Thanks for writing this. It's a really great reference. I posted this question on your blog too, but thought I'd repost here and get feedback from others (maybe even Brice). What are the advantages/disadvantages of using jqmodal vs. using the new ui.dialog? I'm also wanting to get rid of thickbox, but I figured ui.dialog was the better choice since it's more official now. But I've enjoyed using Brice's other plugins (dnr) previously, so didn't want to rule jqmodal out if there are benefits to its use. Anybody have an opinion on this (jqmodal vs. ui.dialog)? On Jul 1, 7:01 am, Alexandre Plennevaux [EMAIL PROTECTED] wrote: On Mon, Jun 30, 2008 at 8:29 PM, Alexandre Plennevaux [EMAIL PROTECTED] wrote: aloha Brice! Further to my previous message, i've been trying some but didn't get much success with this, maybe you can help me: basically, my app is full of thickbox calls where urls are parts of the url query string, such as writing.php?todo=displayamp;writing_id=5KeepThis=trueTB_iframe=truewidth=90%height=99% thickbox parameters happens starting with keepThis onwards. So to use jqmodal, i assigned jqmodal target parameter to the iframe element, but nothing shows inside the iframe (although the jqmodal works). Can you tip me in the right direction ? Here is my js call: //thickbox replacement $('#modalWindow').jqm({ modal: true, trigger: 'a.thickbox', target: $('#jqmContent')[0], width: '1600' }); and my html: div id=modalWindow class=jqmWindow div id=jqmTitleTitle of modal window button class=jqmCloseClose X/button/div iframe id=jqmContent/iframe /div Thanks for your insight ! Alexandre Plennevaux On Mon, Jun 30, 2008 at 9:20 AM, Alexandre Plennevaux [EMAIL PROTECTED] wrote: hi Brice, i need to convert my admin -in-development from thickbox, so basically make a wrapper function that interfaces nicely all my thickbox calls to jModal. if i manage to, i'll post a how-to... the only thing i'm not sure i can manage is the modal window width/height change per call, but i'll have to double check on that. On Mon, Jun 30, 2008 at 6:14 AM, Brice Burgess [EMAIL PROTECTED] wrote: Alexandre, The neat thing about jqModal is it's flexibility. Really anything is possible... but may take some extra code (CSS, onShow Callbacks, etc.) to achieve the desired effect. It is a good idea to extend jqModal... say to mimic the (very good looking) effects and functionality of ShadowBox. These extensions could be made available @ the demo page... and I'd likely modify jqModal to accept extending the default onShow/onHide/onLoad callbacks. If you send an example page of what you'd like to achieve, perhaps I could demonstrate the jqModal method. ~ Brice On Jun 27, 1:33 pm, Alexandre Plennevaux [EMAIL PROTECTED] wrote: Brice, i have a feature request: the possibilty to use proportional width instead of fixed width, so we can tell it to take like 90% of the available width space. Useful in some cases for complex UI. sorry if it is possible already, didn't manage to so far. thanks !!! On Tue, Jun 24, 2008 at 1:38 AM, MorningZ [EMAIL PROTECTED] wrote: Brice: Thanks a lot for all the hard work, your plugin is one of the most used ones in my applications Glad to see it playing nicely with the new jQuery version -- Alexandre Plennevaux LAb[au] http://www.lab-au.com -- Alexandre Plennevaux LAb[au] http://www.lab-au.com -- Alexandre Plennevaux LAb[au] http://www.lab-au.com hi brice, i'm done! you can read my tutorial here:http://www.pixeline.be/blog/2008/javascript-loading-external-urls-in-... let me know if you spot anything wrong, ok? if you want, there is an example page here :http://www.pixeline.be/experiments/ThickboxToJqModal/ -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] [autocomplete] Multiple Values, Update Hidden Field
Hello, I'm trying to to a message sending system. The message may have multiple destinations so i'm using the something similar to Multiple Birds (http://jquery.bassistance.de/autocomplete/demo/) When I add a new user it's id get added to the hidden field (with is correct). But if I delete a user from the autocomplete the id desn't get deleted from the hidden, is there anyway to do this? Is there any other type of autocomplete that allows this? With best regards, Luis Rodrigues
[jQuery] Re: Moving mouse fast causes mouseout not to fire
Thanks for the reply. I actually tried that. This was my first attempt: $(#Layer-4).addClass(defHide).hide(); $(#Layer-3).hover( function(){ $(#Layer-4).show(); $(#Layer-3).hide(); }, function(){ $(#Layer-3).show(); $(#Layer-4).hide(); }); ... And that doesn't work because I'm actually swapping out the DIV layer. It flashes while the mouse is over the DIVs. I think that the show() and hide() from the first function cause the second one to fire. So then I tried this (which is such a hack, but on the chance that hover uses something other than mouseover, mouseout, mouseenter or mouseleave). $(#Layer-4).addClass(defHide).hide(); $(#Layer-3).hover( function(){ $(#Layer-4).show(); $(#Layer-3).hide(); }, function() { }); $(#Layer-4).hover( function(){ }, function(){ $(#Layer-3).show(); $(#Layer-4).hide(); }); ... But still no joy. That works just like the original solution did - with the occasional 'sticking' for quick mouse movement. On Jun 30, 7:54 pm, Karl Rudd [EMAIL PROTECTED] wrote: Have a look at the hover function: http://docs.jquery.com/Events/hover It deals with the issues associated with mouseout and mouseover. Karl Rudd On Tue, Jul 1, 2008 at 12:14 PM, Shaun [EMAIL PROTECTED] wrote: I was able to verify that it looks slow on FF3 today as well. If anyone knows of a lighter weight solution, please post. Thanks. On Jun 29, 11:41 am, Shaun [EMAIL PROTECTED] wrote: Hello All - I have the problem where for an image rollover, moving the mouse very quickly can leave my roll over 'on' because the mouseout (mouseleave seems to do the same thing) doesn't always fire reliably. I wrote a solution to the problem but I don't like it. I've posted the example here:http://psd2cssonline.com/tutorials/nav/index.html The important code is this: var mouseX, mouseY; $('*').mousemove( function(e) { mouseX = e.pageX; mouseY = e.pageY; }); setInterval( function () { $('.defHide:visible').each( function() { if( mouseX $(this).offset().left || mouseX $ (this).offset().left + $(this).width() || mouseY $(this).offset().top || mouseY $(this).offset().top + $(this).height() ) { $(this).trigger( 'mouseout' ); } }); }, 100 ); where all of the divs that are to be hidden by default have the class defHide added to them. The technique is kludgy at best however because it works by setting a watchdog timer that checks current mouse position against the screen space location of any currently visible divs that should by default be off. It is CPU consuming and not very elegant. It seems to work fast enough in IE7 and Opera (no visual performance degradation) but my FF2 actually looks slower when this is enabled. Does anyone know of a better solution to this problem? Thanks. -- Shaun [EMAIL PROTECTED]
[jQuery] [autocomplete] Multiple Values, Update Hidden Field
Hello, I'm trying to to a message sending system. The message may have multiple destinations so i'm using the something similar to Multiple Birds (http://jquery.bassistance.de/autocomplete/demo/) When I add a new user it's id get added to the hidden field (with is correct). But if I delete a user from the autocomplete the id desn't get deleted from the hidden, is there anyway to do this? Is there any other type of autocomplete that allows this? With best regards, Luis Rodrigues
[jQuery] Re: Best way to detect between jQuery triggered event and actual browser-based event...
Needing to determine the difference is a corner case, but it's an issue I've run into from time-to-time. For example, I've got a plug-in where I've got a click event set to toggle the current visibility of an element. However, if I call that event programmatically I always want to make sure that it shows the element (and doesn't toggle the state.) As I said, it's a corner case but one I've run into a few times in the past 6 months. It looks like maybe this is a better method: function isJQueryEvent(e){ return !(($.browser.msie ? cancelBubble : bubbles) in e); } The ctrlKey is only available when a keyboard event occurs. I needed something that works for the click event too. There may be some issues with this, so it would be nice if a jQuery event object had: e.jquery = true. That would make my code fullproof. -Dan
[jQuery] Re: IE error on jquery braces {}
Yeah, I was about to mention. We don't support string event handlers using attr(). It won't work on IE and it'd be useless to worry about that within attr(). -- Ariel Flesler http://flesler.blogspot.com On 1 jul, 03:51, Klaus Hartl [EMAIL PROTECTED] wrote: The javascript protocol is obsolete in DOM Level 0 event handlers. Here's how I would write that piece of code: $(span/).addClass('tag').click(function() { showBookmarks(i); }).text(i).appendTo(#leftcol); Saves you the hassle with quoting and looks much cleaner, at least to me. --Klaus On Jul 1, 2:00 am, Heavy [EMAIL PROTECTED] wrote: Thanks, Karl you know your stuff. That was a big time saver. On Jun 30, 4:37 pm, Karl Rudd [EMAIL PROTECTED] wrote: In JavaScript class is a reserved keyword so you need to quote it. As a rule I quote all keys, just to be on the safe side. $(span/).attr({ class: tag, onclick: javascript:showBookmarks( + \ + i + \ + );}).text(i).appendTo(#leftcol); Karl Rudd On Tue, Jul 1, 2008 at 6:21 AM, Heavy [EMAIL PROTECTED] wrote: Anyone know why the following line throws an error in IE7 and works fine in FF3 and Opera9.5? The complete HTML and JS and be found here: http://veryheavy.org $(span/).attr({class:tag, onclick:javascript:showBookmarks( + \ + i + \ + );}).text(i).appendTo(#leftcol); IE seems to puke on the braces {} Any ideas?- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: AJAX Load posting script defined datas
$(.form_param).change(function(){ var data = {}; data[ this.name ] = this.value; $(#moniteur).load(session_maj.php, data); }); -- Ariel Flesler http://flesler.blogspot.com On 1 jul, 05:40, PatrickPoncet [EMAIL PROTECTED] wrote: I'm a jquery beginer. I want to use the load function in a special way, the datas should be defined by th sript, depending on which part of my form I'm posting. My code is the following : $(.form_param).change(function(){ var param_val = $(this).val(); var param_nom = $(this).attr(name); $(#moniteur).load(session_maj.php, {param_nom: param_val}); }); The .form_param class is the class of the form elements (select, checkbox...), and I get the value (param_val) on change, an the name of the element (param_nom). I would like to post it, saying something like : {param_nom: param_val}. The problème is that in this way, the name of the posted data is always param_nom ; I get $_POST['param_nom'] Is there a way to do what I want in a simple Jquery way ? Patrick
[jQuery] Re: Mirrored radio button select/disable problem
As is usually the case, 30 minutes after posing the question, I figure it out myself. For those that are interested: radio class=first_choice id=choice_1 / radio class=first_choice id=choice_2 / radio class=first_choice id=choice_3 / radio class=second_choice id=choice_1b / radio class=second_choice id=choice_2b / radio class=second_choice id=choice_3b / //radio button mirror disable $('.first_choice').click( function(){ mirror_radio = '#' + this.id + 'b'; $(.second_choice).attr(disabled,false); $(mirror_radio).attr(disabled,true).attr(checked,false); }); Luc Pestille Web Designer From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Luc Pestille Sent: 01 July 2008 14:59 To: jquery-en@googlegroups.com Subject: [jQuery] Mirrored radio button select/disable problem Hi, I've run out of brain power when it comes to a particular jQuery problem I've got - has anyone done something similar to this: I have two sets of radio buttons, both with the same list of items, and selecting one should disable it's respective duplicate in the other list. e.g. - (*) Choice 1 (selected) - () Choice 2 - () Choice 3 - (-) Choice 1 (disabled) - () Choice 2 - () Choice 3 Choosing something in either list should free up / enable the other options. I can't think of a way to do it without being un-elegant, which is something I want to stay awy from. Thanks, Luc Pestille Web Designer in2, Thames House, Mere Park, Dedmere Road, Marlow, Bucks, SL7 1PB tel: +44 (1628) 899700 | fax: +44 (1628) 899701 | email: [EMAIL PROTECTED] | web: www.in2.co.uk http://www.in2.co.uk/ This message (and any associated files) is intended only for the use of jquery-en@googlegroups.com and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not jquery-en@googlegroups.com you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored. Any views or opinions presented are solely those of the author jquery-en@googlegroups.com and do not necessarily represent those of the company. ATT45488.gif
[jQuery] Shadowbox 2.0rc1
If you're using the Shadowbox jQuery plugin, it has been updated. The new version features increased flexibility and stability for various media types. It also includes much better support for i18n and skinning. Just wanted to let you know in case you are using it.
[jQuery] Re: Shadowbox 2.0rc1
Is there a homepage for this plugin? I cant seem to find it. Glen On Tue, Jul 1, 2008 at 9:44 AM, Michael J. I. Jackson [EMAIL PROTECTED] wrote: If you're using the Shadowbox jQuery plugin, it has been updated. The new version features increased flexibility and stability for various media types. It also includes much better support for i18n and skinning. Just wanted to let you know in case you are using it.
[jQuery] Re: Shadowbox 2.0rc1
http://mjijackson.com/shadowbox/ On Jul 1, 12:37 pm, Glen Lipka [EMAIL PROTECTED] wrote: Is there a homepage for this plugin? I cant seem to find it. Glen On Tue, Jul 1, 2008 at 9:44 AM, Michael J. I. Jackson [EMAIL PROTECTED] wrote: If you're using the Shadowbox jQuery plugin, it has been updated. The new version features increased flexibility and stability for various media types. It also includes much better support for i18n and skinning. Just wanted to let you know in case you are using it.
[jQuery] Multiple File Upload Update
Annoucement to anyone using this plugin: - MAJOR BUG FIX - New documentation website - Documentation available to download (works off-line just as it does online)
[jQuery] Star Rating Plugin
Announcement to anyone using this plugin: - MAJOR BUG FIXES: - - split stars did not work in hidden layers - - now works without dimensions plugin - New documentation - Documentation can be downloaded (works off-line just as it does online)
[jQuery] Re: Multiple File Upload Update
Oops, forgot to post the link: http://www.fyneworks.com/jquery/multiple-file-upload/ On Jul 1, 6:48 pm, Diego A. [EMAIL PROTECTED] wrote: Annoucement to anyone using this plugin: - MAJOR BUG FIX - New documentation website - Documentation available to download (works off-line just as it does online)
[jQuery] Re: Star Rating Plugin
Oops, forgot to post a link: http://www.fyneworks.com/jquery/star-rating/ On Jul 1, 6:50 pm, Diego A. [EMAIL PROTECTED] wrote: Announcement to anyone using this plugin: - MAJOR BUG FIXES: - - split stars did not work in hidden layers - - now works without dimensions plugin - New documentation - Documentation can be downloaded (works off-line just as it does online)
[jQuery] getJSON callback bug
Hi all, I think there may be a bug with the getJSON callback function. See http://www.sanchothefat.com/dev/jquery/json/ An alert should show and the body should turn blue if it's successful. Using firebug you can see it gets the file. I don't know what's wrong. MIME type maybe? Cheers, Rob
[jQuery] Re: Retrieve function signature from a list
I forgot about Firebug! After some debugging, I came up with the code below which solves the problem: jQuery(document).ready(function() { spn0 =$(#imgEnum ul li span).get(0); // Extract span content from the first list element sigimgURL =spn0.attributes[0].nodeValue; // Get mouseover function signature eval(sigimgURL); // Run function });
[jQuery] Adding a privileged function to a class in a separate file.
Hello there, I am building a class in a namespace extending jQuery this way : ;(function($) { $.myNamespace = $.myNamespace || {}; $.extend($.myNamespace, { myClass: function() { this.myPrivilegedFunction = function() { return myVar; } var myVar = 42; } }); })(jQuery); Now I want to add myOtherPrivilegedFunction to myClass in a separate file. Every attempt so far failed... I just wonder if it's possible or if there is an alternative. Thanks for your help : )
[jQuery] Re: getJSON callback bug
It's the format of your json.js http://www.codejames.com/temp/test.html On Jul 1, 1:31 pm, Robert O'Rourke [EMAIL PROTECTED] wrote: Hi all, I think there may be a bug with the getJSON callback function. Seehttp://www.sanchothefat.com/dev/jquery/json/ An alert should show and the body should turn blue if it's successful. Using firebug you can see it gets the file. I don't know what's wrong. MIME type maybe? Cheers, Rob
[jQuery] .submit with ajax inside
In the code below It seems that if i uncomment the return true; at the bottom it seems to happen before the ajax call is complete.. is there anyway to force it to wait for the call or have the call back return true or false and have that be returned to the submit's function? $(form).bind(submit,function() { $.ajax({url: , cache: false, type: POST, dataType: json, data: $(form).serializeArray(), success: function(data) { if(data.ErrorsFound != ) { $(div#ErrorsFound).text(data.ErrorsFound); $(form#register input).each(function(i, element){ $ (element).removeClass(data.removeClasses); }); $.each(data.requiredfields, function(i, required) { if($(input#+required.field).hasClass(required.classname) != true) { $ (input#+required.field).addClass(required.classname).focus(); } }); return false; } else { return true; } } }); if($(div#ErrorsFound).text() == ){ //return true; }else{ return false; } });
[jQuery] Re: Minor fixes required in order to play nice with other libraries that extend Object (code inside)
Hi Jörn, exactly, the function gets iterated too and is considered as the last element of the array. When passed on to autocomplete, it will break as s.toLowerCase() is invalid when s isn't a string. Therefore; my patch over at http://dev.jquery.com/attachment/ticket/3080/jquery.autocomplete.diff (2 little additions to make autocomplete even more idiotproof than it already is ;)) On a sidenote: The strangest part of it all is that the letsBreakStuff function doesn't get applied on normal arrays (see the correct array in the example mentioned earlier) but only to arrays created as an element of an Object (or so it seems in the wrong array mentioned earlier). Regards, Bram. On Jul 1, 3:47 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Okay, so the issue is that letsBreakStuff gets iterated together with the rest of the array, while it should be ignored, as it doesn't have a numerical index, right? How does that relate to your patch? Jörn On Tue, Jul 1, 2008 at 11:36 AM, Bramus! [EMAIL PROTECTED] wrote: Hi Jörn, The problem in fact is Ext Related, yet can be reproduced without Ext: any library that expands the Array prototype with a function can be the wrongdoer. Create a new blank document (nothing needs to be in it), open up firebug and paste in the code below: Array.prototype.letsBreakStuff = function(){return this}; correct = [ baa, bah!, bar, bar!, beblog, bezar, blog, blub, blub!, boo, bramus ]; As you can see this in fact does work correct. However, I'm a great JSON-addict, and my autocompletion data - just as any other call - is returned in the Object Literal Notation (and then run through a custom parse function to get an autocomplete compatible array). Now, open up Firebug again and paste in this code: Array.prototype.letsBreakStuff = function(){return this}; wrong = { data:[ baa, bah!, bar, bar!, beblog, bezar, blog, blub, blub!, boo, bramus ] } Check wrong.data, you'll see that the last item is the letsBreakStuff function. To make it all complete: the reason I named Ext is that I got the remove function as last item on wrong.data ... which is added by Ext: Ext.applyIf(Array.prototype,{indexOf:function(C){for(var B=0,A=this.length;BA;B++){if(this[B]==C){return B}}return -1},remove:function(B){var A=this.indexOf(B);if(A!=-1){this.splice(A, 1)}return this}}); Hope you now see why exactly I suggested that little patch ;) Regards, Bramus! On Jun 24, 3:57 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: I don't quite the how the issue is related to ExtJS. It sounds like you pass functions instead of strings to the autocomplete plugin, which is the actual issue here. Could you upload a testpage and post the URL here? Jörn On Tue, Jun 24, 2008 at 1:03 PM, Bramus! [EMAIL PROTECTED] wrote: Filed a ticket on dev.jquery including a .diff file:http://dev.jquery.com/ticket/3080 ;-) Regards, B! PS: [autocomplete] prefix seems to be cut off subject? On Jun 24, 11:15 am, Bramus! [EMAIL PROTECTED] wrote: Hi Jörn et all here at the list, I'm using the autocomplete plugin in a project I'm working on and I must say: it works great!. However: one part of the project uses ExtJS (their tree component is great) and that's where things go wrong. Problem is that somewhere in ExtJS they extend Object with a remove() function, breaking jQuery.autocomplete. After a little quest I found that - quite obviously - autocomplete breaks on string manipulations (Function.toLowerCase() doesn't really exist ;)) and has a minor issue when displaying the items whenever some library has extended Object. Here below are the 2 minor changes I implemented in order to make things work just fine again. Could you tuck 'm into the release as I can't commit any changes to the trunk. Change #1: Display issue: $.Autocompleter.Select, function fillList(): replace: if (!data[i]) with: if (!data[i] || (data[i].value.constructor === Function)) Change #2: Selection issue: $.Autocompleter.Cache, function matchSubset() at line#1 of this function (directly after the opening { ) add: if (s.constructor === Function) return false; Regards, Bramus!
[jQuery] Noob question about accessing element contents
Hi: I'm a noob, so please be kind. I am using jquery to parse some xml. I'm looking for the best practice to access an elements text contents. Let's say my xml looks like this: items item Hello world! /item item Goodnight moon! /item items I can get a wrapped set of the elements this way: $('items item', xml) And I can get the text of element 1 this way: $('items item:eq(1)', xml).text() But how do I get the contents once I am directly accessing the element instead of the jquery object? In other words I'd like to do something like this: $('items item', xml)[1].text(), but since the element that’s returned from the array [] doesn’t support text() how do I get it’s contents? I know I can wrap it in a second $ call, as in $($('items item', xml) [1]).text() but that seems less than ideal. Thanks!
[jQuery] Re: select option name attribute
$('select[name=textselector] option:selected').attr('name') On Jun 25, 7:07 pm, chasryder [EMAIL PROTECTED] wrote: How do I retrieve the name attribute of a selectedoptionusing jquery. IE: selectname=textselector optionname=11Text/option optionname=12Text 2/option /select In this example, I would be trying to get 12 when the Textoptionis selected. -- View this message in context:http://www.nabble.com/select-option-name-attribute-tp18124157s27240p1... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Shadowbox 2.0rc1
This looks like the home page: http://mjijackson.com/shadowbox/ -asegovia On Tue, Jul 1, 2008 at 10:37 AM, Glen Lipka [EMAIL PROTECTED] wrote: Is there a homepage for this plugin? I cant seem to find it. Glen On Tue, Jul 1, 2008 at 9:44 AM, Michael J. I. Jackson [EMAIL PROTECTED] wrote: If you're using the Shadowbox jQuery plugin, it has been updated. The new version features increased flexibility and stability for various media types. It also includes much better support for i18n and skinning. Just wanted to let you know in case you are using it.
[jQuery] Re: X_REQUESTED_WITH ie6
hey ken, I tracked it down.. its because of getJSON using the cached version.. that is what was wrong with mine.. it works fine if you use $.ajax and with json as the return type and cache to false.. =D On Jun 28, 1:10 pm, Ken Gregg [EMAIL PROTECTED] wrote: This may not be an IE6 problem. I have two pages. One page the header shows up in php, the other page it doesn't. Using FF3, live headers and firebug both say the header is sent. I haven't tried tracking it down yet. Cold be some strange bug somewhere between the browser and php. Of course, could be in my code too. On Jun 27, 8:39 am, DXCJames [EMAIL PROTECTED] wrote: Since JQuery auto sends X_REQUESTED_WITH i assumed it would probably work with most everything.. but it doesnt seem to be working with ie6... I tried changing the head name to a few different things but nothing seemed to work.. does anyone have any idea why this doesnt work or have any other ideas for a similar way to detect if ajax is making the call on the server side? i dont really want to use a QueryString variable because then that allows a person to just open that page up inside the browser.. so i was looking for something slightly more difficult to obtain the page.. any ideas/
[jQuery] Superfish - button width
Hey, Sorry if this is an elementary question, but what is the easiest way to set up the superfish menu so that each main menu button has its own width, depending on the length of the content? I got the menu working without any problems, but all the example css files are made with buttons that are all the same width. For a real website that's not very practical, of course, so I want to have them expand and contract depending on the content. I've tried removing the width from the .nav li and added a left/right padding to the .nav a. This makes the main menu appear correct in FF, but the sub-menues are a bit messed up. In IE6 this breaks the menu completely. Is there a CSS file available that has this set up correctly? Thank you!!
[jQuery] Re: jCarousel Lite and IE6/7
Any one able to help with this request? Thanks SeanR On Jun 24, 7:34�pm, SeanR [EMAIL PROTECTED] wrote: Hi all, I'm having problems getting jCarousel Lite working in IE6 7 http://www.gmarwaha.com/jquery/jcarousellite/ Firefox works fine, but the unordered list does not get any styling applied in IE There are several recent posts to the issues blog for the author that mention similar IE issues, but they have not had responses in the last month. http://gmarwaha.com/blog/?p=6 Has anyone else had issues with IE and found a fix? My markup is below: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / title/title script type=text/javascript src=http://gmarwaha.com/js/lib/ lib.min.js/script script type=text/javascript src=http://gmarwaha.com/jquery/ jcarousellite/js/jquery.jcarousellite.min.js/script script type=application/javascript �$(document).ready(function() { � �$(.jite).jCarouselLite({ � � � � � � � � btnNext: .next, � � � � � � � � btnPrev: .prev, � � � � � � � � visible : 6, � � � � � � � � scroll: 3 � � � � });}); /script /head body div a href=# class=prevprevious/a � div class=jite � � ul � � � lia href=#4img src=images/item8.gif alt= width=100 height=100 //a/li � � � lia href=#5img src=images/item7.gif alt= width=100 height=100 //a/li � � � lia href=#6img src=images/item6.gif alt= width=100 height=100 //a/li � � � lia href=#7img src=images/item5.gif alt= width=100 height=100 //a/li � � � lia href=#8img src=images/item4.gif alt= width=100 height=100 //a/li � � � lia href=#9img src=images/item3.gif alt= width=100 height=100 //a/li � � � lia href=#0img src=images/item2.gif alt= width=100 height=100 //a/li � � � lia href=#-img src=images/item1.gif alt= width=100 height=100 //a/li � � /ul � /div � a href=# class=nextnext/a /div /body /html Thanks in advance! Regards Sean
[jQuery] I am making a Drag/Drop applications BUILDER (feedback appreciated)
I am making a Drag/Drop applications BUILDER (feedback appreciated): http://mynichecomputing.com/GuideInfoandPlanner/UniversalDD.htm The user interface is done, but it does no building. Whole thing may be done in a couple of days. BUT, I would like any input/feedback/ideas or suggestions.
[jQuery] Re: clash in code? jQuery document ready and window.onload
Solved, the accordion script has a few $ used in it. By using the jQuery.noConflict function everything now works happely ever after :) On Jul 1, 3:16 am, ChrisQuery [EMAIL PROTECTED] wrote: hi, im new to jQuery and to programming in general so i hope this isnt a stupid question. A have an accordion which is animated to open and close when a user clicks a header div. The accordion holds a decent amount of content which takes some time load in ie (and only ie for some reason) before the javascript takes effect and closes the accordion to hide all the data inside them. Using the $(document).ready(function() I was able to have the page load with the accordion closed (content hidden but headers visible). I was very pleased with that. Im now trying to have an animated gif load in when the dom is ready and swap the gif for the accordion div once the page loads completely. To accomplish this Im trying to use $ (document).ready(function() to show the gif and hide the accordion div and then use window.onload to hide the gif and show the accordion div as well as create the new instance of my accordion passing through some parameters. The css manipulation works fine its the accordions functionality that stops working and loads open for all the content to be seen. script type=text/javascript src=scripts/js/accordian-src.js/ script script type=text/javascript src=scripts/js/jquery-1.2.6.min.js/ script script $(document).ready(function(){ $('div#basic-accordian').hide(); /* show gif */ $('div#load').show(); /* hide accordion */ }); window.onload = function(){ $('div#load').hide(); /* hide gif */ $('div#basic-accordian').show('slow'); /* show accordion */ new Accordian('basic-accordian',5,'header_highlight'); /* supposed to activate the accordion */ } /script Anyone have any idea why the accordion stops working? if i remove all the jquery code and js file the window.onload loads the accordion correctly after the page loads. Once the jQuery code and js file are put back in the accordion stops working. Could it be a clash in code or am i just structuring it incorrectly or missing something? if i haven't provided enough information i can provide more. Hope someone can help this is driving me crazy chris
[jQuery] Including the submit element in the querystring.
Serialize is a great method to automatically prepare a form, but it doesn't include the element that initiated the submit in the case where I attach a click event to a div and call submit from the click event. Is there a typical pattern to adding the submit element to the serialized string so the server can know which element initiated? Does it matter what format it's in? (submitter=elementId)? *bonus question* This is academic but I'm trying to learn: why does ajax put data in a querystring instead of using a form like normal html submit would do? best regards, ltg
[jQuery] Re: (Newbie Help) Cluetip not showing up
Well, actually there is a file there in that folder so I don't know why you're not getting it. I followed your lead though and deleted all the .js from that page and added yours and I get the rounded corners box and then added all the other features I want like arrows and now they show up too. Is there a way I can see the HTML of one of these boxes easily so I can figure out where the selectors and styles are so I can customize it some more? On Jul 1, 6:41 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi again, You have a couple problems here. 1. None of the rounded corner examples are using a selector that will select the link you're trying to activate with a clueTip. If you only want one clueTip to appear, and you want it to appear when hovering over that first image (or, more precisely, it's containing link), try this: $(document).ready(function() { $('a[title^=rounded]').cluetip({cluetipClass: 'rounded'}); }); You can get rid of everything else in that js file. For more information about selecting elements on a page, see:http://docs.jquery.com/Selectors 2. You have demo/ajax4.htm in the rel attribute -- but that file doesn't exist. If you want to pull in tooltip content from another page (which, given the rel attribute in there, I'm assuming you want to do), the other page has to exist. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jun 30, 2008, at 10:59 PM, datatv wrote: OK, I found it but that brings up the default. I still can't figure out why the rounded corners tool tip won't appear. On Jun 30, 5:46 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi, It looks like you've included the entire demo script, but you really only need one line inside a $(document).ready() function. The first two lines that use the .cluetip() method in your script file are these: $('a.title').cluetip({splitTitle: '|'}); $('a.basic').cluetip(); Notice that the first one applies the cluetip to a link with class=title and the second to a link with class=basic . Your html doesn't have either of these classes in it. I think that could be your problem. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jun 30, 2008, at 7:14 PM, datatv wrote: I just started using Cluetip and I can't get the tip to show up at all even though I've tried the example on the Cluetip website (for rounded corners) to the letter. Can anybody look at my code and see where I might have screwed up? http://www.datatv.com/sw/SW_wp_sampler.html If you rollover the first icon on the top left (underneath the header) the cluetip is supposed to appear. Thanks in advance to anyone who can assist.
[jQuery] Re: Retrieve function signature from a list
Well the code works! I guess the browser kept staled values in the cache causing the code to fail. The js script looks as follows: script type=text/javascript jQuery(document).ready(function() { spn0 =$(#imgEnum ul li span).get(0); // Extract span cnt from first list element sigimgURL =spn0.attributes[0].nodeValue; // Get mouseover signature eval(sigimgURL); }); /script
[jQuery] Re: Multiple tabs on one page..?
Why dou you initialize tabs twice? This is sufficient: $('#1 ul, #2 ul, #3 ul, #4 ul').tabs({ selected: null, unselect: true, fx: { height: 'toggle', opacity: 'toggle'} }); Apart from that I couldn't see any difference between the two pags and also couldn't see what is wrong with tabs. --Klaus On Jul 1, 10:56 am, t1mmie [EMAIL PROTECTED] wrote: Hey all, There's a few ways that I could pull off this kind of effect... But I have used the jUI Tabs plugin - http://www.webhero.co.uk/test The problem is, as you may find, that not all of the tabs work correctly! The first 2 or 3 do, but the last never does - and for what seems to be no reason! I want to keep this fading effect on open and closing, and I would also like the tabs to start off closed, but it doesn't seem to work. [code] $('#1 ul, #2 ul, #3 ul, #4 ul').tabs({ selected: null }); // start with all tabs hidden $('#1 ul, #2 ul, #3 ul, #4 ul').tabs({ unselect: true, fx: { height: 'toggle', opacity: 'toggle'} }); // selected tab closes on click [/code] Although, when everything is included on the one page without the main template etc. it works fine..! -http://www.webhero.co.uk/test2.php Could something be interfering? edit: (it seems to be where the #bg overlaps that last tab in the background? I'm not sure.. but if that is why, how can I fix?!) Thanks for your help! -- View this message in context:http://www.nabble.com/Multiple-tabs-on-one-page..--tp18212017s27240p1... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: hundreds of requests for images in IE6.
I think this is the typical IE flickering background images problem. Googling flicker background will give you lots of information... Also, I think it only occurs if oyu turn off cache in IE. --Klaus On Jul 1, 11:21 am, Darren [EMAIL PROTECTED] wrote: Hello, I am using the jQuery treeview plugin and am noticing that every time I expand and collapse nodes the browser is making hundreds of requests for the images associated with the tree. I notice it also happens on the treeview demo page. Does anyone have a workaround for this? Many Thanks. Darren
[jQuery] Re: getJSON callback bug
You are missing commas in between your inner {}'s for instance, your JSON is this (and this is just the first two records) { 275: { tags: , name: 1st Wickham Scout Group, code: 1stWickhamScoutGroup } 1: { tags: , name: ?, code: devtest123 } } it should be { 275: { tags: , name: 1st Wickham Scout Group, code: 1stWickhamScoutGroup }, 1: { tags: , name: ?, code: devtest123 } } I found this easily using the excellent program JSON Viewer (http:// www.codeplex.com/JsonViewer)
[jQuery] Re: ajaxSubmit plugin question
var options = { target: '#results', beforeSubmit: toggleSubmit(true), success: toggleSubmit(false) }; Just create two anonymous functions like this: var options = { target: '#results', beforeSubmit: function() {toggleSubmit(true)}, success: function() {toggleSubmit(false)} };
[jQuery] Re: Star Rating Plugin
Thanks Diego. I'm in the process of evaluating your plugin to use in a project and it's nice to see an update (ie, that the project is alive). :-) - Jack Diego A. wrote: Oops, forgot to post a link: http://www.fyneworks.com/jquery/star-rating/ On Jul 1, 6:50pm, "Diego A." [EMAIL PROTECTED] wrote: Announcement to anyone using this plugin: - MAJOR BUG FIXES: - - split stars did not work in hidden layers - - now works without dimensions plugin - New documentation - Documentation can be downloaded (works off-line just as it does online)
[jQuery] Re: Noob question about accessing element contents
I am using jquery to parse some xml. I'm looking for the best practice to access an elements text contents. Let's say my xml looks like this: items item Hello world! /item item Goodnight moon! /item items I can get a wrapped set of the elements this way: $('items item', xml) And I can get the text of element 1 this way: $('items item:eq(1)', xml).text() But how do I get the contents once I am directly accessing the element instead of the jquery object? In other words I'd like to do something like this: $('items item', xml)[1].text(), but since the element that’s returned from the array [] doesn’t support text() how do I get it’s contents? I know I can wrap it in a second $ call, as in $($('items item', xml) [1]).text() but that seems less than ideal. Why do you need to access the element? Are you trying to get the contents of each 'item'? If so, here's a way to do that: $('items item').each(i,o) { // in this loop 'i' is the index of the loop iteration // and 'o' is the object of the iteration (item element in this case) var $item = $(o); // could also do: var $item = $(this); var txt = $item.text(); });
[jQuery] Re: Including the submit element in the querystring.
Serialize is a great method to automatically prepare a form, but it doesn't include the element that initiated the submit in the case where I attach a click event to a div and call submit from the click event. Is there a typical pattern to adding the submit element to the serialized string so the server can know which element initiated? Does it matter what format it's in? (submitter=elementId)? *bonus question* This is academic but I'm trying to learn: why does ajax put data in a querystring instead of using a form like normal html submit would do? You could use the Form Plugin and its ajaxForm method if you want it to be handled for you. Otherwise it's up to you to append the submitting element's name and value to the data submitted. $.ajax does submit data the same way as a normal http submit. The query string is added to the url for GET requests and put in the body for POST requests. Mike
[jQuery] Re: Including the submit element in the querystring.
By default, the jQuery.ajax (or $.ajax) function uses the get method, which passes the data as a querystring tacked onto the url. So does the jQuery.get (or $.get) function. This is the same as a form submitted using the get method. If you are using the $.ajax function, you can set the type option to post to have it submit as form data, or you can use the jQuery.post (or $.post) function. Either way, it sends the data as form data (same as a form submitted using the post method. HTH, Carl LTG wrote: Serialize is a great method to automatically prepare a form, but it doesn't include the element that initiated the submit in the case where I attach a click event to a div and call submit from the click event. Is there a typical pattern to adding the submit element to the serialized string so the server can know which element initiated? Does it matter what format it's in? (submitter=elementId)? *bonus question* This is academic but I'm trying to learn: why does ajax put data in a querystring instead of using a form like normal html submit would do? best regards, ltg
[jQuery] Re: Multiple tabs on one page..?
Ok, that was just how it was in the official fading tab example. I'm having trouble with the last tab working on IE7, FF3, and Opera 9.5... Is it just me!? All of the tabs work ok, but the last one doesn't seem to, and the third one isn't if the first two are open. The tabs should still also start closed, but they don't? :\ Thanks Klaus Hartl-4 wrote: Why dou you initialize tabs twice? This is sufficient: $('#1 ul, #2 ul, #3 ul, #4 ul').tabs({ selected: null, unselect: true, fx: { height: 'toggle', opacity: 'toggle'} }); Apart from that I couldn't see any difference between the two pags and also couldn't see what is wrong with tabs. --Klaus On Jul 1, 10:56 am, t1mmie [EMAIL PROTECTED] wrote: Hey all, There's a few ways that I could pull off this kind of effect... But I have used the jUI Tabs plugin - http://www.webhero.co.uk/test The problem is, as you may find, that not all of the tabs work correctly! The first 2 or 3 do, but the last never does - and for what seems to be no reason! I want to keep this fading effect on open and closing, and I would also like the tabs to start off closed, but it doesn't seem to work. [code] $('#1 ul, #2 ul, #3 ul, #4 ul').tabs({ selected: null }); // start with all tabs hidden $('#1 ul, #2 ul, #3 ul, #4 ul').tabs({ unselect: true, fx: { height: 'toggle', opacity: 'toggle'} }); // selected tab closes on click [/code] Although, when everything is included on the one page without the main template etc. it works fine..! -http://www.webhero.co.uk/test2.php Could something be interfering? edit: (it seems to be where the #bg overlaps that last tab in the background? I'm not sure.. but if that is why, how can I fix?!) Thanks for your help! -- View this message in context:http://www.nabble.com/Multiple-tabs-on-one-page..--tp18212017s27240p1... Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Multiple-tabs-on-one-page..--tp18212017s27240p18225794.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Including the submit element in the querystring.
Is there a place that explains the differences in functionality between the core and the forms plugin? I came across a 2006 thread where so many people supported adding the functionality to the core that I just assumed it happened. thanks for the reply, ltg On Jul 1, 5:03 pm, Mike Alsup [EMAIL PROTECTED] wrote: Serialize is a great method to automatically prepare a form, but it doesn't include the element that initiated the submit in the case where I attach a click event to a div and call submit from the click event. Is there a typical pattern to adding the submit element to the serialized string so the server can know which element initiated? Does it matter what format it's in? (submitter=elementId)? *bonus question* This is academic but I'm trying to learn: why does ajax put data in a querystring instead of using a form like normal html submit would do? You could use the Form Plugin and its ajaxForm method if you want it to be handled for you. Otherwise it's up to you to append the submitting element's name and value to the data submitted. $.ajax does submit data the same way as a normal http submit. The query string is added to the url for GET requests and put in the body for POST requests. Mike
[jQuery] Re: Including the submit element in the querystring.
Is there a place that explains the differences in functionality between the core and the forms plugin? I came across a 2006 thread where so many people supported adding the functionality to the core that I just assumed it happened. You're right, a good portion of the Form Plugin's functionality moved into core. Specifically, the serialization capabilities. But the core lib doesn't provide the capability your asked about - detecting the submitting element and adding it to the request data. Basically, the core can handle all of your serialization needs. But if you want a simple way to bind submit events and have forms auto-ajaxified then the Form Plugin steps in to fill that role, and offers numerous options as well.
[jQuery] Preventing form field caching on refresh...
Does anyone know a reliable way to prevent form field caching on a page reload? I want all form fields to return to their original state (aka defaultValue.) I'm developing a page and I really need the form to always return to it's original HTML state. The page isn't being cached, but FF is replacing the form fields with the changed values (which I don't want.) Any suggestions? Thanks, Dan
[jQuery] Re: Fadein with ajax load()
try $('#id-of-my-div').load('somescript.php?name='+escape($(this).val()), {},function(){ $('#id-of-my-div').fadeIn(slow) }); http://docs.jquery.com/Ajax/load#urldatacallback On 1 июл, 14:26, Pickledegg [EMAIL PROTECTED] wrote: I'm using an ajax load() with an onChange event: $('#id-of-my-div').load('somescript.php?name='+escape($(this).val())); Which is lovely, but how can I add a fadeIn to it so that every time my div is updated, it fades into the div in a sultry provocative fashion? Thanks.
[jQuery] Re: getJSON callback bug
D'oh, Thanks. It's been a long day... On 1 Jul, 21:30, MorningZ [EMAIL PROTECTED] wrote: You are missing commas in between your inner {}'s for instance, your JSON is this (and this is just the first two records) { 275: { tags: , name: 1st Wickham Scout Group, code: 1stWickhamScoutGroup } 1: { tags: , name: ?, code: devtest123 } } it should be { 275: { tags: , name: 1st Wickham Scout Group, code: 1stWickhamScoutGroup }, 1: { tags: , name: ?, code: devtest123 } } I found this easily using the excellent program JSON Viewer (http://www.codeplex.com/JsonViewer)
[jQuery] Assigning the value of a field to another hidden field.
Hi all, Quick question regarding retrieving a field value. I have the following code. Basically based on a select menu option I want to set a hidden field to specific value depending on what is selected. So if the user selects Urgent or Critical the hidden field would be set to the value of another field in the form. I am trying to use $ (#chkneededby).val == $('#dateSel').val; but that does not seem to work. Is this correct if say I want to get the field value of a field with the id dateSel $('#dateSel').val; $(pselectBox).change(function () { // var text = $(this).text(); $this = $(this); if ($this.val() == 'Urgent') { $(#chkneededby).val == $('#dateSel').val; } else if ($this.val() == 'Critical') { $(#chkneededby).val == $('#dateSel').val; } else { $(#chkneededby).val('01/01/2999'); } });
[jQuery] Re: Assigning the value of a field to another hidden field.
A few notes... == is the comparison operator, not the assignment operator. = is the assignment operator. $().val is a *method*, not a property. $().val() retrieves the value, and $().val(newvalue) sets the value. (So you wouldn't want to use the assignment operator anyway.) You're setting a global variable $this, which is likely not what you want. Use var to create a local variable. When you find yourself writing the same line of code twice, look for a way to combine them. Personally I would probably code it like this: $(pselectBox).change(function () { var val = $(this).val(); $(#chkneededby).val( val == 'Urgent' || val == 'Critical' ? $('#dateSel').val() : '01/01/2999' ); }); Hope that helps, -Mike Quick question regarding retrieving a field value. I have the following code. Basically based on a select menu option I want to set a hidden field to specific value depending on what is selected. So if the user selects Urgent or Critical the hidden field would be set to the value of another field in the form. I am trying to use $ (#chkneededby).val == $('#dateSel').val; but that does not seem to work. Is this correct if say I want to get the field value of a field with the id dateSel $('#dateSel').val; $(pselectBox).change(function () { // var text = $(this).text(); $this = $(this); if ($this.val() == 'Urgent') { $(#chkneededby).val == $('#dateSel').val; } else if ($this.val() == 'Critical') { $(#chkneededby).val == $('#dateSel').val; } else { $(#chkneededby).val('01/01/2999'); } });
[jQuery] comet long polling with jquery
hello, I finally got my server to run an example comet application, which uses the long polling method. The example code I got uses prototype library, which i dont want to use. I understand there is a comet plugin for jquery that supports the bayeux protocol, which is not what I want. Searching in this group, I have read that the long pollling method does not require a plugin, and just the standard ajax methods are ok. What I need to do shortly, is to submit an ajax request, (which will only be replied when the server sends data) when the server sends data (it sends success in the body, and json data in the response header), the ajax method must process the json data, and restart itself making another ajax request. also, this ajax request should start at document ready. Any ideas? Best, -C.B.
[jQuery] comet long polling with jquery
hello, I finally got my server to run an example comet application, which uses the long polling method. The example code I got uses prototype library, which i dont want to use. I understand there is a comet plugin for jquery that supports the bayeux protocol, which is not what I want. Searching in this group, I have read that the long pollling method does not require a plugin, and just the standard ajax methods are ok. What I need to do shortly, is to submit an ajax request, (which will only be replied when the server sends data) when the server sends data (it sends success in the body, and json data in the response header), the ajax method must process the json data, and restart itself making another ajax request. also, this ajax request should start at document ready. Any ideas? Best, -C.B.
[jQuery] Targeting elements with more than one class
Please excuse my noobiness, I just started playing with jQuery today and I cannot seem to find the answer to this: If you have elements with multiple classes, how do target just one class? For example: p class=big blueblah blah blah/p p class=big greenblah blah blah/p p class=small greenblah blah blah/p How do I target the p's with the class of green? Thanks in advance.
[jQuery] Targeting elements with more than one class
Please excuse my noobiness, I just started playing with jQuery today and I cannot seem to find the answer to this: If you have elements with multiple classes, how do target just one class? For example: p class=big blueblah blah blah/p p class=big greenblah blah blah/p p class=small greenblah blah blah/p How do I target the p's with the class of green? Thanks in advance.
[jQuery] Re: Targeting elements with more than one class
Please excuse my noobiness, I just started playing with jQuery today and I cannot seem to find the answer to this: If you have elements with multiple classes, how do target just one class? For example: p class=big blueblah blah blah/p p class=big greenblah blah blah/p p class=small greenblah blah blah/p How do I target the p's with the class of green? Thanks in advance. $('p.green')
[jQuery] ClueTip: Rounded Corners not appearing correctly
I've got my tooltip now pretty much in order expect for one problem. The rounded corner placement on the tooltip. Seems the bottom right corner is going just below the Close text link instead of actual bottom of the box. If you go to this page: http://www.datatv.com/sw/SW_wp_sampler.html and rollover the 'Selecting a 3D Solution that helps you Design Better Products' text link or icon, you'll see the tooltip (and yes, it's a biggie as the client wanted a lot of content there) and that the br.gif image isn't where it should be.
[jQuery] Re: Shadowbox 2.0rc1
Thanks for the update, Michael. I'm a big fan. :-) --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 1, 2008, at 12:44 PM, Michael J. I. Jackson wrote: If you're using the Shadowbox jQuery plugin, it has been updated. The new version features increased flexibility and stability for various media types. It also includes much better support for i18n and skinning. Just wanted to let you know in case you are using it.
[jQuery] Re: (Newbie Help) Cluetip not showing up
Hi, well, I don't know about easily, but you can set the sticky option to true and then use Firebug to inspect the element once it's visible (or even when it's hidden, actually). Here is the structure of a fairly typical rounded-corner, sticky tooltip: div id=cluetip class=clue-right-rounded cluetip-rounded div id=cluetip-outer h3 id=cluetip-titlerounded corners/h3 div id=cluetip-inner div id=cluetip-closea href=#Close/a/div !-- contents go here! -- /div /div div id=cluetip-extra/div div class=cluetip-arrows id=cluetip-arrows/div /div Hope that helps. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 1, 2008, at 1:52 PM, datatv wrote: Well, actually there is a file there in that folder so I don't know why you're not getting it. I followed your lead though and deleted all the .js from that page and added yours and I get the rounded corners box and then added all the other features I want like arrows and now they show up too. Is there a way I can see the HTML of one of these boxes easily so I can figure out where the selectors and styles are so I can customize it some more? On Jul 1, 6:41 am, Karl Swedberg [EMAIL PROTECTED] wrote: Hi again, You have a couple problems here. 1. None of the rounded corner examples are using a selector that will select the link you're trying to activate with a clueTip. If you only want one clueTip to appear, and you want it to appear when hovering over that first image (or, more precisely, it's containing link), try this: $(document).ready(function() { $('a[title^=rounded]').cluetip({cluetipClass: 'rounded'}); }); You can get rid of everything else in that js file. For more information about selecting elements on a page, see:http://docs.jquery.com/Selectors 2. You have demo/ajax4.htm in the rel attribute -- but that file doesn't exist. If you want to pull in tooltip content from another page (which, given the rel attribute in there, I'm assuming you want to do), the other page has to exist. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jun 30, 2008, at 10:59 PM, datatv wrote: OK, I found it but that brings up the default. I still can't figure out why the rounded corners tool tip won't appear. On Jun 30, 5:46 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi, It looks like you've included the entire demo script, but you really only need one line inside a $(document).ready() function. The first two lines that use the .cluetip() method in your script file are these: $('a.title').cluetip({splitTitle: '|'}); $('a.basic').cluetip(); Notice that the first one applies the cluetip to a link with class=title and the second to a link with class=basic . Your html doesn't have either of these classes in it. I think that could be your problem. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jun 30, 2008, at 7:14 PM, datatv wrote: I just started using Cluetip and I can't get the tip to show up at all even though I've tried the example on the Cluetip website (for rounded corners) to the letter. Can anybody look at my code and see where I might have screwed up? http://www.datatv.com/sw/SW_wp_sampler.html If you rollover the first icon on the top left (underneath the header) the cluetip is supposed to appear. Thanks in advance to anyone who can assist.
[jQuery] The Cycle plugin and residue
Hello folks, I'm using the Cycle plugin to display annotated slideshows - I'm having problems with it remembering and presenting the titles of previous slideshows. My sequence is this: 1. The page is loaded and the current slideshow is started $(document).ready(function() { ... $('#s1').cycle({fx:'fade', timeout: 8000, after: onAfter,pause: 1,next: '#s1',delay: -3000}); ... }); function onAfter() { $('#ssoutput').html(this.title); } 2. If the user clicks a link of other slideshows, an ajax call delivers the new slideshow, complete with a new div wrapper (s1) and overwrites the existing slideshow. 3. The images of the second show are displayed as expected, but for each slide of the second show, the title of the slide and of one from the previous show are sequentially displayed. 4. If a third show is loaded, then for each slide of the new show, three titles are shown (2 of which are of the previous shows). Am I not flushing something properly? Thanks for any assistance, Cheers/Bruce
[jQuery] Re: comet long polling with jquery
hello, I finally got my server to run an example comet application, which uses the long polling method. The example code I got uses prototype library, which i dont want to use. I understand there is a comet plugin for jquery that supports the bayeux protocol, which is not what I want. Searching in this group, I have read that the long pollling method does not require a plugin, and just the standard ajax methods are ok. What I need to do shortly, is to submit an ajax request, (which will only be replied when the server sends data) when the server sends data (it sends success in the body, and json data in the response header), the ajax method must process the json data, and restart itself making another ajax request. also, this ajax request should start at document ready. Any ideas? Best, -C.B. This should get you started: (function($) { $(document).ready(startComet); function startComet() { $.ajax({ url: 'myCometServer.php', complete: onComplete }); }; function onComplete(xhr, status) { if (status == success) { var json = xhr.getResponseHeader('myCometHeader'); $.globalEval('('+json+')'); startComet(); } else { // handle errors } }; })(jQuery);
[jQuery] Re: The Cycle plugin and residue
On Jul 1, 8:58 pm, Bruce MacKay [EMAIL PROTECTED] wrote: Hello folks, I'm using the Cycle plugin to display annotated slideshows - I'm having problems with it remembering and presenting the titles of previous slideshows. My sequence is this: 1. The page is loaded and the current slideshow is started $(document).ready(function() { ... $('#s1').cycle({fx:'fade', timeout: 8000, after: onAfter,pause: 1,next: '#s1',delay: -3000}); ... }); function onAfter() { $('#ssoutput').html(this.title); } 2. If the user clicks a link of other slideshows, an ajax call delivers the new slideshow, complete with a new div wrapper (s1) and overwrites the existing slideshow. 3. The images of the second show are displayed as expected, but for each slide of the second show, the title of the slide and of one from the previous show are sequentially displayed. 4. If a third show is loaded, then for each slide of the new show, three titles are shown (2 of which are of the previous shows). Am I not flushing something properly? Thanks for any assistance, Cheers/Bruce Bruce, Before replacing the slideshow you should stop it. $('#s1').cycle('stop'); That will terminate the timer associated with that slideshow. Mike
[jQuery] Re: zebra striping + flashing/blinking effect?
I think you misunderstood my post. It works fine but i'm looking to add more with an effect such as flashing/blinking rows to represent that its important to the visitor to check it out. On Jul 1, 2:55 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: A zebra stripe doesn't need any Javascript given IE7, either. The tr:hover bit is accepted by the browser if your doctype is set to strict mode. On Jun 30, 10:15 pm, sketchy [EMAIL PROTECTED] wrote: I recently got acquainted with jquery and implemented this tutorial on zebra striping to my site:http://docs.jquery.com/Tutorials:Zebra_Striping_Made_Easy and its awesome but i was wondering it its possible to add like a blinking/flashing effect to one or a couple of the rows. The effect would start when the visitor opens the page and then stop when they leave. My knowledge on jquery is quite limited right now so it would great if someone could help me out. Thanks