[jQuery] Re: jCarouselLite version 0.4.0
that kicks ass. the mouse wheel implementation is a great idea! ;-) GC On Jul 26, 12:28 am, Ganeshji Marwaha [EMAIL PROTECTED] wrote: Hi list, I have updated the jCarouselLite plugin to its next revision - 0.4.0 . The project page is athttp://www.gmarwaha.com/jquery/jcarousellite/index.php
[jQuery] trigger function when something has changed
Hi I've a big legacy app on which there is jquery now. There is a 2 columns design, and when the page loads their height is being equalized. My issue is that their is lot of javascript, old and jquery style, often with inline calls, which will add or expand content and hence change the height of the containing column. Is their a way to detect that something has happened and trigger my equalizing function at that moment ? I know its a crazy question, but I'm desperate... -Olivier
[jQuery] Re: ANNOUNCEMENT: jQuery resetDefaultValue plugin
Leandro Vieira Pinho wrote: Hu, I don´t think it´s a good suggestion. Imagine: I use the filter to avoid submit/reset/button buttons, for example, so if I did it: $('input').resetDefaultValue().height(30); All the input elements affected by plugin will have 30 pixels of height. If I use the .end() function, the submit/reset/buttons will have 30 pixels of height too, so, but these kind of input elements isn ´s affected by plugin. Do you agree? No. I would expect every matched element to get the height. For someone, who is simply using your plugin and does not know how it works it would be totally inobvious why some elements are missing and he would simply assume it's a bug somewhere in jQuery. It's just not transparent what is going on to anyone else than you or one who studied the plugin code carefully (which you cannot expect as a plugin author). If I write $('input').height(30); or $('input').resetDefaultValue().height(30); or $('input').height(30).resetDefaultValue(); I do expect all matched inputs having the height of 30! Otherwies you'd need to call the plugin resetDefaultValueWithFilter or something. It should be up to the user to do the filtering in the selector anyway - the intention what the code should do is much more obvious to others reading the code. The filter in the plugin should simply serve as a little safety mechanism if at all required. The example you've given should be written as this anyway: $('[EMAIL PROTECTED]text]').resetDefaultValue().height(30); --Klaus
[jQuery] Re: $strip has no properties (??)
This is because, $.get() is asynchronous and your call to scrollmarquee is done before $.get() finishes in the background. One solution would be to place setInterval(scrollmarquee, 20); method within the callback of $.get() like this... $.get(url, function() { // your other stuff of inserting the p element setInterval(scrollmarquee, 20); } This should solve your problem -GTG On 7/26/07, GianCarlo Mingati [EMAIL PROTECTED] wrote: Hi list. If yoy have FF with Firebug, and go to this page http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/beta/continuous.html you MAY have an error that pops up that says that $strip has no properties $strip in this script should be (should be because i'm 'learning' jquery) the paragraph that continuosly scroll $strip = $(#mask p#strip); Now have you an idea of why if I simply reload that page that error popsup but the script runs ok? Why if teste locally $strip makes a continuous loop of errors while 'online' not? How could it be that $strip.css has no properties but the P scrolls anyway? It's making me mad. Thanks GC
[jQuery] Re: $strip has no properties (??)
Hi thanks for your suggestion is not working... inserting setInterval(scrollmarquee, 20) into $.get() isnot called at all. GC On Jul 26, 9:48 am, Ganeshji Marwaha [EMAIL PROTECTED] wrote: This is because, $.get() is asynchronous and your call to scrollmarquee is done before $.get() finishes in the background. One solution would be to place setInterval(scrollmarquee, 20); method within the callback of $.get() like this... $.get(url, function() { // your other stuff of inserting the p element setInterval(scrollmarquee, 20); } This should solve your problem -GTG On 7/26/07, GianCarlo Mingati [EMAIL PROTECTED] wrote: Hi list. If yoy have FF with Firebug, and go to this page http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/b... you MAY have an error that pops up that says that $strip has no properties $strip in this script should be (should be because i'm 'learning' jquery) the paragraph that continuosly scroll $strip = $(#mask p#strip); Now have you an idea of why if I simply reload that page that error popsup but the script runs ok? Why if teste locally $strip makes a continuous loop of errors while 'online' not? How could it be that $strip.css has no properties but the P scrolls anyway? It's making me mad. Thanks GC
[jQuery] Re: Does jQuery have function for ajax periodical updater
My first thought would be to use setInterval() to fire an ajax request at a regular interval, but as I don't know if the $.ajax object gets recycled or if a new XHR is created for each call. In the latter case the setInterval approach would cause the browser to eventually gobble up the system memory. On Jul 25, 11:59 am, Makara Kao [EMAIL PROTECTED] wrote: I just wonder if jquery has function for ajax periodical updater. I mean, for example, for every 5 minutes it loads the Ajax to request the result from the server. Are there any tutorials or solutions? Cos I could hardly find the tutorial about this. Thanks in advance. Makara
[jQuery] Re: $strip has no properties (??)
It works Thank you Cheers GC
[jQuery] Re: jQuery AJAX working in Firefox but not IE
Thank you, that gives me some ideas to try. To answer your question: because I am a javascript beginner just starting to get my head around this stuff :-) On Jul 25, 7:16 pm, Benjamin Sterling [EMAIL PROTECTED] wrote: Josh, First, I am curious why you are putting the code directly on a like, is there a reason for that? I assume it is to be able to dynamically add the IDs, but you should be able to create a function and just pass those IDs. But, to actually answer your question, I could not find a good answer for you, but this link may point you in the right direction:http://www.thescripts.com/forum/thread424606.html The second and third post should shed some light. The .load() uses innerHTML. On 7/25/07, Josh A. [EMAIL PROTECTED] wrote: Hey folks, So here's example code: a onClick= $j('#points_1').fadeTo('fast', .1).load( '/points/scroll', {sm_id: 1, ps_id: 13}, function() {$j('#points_1').fadeTo('fast', 1);} ); You can see it in action (or inaction using IE) at http://delangeracing.com/points and clicking any Prev link. Any idea why it never fades back in using IE? -Josh -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com
[jQuery] Re: Interface: Slider, fractions, onSlide reporting incorrect fractions?
Thanks Mitch I found your function helpful. I was having trouble with the slide as the percent value or the xProc in your equation was inaccurate and changed if I click the slider a second time. I did however fine tune your equation for my own purposes. Here's my result: var fraction = x / this.dragCfg.containerMaxx; var expected = (100 * fraction) / (100/f) + 1; The expected value now becomes in a fraction 4 = 1,2,3,4 or 5. Hope this might help someone. On Jun 22, 4:10 am, Gordon [EMAIL PROTECTED] wrote: I have been having some trouble with the interface sliders as well, it has been suggested to me when I posted about it that the sliders code simply needs a rework as it stands, and that certain things just don't work very well currently. Sorry I can't be mroe help than that, it's pretty much all I've been told on the subject. On Jun 21, 12:18 am, Mitch [EMAIL PROTECTED] wrote: I have aSliderwith fractions and an onSlide handler. Sometimes when the handler is invoked, the reported value for xProc seems to be lagging -- it seems to be the value from just before theslider jumped to its current position. Has anyone else seen this problem? I'd like to post an example but am not sure how Google Groups will handle the formatting. So for now, here's a fragment to demonstrate the problem. div id=slider_frame div id=bar div id=indicator class=Indicator/div /div /div p id=msg/p ... var f = 5; varslider= $(#bar).Slider({ accept: #indicator, fractions: f, onSlide: function(xProc, yProc, x, y) { var fraction = x / this.dragCfg.containerMaxx; var expected = Math.round(100 * fraction / (f - 1)) * (f - 1); $(#msg).html(Expected + expected + , got + xProc); In the web app where I've encountered this problem, I've been able to work around it by recomputing the xProc value in my onSlide function: var fraction = x / this.dragCfg.containerMaxx; var f = this.dragCfg.fractions; xPercent = Math.round(100 * fraction / (f - 1)) * (f - 1); A more complete example is available at:http://bottledtext.blogspot.com/2007/06/bug-with-jquery-112-interface...
[jQuery] Manage overflow auto or something similar
Hi, I've a div with a list inside, each element contains a a tag and a p tag with a class that is hidden for default. I post some code for better explain: div id=news_eventi ul li a href=# onclick=$('.surprise').hide('slow');$('#news_3').show('slow');return false; + 19-06-2007 09:09 strongtre/strong /a p id=news_3 class=surprise Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit p /p /li li a href=# onclick=$('.surprise').hide('slow');$('#news_4').show('slow');return false; + 19-06-2007 09:09 strongquattro/strong /a p id=news_4 class=surprise Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit p /p /li /div The div news_eventi has a fixed height, and overlow:auto, then, when a click on the title of a very long news the browser display the classic default scrollbar. And now my question: There's a way to replace the beaviour of the browser putting 2 images of a arrow for manage the scrolling of the div? In a few words I want to change the styles for the scrollbars. Can you suggest me a way or a point of start? Thank you very much :-)
[jQuery] Re: Announce: Masked Input Plugin 1.0
Ji Josh, great work!! What I'm missing is a more detailed mask i.e. for date inputs: time input [0..23]:[0..59] date input [1..31].[1..12].[1900..2007] (and check for 29th Feb) Do you want to add this in your roadmap? Michael On Jul 26, 2:21 am, Josh Bush [EMAIL PROTECTED] wrote: I just wanted to announce that I've finally released v1.0 of my masked input plugin. Please check it out at: http://digitalbush.com/projects/masked-input-plugin Thank You Josh digitalbush.com
[jQuery] Re: Noob Question - .add() not working in IE?
Hi John, thanks for the info, I'll try that. But it seems that there is another problem, because the part where the .attr(style) thing is checked, depends on the link beiing generated, wich does not happen in IE. The result of the code in IE is h3img / Text/h3 (which is the static html code) in Firefox and Safari (didn't checked with Opera) it is h3aimg /img /Text spananother Text/span/h3 (static code plus the 'inserted' code through jQuery) - Tom On 25 Jul., 20:39, John Resig [EMAIL PROTECTED] wrote: This is going to be an issue: .attr(style) == display: none; Up until just the other day, that wasn't working in IE (it's fixed now, and it will be in jQuery 1.1.4). In the meantime I recommend that you do: .is(:hidden) or: .css(display) == none --John On 7/24/07, webrocker [EMAIL PROTECTED] wrote: Hello group, I try to dynamically add some tags and content to an existing element (basically a toggle-link, that's only to be seen if JS is active and that slideToggles a div). Somehow my code doesn't work in IE, although it works fine in other browsers like Firefox or Safari: +++ JQuery: $(document).ready(function(){ // hide div on pageready: if( $(div.reduction-wrap) ){ $(div.reduction-wrap).hide(); // add toggle link with icon to headline with( $(#toggle-link) ){ children('img').append('img src=images/pfeil-blau-r.gif id=toggle-icon alt='); append(' spanshow/span'); html( 'a href=javascript:; id=reduction-toggle'+$(#toggle- link).html()+'/a'); } // click on link toggles hidden div: $(#reduction-toggle).click( function() { $(div.reduction-wrap).slideToggle(normal, function(){ if( $(div.reduction-wrap).attr(style) == display: none;) { $(#reduction-toggle).children(span).html(show); $(#toggle-icon).attr({src:images/pfeil-blau-r.gif, id: toggle-icon, alt: }); } else { $(#reduction-toggle).children(span).html(hide); $(#toggle-icon).attr({src:images/pfeil-blau-u.gif, id: toggle-icon, alt: }); } }); // make sure nothing happens with the link: this.blur(); return false; }); } }); HTML: h3 id=toggle-linkimg src=images/icon-reductions.gif alt= / Title/h3 div class=reduction-wrapcontent/div +++ What is wrong with that? IE will hide the div, but no link-markup is inserted to the html. Thanks for any hint or shove in the right direction... Tom
[jQuery] Re: Does $('input#myId') search for inputs first or is it optimised?
It uses document.getElementById(myId) as usual so it's a fast search, but it will then check that the returned element is an input, so there is a little additional overhead. --rob On 7/26/07, Remy Sharp [EMAIL PROTECTED] wrote: I should really know this, but I've come to realise I'm not 100% sure. Does this: $('input#myId') ...search for all inputs first then narrow down to the ID, or does jQuery work out before hand that there can be only one Id - and therefore is the same, with respect to processing to: $('#myId') Cheers. Remy. -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: Does $('input#myId') search for inputs first or is it optimised?
Cheers for that. On Jul 26, 11:24 am, Rob Desbois [EMAIL PROTECTED] wrote: It uses document.getElementById(myId) as usual so it's a fast search, but it will then check that the returned element is an input, so there is a little additional overhead. --rob On 7/26/07, Remy Sharp [EMAIL PROTECTED] wrote: I should really know this, but I've come to realise I'm not 100% sure. Does this: $('input#myId') ...search for all inputs first then narrow down to the ID, or does jQuery work out before hand that there can be only one Id - and therefore is the same, with respect to processing to: $('#myId') Cheers. Remy. -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: Superfish with interface plugin ...
Hi Joel, Thanks for reply. http://www.amside.be/index.php I did this test page with your sample code, the interface plugin is not used, just loaded ... Only superfish css is loaded and used ... And as you can see, the sub sub menu doesn't appear with IE7 ... Still better, if i put this code console.log($(document).ready(function(){ $(ul.nav).superfish({ hoverClass : sfHover, currentClass: overideThisToUse, /*new to v1.2a*/ delay : 500, animation : {opacity:show}, speed : normal }); })); (just to log any errors in firebug ... ) the menu works correctly in IE7 ...
[jQuery] Re: Selector Optimisation Question
There is a plugin that dies speed up the selection of DOM elements a lot: http://jquery.com/plugins/project/fastid This plugin speeds up use of $('#id'). Use of $('#id') may be anywhere between 10 and 40 times slower than using $ (document.getElementById('id')), depending on the browser used. I don't know about you, but I personally use $ ('#id') a lot and really need the speed up. With this plugin, $('#id') is typically only up to 10% slower than $(document.getElementById('id')), and often not even measurable (110% vs 4000%, not bad I would say!). Hope i helped :) On 22 Jul., 11:28, NeilM [EMAIL PROTECTED] wrote: Thanks Guys, That has been very helpful. On Jul 12, 4:52 pm, Michael Geary [EMAIL PROTECTED] wrote: Yeah, as Klaus mentioned, it is a tiny bit faster if you leave out the 'img'. The real optimization you can do is to avoid using the same selector repeatedly. In a way, jQuery makes it too easy to write inefficient code: $('#foo').doSomething(); // ...later... $('#foo').doSomethingElse(); Replace that with: var $foo = $('#foo'); $foo.doSomething(); // ...later... $foo.doSomethingElse(); As you can see, I use $variableName as a convention to remind me that the variable is a jQuery object. This will make more of a difference with slower selectors like $('.someClass'). Even though jQuery is much faster than it used to be, it's still faster if you can avoid repeating the selector query at all. -Mike From: NeilM I have just started to use jQuery in my web development and have a question concerning optimising element selection. I find that I create a lot of references to id'd elements: img id=myImage src=todaysimage.gif width=20 height=20 / Then, in my JavaScript, I want to obtain a reference to the element. Now, even though it has an id, I tend to use the full CSS descriptor as, to me anyway, it makes the code more readable: $(img#myImage).addClass(border); My question is, apart from the overhead of some extra characters in the script (e.g. 'img#'), does this style of specification introduce a performance overhead internally within jQuery? Would/does jQuery optimise the element selection process if it just 'sees' a simple id string starting with a #? $(#myImage).addClass(border);
[jQuery] Re: Ajax: (Didn't have time to go over posted messages)
On Jul 25, 8:15 pm, andreas [EMAIL PROTECTED] wrote: Didn't have time to go over the posts in the group and i would appreciate answers/tips cause i need to deploy an app. based heavily on async calls and custom headers will be required in many occasions. In the future i would recommend lying and saying, i didn't find anything in my searches, as saying i didn't have time to... is just an invitation for us to say, if you didn't take the time to help yourself, we're not going to take the time to help you. :)
[jQuery] Re: ANNOUNCEMENT: jQuery resetDefaultValue plugin
Yeah, I´m wrong. And without the filter inside the plugin, we can use with textarea too. So, the new code is here. Thanks. I´m learning so much with these discussion. /** * jQuery resetDefaultValue plugin * @version 0.9.1 * @author Leandro Vieira Pinho [EMAIL PROTECTED] * How to use * $(function() { * $('input').resetDefaultValue(); // for all input elements * $('input.className').resetDefaultValue(); // for some elements * $('#q').resetDefaultValue(); // for a especific element * $('[EMAIL PROTECTED]').resetDefaultValue(); // avoid button/reset/ submit buttons * $('textarea').resetDefaultValue(); // work with textarea too * }); * ChangeLog * 0.1 - First relase * 0.2 - Filter input elements with type igual text, just it. * 0.9 - Rewrite all the plugin code. Thanks to Klaus Hartl [ http://groups.google.com/group/jquery-en/browse_thread/thread/5ca50fd021062331 ] * 0.9.1 - Doesn´t do the filter inside the plugin */ jQuery.fn.resetDefaultValue = function() { function _clearDefaultValue() { var _$ = $(this); if ( _$.val() == this.defaultValue ) { _$.val(''); } }; function _resetDefaultValue() { var _$ = $(this); if ( _$.val() == '' ) { _$.val(this.defaultValue); } }; return this.click(_clearDefaultValue).focus(_clearDefaultValue).blur(_resetDefaultValue); } On Jul 26, 5:08 am, Klaus Hartl [EMAIL PROTECTED] wrote: Leandro Vieira Pinho wrote: Hu, I don´t think it´s a good suggestion. Imagine: I use the filter to avoid submit/reset/button buttons, for example, so if I did it: $('input').resetDefaultValue().height(30); All the input elements affected by plugin will have 30 pixels of height. If I use the .end() function, the submit/reset/buttons will have 30 pixels of height too, so, but these kind of input elements isn ´s affected by plugin. Do you agree? No. I would expect every matched element to get the height. For someone, who is simply using your plugin and does not know how it works it would be totally inobvious why some elements are missing and he would simply assume it's a bug somewhere in jQuery. It's just not transparent what is going on to anyone else than you or one who studied the plugin code carefully (which you cannot expect as a plugin author). If I write $('input').height(30); or $('input').resetDefaultValue().height(30); or $('input').height(30).resetDefaultValue(); I do expect all matched inputs having the height of 30! Otherwies you'd need to call the plugin resetDefaultValueWithFilter or something. It should be up to the user to do the filtering in the selector anyway - the intention what the code should do is much more obvious to others reading the code. The filter in the plugin should simply serve as a little safety mechanism if at all required. The example you've given should be written as this anyway: $('[EMAIL PROTECTED]text]').resetDefaultValue().height(30); --Klaus
[jQuery] Re: Java Errors when using .Accordion and .innerfade - Please help :)
Thanks for the advice! i have tried reversing the order but no luck. the error happens when there is no accordian items on the page. The javascript call is in the template and on every page. Other wise i would have to make a seperate template or modify each page that only has the acordion on it. I thought you could have the call but if no HTML it would just not do anything and only function if there was an accordion element on the page or html element using that. The innerfade works fine even on pages that do not have a call to it. It is just the accordion that seems to want ot allways have an element on the page. Is there a way to have it work if there is an element but if no element on the page dont throw an error? This way i can have the calls in the template and i do not have to modify a bunch of pages to add the acordion call. Right now all the calls are in a common.js file and in the template. Thanks for all the advice and help! On Jul 26, 1:58 am, Stephan Beal [EMAIL PROTECTED] wrote: On Jul 25, 5:03 pm, Aaron [EMAIL PROTECTED] wrote: jQuery(:first-child, this)[0] has no properties ... [Break on this error] header: jQuery(':first-child', this) [0].tagName // take first childs tagName ... As i understand it (possibly incorrectly), the problem is that :first- child is returning no elements, which means that there are no elements to select. That suggests that the HTML is not structured how the Accordion wants it to be structured.
[jQuery] Re: Get a range of elements (getting late, and losing my mind)
This is great... I am glad it worked, and more importantly thank you for sharing the modified version as well. -GTG On 7/26/07, agent2026 [EMAIL PROTECTED] wrote: Added first/last jumps. Tried to figure out a way to have the same amount of page numbers displayed at all times, but that was getting complicated quickly. Anyway, here it is. For some reason if I set the step to 1 or 2, I end up with an empty page on the end. Hope someone can have a look and take this further. // John Resig's Pager - http://jquery.com/api/js/pager.js // // modified July 2007 - Adam Davis (agent2026) // $.fn.pager = function(step,spread) { var types = { UL: li, OL: li, DL: dt, TABLE: tr }; return this.each(function(){ var type = types[this.nodeName]; var pagedUI = type == tr ? $(tbody,this) : $(this); var rows = $(type, pagedUI); var curPage = 0; var names = [], num = []; if ( !step || step.constructor != Function ) { step = step || 10; if (rows.length step) for ( var i = 0; i = rows.length; i += step ) { names.push( names.length + 1 ); num.push( [ i, step ] ); } } else { var last; rows.each(function(){ var l = step( this ); if ( l != last ) { names.push( l ); var pre = num.length ? num[ num.length - 1 ][0] + num[ num.length - 1 ][1] : 0; num.push( [ pre, 0 ] ); last = l; } num[ num.length - 1 ][1]++; }); } if ( names.length 1 ) { var pager = $(this).prev(ul.nav-page).empty(); if ( !pager.length ) pager = $(ul class='nav-page'/ul); for ( var i = 0; i names.length; i++ ) $(a href=''/a).attr({ rel: i, innerHTML: names[i] }).click(function() { return handleCrop( this.rel ); }).wrap(li/li).parent().appendTo(pager); pager.insertBefore( this ); var prev = $(a href=''laquo; Prev/a).click(function(){ return handleCrop( --curPage ); }).wrap(li class='prev, noTrim'/ li).parent().prependTo(pager); var next = $(a href=''Next raquo;/a).click(function(){ return handleCrop( ++curPage ); }).wrap(li class='next, noTrim'/ li).parent().appendTo(pager); // add first/last jumps - agent2026 // var fJump = $(a href=''lsaquo; First/a).click(function(){ return handleCrop( 0 ); }).wrap(li class='first, noTrim'/ li).parent().prependTo(pager); var lJump = $(a href=''Last rsaquo;/a).click(function(){ return handleCrop( names.length-1 ); }).wrap(li class='last, noTrim'/ li).parent().appendTo(pager); // end first/last // handleCrop( 0 ); } function handleCrop( page ) { curPage = page - 0; var s = num[ curPage ][0]; var e = num[ curPage ][1]; if ( !curPage ) prev.hide(); else prev.show(); if ( curPage == names.length - 1 ) next.hide(); else next.show(); // show first/last only when needed - agent2026 // if ( curPage 3 ) fJump.hide(); else fJump.show(); if ( curPage names.length - 4 ) lJump.hide(); else lJump.show(); // end show // $(li,pager) .removeClass(cur) .eq( curPage + 2 ) // increase +1 to +2 to account for new li class=first - agent2026 // .addClass(cur); pagedUI.empty().append( jQuery.makeArray( rows ).slice( s, s + e ) ); pageTrim(); return false; } // trim pages when page count is high using spread - agent2026 // function pageTrim(){ $(li:not(.noTrim),pager).show(); $(li:not(.noTrim),pager).lt(curPage-spread-1).hide(); $(li:not(.noTrim),pager).gt(curPage+spread+1).hide(); } }); };
[jQuery] Field Plug-in Update - TabIndex Navigation...
Everyone, I've updated my Field Plug-in with some new methods to make it easy to go to specific fields within the tabIndex of the form. I'm looking for people to test the new functionality before updating my Plug-in in the repository. http://www.pengoworks.com/workshop/jquery/field.plugin.htm Please check out the Field Navigation Methods under the Interactive Examples section. The autoAdvance() method may be the one that developers find the most useful. However, from time-to-time I've needed to programmatically move to a specific field and the move methods should be useful. Here's an overview of the new methods: $(#formName).autoAdvance();* The autoAdvance() will search through the matching elements in the selector for any text-based input fields. It will then apply an onkeyup event that will take the user to the next field in the tabIndex (within the context of the form) when the maxlength value of the field has been reached. $([EMAIL PROTECTED]'users']).moveNext();* This would move the focus to the next field in the tabIndex array from the users field. If the next tabItem is outside of the form's context, the first element in the form will be selected. $([EMAIL PROTECTED]'users']).movePrev();* This would move the focus to the previous field in the tabIndex array from the users field. If the previous tabItem is outside of the form's context, the last element in the form will be selected. $([EMAIL PROTECTED]'users']).moveIndex(3);* This would move the focus to the third element in the tabIndex array. If the value 3 is outside the tabIndex array for the current form, then the last field would be selected. $([EMAIL PROTECTED]'users']).getTabIndex();* This returns the tabIndex for the current field as it relates to the parent form object. * The tabIndex navigation methods attempt to follow the spec for tabbing through elements. This means that elements that have a specified tabIndex take priority over elements that do not specify an index. Disabled items are skipped altogether. -Dan
[jQuery] Re: Opacity in fadeTo, etc does not work in IE, am I crazy?
Hmm, I'm not sure since I removed the header from the js file. I downloaded jQuery shortly after it got dugg for 1.1.3.1. I will download it again just in case there was a patch I missed. On Jul 25, 5:00 pm, Brandon Aaron [EMAIL PROTECTED] wrote: Are you using jQuery 1.1.3.1? -- Brandon Aaron On 7/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I've posted about this before but no one has replied. Is anyone having issues in IE 6/7 with opacity? It doesn't seem to be using the filter: to toggle opacity for me... I find it bizarre that jQuery would not have covered this. Maybe it has something to do with running IE through parallels? Thanks!
[jQuery] Re: vs '
Stephan Beal wrote: On Jul 26, 6:37 pm, Mitchell Waite [EMAIL PROTECTED] wrote: This going will make me sound really dumb but what is the difference between using single quote versus double quotes in jQuery, e.g. Mitchel, PLEASE don't hijack other people's threads to post a question. Start a new thread! Thread hijacking is one of the most annoying things a forum-goer can do! I second that plea! Please be aware that mail clients like Thunderbird do not thread messages by subject but by some mail headers. Thus hitting reply and changing the subject *does not* create a new thread. Not only do you add unrelated messages to a thread I'm following like for example Whats wrong with the tabs plugin and keep me constantly busy because me thinking there's something new I need to reply to and then again realizing that it's just a reply to the hijacked thread. You also decrease your chance to get an answer if your new topic is buried away in another thread say 30% of the people here are not interested in (I just can't follow every single thread here). I know less friendly communities where you get filtered away pretty fast if you do hijack threads even once by the way. Thanks! --Klaus
[jQuery] Re: A perhaps SOT CSS/jQuery question
Yeah, it kinda sucks, but I've got some work to do for another client that ought to last me maybe a week or so. But that other client was my bread 'n butter. :o( Anyway, thanks again! Chris On 7/26/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Ah.. been there before. On 7/26/07, Christopher Jordan [EMAIL PROTECTED] wrote: Thanks Benjamin. I'll see if that helps. Unfortunately, that client just up and decided out of the blue to stop work on all projects for about a months time, so who knows when (if) I'll get back to it. :o( Chris On 7/26/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Chris, with out actually seeing in action, my assumption is that you have the height set to 413px and do not specify a overflow to either hidden, auto or scroll and the assumption is that as some point the box is being forced taller and not resizing after there is smaller inner content. I would suggest taking out the paddings and adding them back in till you see the issue. Sadly, IE has known box issues so, you will need to adjust your math, height + paddingTop + paddingBottom, to suit. Hope this points you in the right direction. On 7/26/07, Christopher Jordan [EMAIL PROTECTED] wrote: Hi folks, I'm having trouble with a bit of jQuery/CSS stuff, and I'm hoping someone here could explain what the heck I'm doing wrong. I am not by any stretch a CSS guy. I do what I can to get by. Also (and I know this sticks in lots of people's craw), this only *has to* work in IE. This is an internal app for a company who does not use FF or any other browser. I've got the following in my main index file: script src=/Include/JS/jquery.js/script script $(function(){ $(.ActionSelection).bind(mouseover,function(){ $(this).addClass(Underlined); $(this).addClass(ActiveLinkColor); }).bind(mouseout,function(){ $(this).removeClass(Underlined); $(this).removeClass(ActiveLinkColor); }).bind(click,function(){ DisplayScreen($(this).attr(method)); }); }); ... /script then... body div class=MainWrapper !--- This creates the border and colors that we're used to on our submodals --- div class=LeftPanel div class=ActionHeaderAdd New/div div class=ActionSelection method=displayAddCancelCodeCancel Code/div div class=ActionSelection method=displayAddCancelReasonCancellation Reason/div br div class=ActionHeaderEdit/Delete/div div class=ActionSelection method=displayEditCancelCodeCancel Code/div div class=ActionSelection method=displayEditCancelReasonCancellation Reason/div /div div class=RightPanel div class=StatusBar/div div class=RightPanelContent/div /div /div /body The relevant CSS is: (don't mind the #someVar# it's a ColdFusion thing. Those are evaluated to actual colors before they hit the browser) div.MainWrapper{ height: 413px; width: 100%; margin: 2px 0px 0px 0px; padding: 3px; border: 3px solid #ThisMasterConsoleTableBorderColor#; background-color: #ThisMasterConsoleTableBackgroundColor#; } div.LeftPanel{ float : left; border-right : 1px solid #ThisMasterConsoleTableBorderColor#; width : 150px; height : 400px; } div.RightPanel{ float: right; border: 1px dashed ##A0A0A0; width: 400px; height: 400px; } div.StatusBar{ color: ##A0A0A0; font-weight: bold; width: 100%; height: 15px; border-bottom: 1px dashed ##A0A0A0; text-align: right; } /* Generic Classes */ .ActionHeader{ font-weight: bold; color: #ThisMasterConsoleHeaderTextColor#; background-color: #ThisMasterConsoleHeaderBackgroundColor#; padding: 3px; margin-right: 3px; cursor: default; } .ActionSelection{ padding-left: 5px; cursor: pointer; } .Underlined{ text-decoration: underline; } .ActiveLinkColor{ color: green; } Okay, so I've got a nice box with a three pixel border around it and it sits in a
[jQuery] Data, get response.
Is there a way to pull a div out of a get response? ive tried all sorts of uses behind the find, even the (expr,contenxt) method and im just getting stuck at every corner. This is what im currently doing but I have to append to the dom HTML data all the time, after one click event, my hide and show no longer work. So im trying to see if i can just pull the div out, w/o having to append to the dom. $(document).ready(function(){ $('body').append('div id=hiddenDiv style=display: none;/ div'); $(a2).unbind(click).click( function(){ var destination = $(this).attr(href); $('#bodyframe').hide(1600,function() { $.getIfModified(destination, function(data){ //alert($(data)); $('#hiddenDiv').append(data); content = $('#bodyframe').html(); //alert(content); //$('#hiddenDiv').remove(); $ ('html').children('body').children('center').children('#frame').children('#content').children('#bodyframe').html(content).show(); }); }); return false; }); });
[jQuery] Re: Data, get response.
I may not be clear about what you're trying to do here but... Is the the data valid xhtml when it is returned? So this $(data).find(DIV) did not work? What about $(SPAN/SPAN).append(data).find(DIV) ? George On Jul 26, 8:17 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is there a way to pull a div out of a get response?
[jQuery] Re: SITE SUBMISSION: Please add gsalr.com to the list of sites
Nicely done Marshall. How are you able to mashup the Craigslist data? I have been looking into that. Any advise? _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Marshall Salinger Sent: Thursday, July 26, 2007 1:09 PM To: jquery-en@googlegroups.com Subject: [jQuery] SITE SUBMISSION: Please add gsalr.com to the list of sites Hello Rey, I was wondering if you could add gsalr.com to the list of sites that use jQuery. The site is a mashup of Google Maps / Craigslist and a few other sites that list garage sales on the web. The site provides a map view of garage sales in various cities across the United States. The site also provides a feature called the Trip Planner and allows you to save sales to a list and then retireve printable directions from one sale to the next. The site is still very much in beta and critiques are welcomed. Various plugins are being used on the site. They include: - jQuery Interface - dimensions - tablesorter 1.0 Thanks again to the jQuery team for such an amazing tool and to everyone that contributes their plugins. -Marshall
[jQuery] ANNOUNCE: jQuery moreSelectors plugin adds :color() :colIndex() :hover and more
The jQuery moreSelectors plugin has been updated for jQuery v1.1.3.1. For example: DIV:color(red) to match DIVs with red text. Automagically matches #rrggbb and rgb(r,g,b) formats too. TD:colIndex(1) to match table cells in column 1 (allowing for colSpans too). SELECT:modified to match SELECTs that have been changed. *:blur to match form element that last had the focus. - jQuery Plugin page: http://jquery.com/plugins/project/moreSelectors - Download: http://www.softwareunity.com/sandbox/JQueryMoreSelectors/ - Demo: http://www.softwareunity.com/sandbox/JQueryMoreSelectors/#DemoArea Hope you find something useful in there! (Also includes several undocumented selectors and extensions) George PS: Apologies to those Nabble and Mailing List members who may have seen this post twice!
[jQuery] Re: Form Client and server side validaion probleme
Bump! No one can help me ?? On 25 juil, 22:46, Samad [EMAIL PROTECTED] wrote: Hello, I'm trying to fix a validation form probleme but I don't have any idea. This is the probleme : I have a forum with inputs, for the validation, I have some client side controls and server ones with an ajax call. this is the code : -- $(#Register).submit(function() { $(.ErrorDiv).hide(); $(.SuccessDiv).hide(); var msg_error = 0; var valid_email = /^\w+([\.-]?\w+)[EMAIL PROTECTED]([\.-]?\w+)*(\.\w{2,3}) +$/; var valid_text = /^\w+$/; var username = $(#Username).val(); var email = $(#Email).val(); var pwd = $(#Password).val(); var pwd_conf = $(#PasswordConf).val(); if ( !username.match(valid_text) || username == ) { msg_error = 1; $(#Username_Error).show(); } else { $.ajax({ type: POST, url: inc/user_reg.hand.php, data: action=check_usernameusername=+username, dataType: html, success: function(msg){ if (msg == KO) { msg_error = 1; $(#UsernameUsed_Error).show(); } } }); } if ( !email.match(valid_email) || email == ) { msg_error = 1; $(#Email_Error).show(); } else { $.ajax({ type: POST, url: inc/user_reg.hand.php, data: action=check_emailemail=+email, dataType: html, success: function(msgmail){ if (msgmail == KO) { msg_error = 1; $(#EmailUsed_Error).show(); } } }); } if ( !pwd.match(valid_text) || pwd == ) { msg_error = 1; $(#Password_Error).show(); } if ( pwd != pwd_conf ) { msg_error = 1; $(#PasswordConf_Error).show(); } if( msg_error == 0 ) { $.ajax({ type: POST, url: inc/user_reg.hand.php, data: action=registerusername=+username +email=+email+password=+pwd, dataType: html, beforeSend: function(msgregister){ }, success: function(msgregister){ $(#Register_Success).show(); bindStyle(); } }); } return false; // cancel conventional submit }); -- The thing is : when I try the ajax call the first time with the 'Username' and after a 'KO' response, the variable msg_error is still on '0' and not '1' even if the msg received after the call is 'KO' and the #UsernameUsed_Error is showed. Can anyone help ?? :)
[jQuery] Re: Are there any particular ways to debug jQuery code?
I do have it and I have run it but I don't see where it can tell me what I am doing wrong. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Priest, James (NIH/NIEHS) [C] Sent: Thursday, July 26, 2007 10:49 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? -Original Message- From: Mitchell Waite [mailto:[EMAIL PROTECTED] $(#nest).click(function() { alert(got it); $(#nest).fade(slow); I still haven't picked up my jQuery book again - this weekend! But couldn't your write this like: alert(got it).fade(slow); Does the fade work if you remove the alert? I just don't know how to systematically track this down. Do you have the Firebug plugin for Firefox? http://www.getfirebug.com/ Jim
[jQuery] Re: Data, get response.
$(data).find(DIV) Did not work for me I did uhmm $(data).find('#bodyframe'); I didn try the span function, im not sure what you mean by it, could you explain more what it would do? On Jul 26, 2:31 pm, George [EMAIL PROTECTED] wrote: I may not be clear about what you're trying to do here but... Is the the data valid xhtml when it is returned? So this $(data).find(DIV) did not work? What about $(SPAN/SPAN).append(data).find(DIV) ? George On Jul 26, 8:17 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is there a way to pull a div out of a get response?
[jQuery] 1.1.3.1 breaks jqModal in IE6
I if download and host the jqModal public example (and associated resources) on a local webserver and simply change the jQuery to 1.1.3.1, jqModal stops working in IE6. The overlay is pushed to a thin box at the bottom of the page and any modal like behavior is lost. My workaround is to roll back jQuery to 1.1.2 for now, though I was appreciating the performance increases in the latest release. I don't have the IE specific skills / tools to offer any insight into what might be happening. If anyone can corroborate this issue or if anyone has any suggestions or a fix for this I would welcome the advice. I have search the archives for this group. This is not the same as the issue logged regarding opacity that was fixed with the 1.1.3 1.1.3.1 jQuery release. Thank-you. Mark Miller, Calgary, Alberta
[jQuery] Re: ANNOUNCE: jTagEditor 1.0 beta
This plugin rocks... I always wanted a simple tag editor like this, but, i also wanted a preview mode... I understand that this is in beta... So, is there any plans for preview mode going forward... -GTG On 7/26/07, Karl Swedberg [EMAIL PROTECTED] wrote: I love it! This was on my to-do list for upcoming projects that I wanted to tackle, but now I can cross it off. Thanks, Jay! --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 26, 2007, at 8:28 AM, Jay Salvat wrote: My apologies ! too much emotion... ;) Here is the url: http://www.jaysalvat.com/jquery/jtageditor/ Thanks ! Bruce Wang a écrit : On 7/26/07, Jay Salvat [EMAIL PROTECTED] wrote: Hi all, I'm pleased to announce the birth of jTagEditor 1.0 beta. It's a small and customizable tag editor wich allows you to turn any textarea in a quick tag editor of any kind (html, wiki, bbcode, textile or any type of tag you want). any url? -- simple is good http://brucewang.net http://twitter.com/number5 skype: number5
[jQuery] Re: ANNOUNCE: jTagEditor 1.0 beta
Looks great Jay! Keep up the hard work. ~Sean
[jQuery] Re: jqModal help: multiple triggers, different ajax url's
David, You can do something like: a href=this.htm class=typeAthis/a $('a.typeA').click(function(){ $('#modal').jqm({ajax: this.href, trigger: '.typeA', modal: 'true', target:'target'}).jqmShow(); return false; }); On 7/26/07, David Mernin [EMAIL PROTECTED] wrote: I am stuck with the same problem... Hope someone can help! =) On Jul 11, 3:26 pm, rolfsf [EMAIL PROTECTED] wrote: I have a page on which I've hidden a div for use as an adaptable modal window: div id=modal class=jqmWindow div class=modalTop div class=jqmClose ../images/btn/btn_close.gif /div /div div class=target/div /div I have 2 different types of triggers, for which I want to load 2 different urls into thejqModal'target'... let's call them: .typeA this.htm .typeB that.htm I can get either of these to work, but not both at the same time: $('#modal').jqm({ajax: 'this.htm', trigger: '.typeA', modal: 'true', target: '.target'}); $('#modal').jqm({ajax: 'that.htm', trigger: '.typeB', modal: 'true', target: '.target'}); What's the correct construction to get the both working on the same page? -- View this message in context: http://www.nabble.com/jqModal-help%3A-multiple-triggers%2C-different-... Sent from the JQuery mailing list archive at Nabble.com. -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: [Off-Topic] CSS Combine Images
Link: http://dev.portalzine.de/index?/pzImageCombine--print http://dev.portalzine.de/index?/pzImageCombine--print Sorry Alexander _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Graef Sent: Friday, July 27, 2007 12:22 AM To: jquery-en@googlegroups.com Subject: [jQuery] [Off-Topic] CSS Combine Images Normally for each image on a webpage a separate request to the webserver is required, each taking as much as a hundred millisecond. Does not sound much, but can add up fast. There is an easy way to overcome this by combining images into one single image and address the single images using CSS. CSS for 1st image in row: background-image : url(combined.png); background-position : 0px -16px; CSS for 2nd image in row: background-image : url(combined.png); background-position : 0px -32px; I have been using this technique for some time now and always searched for a tool that would help me combine those images easily, but never succeeded. That is why I decided to build my own :) This small tool allows you to choose an image directory and combine all png images into one single image. Its still in its alpha stage and far from feature complete ;) Current restrictions: - Only png images are allowed. - Only one row. - All source images must have the same size. Planned features: - Linux version - Multiple rows - Multiple source sizes - Multiple input formats - Image selection and sort options - Drag drop grid to place images I am sure some of you might see some use for this. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de __ NOD32 2424 (20070726) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
[jQuery] [Off-Topic] CSS Combine Images
Normally for each image on a webpage a separate request to the webserver is required, each taking as much as a hundred millisecond. Does not sound much, but can add up fast. There is an easy way to overcome this by combining images into one single image and address the single images using CSS. CSS for 1st image in row: background-image : url(combined.png); background-position : 0px -16px; CSS for 2nd image in row: background-image : url(combined.png); background-position : 0px -32px; I have been using this technique for some time now and always searched for a tool that would help me combine those images easily, but never succeeded. That is why I decided to build my own :) This small tool allows you to choose an image directory and combine all png images into one single image. Its still in its alpha stage and far from feature complete ;) Current restrictions: - Only png images are allowed. - Only one row. - All source images must have the same size. Planned features: - Linux version - Multiple rows - Multiple source sizes - Multiple input formats - Image selection and sort options - Drag drop grid to place images I am sure some of you might see some use for this. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de
[jQuery] Re: Are there any particular ways to debug jQuery code?
Mitchell, I don't know of any Firebug tutorials offhand, I would just Google it and see what turns up. -- Josh - Original Message - From: Mitchell Waite [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, July 26, 2007 2:11 PM Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? THANK YOU that is super amazing. That simple icon I never even noticed. I love the way it shows you exactly where you messed up. I know the answer to this but I got to ask - are there any firebug tutorials around? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh Nathanson Sent: Thursday, July 26, 2007 1:30 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? Mitchell - if an error occurs in a script, you will see a red x in the lower right corner of the web browser. Click that to open the Firebug console. In the console tab you'll see the error. Instead of throwing an alert like IE6 does, it logs errors into the console. If your script is clean (no errors), you'll see a green check in the lower right corner. Firebug is an amazing program - once you get used to it, it will be indispensable for you. Showing errors is just one of the many helpful things it can do. It can also show you every script and image that makes up the currently viewed page, and how long they took to download (the Net tab). -- Josh - Original Message - From: Mitchell Waite [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, July 26, 2007 1:13 PM Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? I do have it and I have run it but I don't see where it can tell me what I am doing wrong. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Priest, James (NIH/NIEHS) [C] Sent: Thursday, July 26, 2007 10:49 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? -Original Message- From: Mitchell Waite [mailto:[EMAIL PROTECTED] $(#nest).click(function() { alert(got it); $(#nest).fade(slow); I still haven't picked up my jQuery book again - this weekend! But couldn't your write this like: alert(got it).fade(slow); Does the fade work if you remove the alert? I just don't know how to systematically track this down. Do you have the Firebug plugin for Firefox? http://www.getfirebug.com/ Jim
[jQuery] Re: jCarouselLite version 0.4.0
Thanks GianCarlo for the compliment. -GTG On 7/26/07, GianCarlo Mingati [EMAIL PROTECTED] wrote: that kicks ass. the mouse wheel implementation is a great idea! ;-) GC On Jul 26, 12:28 am, Ganeshji Marwaha [EMAIL PROTECTED] wrote: Hi list, I have updated the jCarouselLite plugin to its next revision - 0.4.0 . The project page is athttp://www.gmarwaha.com/jquery/jcarousellite/index.php
[jQuery] Re: [Off-Topic] CSS Combine Images
I think this is a cool idea, but what is needed is an example so we can see how valuable it is. A nice example would show the slow way vs your sliced way and see how they compare. From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Graef Sent: Thursday, July 26, 2007 3:22 PM To: jquery-en@googlegroups.com Subject: [jQuery] [Off-Topic] CSS Combine Images Normally for each image on a webpage a separate request to the webserver is required, each taking as much as a hundred millisecond. Does not sound much, but can add up fast. There is an easy way to overcome this by combining images into one single image and address the single images using CSS. CSS for 1st image in row: background-image : url(combined.png); background-position : 0px -16px; CSS for 2nd image in row: background-image : url(combined.png); background-position : 0px -32px; I have been using this technique for some time now and always searched for a tool that would help me combine those images easily, but never succeeded. That is why I decided to build my own :) This small tool allows you to choose an image directory and combine all png images into one single image. Its still in its alpha stage and far from feature complete ;) Current restrictions: - Only png images are allowed. - Only one row. - All source images must have the same size. Planned features: - Linux version - Multiple rows - Multiple source sizes - Multiple input formats - Image selection and sort options - Drag drop grid to place images I am sure some of you might see some use for this. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de
[jQuery] Re: IE and the Invalid Source Code Error
I don't anything in your code that may cause issue. I would suggest that you take out some of the effects and then test it with just the .html()s and see if the issue persists. But now that I think about it, you should probably change them to .text() since you are only putting text in. You will need to baby-step it thru the code; take everything out and start putting back in till it breaks. Is there a way to post a test page? On 7/26/07, mcraig [EMAIL PROTECTED] wrote: Thanks...I do believe it is an innerHTML/non-block related issue...but don't know how to work around it as (again) (a) new to jQuery and (b) never heard of this kind of error before. Also (and I'm hoping this is not the show stopper) I am testing in IE 7. Here is all the code and the only jQuery code I am using (sorry about the formatting...it makes it easier for me to see the bugs when i try to line up certain elements of code. script $(document).ready(function() { $(#navholder div).hide(); $(#navbar a).corner(4px;); $(#switchcontent).hide(); $(#logincontent).hide(); $(#switchkey p).corner(bottom 6px;); $(#loginkey p).corner(bottom 6px;); $(#switchkey p).click(function() { $(#switchcontent).animate({height: 'toggle', opacity: 'toggle'}, 500, function() { if ($(#switchcontent).is(':visible')) { $(#switchkey p).html('Close Site Panel'); $(#switchkey p).corner(bottom 6px;); } else { $(#switchkey p).html('Site Panel'); $(#switchkey p).corner(bottom 6px;); }; } ); } ); $(#loginkey p).click(function() { $(#logincontent).animate({height: 'toggle', opacity: 'toggle'}, 500, function() { if ($(#logincontent).is(':visible')) { $(#loginkey p).html('Close Login'); $(#loginkey p).corner(bottom 6px;); } else { $(#loginkey p).html('Login'); $(#loginkey p).corner(bottom 6px;); }; } ); } ); $('#navbar a').click(function() { $('#navholder [EMAIL PROTECTED]' + this.name + ']').slideToggle().siblings('div:visible').slideUp('fast'); }); }); /script On Jul 26, 1:49 pm, Benjamin Sterling [EMAIL PROTECTED] wrote: Mike, Great story, it brought a tear to my eye :) Do you have a demo page for us to look at? Some code? Sounds like a innerHTML/non-block level element issue, but not sure off hand. On 7/26/07, mcraig [EMAIL PROTECTED] wrote: Ok...so I just got this mock up working great in firefox and realized that after all that work (new to JQuery), I had never tested it in IE. But, figuring it was cross browser and I was going to test on the latest IE that this would not prove problematic. And of course, nothing I was doing was that tricky really (ok, once I learned how best to do it)...a couple divs a-toggling, a little inner html being updatednothing really fancy as far as code goes. So a-lauching I go in IE...nothing looks particular wrong but nothing happens when I start clicking on trigger-happy links and there is a glaring nasty exclamation point in my lower left !!! It says invalid source html for this operation and proceeds to point me to what seems to be a blank line of code in my final source. Hello? What the heck does that mean? I cannot have spent this time learning jQuery and doing some really fabulous code to make
[jQuery] Re: datePicker plugin inline
Thanks Rob. It looks promising. I'll give it a shot tomorrow at work. I'm not set on it being jQuery, just on it being not as buggy as the YUI thing is. :-/ On Thursday 26 July 2007, Rob Desbois wrote: Larry, Try the dynarch calendar at http://www.dynarch.com/projects/calendar/ It's not jQuery but does the job and can most likely be ported to jQuery if desired. --rob On 7/26/07, Larry Garfield [EMAIL PROTECTED] wrote: Thanks, Kelvin. (And sorry about misspelling your name. g) I was afraid you were going to say that. Unfortunately my timeframe allowed for this project is measured in hours, not weeks, so I doubt I'd even have time to try and figure out how to do it myself. Is there a method that you think would work that you haven't tested yet, or is it just a non-available feature? Is there some alternate plugin you can recommend? Or some possible alternate interface that's similar that could be accomplished with datePicker? Thanks. --Larry Garfield On Thu, 26 Jul 2007 14:12:14 +0100, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid that it is currently exactly as you describe. A date picker calendar (with the paging etc) only exists as a popup and if you use renderCalendar then you don't get paging or anything. The ability to use a date picker not in a popup is one of the two additions I wanted to make before I stop calling the date picker v2 beta. Unfortunately I'm really busy at work at the moment and realistically it will probably be a couple of weeks before I get a chance to work on the date picker again. If you want to try and figure it out yourself then feel free and report back on your progress, otherwise if you can wait I'll try and get it done then, Cheers, Kelvin :) Larry Garfield wrote: Hello, jQuery. My apologies if this is a dupe; the first copy didn't seem to go through. I'm working with Kevin Luck's datePicker plugin, v2[1], because it seemed the least unsuited for what I was trying to do and I'm already using it elsewhere. What I'm trying to do is have an inline calendar grid rather than a popup, and have that inline grid offer paging and multi-select abilities. Then on submit, grab all of the selected dates and serialize them to a hidden field and submit. I'm replacing a YUI widget that did that, but did so only on certain systems when it was in certain moods, making it far too unreliable. According to the docs, I can get paging and multi-select in a popup easily[2]. I can also render an inline calendar instead[3]. What I have found no documentation on and have been unable to do myself is get both to happen at the same time. If I render my own calendar, it gets no paging, no select ability at all; it's really just a static read-only display. I've looked at the plugin's source, but haven't been able to find any indication of what I'd need to copy out or reference directly in order to get the picker parts of datePicker. Any tips on how to have my picker and see it, too, would be most appreciated. Samples of working code would be even better. : :-) Thanks. : [1] http://kelvinluck.com/assets/jquery/datePicker/v2/demo [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple .html [3] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.htm l -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson
[jQuery] Re: datePicker plugin inline
I looked at that yesterday. Unfortunately it's CC licensed non-commercial, and this is for a commercial project. (Custom app for a client.) On Thursday 26 July 2007, bbuchs wrote: Give this a shot: http://tedserbinski.com/jcalendar/index.html Inline calendar that ties to 3 select elements (m/d/y), with paging. On Jul 26, 10:45 am, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid I haven't got any alternative suggestions... If you only need one calendar on the page and don't need a popup one as well you could implement a temporary dodgy hack... You could look for the calls to close the calendar and just comment them out... It's not pretty but could get you out of a fix, Cheers, Kelvin :) Larry Garfield wrote: Thanks, Kelvin. (And sorry about misspelling your name. g) I was afraid you were going to say that. Unfortunately my timeframe allowed for this project is measured in hours, not weeks, so I doubt I'd even have time to try and figure out how to do it myself. Is there a method that you think would work that you haven't tested yet, or is it just a non-available feature? Is there some alternate plugin you can recommend? Or some possible alternate interface that's similar that could be accomplished with datePicker? Thanks. --Larry Garfield On Thu, 26 Jul 2007 14:12:14 +0100, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid that it is currently exactly as you describe. A date picker calendar (with the paging etc) only exists as a popup and if you use renderCalendar then you don't get paging or anything. The ability to use a date picker not in a popup is one of the two additions I wanted to make before I stop calling the date picker v2 beta. Unfortunately I'm really busy at work at the moment and realistically it will probably be a couple of weeks before I get a chance to work on the date picker again. If you want to try and figure it out yourself then feel free and report back on your progress, otherwise if you can wait I'll try and get it done then, Cheers, Kelvin :) Larry Garfield wrote: Hello, jQuery. My apologies if this is a dupe; the first copy didn't seem to go through. I'm working with Kevin Luck's datePicker plugin, v2[1], because it seemed the least unsuited for what I was trying to do and I'm already using it elsewhere. What I'm trying to do is have an inline calendar grid rather than a popup, and have that inline grid offer paging and multi-select abilities. Then on submit, grab all of the selected dates and serialize them to a hidden field and submit. I'm replacing a YUI widget that did that, but did so only on certain systems when it was in certain moods, making it far too unreliable. According to the docs, I can get paging and multi-select in a popup easily[2]. I can also render an inline calendar instead[3]. What I have found no documentation on and have been unable to do myself is get both to happen at the same time. If I render my own calendar, it gets no paging, no select ability at all; it's really just a static read-only display. I've looked at the plugin's source, but haven't been able to find any indication of what I'd need to copy out or reference directly in order to get the picker parts of datePicker. Any tips on how to have my picker and see it, too, would be most appreciated. Samples of working code would be even better. :-) Thanks. [1]http://kelvinluck.com/assets/jquery/datePicker/v2/demo [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMult.. . [3] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.. . -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson
[jQuery] Re: [Off-Topic] CSS Combine Images
This is a well-know technique. If I remember right, credits goes to http://wellstyled.com/css-nopreload-rollovers.html -Olivier Mitchell Waite wrote: I think this is a cool idea, but what is needed is an example so we can see how valuable it is. A nice example would show the slow way vs your sliced way and see how they compare. *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alexander Graef *Sent:* Thursday, July 26, 2007 3:22 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] [Off-Topic] CSS Combine Images Normally for each image on a webpage a separate request to the webserver is required, each taking as much as a hundred millisecond. Does not sound much, but can add up fast. There is an easy way to overcome this by combining images into one single image and address the single images using CSS. CSS for 1st image in row: background-image : url(combined.png); background-position : 0px -16px; CSS for 2nd image in row: background-image : url(combined.png); background-position : 0px -32px; I have been using this technique for some time now and always searched for a tool that would help me combine those images easily, but never succeeded. That is why I decided to build my own :) This small tool allows you to choose an image directory and combine all png images into one single image. Its still in its alpha stage and far from feature complete ;) Current restrictions: - Only png images are allowed. - Only one row. - All source images must have the same size. Planned features: - Linux version - Multiple rows - Multiple source sizes - Multiple input formats - Image selection and sort options - Drag drop grid to place images I am sure some of you might see some use for this. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de
[jQuery] Re: 1.1.3.1 breaks jqModal in IE6
Thanks David, Sourcing from: http://dev.iceburg.net/jquery/jqModal/ I am using jqModal $Version: 2007.02.25 +r9. IE6 works for me with jQuery1.1.2 but not jQuery1.1.3.1. I've tested the following in IE6.0.2900.2180.xpsp_sp2: jQuery 1.1.2 + r9 = PASS jQuery 1.1.2 + r10beta = PASS jQuery 1.1.3 + r9 = FAIL jQuery 1.1.3 + r10beta = FAIL jQuery 1.1.3.1 + r9 = FAIL jQuery 1.1.3.1 + r10beta = FAIL I figured that taking Brice's public page as a test was the best I could do to isolate myself from other variables in my project. So I was pretty convinced I was on the right track until your post. Now the mystery deepens... So I put the following together: http://www.markmiller.ca/jqmodal/ It's just a collection of bare bones test cases. If anyone cares to hit them with IE6, I'd appreciate the feedback regarding your experience. Everything is good for on in FF and IE7 - but IE6 is the primary target browser for my current project. I really appreciate your time in helping me get to the bottom of this one... Mark On Jul 26, 4:02 pm, David Duymelinck [EMAIL PROTECTED] wrote: Are you using the last revision of the plugin? I use jqModal for an IE6 intranet site and i had no bumps upgrading to jQuery 1.1.3 --David On Jul 26, 10:01 pm, mmiller [EMAIL PROTECTED] wrote: I if download and host the jqModal public example (and associated resources) on a local webserver and simply change the jQuery to 1.1.3.1, jqModal stops working in IE6. The overlay is pushed to a thin box at the bottom of the page and any modal like behavior is lost. My workaround is to roll back jQuery to 1.1.2 for now, though I was appreciating the performance increases in the latest release. I don't have the IE specific skills / tools to offer any insight into what might be happening. If anyone can corroborate this issue or if anyone has any suggestions or a fix for this I would welcome the advice. I have search the archives for this group. This is not the same as the issue logged regarding opacity that was fixed with the 1.1.3 1.1.3.1 jQuery release. Thank-you. Mark Miller, Calgary, Alberta
[jQuery] Re: SITE SUBMISSION: Please add gsalr.com to the list of sites
Thanks Rey! Rey Bango wrote: Hi Marshall, Great work! I'll be adding it today. Rey Marshall Salinger wrote: Hello Rey, I was wondering if you could add gsalr.com http://gsalr.com to the list of sites that use jQuery. The site is a mashup of Google Maps / Craigslist and a few other sites that list garage sales on the web. The site provides a map view of garage sales in various cities across the United States. The site also provides a feature called the Trip Planner and allows you to save sales to a list and then retireve printable directions from one sale to the next. The site is still very much in beta and critiques are welcomed. Various plugins are being used on the site. They include: - jQuery Interface - dimensions - tablesorter 1.0 Thanks again to the jQuery team for such an amazing tool and to everyone that contributes their plugins. -Marshall
[jQuery] Re: Are there any particular ways to debug jQuery code?
There is a video presentation in Yahoo, where Joe Hewitt (Firebug author) talks about Firebug 1.0 and some features. Here: http://video.yahoo.com/video/play?vid=111597 On 7/26/07, Josh Nathanson [EMAIL PROTECTED] wrote: Mitchell, I don't know of any Firebug tutorials offhand, I would just Google it and see what turns up. -- Josh - Original Message - From: Mitchell Waite [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, July 26, 2007 2:11 PM Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? THANK YOU that is super amazing. That simple icon I never even noticed. I love the way it shows you exactly where you messed up. I know the answer to this but I got to ask - are there any firebug tutorials around? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh Nathanson Sent: Thursday, July 26, 2007 1:30 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? Mitchell - if an error occurs in a script, you will see a red x in the lower right corner of the web browser. Click that to open the Firebug console. In the console tab you'll see the error. Instead of throwing an alert like IE6 does, it logs errors into the console. If your script is clean (no errors), you'll see a green check in the lower right corner. Firebug is an amazing program - once you get used to it, it will be indispensable for you. Showing errors is just one of the many helpful things it can do. It can also show you every script and image that makes up the currently viewed page, and how long they took to download (the Net tab). -- Josh - Original Message - From: Mitchell Waite [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, July 26, 2007 1:13 PM Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? I do have it and I have run it but I don't see where it can tell me what I am doing wrong. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Priest, James (NIH/NIEHS) [C] Sent: Thursday, July 26, 2007 10:49 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? -Original Message- From: Mitchell Waite [mailto:[EMAIL PROTECTED] $(#nest).click(function() { alert(got it); $(#nest).fade(slow); I still haven't picked up my jQuery book again - this weekend! But couldn't your write this like: alert(got it).fade(slow); Does the fade work if you remove the alert? I just don't know how to systematically track this down. Do you have the Firebug plugin for Firefox? http://www.getfirebug.com/ Jim
[jQuery] Re: [ANNOUNCE] jCarouselLite version 0.4.0
Think both Nicolas and Mike are looking for the same feature... I will see if that can be implemented without affecting the size of the plugin too much. You know, coz it is named Lite and all... I'm not sure it would be big. You just need to clone the first and put it in the end, and just after the slide effect to this last one, just return to 0. If successful, i will host another revision ( 0.5.0 maybe) for feedback before i upgrade the project to 1.0 status. Great! -Nicolas -- Nicolas Brush HOIZEY Clever Age : http://www.clever-age.com/ Gastero Prod : http://www.gasteroprod.com/ Photos : http://www.flickr.com/gp/[EMAIL PROTECTED]/M1c002
[jQuery] Boggles the mind - mousevoer and mouseout together
Imagine this When a user moves the mouse over a certain div (mouseover) on your page you want to do some things 1. fadeOut a graphic in that div to 50% 2. Make a button in that div appear (show) 3. Manipulate the button's 3 states (my wonderful 3 state button gizmo) 4. When the user clicks the mouse call function A and reverse the above, fadeIn the graphic back to 100%, hide the button. 5. If the user moves the mouse out of the div area (mouseout) then reverse the above, fadeIn the graphic back to 100%, hide the button. Sounds easy right? Well it's not. Why? Because of the way jQuery queues up the events, the a mouseover and a mouseout events interact in such a way that the whole process goes bananas, there is a great deal of flickering of the graphics when you move the mouse because it is sending mouseover messages. What I need to do is to have it act more like hover, which avoids these issues. Except for one problem. I am using a button over the graphic that uses hover also. So the two processes fight eachother. I need a way to say jQuery - I need you to do something a bit different. Respond to my mouseover as usual but then don't look at mouseover for a while. That way I could process the other events. Any ideas on how to do this. I thought perhaps using a call back would help but that seems to just let me control one thing finishing before another starts which is not my issue. Thanks Mitch
[jQuery] Re: 1.1.3.1 breaks jqModal in IE6
Are you using the last revision of the plugin? I use jqModal for an IE6 intranet site and i had no bumps upgrading to jQuery 1.1.3 --David On Jul 26, 10:01 pm, mmiller [EMAIL PROTECTED] wrote: I if download and host the jqModal public example (and associated resources) on a local webserver and simply change the jQuery to 1.1.3.1, jqModal stops working in IE6. The overlay is pushed to a thin box at the bottom of the page and any modal like behavior is lost. My workaround is to roll back jQuery to 1.1.2 for now, though I was appreciating the performance increases in the latest release. I don't have the IE specific skills / tools to offer any insight into what might be happening. If anyone can corroborate this issue or if anyone has any suggestions or a fix for this I would welcome the advice. I have search the archives for this group. This is not the same as the issue logged regarding opacity that was fixed with the 1.1.3 1.1.3.1 jQuery release. Thank-you. Mark Miller, Calgary, Alberta
[jQuery] Re: Ken Burns effects using jQuery?
How about this one: http://medienfreunde.com/lab/innerfade/ Nicolas Hoizey wrote: Hello, Has anyone already made a Ken Burns effects slideshow powered by jQuery? I've found this one very nice, but made with Mootools, and I would not like having all JS libraries on my website... ;-) http://www.electricprism.com/aeron/slideshow/ I don't need much, only a slideshow of photos moving and zooming in/ out randomly inside a div. Thanks! -Nicolas -- BrightLight Development, LLC. 954-323-2225 (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com
[jQuery] Ken Burns effects using jQuery?
Hello, Has anyone already made a Ken Burns effects slideshow powered by jQuery? I've found this one very nice, but made with Mootools, and I would not like having all JS libraries on my website... ;-) http://www.electricprism.com/aeron/slideshow/ I don't need much, only a slideshow of photos moving and zooming in/ out randomly inside a div. Thanks! -Nicolas -- Nicolas Brush HOIZEY Clever Age : http://www.clever-age.com/ Gastero Prod : http://www.gasteroprod.com/ Photos : http://www.flickr.com/gp/[EMAIL PROTECTED]/M1c002
[jQuery] Re: Java Errors when using .Accordion and .innerfade - Please help :)
ok si i tried different ways of the above code with the if( $j('#SpeakerDIV').length ) but i can not seem to figure out how to get it to work. On Jul 26, 2:05 pm, Aaron [EMAIL PROTECTED] wrote: Great! Thanks so much for the help! so is this correct for the call then? var $j = jQuery.noConflict(); $j(document).ready(function() { //Function for the Inner Fade News Ticker $j('.NewsLC').innerfade({ animationtype: 'fade', speed: 700, timeout: 9000, type: 'random', containerheight: '30.0em' }); }); if( $j('#SpeakerDIV').length ) { $j('#SpeakerDIV').Accordion({ showSpeed: 250, hideSpeed: 250, header: '.SpeakerTitle', active: false, alwaysOpen: false, animated: true }); }); Thank you s much for your help and patience!! On Jul 26, 11:15 am, Stephan Beal [EMAIL PROTECTED] wrote: On Jul 26, 4:48 pm, Aaron [EMAIL PROTECTED] wrote: Is there a way to have it work if there is an element but if no element on the page dont throw an error? a) hack the plugin source code or b) add a hidden accordion-compatible element to pages which don't normally have one (that would be an ugly kludge, though). Or check for the accordion with something like: if( $('#AccordionID').length ) { ... do accordion stuff ... }- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: SITE SUBMISSION: Please add gsalr.com to the list of sites
To phrase to question better, how were you able to parse the addresses if you're getting the data from craigslist directly? Or which web service are you using if you're using one? _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael E. Carluen Sent: Thursday, July 26, 2007 1:23 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: SITE SUBMISSION: Please add gsalr.com to the list of sites Nicely done Marshall. How are you able to mashup the Craigslist data? I have been looking into that. Any advise? _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Marshall Salinger Sent: Thursday, July 26, 2007 1:09 PM To: jquery-en@googlegroups.com Subject: [jQuery] SITE SUBMISSION: Please add gsalr.com to the list of sites Hello Rey, I was wondering if you could add gsalr.com to the list of sites that use jQuery. The site is a mashup of Google Maps / Craigslist and a few other sites that list garage sales on the web. The site provides a map view of garage sales in various cities across the United States. The site also provides a feature called the Trip Planner and allows you to save sales to a list and then retireve printable directions from one sale to the next. The site is still very much in beta and critiques are welcomed. Various plugins are being used on the site. They include: - jQuery Interface - dimensions - tablesorter 1.0 Thanks again to the jQuery team for such an amazing tool and to everyone that contributes their plugins. -Marshall
[jQuery] Re: Form Client and server side validaion probleme
Samad, AJAX calls are asynchronous and will run outside the context of the current function. So, while the AJAX call might get invoked, the function will continue to run in parallel with the AJAX call. The only way to get the script to run like you have it would be to specific run the AJAX call as synchronous--which is a really bad practice. The better way to do this is to figure out what AJAX validation you need to do and then run them all via one request. Once the AJAX validation result has come back, you finish process the validation via a callback. -Dan -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Samad Sent: Thursday, July 26, 2007 3:27 PM To: jQuery (English) Subject: [jQuery] Re: Form Client and server side validaion probleme Bump! No one can help me ?? On 25 juil, 22:46, Samad [EMAIL PROTECTED] wrote: Hello, I'm trying to fix a validation form probleme but I don't have any idea. This is the probleme : I have a forum with inputs, for the validation, I have some client side controls and server ones with an ajax call. this is the code : - - $(#Register).submit(function() { $(.ErrorDiv).hide(); $(.SuccessDiv).hide(); var msg_error = 0; var valid_email = /^\w+([\.-]?\w+)[EMAIL PROTECTED]([\.- ]?\w+)*(\.\w{2,3}) +$/; var valid_text = /^\w+$/; var username = $(#Username).val(); var email = $(#Email).val(); var pwd = $(#Password).val(); var pwd_conf = $(#PasswordConf).val(); if ( !username.match(valid_text) || username == ) { msg_error = 1; $(#Username_Error).show(); } else { $.ajax({ type: POST, url: inc/user_reg.hand.php, data: action=check_usernameusername=+username, dataType: html, success: function(msg){ if (msg == KO) { msg_error = 1; $(#UsernameUsed_Error).show(); } } }); } if ( !email.match(valid_email) || email == ) { msg_error = 1; $(#Email_Error).show(); } else { $.ajax({ type: POST, url: inc/user_reg.hand.php, data: action=check_emailemail=+email, dataType: html, success: function(msgmail){ if (msgmail == KO) { msg_error = 1; $(#EmailUsed_Error).show(); } } }); } if ( !pwd.match(valid_text) || pwd == ) { msg_error = 1; $(#Password_Error).show(); } if ( pwd != pwd_conf ) { msg_error = 1; $(#PasswordConf_Error).show(); } if( msg_error == 0 ) { $.ajax({ type: POST, url: inc/user_reg.hand.php, data: action=registerusername=+username +email=+email+password=+pwd, dataType: html, beforeSend: function(msgregister){ }, success: function(msgregister){ $(#Register_Success).show(); bindStyle(); } }); } return false; // cancel conventional submit }); - - The thing is : when I try the ajax call the first time with the 'Username' and after a 'KO' response, the variable msg_error is still on '0' and not '1' even if the msg received after the call is 'KO' and the #UsernameUsed_Error is showed. Can anyone help ?? :)
[jQuery] Re: jqModal help: multiple triggers, different ajax url's
I am stuck with the same problem... Hope someone can help! =) On Jul 11, 3:26 pm, rolfsf [EMAIL PROTECTED] wrote: I have a page on which I've hidden a div for use as an adaptable modal window: div id=modal class=jqmWindow div class=modalTop div class=jqmClose ../images/btn/btn_close.gif /div /div div class=target/div /div I have 2 different types of triggers, for which I want to load 2 different urls into thejqModal'target'... let's call them: .typeA this.htm .typeB that.htm I can get either of these to work, but not both at the same time: $('#modal').jqm({ajax: 'this.htm', trigger: '.typeA', modal: 'true', target: '.target'}); $('#modal').jqm({ajax: 'that.htm', trigger: '.typeB', modal: 'true', target: '.target'}); What's the correct construction to get the both working on the same page? -- View this message in context:http://www.nabble.com/jqModal-help%3A-multiple-triggers%2C-different-... Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: SITE SUBMISSION: Please add gsalr.com to the list of sites
Hi Marshall, Great work! I'll be adding it today. Rey Marshall Salinger wrote: Hello Rey, I was wondering if you could add gsalr.com http://gsalr.com to the list of sites that use jQuery. The site is a mashup of Google Maps / Craigslist and a few other sites that list garage sales on the web. The site provides a map view of garage sales in various cities across the United States. The site also provides a feature called the Trip Planner and allows you to save sales to a list and then retireve printable directions from one sale to the next. The site is still very much in beta and critiques are welcomed. Various plugins are being used on the site. They include: - jQuery Interface - dimensions - tablesorter 1.0 Thanks again to the jQuery team for such an amazing tool and to everyone that contributes their plugins. -Marshall -- BrightLight Development, LLC. 954-323-2225 (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com
[jQuery] SITE SUBMISSION: Please add gsalr.com to the list of sites
Hello Rey, I was wondering if you could add gsalr.com to the list of sites that use jQuery. The site is a mashup of Google Maps / Craigslist and a few other sites that list garage sales on the web. The site provides a map view of garage sales in various cities across the United States. The site also provides a feature called the Trip Planner and allows you to save sales to a list and then retireve printable directions from one sale to the next. The site is still very much in beta and critiques are welcomed. Various plugins are being used on the site. They include: - jQuery Interface - dimensions - tablesorter 1.0 Thanks again to the jQuery team for such an amazing tool and to everyone that contributes their plugins. -Marshall
[jQuery] Re: 1.1.3.1 breaks jqModal in IE6
Mark, I noticed the same thing and also had to roll back to 1.1.2. I sent the plugin author an email offlist, I see you have cc'd him as well. Hopefully he will come up with an update soon that will address the issue. -- Josh - Original Message - From: mmiller [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Cc: [EMAIL PROTECTED] Sent: Thursday, July 26, 2007 1:01 PM Subject: [jQuery] 1.1.3.1 breaks jqModal in IE6 I if download and host the jqModal public example (and associated resources) on a local webserver and simply change the jQuery to 1.1.3.1, jqModal stops working in IE6. The overlay is pushed to a thin box at the bottom of the page and any modal like behavior is lost. My workaround is to roll back jQuery to 1.1.2 for now, though I was appreciating the performance increases in the latest release. I don't have the IE specific skills / tools to offer any insight into what might be happening. If anyone can corroborate this issue or if anyone has any suggestions or a fix for this I would welcome the advice. I have search the archives for this group. This is not the same as the issue logged regarding opacity that was fixed with the 1.1.3 1.1.3.1 jQuery release. Thank-you. Mark Miller, Calgary, Alberta
[jQuery] Re: $(e.target) $('#id'), IE got problem
Try copying e.target into a variable at the start of the click event, then refer to the variable instead in the get() method. (Seeing as both occurrences of e.target are wrapped in $() you may as well store that in the variable) Something like: function paginator_hook(){ $('div.paginator a.ajaxpage').click( function(e){ var $el = $(e.target); $.get($el.attr('href'), function(data) { $el.parents('div.paginator').html(data); paginator_hook(); }); return false; }); George So what's going wrong with the $(e.target) selector? How can I make it work with the event obj but not the id?
[jQuery] Re: BlockUI does not display overlay in IE6 and IE7
I just had the same problem with transparency, upgrading to jQuery 1.1.3.1 seemed to clear it up. Trymbill wrote: Hi guys! I have a problem regarding BlockUI. I'm using it on a website where I have a few users registered. The idea is that a user can browse for an image, select it and as soon as it has been selected the BlockUI will appear and ask them to wait. Then it runs through a PHP code via Ajax and displays Hurray if it worked and Burray if it didn't. This works like a dime in FF but in IE it's all messy. First of all I can't get IE to stop following the form submit. IE always tries to submit the form regularly but my javascript code says return false; - FF understands that but IE is stupid (or maybe it's me, I don't know...). But my main problem with BlockUI is that it does not display the overlay background in IE6 and IE7! It does work in FF and I can see that it works when I try the example code on the BlockUI website, but I can't seem to get it working on IE6 and IE7 on my page. I am using alot of scripts for jQurey so maybe it could be some script interference? I tried downloading the lates version of BlockUI but that did nothing. I tried changing my code but that didn't work. Does any one know what I can try to do? Please, it would be much appreciated! Sincerely, Magnus -- View this message in context: http://www.nabble.com/BlockUI-does-not-display-overlay-in-IE6-and-IE7-tf4153153s15494.html#a11817058 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: Java Errors when using .Accordion and .innerfade - Please help :)
Great! Thanks so much for the help! so is this correct for the call then? var $j = jQuery.noConflict(); $j(document).ready(function() { //Function for the Inner Fade News Ticker $j('.NewsLC').innerfade({ animationtype: 'fade', speed: 700, timeout: 9000, type: 'random', containerheight: '30.0em' }); }); if( $j('#SpeakerDIV').length ) { $j('#SpeakerDIV').Accordion({ showSpeed: 250, hideSpeed: 250, header: '.SpeakerTitle', active: false, alwaysOpen: false, animated: true }); }); Thank you s much for your help and patience!! On Jul 26, 11:15 am, Stephan Beal [EMAIL PROTECTED] wrote: On Jul 26, 4:48 pm, Aaron [EMAIL PROTECTED] wrote: Is there a way to have it work if there is an element but if no element on the page dont throw an error? a) hack the plugin source code or b) add a hidden accordion-compatible element to pages which don't normally have one (that would be an ugly kludge, though). Or check for the accordion with something like: if( $('#AccordionID').length ) { ... do accordion stuff ... }- Hide quoted text - - Show quoted text -
[jQuery] Re: A perhaps SOT CSS/jQuery question
Thanks Benjamin. I'll see if that helps. Unfortunately, that client just up and decided out of the blue to stop work on all projects for about a months time, so who knows when (if) I'll get back to it. :o( Chris On 7/26/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Chris, with out actually seeing in action, my assumption is that you have the height set to 413px and do not specify a overflow to either hidden, auto or scroll and the assumption is that as some point the box is being forced taller and not resizing after there is smaller inner content. I would suggest taking out the paddings and adding them back in till you see the issue. Sadly, IE has known box issues so, you will need to adjust your math, height + paddingTop + paddingBottom, to suit. Hope this points you in the right direction. On 7/26/07, Christopher Jordan [EMAIL PROTECTED] wrote: Hi folks, I'm having trouble with a bit of jQuery/CSS stuff, and I'm hoping someone here could explain what the heck I'm doing wrong. I am not by any stretch a CSS guy. I do what I can to get by. Also (and I know this sticks in lots of people's craw), this only *has to* work in IE. This is an internal app for a company who does not use FF or any other browser. I've got the following in my main index file: script src=/Include/JS/jquery.js/script script $(function(){ $(.ActionSelection).bind(mouseover,function(){ $(this).addClass(Underlined); $(this).addClass(ActiveLinkColor); }).bind(mouseout,function(){ $(this).removeClass(Underlined); $(this).removeClass(ActiveLinkColor); }).bind(click,function(){ DisplayScreen($(this).attr(method)); }); }); ... /script then... body div class=MainWrapper !--- This creates the border and colors that we're used to on our submodals --- div class=LeftPanel div class=ActionHeaderAdd New/div div class=ActionSelection method=displayAddCancelCodeCancel Code/div div class=ActionSelection method=displayAddCancelReasonCancellation Reason/div br div class=ActionHeaderEdit/Delete/div div class=ActionSelection method=displayEditCancelCodeCancel Code/div div class=ActionSelection method=displayEditCancelReasonCancellation Reason/div /div div class=RightPanel div class=StatusBar/div div class=RightPanelContent/div /div /div /body The relevant CSS is: (don't mind the #someVar# it's a ColdFusion thing. Those are evaluated to actual colors before they hit the browser) div.MainWrapper{ height: 413px; width: 100%; margin: 2px 0px 0px 0px; padding: 3px; border: 3px solid #ThisMasterConsoleTableBorderColor#; background-color: #ThisMasterConsoleTableBackgroundColor#; } div.LeftPanel{ float : left; border-right : 1px solid #ThisMasterConsoleTableBorderColor#; width : 150px; height : 400px; } div.RightPanel{ float: right; border: 1px dashed ##A0A0A0; width: 400px; height: 400px; } div.StatusBar{ color: ##A0A0A0; font-weight: bold; width: 100%; height: 15px; border-bottom: 1px dashed ##A0A0A0; text-align: right; } /* Generic Classes */ .ActionHeader{ font-weight: bold; color: #ThisMasterConsoleHeaderTextColor#; background-color: #ThisMasterConsoleHeaderBackgroundColor#; padding: 3px; margin-right: 3px; cursor: default; } .ActionSelection{ padding-left: 5px; cursor: pointer; } .Underlined{ text-decoration: underline; } .ActiveLinkColor{ color: green; } Okay, so I've got a nice box with a three pixel border around it and it sits in a browser window sized just right leaving a two-pixel space between the edge of the window and the three pixel border. When I mouseover one of the ActionSelection divs the text contained within dutifully underlines and changes color. However, the MainWrapper also seems to get two pixels taller leaving me with a three pixel border on the top, left and right and a one pixel border on the bottom! :o( The two pixel margin between the browser window's bottom edge and that one remaining pixel of the bottom three pixel border however, remains unchanged. I can attach some
[jQuery] Re: IE and the Invalid Source Code Error
Mike, Great story, it brought a tear to my eye :) Do you have a demo page for us to look at? Some code? Sounds like a innerHTML/non-block level element issue, but not sure off hand. On 7/26/07, mcraig [EMAIL PROTECTED] wrote: Ok...so I just got this mock up working great in firefox and realized that after all that work (new to JQuery), I had never tested it in IE. But, figuring it was cross browser and I was going to test on the latest IE that this would not prove problematic. And of course, nothing I was doing was that tricky really (ok, once I learned how best to do it)...a couple divs a-toggling, a little inner html being updatednothing really fancy as far as code goes. So a-lauching I go in IE...nothing looks particular wrong but nothing happens when I start clicking on trigger-happy links and there is a glaring nasty exclamation point in my lower left !!! It says invalid source html for this operation and proceeds to point me to what seems to be a blank line of code in my final source. Hello? What the heck does that mean? I cannot have spent this time learning jQuery and doing some really fabulous code to make navigation more streamlined and subtle for my customer only to find out it does not work in other browsers...or did I? With a tear in my eye, I'm begging...is there an easy answer to this dilemma ? Mike -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: Are there any particular ways to debug jQuery code?
Mitchell, a good way to debug jQuery or JS in general is via a tool called Firebug, that is available as an extension for the Firefox browser. In your case, it probably would have said something like fade is not a method of jQuery, which would have immediately helped you diagnose the problem. It is hugely popular with folks using jQuery or JS. Here's the link to get it: https://addons.mozilla.org/en-US/firefox/addon/1843 -- Josh - Original Message - From: Mitchell Waite To: jquery-en@googlegroups.com Sent: Thursday, July 26, 2007 10:36 AM Subject: [jQuery] Are there any particular ways to debug jQuery code? Noobie question 99 Are there any particular ways to debug jQuery code? I have a small handler $(#nest).click(function() { alert(got it); $(#nest).fade(slow); }); It's called by a click on a div with an id=nest. The click will make the alert go off but the fade wont work. For the life of me I can't get any affects to work on the #nest div. It's like something is interfering with the fade function. No affects work. I just don't know how to systematically track this down. Mitch
[jQuery] Rss Feed pagination animation
Tossing this one out as I've not idea if there is a way to animate the loading of an RSS feed (remote content). Had the idea to say maybe pull in gallery screenshots from CSSmania for example maybe 3 at a time and have them slide out and three more slide in. It might require the magpieRSS app, not sure. Similar to the way the google or is it yahoo autoPager works. so it would load 1-3 then 3-6 and so on, possibly limiting it to maybe 5 iterations in the loop. It's way beyond me but seems like something practical, similar to a news feed also I guess.
[jQuery] Re: vs '
Sean, Attributes in (X)HTML don't need to be double-quoted, again single-quotes are equally valid there so 'a href=...' and a href='...' are effectively the same and both valid. I know you probably know, I just wanted to rephrase It is easier to type an html string if you use single quotes: in case :-) --rob On 7/26/07, Sean Catchpole [EMAIL PROTECTED] wrote: On 7/26/07, Mitchell Waite [EMAIL PROTECTED] wrote: This going will make me sound really dumb but what is the difference between using single quote versus double quotes in jQuery, e.g. Mitchell, the concept of single vs double quotes is more of a javascript question. The simple answer is that there's no difference really. It is easier to type an html string if you use single quotes: Single: var html = 'a href=#link/a'; Double: var html = a href\#\link/a'; But sometimes you might want to use double instead: Single: var str = 'I\'m in love'; Double: var str = I'm in love; So just use whichever you feel is better for the situation. Some people are used to single quotes representing characters, whereas others think html = double quotes, javascript = single quotes. ~Sean -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] A perhaps SOT CSS/jQuery question
Hi folks, I'm having trouble with a bit of jQuery/CSS stuff, and I'm hoping someone here could explain what the heck I'm doing wrong. I am not by any stretch a CSS guy. I do what I can to get by. Also (and I know this sticks in lots of people's craw), this only *has to* work in IE. This is an internal app for a company who does not use FF or any other browser. I've got the following in my main index file: script src=/Include/JS/jquery.js/script script $(function(){ $(.ActionSelection).bind(mouseover,function(){ $(this).addClass(Underlined); $(this).addClass(ActiveLinkColor); }).bind(mouseout,function(){ $(this).removeClass(Underlined); $(this).removeClass(ActiveLinkColor); }).bind(click,function(){ DisplayScreen($(this).attr(method)); }); }); ... /script then... body div class=MainWrapper !--- This creates the border and colors that we're used to on our submodals --- div class=LeftPanel div class=ActionHeaderAdd New/div div class=ActionSelection method=displayAddCancelCodeCancel Code/div div class=ActionSelection method=displayAddCancelReasonCancellation Reason/div br div class=ActionHeaderEdit/Delete/div div class=ActionSelection method=displayEditCancelCodeCancel Code/div div class=ActionSelection method=displayEditCancelReasonCancellation Reason/div /div div class=RightPanel div class=StatusBar/div div class=RightPanelContent/div /div /div /body The relevant CSS is: (don't mind the #someVar# it's a ColdFusion thing. Those are evaluated to actual colors before they hit the browser) div.MainWrapper{ height: 413px; width: 100%; margin: 2px 0px 0px 0px; padding: 3px; border: 3px solid #ThisMasterConsoleTableBorderColor#; background-color: #ThisMasterConsoleTableBackgroundColor#; } div.LeftPanel{ float : left; border-right : 1px solid #ThisMasterConsoleTableBorderColor#; width : 150px; height : 400px; } div.RightPanel{ float: right; border: 1px dashed ##A0A0A0; width: 400px; height: 400px; } div.StatusBar{ color: ##A0A0A0; font-weight: bold; width: 100%; height: 15px; border-bottom: 1px dashed ##A0A0A0; text-align: right; } /* Generic Classes */ .ActionHeader{ font-weight: bold; color: #ThisMasterConsoleHeaderTextColor#; background-color: #ThisMasterConsoleHeaderBackgroundColor#; padding: 3px; margin-right: 3px; cursor: default; } .ActionSelection{ padding-left: 5px; cursor: pointer; } .Underlined{ text-decoration: underline; } .ActiveLinkColor{ color: green; } Okay, so I've got a nice box with a three pixel border around it and it sits in a browser window sized just right leaving a two-pixel space between the edge of the window and the three pixel border. When I mouseover one of the ActionSelection divs the text contained within dutifully underlines and changes color. However, the MainWrapper also seems to get two pixels taller leaving me with a three pixel border on the top, left and right and a one pixel border on the bottom! :o( The two pixel margin between the browser window's bottom edge and that one remaining pixel of the bottom three pixel border however, remains unchanged. I can attach some before and after screen shots if that would help. Unfortunately, the code resides behind a firewall, and is not accessible to the public. :o( Can anyone help me, please? Many Thanks, Chris -- http://cjordan.us
[jQuery] Re: Java Errors when using .Accordion and .innerfade - Please help :)
On Jul 26, 4:48 pm, Aaron [EMAIL PROTECTED] wrote: Is there a way to have it work if there is an element but if no element on the page dont throw an error? a) hack the plugin source code or b) add a hidden accordion-compatible element to pages which don't normally have one (that would be an ugly kludge, though). Or check for the accordion with something like: if( $('#AccordionID').length ) { ... do accordion stuff ... }
[jQuery] Re: [ANNOUNCE] jCarouselLite version 0.4.0
I have updated the jCarouselLite plugin to its next revision - 0.4.0. The project page is at http://www.gmarwaha.com/jquery/ jcarousellite/index.php This is really great! One more option I really would love would be to have infinite carousel, with left most element being repeted on the right of the right most one, and not noticable circular chaining... -Nicolas -- Nicolas Brush HOIZEY Clever Age : http://www.clever-age.com/ Gastero Prod : http://www.gasteroprod.com/ Photos : http://www.flickr.com/gp/[EMAIL PROTECTED]/M1c002
[jQuery] Re: datePicker plugin inline
Hi, I'm afraid I haven't got any alternative suggestions... If you only need one calendar on the page and don't need a popup one as well you could implement a temporary dodgy hack... You could look for the calls to close the calendar and just comment them out... It's not pretty but could get you out of a fix, Cheers, Kelvin :) Larry Garfield wrote: Thanks, Kelvin. (And sorry about misspelling your name. g) I was afraid you were going to say that. Unfortunately my timeframe allowed for this project is measured in hours, not weeks, so I doubt I'd even have time to try and figure out how to do it myself. Is there a method that you think would work that you haven't tested yet, or is it just a non-available feature? Is there some alternate plugin you can recommend? Or some possible alternate interface that's similar that could be accomplished with datePicker? Thanks. --Larry Garfield On Thu, 26 Jul 2007 14:12:14 +0100, Kelvin Luck [EMAIL PROTECTED] wrote: Hi, I'm afraid that it is currently exactly as you describe. A date picker calendar (with the paging etc) only exists as a popup and if you use renderCalendar then you don't get paging or anything. The ability to use a date picker not in a popup is one of the two additions I wanted to make before I stop calling the date picker v2 beta. Unfortunately I'm really busy at work at the moment and realistically it will probably be a couple of weeks before I get a chance to work on the date picker again. If you want to try and figure it out yourself then feel free and report back on your progress, otherwise if you can wait I'll try and get it done then, Cheers, Kelvin :) Larry Garfield wrote: Hello, jQuery. My apologies if this is a dupe; the first copy didn't seem to go through. I'm working with Kevin Luck's datePicker plugin, v2[1], because it seemed the least unsuited for what I was trying to do and I'm already using it elsewhere. What I'm trying to do is have an inline calendar grid rather than a popup, and have that inline grid offer paging and multi-select abilities. Then on submit, grab all of the selected dates and serialize them to a hidden field and submit. I'm replacing a YUI widget that did that, but did so only on certain systems when it was in certain moods, making it far too unreliable. According to the docs, I can get paging and multi-select in a popup easily[2]. I can also render an inline calendar instead[3]. What I have found no documentation on and have been unable to do myself is get both to happen at the same time. If I render my own calendar, it gets no paging, no select ability at all; it's really just a static read-only display. I've looked at the plugin's source, but haven't been able to find any indication of what I'd need to copy out or reference directly in order to get the picker parts of datePicker. Any tips on how to have my picker and see it, too, would be most appreciated. Samples of working code would be even better. :-) Thanks. [1] http://kelvinluck.com/assets/jquery/datePicker/v2/demo [2] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple.html [3] http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.html
[jQuery] IE and the Invalid Source Code Error
Ok...so I just got this mock up working great in firefox and realized that after all that work (new to JQuery), I had never tested it in IE. But, figuring it was cross browser and I was going to test on the latest IE that this would not prove problematic. And of course, nothing I was doing was that tricky really (ok, once I learned how best to do it)...a couple divs a-toggling, a little inner html being updatednothing really fancy as far as code goes. So a-lauching I go in IE...nothing looks particular wrong but nothing happens when I start clicking on trigger-happy links and there is a glaring nasty exclamation point in my lower left !!! It says invalid source html for this operation and proceeds to point me to what seems to be a blank line of code in my final source. Hello? What the heck does that mean? I cannot have spent this time learning jQuery and doing some really fabulous code to make navigation more streamlined and subtle for my customer only to find out it does not work in other browsers...or did I? With a tear in my eye, I'm begging...is there an easy answer to this dilemma ? Mike
[jQuery] Re: Announce: Masked Input Plugin 1.0
I was about to do something like this for SSNs but you beat me to the punch. Great work Josh! You just saved me loads of time! :o) Cheers! Chris On 7/26/07, Josh Bush [EMAIL PROTECTED] wrote: Sorry for the confusing eye script example. Someone on this list had a request and gave me that as an example. That's what I tested with and that's what I threw up on the site. If you have a more clear example, I'd be happy to place it up on the website for the benefit of everyone. For my personal use, the built in placeholders serve me well. That's why they are the built in! :) Josh On 7/26/07, Bernd Matzner [EMAIL PROTECTED] wrote: Terrific, Josh! Thanks for your work on this baby. Took some time to figure out how the Eye script custom +/- placeholder is supposed to work, but I guess it's just a matter of adding a tooltip hint on valid input (fortunately, I don't need glasses, so I guess that's why I'm not familiar with that - that's what it's for, right?) Thanks again! Bernd On Jul 26, 2:21 am, Josh Bush [EMAIL PROTECTED] wrote: I just wanted to announce that I've finally released v1.0 of my masked input plugin. Please check it out at: http://digitalbush.com/projects/masked-input-plugin Thank You Josh digitalbush.com -- http://cjordan.us
[jQuery] Re: Announce: Masked Input Plugin 1.0
Sorry for the confusing eye script example. Someone on this list had a request and gave me that as an example. That's what I tested with and that's what I threw up on the site. If you have a more clear example, I'd be happy to place it up on the website for the benefit of everyone. For my personal use, the built in placeholders serve me well. That's why they are the built in! :) Josh On 7/26/07, Bernd Matzner [EMAIL PROTECTED] wrote: Terrific, Josh! Thanks for your work on this baby. Took some time to figure out how the Eye script custom +/- placeholder is supposed to work, but I guess it's just a matter of adding a tooltip hint on valid input (fortunately, I don't need glasses, so I guess that's why I'm not familiar with that - that's what it's for, right?) Thanks again! Bernd On Jul 26, 2:21 am, Josh Bush [EMAIL PROTECTED] wrote: I just wanted to announce that I've finally released v1.0 of my masked input plugin. Please check it out at: http://digitalbush.com/projects/masked-input-plugin Thank You Josh digitalbush.com
[jQuery] Re: Announce: Masked Input Plugin 1.0
Terrific, Josh! Thanks for your work on this baby. Took some time to figure out how the Eye script custom +/- placeholder is supposed to work, but I guess it's just a matter of adding a tooltip hint on valid input (fortunately, I don't need glasses, so I guess that's why I'm not familiar with that - that's what it's for, right?) Thanks again! Bernd On Jul 26, 2:21 am, Josh Bush [EMAIL PROTECTED] wrote: I just wanted to announce that I've finally released v1.0 of my masked input plugin. Please check it out at: http://digitalbush.com/projects/masked-input-plugin Thank You Josh digitalbush.com
[jQuery] Re: ANNOUNCE: jTagEditor 1.0 beta
My apologies ! too much emotion... ;) Here is the url: http://www.jaysalvat.com/jquery/jtageditor/ Thanks ! Bruce Wang a écrit : On 7/26/07, Jay Salvat [EMAIL PROTECTED] wrote: Hi all, I'm pleased to announce the birth of jTagEditor 1.0 beta. It's a small and customizable tag editor wich allows you to turn any textarea in a quick tag editor of any kind (html, wiki, bbcode, textile or any type of tag you want). any url? -- simple is good http://brucewang.net http://twitter.com/number5 skype: number5
[jQuery] reproduce position:fixed
hello! i'm trying to have a div box stay permanently on the same position in the viewport, no matter how much the page is scrolled. I try to use dimensions.js to do it, but so far i've failed to calculate correctly the new top position of my element. Can someone explain me what i'm doing wrong? $(window).bind(scroll,function(){ $this = $('#leftCol'); var newTop = $this.offset(); var scrollTop = $this.scrollTop(); $('#leftCol').css({top: fixedTop.top + scrollTop}); }); Thank you! Alexandre Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.19/918 - Date: 25/07/2007 14:55
[jQuery] Re: Announce: Masked Input Plugin 1.0
This is something I'd like to do along with making pieces of the mask optional. I'll keep it simple as I don't want to overlap the work done on the validation plugin. On Jul 26, 3:06 am, Michael Schwarz [MVP] [EMAIL PROTECTED] wrote: Ji Josh, great work!! What I'm missing is a more detailed mask i.e. for date inputs: time input [0..23]:[0..59] date input [1..31].[1..12].[1900..2007] (and check for 29th Feb) Do you want to add this in your roadmap? Michael On Jul 26, 2:21 am, Josh Bush [EMAIL PROTECTED] wrote: I just wanted to announce that I've finally released v1.0 of my masked input plugin. Please check it out at: http://digitalbush.com/projects/masked-input-plugin Thank You Josh digitalbush.com
[jQuery] $strip has no properties (??)
Hi list. If yoy have FF with Firebug, and go to this page http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/beta/continuous.html you MAY have an error that pops up that says that $strip has no properties $strip in this script should be (should be because i'm 'learning' jquery) the paragraph that continuosly scroll $strip = $(#mask p#strip); Now have you an idea of why if I simply reload that page that error popsup but the script runs ok? Why if teste locally $strip makes a continuous loop of errors while 'online' not? How could it be that $strip.css has no properties but the P scrolls anyway? It's making me mad. Thanks GC
[jQuery] Re: [ANNOUNCE] jCarouselLite version 0.4.0
Rey, I sure will do it, but since all the demos are in php files right now, i might need some time to make a zip of all the demos and docs. I will give it a shot over the weekend and let you know... is that fine with u... BTW, if i have to make jCarouselLite available via jquery svn whom should i ask to get a userId for myself.? -GTG On 7/25/07, Rey Bango [EMAIL PROTECTED] wrote: Ganeshji, Would you mind terribly zipping up all of the files, demos and docs so I can download everything at one time? I'd like to keep a local copy of everything for archival purposes. Rey... Ganeshji Marwaha wrote: Hi list, I have updated the jCarouselLite plugin to its next revision - 0.4.0. The project page is at http://www.gmarwaha.com/jquery/jcarousellite/index.php http://www.gmarwaha.com/jquery/jcarousellite/index.php This revision adds a few cool features(based on demand) and fixes a few bugs. It looks pretty stable now. If it stays stable for sometime, i might raise it to 1.0 status pretty soon. 1. Added support for mouse-wheel interaction. By adding mouseWheel:true to your list of options, you can scroll your mouse-wheel and navigate the carousel. 2. Added support for auto-scroll. You can specify a delay between 2 subsequent scrolls in the auto option, and your carousel will magically keep scrolling 3. The mouseWheel, autoScroll and button based navigation are not mutually exclusive. You can use all three with the same carousel if you want. 4. Added support for scrolling more than one item at a time. Just add scroll: someNumber here to scroll that many items per unit of navigation. 5. Fixed bugs that were both reported here on the list and sent to my personal email. Thanks guys for all your feedback. 6. Added 3 more demos to the project page, improved the documentation and installation sections. The changelog and known-issues sections are also updated. So, you should get a pretty accurate picture of the project's current status there. The best part is, it is still approximately 1.9 KB light (compressed). I would be glad to hear some feedback. -GTG -- BrightLight Development, LLC. 954-323-2225 (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com
[jQuery] Re: Boggles the mind - mousevoer and mouseout together
Thank you Josh, that triggered something - that I am not asking very good questions, and that I had just finished reading about bubbling in Karl's L J Q chap 3. I understand that is when an event like a click travels up the DOM to other elements and you want it to stop. Karl presents the event object as a solution (I don't recall that he used return to solve it), and he also shows how to remove event handlers. But no return. Thing is my problem doesn't seem to fit this allegory, because I have one div with two conflicting events, mouseover and mouseout. Like this http://www.whatbird.com/wwwroot/3statebutton_framed.html In my example the button and graphic inside theframe appear during a mouseover and disappear on a mouse out. I set it up like this $(#nest).mouseover(function() { $(#nest).fadeOut(500); $(#But1frm).fadeIn(500); }); $(#nest).mouseout(function() { $(#nest).fadeIn(500); $(#But1frm).fadeOut(500); }); And I got this result http://www.whatbird.com/wwwroot/3statebutton_framed.html 2 pulses for every mouseover giving this hypnotic effect which might be useful at some point J but is not what I want . The solution was pretty simple. Can you see what I did? http://www.whatbird.com/wwwroot/3statebutton_framed_2.html Note that the small green jQuery 3 State button still works. Now my question is can I add an effect to the mouseover handler so the nest fades in an fades out? Mitch From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh Nathanson Sent: Thursday, July 26, 2007 3:33 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Boggles the mind - mousevoer and mouseout together Ahah, now you are delving a bit deeper. This is where things get a bit tricky. What you want to do is add a return false; to your mouseover event handler. This is to stop what is known as event bubbling, that is to say, an event which occurs on an inner element will propagate up through the DOM, and any other event handlers will be triggered. NOW, I've found that if you use the hover method, returning false will not stop the event bubbling. In these cases I had to break out my mouse events into mouseover and mouseout. So, suppose you have something like: div id=1 div id=2 hello! /div /div And you have mouseover handlers for both #1 and #2. You might do something like: $(#2).mouseover(function() { dosomething(); return false; }); This will stop your div#1 from receiving the mouseover event while the mouse is within div#2. I believe this basic approach of returning false will work for all the mouse events, but for whatever reason (I'm sure there's a good one) it won't work in the hover method. I didn't follow your example entirely, but it sounds like something like this is occurring. -- Josh - Original Message - From: Mitchell Waite mailto:[EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, July 26, 2007 3:05 PM Subject: [jQuery] Boggles the mind - mousevoer and mouseout together Imagine this When a user moves the mouse over a certain div (mouseover) on your page you want to do some things 1. fadeOut a graphic in that div to 50% 2. Make a button in that div appear (show) 3. Manipulate the button's 3 states (my wonderful 3 state button gizmo) 4. When the user clicks the mouse call function A and reverse the above, fadeIn the graphic back to 100%, hide the button. 5. If the user moves the mouse out of the div area (mouseout) then reverse the above, fadeIn the graphic back to 100%, hide the button. Sounds easy right? Well it's not. Why? Because of the way jQuery queues up the events, the a mouseover and a mouseout events interact in such a way that the whole process goes bananas, there is a great deal of flickering of the graphics when you move the mouse because it is sending mouseover messages. What I need to do is to have it act more like hover, which avoids these issues. Except for one problem. I am using a button over the graphic that uses hover also. So the two processes fight eachother. I need a way to say jQuery - I need you to do something a bit different. Respond to my mouseover as usual but then don't look at mouseover for a while. That way I could process the other events. Any ideas on how to do this. I thought perhaps using a call back would help but that seems to just let me control one thing finishing before another starts which is not my issue. Thanks Mitch
[jQuery] Re: SITE SUBMISSION: Please add gsalr.com to the list of sites
My critique is: that is badass. -- Josh - Original Message - From: Marshall Salinger To: jquery-en@googlegroups.com Sent: Thursday, July 26, 2007 4:20 PM Subject: [jQuery] Re: SITE SUBMISSION: Please add gsalr.com to the list of sites Hi Michael, I wish I could offer you the answer. It is all the work of a guru back-end developer that I work with. I don't know how he does it. Only he knows the answer and I don't think he is willing to part with it at the moment. Best of luck, Marshall Michael E. Carluen wrote: To phrase to question better, how were you able to parse the addresses if you're getting the data from craigslist directly? Or which web service are you using if you're using one? From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael E. Carluen Sent: Thursday, July 26, 2007 1:23 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: SITE SUBMISSION: Please add gsalr.com to the list of sites Nicely done Marshall. How are you able to mashup the Craigslist data? I have been looking into that. Any advise? From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Marshall Salinger Sent: Thursday, July 26, 2007 1:09 PM To: jquery-en@googlegroups.com Subject: [jQuery] SITE SUBMISSION: Please add gsalr.com to the list of sites Hello Rey, I was wondering if you could add gsalr.com to the list of sites that use jQuery. The site is a mashup of Google Maps / Craigslist and a few other sites that list garage sales on the web. The site provides a map view of garage sales in various cities across the United States. The site also provides a feature called the Trip Planner and allows you to save sales to a list and then retireve printable directions from one sale to the next. The site is still very much in beta and critiques are welcomed. Various plugins are being used on the site. They include: - jQuery Interface - dimensions - tablesorter 1.0 Thanks again to the jQuery team for such an amazing tool and to everyone that contributes their plugins. -Marshall
[jQuery] Re: Are there any particular ways to debug jQuery code?
Firebug is awesome for debugging your Jquery code using firefox. But, how do you debug problems that occur in IE and IE only?
[jQuery] Re: Are there any particular ways to debug jQuery code?
Mitchell - if an error occurs in a script, you will see a red x in the lower right corner of the web browser. Click that to open the Firebug console. In the console tab you'll see the error. Instead of throwing an alert like IE6 does, it logs errors into the console. If your script is clean (no errors), you'll see a green check in the lower right corner. Firebug is an amazing program - once you get used to it, it will be indispensable for you. Showing errors is just one of the many helpful things it can do. It can also show you every script and image that makes up the currently viewed page, and how long they took to download (the Net tab). -- Josh - Original Message - From: Mitchell Waite [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, July 26, 2007 1:13 PM Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? I do have it and I have run it but I don't see where it can tell me what I am doing wrong. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Priest, James (NIH/NIEHS) [C] Sent: Thursday, July 26, 2007 10:49 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Are there any particular ways to debug jQuery code? -Original Message- From: Mitchell Waite [mailto:[EMAIL PROTECTED] $(#nest).click(function() { alert(got it); $(#nest).fade(slow); I still haven't picked up my jQuery book again - this weekend! But couldn't your write this like: alert(got it).fade(slow); Does the fade work if you remove the alert? I just don't know how to systematically track this down. Do you have the Firebug plugin for Firefox? http://www.getfirebug.com/ Jim
[jQuery] show jeditable textarea onload instead of onclick
I have a jeditable textarea that works perfectly. However, I want do make one small modification. I want the editable textarea to show as a input type text when the page loads rather than when the user clicks on the div. I've tried event: load and event: onload, but neither of those works.
[jQuery] Re: BlockUI not displaying overlay background in IE6 and IE7
Magnus, Based on your description is sounds like there is a script error on your page (IE is not stupid in regard to return false). That would explain why the form doesn't not submit correctly and why blockUI does not display. Do you have IE's script debugger enabled? Is there a link you can provide that demonstrates the problem? Without something more to look at it's difficult to give you much assistance. But my money is on the script error. Mike This works like a dime in FF but in IE it's all messy. First of all I can't get IE to stop following the form submit. IE always tries to submit the form regularly but my javascript code says return false; - FF understands that but IE is stupid (or maybe it's me, I don't know...).
[jQuery] BlockUI not displaying overlay background in IE6 and IE7
Hi guys! I have a problem regarding BlockUI. I'm using it on a website where I have a few users registered. The idea is that a user can browse for an image, select it and as soon as it has been selected the BlockUI will appear and ask them to wait. Then it runs through a PHP code via Ajax and displays Hurray if it worked and Burray if it didn't. This works like a dime in FF but in IE it's all messy. First of all I can't get IE to stop following the form submit. IE always tries to submit the form regularly but my javascript code says return false; - FF understands that but IE is stupid (or maybe it's me, I don't know...). But my main problem with BlockUI is that it does not display the overlay background in IE6 and IE7! It does work in FF and I can see that it works when I try the example code on the BlockUI website, but I can't seem to get it working on IE6 and IE7 on my page. I am using alot of scripts for jQurey so maybe it could be some script interference? I tried downloading the latest version of BlockUI but that did nothing. I tried changing my code but that didn't work. Does any one know what I can try to do? Please, it would be much appreciated! Sincerely, Magnus
[jQuery] Re: A perhaps SOT CSS/jQuery question
Ah.. been there before. On 7/26/07, Christopher Jordan [EMAIL PROTECTED] wrote: Thanks Benjamin. I'll see if that helps. Unfortunately, that client just up and decided out of the blue to stop work on all projects for about a months time, so who knows when (if) I'll get back to it. :o( Chris On 7/26/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Chris, with out actually seeing in action, my assumption is that you have the height set to 413px and do not specify a overflow to either hidden, auto or scroll and the assumption is that as some point the box is being forced taller and not resizing after there is smaller inner content. I would suggest taking out the paddings and adding them back in till you see the issue. Sadly, IE has known box issues so, you will need to adjust your math, height + paddingTop + paddingBottom, to suit. Hope this points you in the right direction. On 7/26/07, Christopher Jordan [EMAIL PROTECTED] wrote: Hi folks, I'm having trouble with a bit of jQuery/CSS stuff, and I'm hoping someone here could explain what the heck I'm doing wrong. I am not by any stretch a CSS guy. I do what I can to get by. Also (and I know this sticks in lots of people's craw), this only *has to* work in IE. This is an internal app for a company who does not use FF or any other browser. I've got the following in my main index file: script src=/Include/JS/jquery.js/script script $(function(){ $(.ActionSelection).bind(mouseover,function(){ $(this).addClass(Underlined); $(this).addClass(ActiveLinkColor); }).bind(mouseout,function(){ $(this).removeClass(Underlined); $(this).removeClass(ActiveLinkColor); }).bind(click,function(){ DisplayScreen($(this).attr(method)); }); }); ... /script then... body div class=MainWrapper !--- This creates the border and colors that we're used to on our submodals --- div class=LeftPanel div class=ActionHeaderAdd New/div div class=ActionSelection method=displayAddCancelCodeCancel Code/div div class=ActionSelection method=displayAddCancelReasonCancellation Reason/div br div class=ActionHeaderEdit/Delete/div div class=ActionSelection method=displayEditCancelCodeCancel Code/div div class=ActionSelection method=displayEditCancelReasonCancellation Reason/div /div div class=RightPanel div class=StatusBar/div div class=RightPanelContent/div /div /div /body The relevant CSS is: (don't mind the #someVar# it's a ColdFusion thing. Those are evaluated to actual colors before they hit the browser) div.MainWrapper{ height: 413px; width: 100%; margin: 2px 0px 0px 0px; padding: 3px; border: 3px solid #ThisMasterConsoleTableBorderColor#; background-color: #ThisMasterConsoleTableBackgroundColor#; } div.LeftPanel{ float : left; border-right : 1px solid #ThisMasterConsoleTableBorderColor#; width : 150px; height : 400px; } div.RightPanel{ float: right; border: 1px dashed ##A0A0A0; width: 400px; height: 400px; } div.StatusBar{ color: ##A0A0A0; font-weight: bold; width: 100%; height: 15px; border-bottom: 1px dashed ##A0A0A0; text-align: right; } /* Generic Classes */ .ActionHeader{ font-weight: bold; color: #ThisMasterConsoleHeaderTextColor#; background-color: #ThisMasterConsoleHeaderBackgroundColor#; padding: 3px; margin-right: 3px; cursor: default; } .ActionSelection{ padding-left: 5px; cursor: pointer; } .Underlined{ text-decoration: underline; } .ActiveLinkColor{ color: green; } Okay, so I've got a nice box with a three pixel border around it and it sits in a browser window sized just right leaving a two-pixel space between the edge of the window and the three pixel border. When I mouseover one of the ActionSelection divs the text contained within dutifully underlines and changes color. However, the MainWrapper also seems to get two pixels taller leaving me with a three pixel border on the top, left and right and a one
[jQuery] Re: A perhaps SOT CSS/jQuery question
Benjamin, I know. I thought the preferred method for event handling was to use the bind method. Isn't .hover() just a short cut for what I've done? Always happy to learn something new. :o) Thanks, Chris On 7/26/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Also, this: $(function(){ $(.ActionSelection).bind(mouseover,function(){ $(this).addClass(Underlined); $(this).addClass(ActiveLinkColor); }).bind(mouseout,function(){ $(this).removeClass(Underlined); $(this).removeClass(ActiveLinkColor); }).bind(click,function(){ DisplayScreen($(this).attr(method)); }); }); can be writen: $(function(){ $(.ActionSelection).hover(function(){ $(this).addClass(Underlined) .addClass(ActiveLinkColor); }, function(){ $(this).removeClass(Underlined). removeClass (ActiveLinkColor); }).bind(click,function(){ DisplayScreen($(this).attr(method)); }); }); On 7/26/07, Christopher Jordan [EMAIL PROTECTED] wrote: Hi folks, I'm having trouble with a bit of jQuery/CSS stuff, and I'm hoping someone here could explain what the heck I'm doing wrong. I am not by any stretch a CSS guy. I do what I can to get by. Also (and I know this sticks in lots of people's craw), this only *has to* work in IE. This is an internal app for a company who does not use FF or any other browser. I've got the following in my main index file: script src=/Include/JS/jquery.js/script script $(function(){ $(.ActionSelection).bind(mouseover,function(){ $(this).addClass(Underlined); $(this).addClass(ActiveLinkColor); }).bind(mouseout,function(){ $(this).removeClass(Underlined); $(this).removeClass(ActiveLinkColor); }).bind(click,function(){ DisplayScreen($(this).attr(method)); }); }); ... /script then... body div class=MainWrapper !--- This creates the border and colors that we're used to on our submodals --- div class=LeftPanel div class=ActionHeaderAdd New/div div class=ActionSelection method=displayAddCancelCodeCancel Code/div div class=ActionSelection method=displayAddCancelReasonCancellation Reason/div br div class=ActionHeaderEdit/Delete/div div class=ActionSelection method=displayEditCancelCodeCancel Code/div div class=ActionSelection method=displayEditCancelReasonCancellation Reason/div /div div class=RightPanel div class=StatusBar/div div class=RightPanelContent/div /div /div /body The relevant CSS is: (don't mind the #someVar# it's a ColdFusion thing. Those are evaluated to actual colors before they hit the browser) div.MainWrapper{ height: 413px; width: 100%; margin: 2px 0px 0px 0px; padding: 3px; border: 3px solid #ThisMasterConsoleTableBorderColor#; background-color: #ThisMasterConsoleTableBackgroundColor#; } div.LeftPanel{ float : left; border-right : 1px solid #ThisMasterConsoleTableBorderColor#; width : 150px; height : 400px; } div.RightPanel{ float: right; border: 1px dashed ##A0A0A0; width: 400px; height: 400px; } div.StatusBar{ color: ##A0A0A0; font-weight: bold; width: 100%; height: 15px; border-bottom: 1px dashed ##A0A0A0; text-align: right; } /* Generic Classes */ .ActionHeader{ font-weight: bold; color: #ThisMasterConsoleHeaderTextColor#; background-color: #ThisMasterConsoleHeaderBackgroundColor#; padding: 3px; margin-right: 3px; cursor: default; } .ActionSelection{ padding-left: 5px; cursor: pointer; } .Underlined{ text-decoration: underline; } .ActiveLinkColor{ color: green; } Okay, so I've got a nice box with a three pixel border around it and it sits in a browser window sized just right leaving a two-pixel space between the edge of the window and the three pixel border. When I mouseover one of the ActionSelection divs the text contained
[jQuery] Re: Are there any particular ways to debug jQuery code?
-Original Message- From: Mitchell Waite [mailto:[EMAIL PROTECTED] $(#nest).click(function() { alert(got it); $(#nest).fade(slow); I still haven't picked up my jQuery book again - this weekend! But couldn't your write this like: alert(got it).fade(slow); Does the fade work if you remove the alert? I just don't know how to systematically track this down. Do you have the Firebug plugin for Firefox? http://www.getfirebug.com/ Jim
[jQuery] Re: vs '
Thanks to Sean, Aaron and Rob, this is now very clear. I have used both and it was just bugging me. I sort of prefer double quotes, its just more like everything else I do. From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sean Catchpole Sent: Thursday, July 26, 2007 9:48 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: vs ' On 7/26/07, Mitchell Waite [EMAIL PROTECTED] wrote: This going will make me sound really dumb but what is the difference between using single quote versus double quotes in jQuery, e.g. Mitchell, the concept of single vs double quotes is more of a javascript question. The simple answer is that there's no difference really. It is easier to type an html string if you use single quotes: Single: var html = 'a href=#link/a'; Double: var html = a href\#\link/a'; But sometimes you might want to use double instead: Single: var str = 'I\'m in love'; Double: var str = I'm in love; So just use whichever you feel is better for the situation. Some people are used to single quotes representing characters, whereas others think html = double quotes, javascript = single quotes. ~Sean
[jQuery] Are there any particular ways to debug jQuery code?
Noobie question 99 Are there any particular ways to debug jQuery code? I have a small handler $(#nest).click(function() { alert(got it); $(#nest).fade(slow); }); It's called by a click on a div with an id=nest. The click will make the alert go off but the fade wont work. For the life of me I can't get any affects to work on the #nest div. It's like something is interfering with the fade function. No affects work. I just don't know how to systematically track this down. Mitch
[jQuery] Re: vs '
On 7/26/07, Mitchell Waite [EMAIL PROTECTED] wrote: This going will make me sound really dumb but what is the difference between using single quote versus double quotes in jQuery, e.g. Mitchell, the concept of single vs double quotes is more of a javascript question. The simple answer is that there's no difference really. It is easier to type an html string if you use single quotes: Single: var html = 'a href=#link/a'; Double: var html = a href\#\link/a'; But sometimes you might want to use double instead: Single: var str = 'I\'m in love'; Double: var str = I'm in love; So just use whichever you feel is better for the situation. Some people are used to single quotes representing characters, whereas others think html = double quotes, javascript = single quotes. ~Sean
[jQuery] Re: Get a range of elements (getting late, and losing my mind)
Thanks, that got me on the right track. Just to follow through, I ended up passing a spread variable (number of pages on either side of the current page) to pager.js, and calling this function at the end: function pageTrim(){ $(li:not(.prev):not(.next),pager).show(); $(li:not(.prev),pager).lt(curPage-spread-1).hide(); $(li:not(.next),pager).gt(curPage+spread+1).hide(); } I could chain the first two lines, but combining lt() and gt() this way is problematic as I don't want what's in between, but what's outside if you see what I mean. The +-1 adjustments keep things even on either side for some reason. So not the prettiest, but gets the job done. I might delve further to try and add some leaps (first... 25...50...100...last). Would be nice to finally have a usable pager out there. On Jul 25, 11:02 pm, Ganeshji Marwaha [EMAIL PROTECTED] wrote: Something like this should work to get the index of the li relative to the list. There could be a shorter way, but u get the idea... var liIndex; $(ul.nav-page li).each(function(i) { if($(this).is(.curr)) { liIndex = i; return; } }); -GTG On 7/25/07, agent2026 [EMAIL PROTECTED] wrote: Hey everyone, I'm working on some pagination. Before I move on to my issue, the best pagination plugin I've found is John's pager (http://jquery.com/ api/js/pager.js). But it doesn't seem that this is being developed further, and the only other I've found (http://rikrikrik.com/jquery/ pager, listed on jquery.com) is really only suited to paginating large amounts of text, and not lists. Is there anything else out there? So far, John's pager is looking really good but for one problem - it has no handling for situations with a high number of pages. So, I'm trying to break it up - first prev 2 3 4 5 6 ... 10 ... 20 next last - sort of thing instead of 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ... etc. For this I figure I can use gt() and lt() as a start at least to trim off the edges so to speak, but I can't figure out how to get the index of the li with the current page (which has a class of 'cur') relative to the list and not every element in the DOM. If I could get that, then I'm guessing I could hide anything greater/less than the current index plus/minus 5 for example. Alternatively, and probably easier, each link in the pagination has a 'rel' attribute numbered sequentially, but I can't seem to get anything by .attr('rel'); Here's the mark up generated by John's pager (shortened for simplicity): ul class=nav-page li style=display: none; class=preva href=« Prev/a/li li class=cura rel=0 href=1/a/li li class=a rel=1 href=2/a/li li class=a rel=2 href=3/a/li li class=a rel=3 href=4/a/li li class=a rel=4 href=5/a/li li class=nexta href=Next »/a/li /ul Any help greatly appreciated. Thanks, Adam
[jQuery] Re: Testing required for latest jQuery Maps Plugin
AWESOME! Do you have a demo we can take a look at? On Jul 26, 8:35 am, Mike Alsup [EMAIL PROTECTED] wrote: Awesome work, Tane! That's a lot of great functionality! Mike * Added support for creating Yahoo! Maps, can create Map, Satallite or Hybrid. Check out available options below * Added support for creating points on Yahoo! maps. * Added support for creating Polylines on Yahoo! maps. * Added support for GeoRSS files on both Yahoo! and Google maps, as well as existing KML support for Google, method * name was changed from .addKml to .addRss * Moved directions search out of main namespace, now function that is called from within plugin by providing fields- Hide quoted text - - Show quoted text -
[jQuery] Joomla and jQuery
Hi guys! I've successfully implemented jQuery library into my Joomla based site - I'm using it for the drop-down login on the top of my page, but I have a bit of a problem with the gallery section. I'm using Simple Image Gallery ( http://www.joomlaworks.gr/#downloads_section ) and everytime I open the gallery my drop-down login (on the top of my page) doesn't show, but it works flawlessly everywhere else. If anyone has some experience with it, please help. Thank you in advance, NeOman
[jQuery] Re: reproduce position:fixed
I would stick with position: fixed for the browsers that support it (all but IE6) and for IE6 I would probably use CSS expressions to make it work properly. CSS Expressions will be the fastest, in terms of rendering, for IE6. Here is a site that talks about using expressions to make fixed position work in IE 6: http://www.howtocreate.co.uk/fixedPosition.html Using JavaScript to reproduce the position fixed effect will be very jerky. -- Brandon Aaron On 7/26/07, Alexandre Plennevaux [EMAIL PROTECTED] wrote: hello! i'm trying to have a div box stay permanently on the same position in the viewport, no matter how much the page is scrolled. I try to use dimensions.js to do it, but so far i've failed to calculate correctly the new top position of my element. Can someone explain me what i'm doing wrong? $(window).bind(scroll,function(){ $this = $('#leftCol'); var newTop = $this.offset(); var scrollTop = $this.scrollTop(); $('#leftCol').css({top: fixedTop.top + scrollTop}); }); Thank you! Alexandre Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.19/918 - Date: 25/07/2007 14:55
[jQuery] Re: [ANN] Dimensions 1.0 final is finally here!
Hey Alexandre ... are you trying to hi-jack my thread? :p I'll respond over on your thread: http://groups.google.com/group/jquery-en/browse_thread/thread/76320a7b9dd9a2c9/03363a190e9d34fa#03363a190e9d34fa -- Brandon Aaron On 7/26/07, Alexandre Plennevaux [EMAIL PROTECTED] wrote: ah! cool! Brandon, i'm fighting to get a div permanently sit on the screen! I could use position:fixed, but it messes my element position because i center its div container. could you explain how to have an element with position:relative stay on the same viewport position? Is it at all possible? thanks a lot, Alexandre -- *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Brandon Aaron *Sent:* jeudi 26 juillet 2007 14:15 *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: [ANN] Dimensions 1.0 final is finally here! Just wanted to let everyone know I released 1.0.1 last night that now officially supports fixed position. -- Brandon Aaron On 7/22/07, Brandon Aaron [EMAIL PROTECTED] wrote: All of the width and height methods work on hidden elements but the offset, position and offsetParent methods do not. All the methods handle positioned elements fine with the exception of fixed position. Fixed position has been very difficult to get implemented but it is a very high priority. I haven't done much testing with tables ... but to my knowledge it all works just fine. If you come across an issue, feel free to email the list and/or submit a bug report on the Dimensions project page. Thanks! -- Brandon Aaron On 7/22/07, Fred Janon [EMAIL PROTECTED] wrote: Looks good, Brandon. Does it work on: hidden element (display: none), positionned elements (absolute or relative) or on table cells and rows? Thanks Fred On 7/23/07, Brandon Aaron [EMAIL PROTECTED] wrote: The 1.0 release of Dimensions is finally here. It has been a long time in the making. Thanks to everyone who helped me test it! You can get the details and see an example using the new position method over at my blog: http://blog.brandonaaron.net/2007/07/22/dimensions-10/ You can download dimensions from the project page: http://jquery.com/plugins/project/dimensions Or via SVN: http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/ If you find any bugs or have any feature requests ... be sure to report them at the dimensions project page. Oh... and you can check out the documentation over here: http://brandonaaron.net/docs/dimensions/ Thanks! -- Brandon Aaron Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.19/918 - Date: 25/07/2007 14:55
[jQuery] Re: Testing required for latest jQuery Maps Plugin
Awesome work, Tane! That's a lot of great functionality! Mike * Added support for creating Yahoo! Maps, can create Map, Satallite or Hybrid. Check out available options below * Added support for creating points on Yahoo! maps. * Added support for creating Polylines on Yahoo! maps. * Added support for GeoRSS files on both Yahoo! and Google maps, as well as existing KML support for Google, method * name was changed from .addKml to .addRss * Moved directions search out of main namespace, now function that is called from within plugin by providing fields
[jQuery] Re: [ANN] Dimensions 1.0 final is finally here!
ah! cool! Brandon, i'm fighting to get a div permanently sit on the screen! I could use position:fixed, but it messes my element position because i center its div container. could you explain how to have an element with position:relative stay on the same viewport position? Is it at all possible? thanks a lot, Alexandre _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brandon Aaron Sent: jeudi 26 juillet 2007 14:15 To: jquery-en@googlegroups.com Subject: [jQuery] Re: [ANN] Dimensions 1.0 final is finally here! Just wanted to let everyone know I released 1.0.1 last night that now officially supports fixed position. -- Brandon Aaron On 7/22/07, Brandon Aaron HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: All of the width and height methods work on hidden elements but the offset, position and offsetParent methods do not. All the methods handle positioned elements fine with the exception of fixed position. Fixed position has been very difficult to get implemented but it is a very high priority. I haven't done much testing with tables ... but to my knowledge it all works just fine. If you come across an issue, feel free to email the list and/or submit a bug report on the Dimensions project page. Thanks! -- Brandon Aaron On 7/22/07, Fred Janon HYPERLINK mailto:[EMAIL PROTECTED] \n [EMAIL PROTECTED] wrote: Looks good, Brandon. Does it work on: hidden element (display: none), positionned elements (absolute or relative) or on table cells and rows? Thanks Fred On 7/23/07, Brandon Aaron HYPERLINK mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The 1.0 release of Dimensions is finally here. It has been a long time in the making. Thanks to everyone who helped me test it! You can get the details and see an example using the new position method over at my blog: HYPERLINK http://blog.brandonaaron.net/2007/07/22/dimensions-10/; \nhttp://blog.brandonaaron.net/2007/07/22/dimensions-10/ You can download dimensions from the project page: HYPERLINK http://jquery.com/plugins/project/dimensions; \nhttp://jquery.com/plugins/project/dimensions Or via SVN: HYPERLINK http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/; \nhttp://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/ If you find any bugs or have any feature requests ... be sure to report them at the dimensions project page. Oh... and you can check out the documentation over here: HYPERLINK http://brandonaaron.net/docs/dimensions/; \nhttp://brandonaaron.net/docs/dimensions/ Thanks! -- Brandon Aaron Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.19/918 - Date: 25/07/2007 14:55