[jQuery] Issues with non FF browsers
Hi, I'm trying to get some simple things to work using jquery, and everything currently works the way I'd like it to in Firefox. However, in Opera, Safari, and Internet Explorer, nothing works right -- and I haven't been able to figure out where the hang up is. My entire jquery code can be found here: http://www.moiph.com/javascript/index.js but a snippet is below: $(document).ready(function() { $("a.lastfm").click(function() { var type = $(this).attr("id"); var user = $("#user").val(); $("div.lastfmContent").html("Loading..."); $.get("parser.php", { type: type, user: user, }, refreshLastFM ); }); }); function refreshLastFM(data) { $("div.lastfmContent").html(data); $("div.lastfmContent").slideDown("slow"); } In IE and in Opera, "loading..." does not even display. I'm using the latest (1.1.1) compressed JQuery. Any help would be much appreciated! Thanks, Pat -- View this message in context: http://www.nabble.com/Issues-with-non-FF-browsers-tf3212115.html#a8920010 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] help - Interface Blind Toggle crashes Safari
I've got a fairly simple page - basically a container div with two divs - a leftPane and a rightPane. A third div serves as something to toggle the left pane open and closed using Interface's blindToggleHorizontally. For some reason, Safari crashes every time the leftPane is closed. Firefox, IE, Netscape all seem fine. I've stripped just about everything else out of the page trying to isolate the problem, but still can't find it - anyone seen this before? http://www.monkeypuzzle.net/testfiles/safari_crash_blindtoggle/index.htm I'm using Safari 2.0.4 on OS X 10.4.8 Thanks! -- View this message in context: http://www.nabble.com/help---Interface-Blind-Toggle-crashes-Safari-tf3211986.html#a8919693 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] The jQuery Litebox
On 2/11/07, ProjectAtomic <[EMAIL PROTECTED]> wrote: > New Features: > > Fully customizable, change colors, fonts, sizes, opacity, navigation labels. > Keyboard navigation and click image to advance. > Still degrades gracefully > > I would appreciate any feedback. Awesome - there is just one feature I would like to see in this (in fact it is missing in every JQuery Lightbox implementation) A Zoom Image feature like it is in Lightbox Plus - this allows a user to see images in full size even if their screen size is smaller than the actual image Cheers Tarique = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Want to know if sites are jQuery powered? Check this out!
On 2/9/07, Felix Geisendörfer <[EMAIL PROTECTED]> wrote: > I'm not Paul, but having just looked at the greasemonkey script source I > found that all it is doing is to load: > http://paul.jquery.com/jquerydetector.js And some people may have a problem with greasemonkey loading a foreign script at each and every site visited Best to put it in the user.js script. Tarique = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Right Click Plugin / Function
To disable or modify a client element just because you feel like it is not that useful. Why would you like to disable the right button anyway? Usability vs developer.. that's though On 2/11/07, Dan Atkinson <[EMAIL PROTECTED]> wrote: Feel free to jQuerify this: function click(e) { if (document.all) { if (event.button==2||event.button==3) { //IE //right click has been clicked //Return false will disabled return false; } } else { if (e.button==2||e.button==3) { //FF //right click has been clicked //Return false will disable e.preventDefault(); e.stopPropagation(); return false; } } } if (document.all)//IE document.onmousedown=click; else //FF document.onclick=click; It's pretty much just a right click disabler which won't allow right clicking in Firefox. -- View this message in context: http://www.nabble.com/Right-Click-Plugin---Function-tf3043202.html#a8915982 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery for President
:) it's been fixed! Has Blue State used jquery before? On 2/11/07, John Resig <[EMAIL PROTECTED]> wrote: > LOL - that's way overly dramatic. They just show a random group name > as an example - so some lame people picked a racist name for their > group - then Techcrunch (being the sensationalist blog that it is) > capitalized on it. > > With that out of the way, the site is done by Blue State Digital - > they do tons of great work for different political web sites. (Thick > Progress, DNC, Al Franken, etc.) > > --John > > On 2/11/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > > Barack got hacked! it doesn't look like jquery was involved! > > > > http://feeds.feedburner.com/~r/Techcrunch/~3/89525493/ > > > > And who is the mystery programmer??? > > > > http://feeds.feedburner.com/~r/Techcrunch/~3/89520865/ > > > > On 2/11/07, Dan Atkinson <[EMAIL PROTECTED]> wrote: > > > > > > If his policies are like his web developers JavaScript, we'll be cheering > > > in > > > the democrats come next election! > > > > > > Karl Swedberg-2 wrote: > > > > > > > > On Feb 10, 2007, at 7:42 PM, Glen Lipka wrote: > > > > > > > >> http://www.barackobama.com (jQuery!) > > > >> Although they are using 1.04. Hello? I was all on board until I > > > >> saw they haven't upgraded. Wassup widdat? > > > >> Is the developer for this site on the list? > > > > > > > > Hmmm. Maybe the developer is just getting started with jQuery... > > > > > > > > http://www.barackobama.com/js/cmxform.js: > > > >> if( document.addEventListener ) document.addEventListener > > > >> ( 'DOMContentLoaded', cmxform, false ); > > > >> > > > >> function cmxform(){ > > > >> // Hide forms > > > >> $( 'form.cmxform' ).hide().end(); > > > >> > > > >> // Processing > > > >> $( 'form.cmxform' ).find( 'li/label' ).not( '.nocmx' ).each > > > >> ( function( i ){ > > > >> var labelContent = this.innerHTML; > > > >> var labelWidth = document.defaultView.getComputedStyle( this, > > > >> '' ).getPropertyValue( 'width' ); > > > >> var labelSpan = document.createElement( 'span' ); > > > >> labelSpan.style.display = 'block'; > > > >> labelSpan.style.width = labelWidth; > > > >> labelSpan.innerHTML = labelContent; > > > >> this.style.display = '-moz-inline-box'; > > > >> this.innerHTML = null; > > > >> this.appendChild( labelSpan ); > > > >> } ).end(); > > > >> > > > >> // Show forms > > > >> $( 'form.cmxform' ).show().end(); > > > >> } > > > > > > > > Could be done like this... > > > > > > > > $(document).ready(function() { > > > >$('form.cmxform li/label').not('.nocmx').each(function(index) { > > > > var labelContent = $(this).html(); > > > > var labelWidth = $(this).width(); > > > > $(this).empty(); > > > > $('').html(labelContent).css({display: 'block', > > > > width: labelWidth}).appendTo(this); > > > >}); > > > > }); > > > > > > > > But why would someone need to append a to the label instead of > > > > just styling the label? > > > > And why would someone want to use a and then make it > > > > display:block instead of just using a ? > > > > > > > > Maybe I'm missing something? > > > > > > > >> in jQuery we trust. > > > > > > > > Yes, but some trust it more than others. :) > > > > > > > > --Karl > > > > _ > > > > Karl Swedberg > > > > www.englishrules.com > > > > www.learningjquery.com > > > > > > > > > > > > > > > > > > > > ___ > > > > jQuery mailing list > > > > discuss@jquery.com > > > > http://jquery.com/discuss/ > > > > > > > > > > > > > > -- > > > View this message in context: > > > http://www.nabble.com/jQuery-for-President-tf3207252.html#a8916014 > > > Sent from the JQuery mailing list archive at Nabble.com. > > > > > > > > > ___ > > > jQuery mailing list > > > discuss@jquery.com > > > http://jquery.com/discuss/ > > > > > > > > > -- > > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > > ___ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Powered Sites - Keep the Links Coming
I guess I could submit my non-commercial blog: http://blog.danen.org/ Gerry On 2/11/07, Dragan Krstic <[EMAIL PROTECTED]> wrote: May I add site of my own? www.zinba.com I'm using jquery all over the place. In backoffice (affiliate part) jquery do more stuff than VBscript. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery for President
LOL - that's way overly dramatic. They just show a random group name as an example - so some lame people picked a racist name for their group - then Techcrunch (being the sensationalist blog that it is) capitalized on it. With that out of the way, the site is done by Blue State Digital - they do tons of great work for different political web sites. (Thick Progress, DNC, Al Franken, etc.) --John On 2/11/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > Barack got hacked! it doesn't look like jquery was involved! > > http://feeds.feedburner.com/~r/Techcrunch/~3/89525493/ > > And who is the mystery programmer??? > > http://feeds.feedburner.com/~r/Techcrunch/~3/89520865/ > > On 2/11/07, Dan Atkinson <[EMAIL PROTECTED]> wrote: > > > > If his policies are like his web developers JavaScript, we'll be cheering in > > the democrats come next election! > > > > Karl Swedberg-2 wrote: > > > > > > On Feb 10, 2007, at 7:42 PM, Glen Lipka wrote: > > > > > >> http://www.barackobama.com (jQuery!) > > >> Although they are using 1.04. Hello? I was all on board until I > > >> saw they haven't upgraded. Wassup widdat? > > >> Is the developer for this site on the list? > > > > > > Hmmm. Maybe the developer is just getting started with jQuery... > > > > > > http://www.barackobama.com/js/cmxform.js: > > >> if( document.addEventListener ) document.addEventListener > > >> ( 'DOMContentLoaded', cmxform, false ); > > >> > > >> function cmxform(){ > > >> // Hide forms > > >> $( 'form.cmxform' ).hide().end(); > > >> > > >> // Processing > > >> $( 'form.cmxform' ).find( 'li/label' ).not( '.nocmx' ).each > > >> ( function( i ){ > > >> var labelContent = this.innerHTML; > > >> var labelWidth = document.defaultView.getComputedStyle( this, > > >> '' ).getPropertyValue( 'width' ); > > >> var labelSpan = document.createElement( 'span' ); > > >> labelSpan.style.display = 'block'; > > >> labelSpan.style.width = labelWidth; > > >> labelSpan.innerHTML = labelContent; > > >> this.style.display = '-moz-inline-box'; > > >> this.innerHTML = null; > > >> this.appendChild( labelSpan ); > > >> } ).end(); > > >> > > >> // Show forms > > >> $( 'form.cmxform' ).show().end(); > > >> } > > > > > > Could be done like this... > > > > > > $(document).ready(function() { > > >$('form.cmxform li/label').not('.nocmx').each(function(index) { > > > var labelContent = $(this).html(); > > > var labelWidth = $(this).width(); > > > $(this).empty(); > > > $('').html(labelContent).css({display: 'block', > > > width: labelWidth}).appendTo(this); > > >}); > > > }); > > > > > > But why would someone need to append a to the label instead of > > > just styling the label? > > > And why would someone want to use a and then make it > > > display:block instead of just using a ? > > > > > > Maybe I'm missing something? > > > > > >> in jQuery we trust. > > > > > > Yes, but some trust it more than others. :) > > > > > > --Karl > > > _ > > > Karl Swedberg > > > www.englishrules.com > > > www.learningjquery.com > > > > > > > > > > > > > > > ___ > > > jQuery mailing list > > > discuss@jquery.com > > > http://jquery.com/discuss/ > > > > > > > > > > -- > > View this message in context: > > http://www.nabble.com/jQuery-for-President-tf3207252.html#a8916014 > > Sent from the JQuery mailing list archive at Nabble.com. > > > > > > ___ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > -- > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Sortables not working after adding item to container
er, note to self: RTFM!Directly from the sortables documentation page: "In a sortable can be added new item by simply inserting the new item via DOM and then using SortableAddItem." embarassing! :| Only problem I'm having now is when I create the item, I'm adding the ID dynamically by removing spaces from the new LIs contents. When I do that and attach SortableAddItem, the page wants to refresh. If I just hard code an ID into the SortableAddItem, all works as expected. If I don't use SortableAddItem, the item adds fine without page refresh but obviously I can't sort it. In case it's some sort of clue, I did have to add an 'onsubmit: return false;' to the form. I put a breakpoint in with firebug (all praise firebug) right after the .append line and right before the SortableAddItem line and it appears to be adding to the dom correctly - in the right spot with a valid id. (Line 45) Any ideas? I *really* hope this isn't as obvious. :) Thank you, Will ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery for President
Barack got hacked! it doesn't look like jquery was involved! http://feeds.feedburner.com/~r/Techcrunch/~3/89525493/ And who is the mystery programmer??? http://feeds.feedburner.com/~r/Techcrunch/~3/89520865/ On 2/11/07, Dan Atkinson <[EMAIL PROTECTED]> wrote: > > If his policies are like his web developers JavaScript, we'll be cheering in > the democrats come next election! > > Karl Swedberg-2 wrote: > > > > On Feb 10, 2007, at 7:42 PM, Glen Lipka wrote: > > > >> http://www.barackobama.com (jQuery!) > >> Although they are using 1.04. Hello? I was all on board until I > >> saw they haven't upgraded. Wassup widdat? > >> Is the developer for this site on the list? > > > > Hmmm. Maybe the developer is just getting started with jQuery... > > > > http://www.barackobama.com/js/cmxform.js: > >> if( document.addEventListener ) document.addEventListener > >> ( 'DOMContentLoaded', cmxform, false ); > >> > >> function cmxform(){ > >> // Hide forms > >> $( 'form.cmxform' ).hide().end(); > >> > >> // Processing > >> $( 'form.cmxform' ).find( 'li/label' ).not( '.nocmx' ).each > >> ( function( i ){ > >> var labelContent = this.innerHTML; > >> var labelWidth = document.defaultView.getComputedStyle( this, > >> '' ).getPropertyValue( 'width' ); > >> var labelSpan = document.createElement( 'span' ); > >> labelSpan.style.display = 'block'; > >> labelSpan.style.width = labelWidth; > >> labelSpan.innerHTML = labelContent; > >> this.style.display = '-moz-inline-box'; > >> this.innerHTML = null; > >> this.appendChild( labelSpan ); > >> } ).end(); > >> > >> // Show forms > >> $( 'form.cmxform' ).show().end(); > >> } > > > > Could be done like this... > > > > $(document).ready(function() { > >$('form.cmxform li/label').not('.nocmx').each(function(index) { > > var labelContent = $(this).html(); > > var labelWidth = $(this).width(); > > $(this).empty(); > > $('').html(labelContent).css({display: 'block', > > width: labelWidth}).appendTo(this); > >}); > > }); > > > > But why would someone need to append a to the label instead of > > just styling the label? > > And why would someone want to use a and then make it > > display:block instead of just using a ? > > > > Maybe I'm missing something? > > > >> in jQuery we trust. > > > > Yes, but some trust it more than others. :) > > > > --Karl > > _ > > Karl Swedberg > > www.englishrules.com > > www.learningjquery.com > > > > > > > > > > ___ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > > -- > View this message in context: > http://www.nabble.com/jQuery-for-President-tf3207252.html#a8916014 > Sent from the JQuery mailing list archive at Nabble.com. > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jquery graphics and comet?
Is anyone working on jquery plugins for graphics and comet functionality? Dojo, prototype and even Mochikit have been coming out with graphics, charts on one hand and 'push' ajax or comet on the other. I hope some of our own gurus are working on bringing us these goodies as well :) -- View this message in context: http://www.nabble.com/jquery-graphics-and-comet--tf3211186.html#a8917653 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery for President
If his policies are like his web developers JavaScript, we'll be cheering in the democrats come next election! Karl Swedberg-2 wrote: > > On Feb 10, 2007, at 7:42 PM, Glen Lipka wrote: > >> http://www.barackobama.com (jQuery!) >> Although they are using 1.04. Hello? I was all on board until I >> saw they haven't upgraded. Wassup widdat? >> Is the developer for this site on the list? > > Hmmm. Maybe the developer is just getting started with jQuery... > > http://www.barackobama.com/js/cmxform.js: >> if( document.addEventListener ) document.addEventListener >> ( 'DOMContentLoaded', cmxform, false ); >> >> function cmxform(){ >> // Hide forms >> $( 'form.cmxform' ).hide().end(); >> >> // Processing >> $( 'form.cmxform' ).find( 'li/label' ).not( '.nocmx' ).each >> ( function( i ){ >> var labelContent = this.innerHTML; >> var labelWidth = document.defaultView.getComputedStyle( this, >> '' ).getPropertyValue( 'width' ); >> var labelSpan = document.createElement( 'span' ); >> labelSpan.style.display = 'block'; >> labelSpan.style.width = labelWidth; >> labelSpan.innerHTML = labelContent; >> this.style.display = '-moz-inline-box'; >> this.innerHTML = null; >> this.appendChild( labelSpan ); >> } ).end(); >> >> // Show forms >> $( 'form.cmxform' ).show().end(); >> } > > Could be done like this... > > $(document).ready(function() { >$('form.cmxform li/label').not('.nocmx').each(function(index) { > var labelContent = $(this).html(); > var labelWidth = $(this).width(); > $(this).empty(); > $('').html(labelContent).css({display: 'block', > width: labelWidth}).appendTo(this); >}); > }); > > But why would someone need to append a to the label instead of > just styling the label? > And why would someone want to use a and then make it > display:block instead of just using a ? > > Maybe I'm missing something? > >> in jQuery we trust. > > Yes, but some trust it more than others. :) > > --Karl > _ > Karl Swedberg > www.englishrules.com > www.learningjquery.com > > > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/jQuery-for-President-tf3207252.html#a8916014 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Right Click Plugin / Function
Feel free to jQuerify this: function click(e) { if (document.all) { if (event.button==2||event.button==3) { //IE //right click has been clicked //Return false will disabled return false; } } else { if (e.button==2||e.button==3) { //FF //right click has been clicked //Return false will disable e.preventDefault(); e.stopPropagation(); return false; } } } if (document.all)//IE document.onmousedown=click; else //FF document.onclick=click; It's pretty much just a right click disabler which won't allow right clicking in Firefox. -- View this message in context: http://www.nabble.com/Right-Click-Plugin---Function-tf3043202.html#a8915982 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Sortables not working after adding item to container
Just a guess ... but you probably need to destroy and re-create the sortable so as to include the new element. scriptaculous works like this as well. - wg - Original Message From: Will <[EMAIL PROTECTED]> To: jQuery Discussion. Sent: Sunday, February 11, 2007 12:43:21 PM Subject: [jQuery] Sortables not working after adding item to container Hi, I'm trying to sketch out a "menu builder" and I'm using Interface's Sortables. Everything works fine until I add an LI to the UL. Well, everything continues to work fine except that the new menu item isn't draggable/sortable. I suppose it is sortable because you can drag existing ones below it and the list will properly reorder. If you try to drag the item you just copied, no luck. The new item has both the same class as the other list items and it has an ID. Do I need to "refresh" the sortable plug in when adding new items? If so, how might I do that? Here's an example page: http://luktown.org/js/sortable_list.html Thank you much, Will ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Validation 1.0 Alpha
I should also add that I'm not trying to replace the current error message functionality, just add to it. On 2/11/07, Aaron Heimlich <[EMAIL PROTECTED]> wrote: On 2/10/07, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > > I think the better approach tells the user what it expects with one > message. > Telling the user what you expect and telling the user what they did wrong are two different things, IMO. Consider this example: $("#myform").validate({ rules: { password: { required:true, rangeLength: [5, 32], alnum:true**}, }, messages { password: "Please enter a password that is between 5 and 32 characters long and contains only letters and numbers" } }); Now, suppose the user enters this: &^%#$#@ (seven non-alphanumeric characters) What did they do wrong? The length is fine, so they pass the rangeLength rule, but they fail the alphanumeric rule. What kind of error message (or *messages*) should the user see if his input for a particular field passes some validation rules but not all? IMO, the only thing that " Please enter a password that is between 5 and 32 characters long and contains only letters and numbers" tells me is that I did something wrong, but it doesn't tell me *specifically what* (something like that is actually more appropriate as a piece of "help text" shown alongside the password field). It doesn't tell me that my password's length was OK but I was supposed enter only letters and numbers. Sure the user might be able the figure this out for himself, but why make him do more work than he's already doing? This is much more helpful: $("#myform").validate({ rules: { password: { required:true, minLength: 5, maxLength: 32, alnum:true*}, }, messages { password: { required: "Please enter a password that is between 5 and 32 characters long and contains only letters and numbers", minLength: "Passwords must be at least 5 characters long", maxLength: "Passwords must be no more than 32 characters long" alnum: "Passwords must contain only letters and numbers" } } }); If the user enters nothing, he gets an error message asking him to fill in the password field (with some helpful reminders of what to enter). If his password is too short, his gets an error message saying it's too short. If his password is too long, his gets an error message saying that it's too long. If he enters non-alphanumeric characters, he gets an error message saying that passwords must only contain letters and numbers. If his password fails multiple rules ( i.e. too short and non-alphanumeric characters), then he could get multiple error messages explaining that his password is too short and contains non-alphanumeric characters. The point is that instead of just telling them that they did not enter what you expected them to (and reiterate what you expect of them, which is what I believe your current setup does), you tell them *specifically why* their input was not what you expected them to enter. ** alnum is a custom rule that checks if the input contains only alphanumeric characters (letters and numbers) -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Powered Sites - Keep the Links Coming
May I add site of my own? www.zinba.com I'm using jquery all over the place. In backoffice (affiliate part) jquery do more stuff than VBscript. -- Dragan Krstić krdr http://krdr.ebloggy.com/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Validation 1.0 Alpha
On 2/10/07, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: I think the better approach tells the user what it expects with one message. Telling the user what you expect and telling the user what they did wrong are two different things, IMO. Consider this example: $("#myform").validate({ rules: { password: { required:true, rangeLength: [5, 32], alnum:true**}, }, messages { password: "Please enter a password that is between 5 and 32 characters long and contains only letters and numbers" } }); Now, suppose the user enters this: &^%#$#@ (seven non-alphanumeric characters) What did they do wrong? The length is fine, so they pass the rangeLength rule, but they fail the alphanumeric rule. What kind of error message (or *messages*) should the user see if his input for a particular field passes some validation rules but not all? IMO, the only thing that "Please enter a password that is between 5 and 32 characters long and contains only letters and numbers" tells me is that I did something wrong, but it doesn't tell me *specifically what* (something like that is actually more appropriate as a piece of "help text" shown alongside the password field). It doesn't tell me that my password's length was OK but I was supposed enter only letters and numbers. Sure the user might be able the figure this out for himself, but why make him do more work than he's already doing? This is much more helpful: $("#myform").validate({ rules: { password: { required:true, minLength: 5, maxLength: 32, alnum:true*}, }, messages { password: { required: "Please enter a password that is between 5 and 32 characters long and contains only letters and numbers", minLength: "Passwords must be at least 5 characters long", maxLength: "Passwords must be no more than 32 characters long" alnum: "Passwords must contain only letters and numbers" } } }); If the user enters nothing, he gets an error message asking him to fill in the password field (with some helpful reminders of what to enter). If his password is too short, his gets an error message saying it's too short. If his password is too long, his gets an error message saying that it's too long. If he enters non-alphanumeric characters, he gets an error message saying that passwords must only contain letters and numbers. If his password fails multiple rules (i.e. too short and non-alphanumeric characters), then he could get multiple error messages explaining that his password is too short and contains non-alphanumeric characters. The point is that instead of just telling them that they did not enter what you expected them to (and reiterate what you expect of them, which is what I believe your current setup does), you tell them *specifically why* their input was not what you expected them to enter. ** alnum is a custom rule that checks if the input contains only alphanumeric characters (letters and numbers) -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checking for a class?
D'oh! Why not indeed! Thanks, Christof. :) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2007, at 3:22 PM, Christof Donat wrote: Hi, You could also use one of the attribute selectors to filter a set of matched elements. If you don't care where the particular value appears within the class attribute, you could do this: $('[EMAIL PROTECTED]') Why not simply this $('#id.someClass') Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Sortables not working after adding item to container
Seems to be working fine in IE 7. Not able to add a menu item, however. Rick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Will Sent: Sunday, February 11, 2007 3:43 PM To: jQuery Discussion. Subject: [jQuery] Sortables not working after adding item to container Hi, I'm trying to sketch out a "menu builder" and I'm using Interface's Sortables. Everything works fine until I add an LI to the UL. Well, everything continues to work fine except that the new menu item isn't draggable/sortable. I suppose it is sortable because you can drag existing ones below it and the list will properly reorder. If you try to drag the item you just copied, no luck. The new item has both the same class as the other list items and it has an ID. Do I need to "refresh" the sortable plug in when adding new items? If so, how might I do that? Here's an example page: http://luktown.org/js/sortable_list.html Thank you much, Will ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Sortables not working after adding item to container
Hi, I'm trying to sketch out a "menu builder" and I'm using Interface's Sortables. Everything works fine until I add an LI to the UL. Well, everything continues to work fine except that the new menu item isn't draggable/sortable. I suppose it is sortable because you can drag existing ones below it and the list will properly reorder. If you try to drag the item you just copied, no luck. The new item has both the same class as the other list items and it has an ID. Do I need to "refresh" the sortable plug in when adding new items? If so, how might I do that? Here's an example page: http://luktown.org/js/sortable_list.html Thank you much, Will ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checking for a class?
Hi, > You could also use one of the attribute selectors to filter a set of > matched elements. If you don't care where the particular value > appears within the class attribute, you could do this: > > $('[EMAIL PROTECTED]') Why not simply this $('#id.someClass') Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checking for a class?
You could also use one of the attribute selectors to filter a set of matched elements. If you don't care where the particular value appears within the class attribute, you could do this: $('[EMAIL PROTECTED]') --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2007, at 2:16 PM, Brandon Aaron wrote: You can use the .is() method to check if an element has a particular class like this. $('#id').is('.someClass'); It will return true if it has that particular class and false if it doesn't. The .is() method can also be used to check other things as well. Here are the docs for the method. http://jquery.bassistance.de/api-browser/#isString -- Brandon Aaron On 2/11/07, Tom Holder <[EMAIL PROTECTED]> wrote: How can I check to see if there is a particular css class on an element? Presumably I could just do $("#id").attr("class"); but I'm doing it in a loop where the class names have multiple classes on them and I only want to check for a specific one. Bith loathed to write a regexp for something so simple. Cheers Tom ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Mouse coordenates
Abel Tamayo wrote: > Ok, this is a noob question, but what is the fastest, cross-browser > way to obtain the mouse coordenates? I've found tons of info about > this in google, but it all seemed a little bit dated (with comments > about Netscape 4 and the war of browsers all the time). > Thanks. > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > Abel, It depends on what mouse coorldinates you're looking for -- coordinates on page or coordinates in viewport. See; http://www.quirksmode.org/dom/w3c_events.html#mousepos What is *VERY* cool about jquery is that it "fixes" the event data! This means you don't need to code a nasty platform detection/workaround, and can just use event.pageX & event.pageY for instance. E.g. to continually output the coords on page, you can do; $().mousemove(function(e){ $('body').append('X-CORD: '+ e.pageX +' Y-CORD:'+ e.pageY +'
'); }); ~ BRice ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] tabs plugin with ajax support and callbacks
thanks! that works now. On 2/11/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Daniel McBrearty schrieb: > > hi > > > > I've been using the tabs plugin for a while, I just updated to use the > > new ajax support. Works nice. > > > > Now I want to add a callback whenever a tab is updated: > > > > $(".tabs").tabs( { remote: true, > > loadingClass: 'progress', > > callback: function () { alert( 'done'); } > >} ); > > > > > > but the callback function is never actually called. > > > > any ideas why? > > > > thanks > > > > Daniel > > Just replace "callback" with "onShow". That had been changed a while ago. > > > -- Klaus > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR
Alexandre Plennevaux wrote: > > > function alert() { > $('#ex1a').jqm(); > } > > $().ready(function() { > alert("hello world"); > > }); > > > That wouldn't work as it would never execute the trigger. If you set the autofire parameter, it *may* work ONCE; e.g. --- function alert() { $('#ex1a').jqm({autofire:true});} $().ready(function() {alert("hello world");}); --- Here is my version (which works); --- Show Last Alert function alert(i) { $('#alert').html(i); $('#alertTrigger').click(); } $().ready(function(){ $('#alert').jqm({trigger: '#alertTrigger'}); alert('This is a test'); }); --- I guess it's time to start styling a alert dialog ;) ~ Brice ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Taconite Plugin - New and Improved!
Mike, this is an extraordinary idea. I'm still working out exactly how I can implement it into my current projects, but this could very well change the way I use JavaScript in heavy AJAX environments. This allows me to use true AJAX (as opposed to AHAH) while still maintaining the flexibility of making asynchronous calls to update HTML snippets. The beauty I see is that I don't need to write one large library that contains each and every JS call I'll make in the lifetime of a page. Instead, I only have to include the relevant code for the particular call that has just been made. Plus, using a MVC framework and templating engine, the HTML and JS can be cleanly written together with well-formed XML documents. Thank you. This is great. m. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: Tuesday, February 06, 2007 11:40 AM To: jQuery Discussion. Subject: [jQuery] Taconite Plugin - New and Improved! I've just rewritten my Taconite Plugin and added some pretty cool features. If you're not familiar with Taconite, it's an easy way to effect multiple client-side updates with the results of a single ajax call. With this latest version there is absolutely no code required to process command documents returned from the server. The plugin detects taconite responses and automatically processes them for you. Other changes: - Available commands now include almost everything in the jQuery API - Vastly improved logging/debug support - Fully extensible Full details and examples can be found at: http://www.malsup.com/jquery/taconite/ Mike PS: For anyone using my old xmlExec plugin, this is a drop-in replacement. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checking for a class?
You can use the .is() method to check if an element has a particular class like this. $('#id').is('.someClass'); It will return true if it has that particular class and false if it doesn't. The .is() method can also be used to check other things as well. Here are the docs for the method. http://jquery.bassistance.de/api-browser/#isString -- Brandon Aaron On 2/11/07, Tom Holder <[EMAIL PROTECTED]> wrote: > How can I check to see if there is a particular css class on an element? > > Presumably I could just do $("#id").attr("class"); but I'm doing it in a > loop where the class names have multiple classes on them and I only want to > check for a specific one. Bith loathed to write a regexp for something so > simple. > > Cheers > Tom > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checking for a class?
> How can I check to see if there is a particular css class on an element? Hi Tom, You can use the "is" method for that. $(whatever).is('.myClass'); http://jquery.bassistance.de/api-browser/#isString ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Checking for a class?
How can I check to see if there is a particular css class on an element? Presumably I could just do $("#id").attr("class"); but I'm doing it in a loop where the class names have multiple classes on them and I only want to check for a specific one. Bith loathed to write a regexp for something so simple. Cheers Tom ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Mouse coordenates
Ok, this is a noob question, but what is the fastest, cross-browser way to obtain the mouse coordenates? I've found tons of info about this in google, but it all seemed a little bit dated (with comments about Netscape 4 and the war of browsers all the time). Thanks. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Interface 1.2
I'm testing it at http://exhibitq.com/talk/discussion/1/html-test/#Comment_5 http://exhibitq.com/talk/discussion/1/html-test/#Comment_5 The internal anchor links on that page all worth as I would expect and scroll to each otehr very nicely ("Top of Page", "Bottom of Page" and the "a link to the first one." link to the first comment in the second comment). However, if you then click on the http://exhibitq.com/talk/discussions/ "Discussions" tab at the top of the page and try clicking on any of the discussion links, such as http://exhibitq.com/talk/discussion/3/attachments-2--plugins/#Item_3 "Attachments 2 + plugins" , nothing happens :( It seems that links to other pages with anchors in them don't function at all, like the one mentioned above which looks like this http://exhibitq.com/talk/discussion/3/attachments-2--plugins/#Item_3. However, turning JS off on that page allows that link to work perfectly as expected. All I'm looking for is for the links on the discussions page to act like they used to before, ie. take you directly to the anchor specified in the link on the page they are describing. Please let me know if you want any more detail or to explain anything further, however I think you'll find out exactly what the problem is if you click around on the site a little bit first. Luke Stefan Petre wrote: > > Luke, can you explain a little bit more what are you want to do ? > > Stefan > > [-Stash-] wrote: >> Love Interface, but I noticed that one bug still isn't fixed in the >> ScrollTo >> plugin. Any news on when it might be fixed? >> More info: http://www.nabble.com/forum/ViewPost.jtp?post=8868839&framed=y >> >> Luke >> -- View this message in context: http://www.nabble.com/Interface-1.2-tf3203349.html#a8912785 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] toggle(fn, fn) does not execute
Thank you Karl, I realised the difference between the two functions: toggle() triggers the show/hide effect and toggle(fn,fn) is an event handler. Here is what i wanted to achieve: $(function(){ $('.desc div:first-child') .toggle( function(){ $(this).next().hide('fast').end().append('<...>'); }, function(){ $(this).next().show('fast'); $('b', this).remove(); } ); }) clicking a form caption hides the textarea below it and appends an indication that there is hidden content below the caption. Clicking again shows the hidden textarea and removes the indication. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] JQuery IE7 and document.ready
Hi, Thanks for pointing me to the bug report. Someone suggested a simple solution for it. The problem as described in the report was that the IE strips out the script if it is a first character of the page. By inserting a false div &nbsq; , I was able to get rid of the problem. Regards, Ritesh malsup wrote: > >> I will try to narrate the actual scenario. I have a list of buttons on my >> home page. When a user clicks on one of the button, it loads a list >> (select >> > option). Any selection made on the list loads another div (again using >> ajax) and I use jquery to load the second div. This all works as expected >> in >> Firefox but as soon as I try to get it working on IE7, it fails. I tried >> debugging and found that the second $(document).ready (loaded with ajax >> load) never got fired. > > Ritesh, > > Read through this bug - perhaps this is what's causing your issue: > > http://jquery.com/dev/bugs/bug/746/ > > > To add a callback to the load method, simply do this: > > $('#myElement').load(myUrl, function(serverResponseData) { > // this is the callback > }); > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/JQuery-IE7-and-document.ready-tf3207782.html#a8912603 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Help with a function
> all...this is the completed thing...certainly, if people want to crit > what I've done here that could be educational... Hi Vaska, This is a very active mailing list so sometimes things get missed. Good job working out your code. Some quick comments: 1.) Inside a plugin 'this' is the jQuery object so you don't need to wrap it in $(). 2.) Some things are easier - and faster - without jQuery, like getting simple element attrs. 3.) Don't forget the 'var' keyword when declaring variables. jQuery.fn.tabpost = function(callback) { this.click(function() { var check = this.title; // call back will go here eventually $('#' + this.parentNode.id + ' li').each(function() { $(this).compare(check, this.title); }); }); } ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery for President
Karl Swedberg schrieb: > Well, there you go! :) > > Looks like the developer did a copy/paste job -- unless Nick Rigby > actually designed the Barack Obama site. > > Thanks for the link, Jörn. Helps to explain some of the JS-gymnastics. > The comments are especially interesting. Yep, indeed. I hope we can drop that workaround one day and simply use inline-block... -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] interface plugin autocomplete always starts with a full query
anyone??? bdee wrote: > > anyone?? why doesnt this work in IE - only seems to work in firefox? > > -- View this message in context: http://www.nabble.com/interface-plugin-autocomplete-always-starts-with-a-full-query-tf3202858.html#a8911751 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery for President
Well, there you go! :) Looks like the developer did a copy/paste job -- unless Nick Rigby actually designed the Barack Obama site. Thanks for the link, Jörn. Helps to explain some of the JS- gymnastics. The comments are especially interesting. Cheers, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2007, at 9:13 AM, Jörn Zaefferer wrote: Karl Swedberg schrieb: On Feb 10, 2007, at 7:42 PM, Glen Lipka wrote: *http://www.barackobama.com** (jQuery!)* /Although they are using 1.04. Hello? I was all on board until I saw they haven't upgraded. Wassup widdat? //Is the developer for this site on the list?/ Hmmm. Maybe the developer is just getting started with jQuery... http://www.barackobama.com/js/cmxform.js: See http://alistapart.com/articles/prettyaccessibleforms -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Help with a function
Hmmm...I'm not sure how to get help around here? Most of my questions just go unanswered...wish there was a forum for all of this... But I did figure out what I needed to do...after a couple hours of reading...and alot of fiddling around. It was rather simple all in all...this is the completed thing...certainly, if people want to crit what I've done here that could be educational... Thanks... jQuery.fn.tabpost = function(callback) { $(this).click(function() { check = $(this).attr('title'); // call back will go here eventually $('#' + $(this).parent().attr('id') + ' li').each(function() { $(this).compare(check, $(this).attr('title')); }); }); } PS: I'm loving Jquery more everyday I get to work with it... On 10 Feb 2007, at 17:08, Vaska wrote: > I'm a little unclear about usage of $(this). I have this function > that currently works but the idea is that I can reuse this for many > instance (I'll put a callback into this later that will be different > for each time it's used). What it does (for the moment), is simply > toggle (highlight) the selected element in a list (LI): > > jQuery.fn.tabpost = function() > { > $(this).click(function() > { > check = $(this).attr('tabindex'); > > $('.ajx-thumbs li').each(function() // this line is the problem > { > $(this).compare(check, $(this).attr('tabindex')); // > sets the > class to 'active' if true or removes it... > }); > > return false; > }); > } > > Works just right, expect that I have '.ajx-thumbs li' specified - I > need to have the function know what it's dealing with here (as it > goes through the list). The function is called into action in a > document ready... > > $('.ajx-thumbs li').tabpost(); > > This is what the html looks like... > > > 100 > 200 // active at page > output > 300 > Original > > > This would be my first actual Jquery function...I could use some > pointers here I bet. ;) > > Any thought? > > Thanks... > > PS: when completed it will be something like... > > $('.ajx-thumbs li').tabpost(callback1); > $('.ajx-image li').tabpost(callback2); > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery for President
Karl Swedberg schrieb: > On Feb 10, 2007, at 7:42 PM, Glen Lipka wrote: > >> *http://www.barackobama.com** (jQuery!)* >> /Although they are using 1.04. Hello? I was all on board until I >> saw they haven't upgraded. Wassup widdat? >> //Is the developer for this site on the list?/ > > Hmmm. Maybe the developer is just getting started with jQuery... > > http://www.barackobama.com/js/cmxform.js: See http://alistapart.com/articles/prettyaccessibleforms -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] toggle(fn, fn) does not execute
Hi there Δημήτρης, The two .toggle() methods are very different (and, therefore, often confusing to new users of jQuery): The first one toggles the show and hide effects: for example, .toggle('slow') The second one is a compound event handler that triggers 2 alternating functions: for example, .toggle(function() { // Stuff to do every *odd* time the element is clicked; }, function() { // Stuff to do every *even* time the element is clicked; }); It looks like you're trying to trigger an even handler inside an event handler? Please try this instead: $(function(){ $('.desc span:first-child').toggle(function() { $(this).next().hide(); }, function() { $(this).next().show(); }); }); If all you are doing is hiding and showing the next sibling element, though, you could do the same thing this way: $(function(){ $('.desc span:first-child').bind('click', function() { $(this).next().toggle(); }); }); Hope that helps. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2007, at 8:02 AM, Δημήτρης Χρυσομάλλης wrote: Hello, I am new to jquery and I am having a problem with toggle( fn, fn). The code below does not seem to work (no errors though). But if I call toggle() with no arguments, it works fine. The thing is, I need to do different things on each click. Might this be a bug? $(function(){ $('.desc span:first-child') .bind("click", function(){ $(this) .next() .toggle( function(){ $(this).hide(); }, function(){ $(this).show(); } ); }); }); I am using it with this markup: description: lorem ipsum... Thank you. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] toggle(fn, fn) does not execute
Hello, I am new to jquery and I am having a problem with toggle( fn, fn). The code below does not seem to work (no errors though). But if I call toggle() with no arguments, it works fine. The thing is, I need to do different things on each click. Might this be a bug? $(function(){ $('.desc span:first-child') .bind("click", function(){ $(this) .next() .toggle( function(){ $(this).hide(); }, function(){ $(this).show(); } ); }); }); I am using it with this markup: description: lorem ipsum... Thank you. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Interface 1.2
Luke, can you explain a little bit more what are you want to do ? Stefan [-Stash-] wrote: > Love Interface, but I noticed that one bug still isn't fixed in the ScrollTo > plugin. Any news on when it might be fixed? > More info: http://www.nabble.com/forum/ViewPost.jtp?post=8868839&framed=y > > Luke > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] JQuery IE7 and document.ready
> I will try to narrate the actual scenario. I have a list of buttons on my > home page. When a user clicks on one of the button, it loads a list (select > > option). Any selection made on the list loads another div (again using > ajax) and I use jquery to load the second div. This all works as expected in > Firefox but as soon as I try to get it working on IE7, it fails. I tried > debugging and found that the second $(document).ready (loaded with ajax > load) never got fired. Ritesh, Read through this bug - perhaps this is what's causing your issue: http://jquery.com/dev/bugs/bug/746/ To add a callback to the load method, simply do this: $('#myElement').load(myUrl, function(serverResponseData) { // this is the callback }); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] tabs plugin with ajax support and callbacks
Daniel McBrearty schrieb: > hi > > I've been using the tabs plugin for a while, I just updated to use the > new ajax support. Works nice. > > Now I want to add a callback whenever a tab is updated: > > $(".tabs").tabs( { remote: true, > loadingClass: 'progress', > callback: function () { alert( 'done'); } >} ); > > > but the callback function is never actually called. > > any ideas why? > > thanks > > Daniel Just replace "callback" with "onShow". That had been changed a while ago. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR
No, not at all !( This is what i tried: function alert() { $('#ex1a').jqm(); } $().ready(function() { alert("hello world"); }); Just nothing happens. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of R. Rajesh Jeba Anbiah Sent: dimanche 11 février 2007 11:55 To: discuss@jquery.com Subject: Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR On Feb 10, 3:02 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]> wrote: > Well, i used to disable alert like this: > > function alert() {} Oh, thanks. > But i guess you could tweak it to launch a modal window instead. I'll > give it a try Just curious, was your try success? -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.441 / Base de données virus: 268.17.35/680 - Date: 10/02/2007 21:15 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] JQuery IE7 and document.ready
Hi Matt and John The code I provided was just a demo to show how things are arranged. The actual code is free of error as I checked with firebug. It seems the trouble is with what Matt is sujesting that $(document).ready wont work with ajax load. I am not sure what might be the best solution. I will try to narrate the actual scenario. I have a list of buttons on my home page. When a user clicks on one of the button, it loads a list (select > option). Any selection made on the list loads another div (again using ajax) and I use jquery to load the second div. This all works as expected in Firefox but as soon as I try to get it working on IE7, it fails. I tried debugging and found that the second $(document).ready (loaded with ajax load) never got fired. In some other post, few have suggested using callback function. Can someone provide me a example of that. Is there a way to call $(document).ready after ajax load. Regards, Ritesh Matt Stith wrote: > > $(document).ready wont work in pages loaded via AJAX, try something like > this: > >document.ready(... > $('button').click( > $('#load_div').load(..some url.,function(response) { > //..whatever you need to be done after the load > }); > }); > > > > On 2/11/07, Ritesh Agrawal <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I am new to JQuery. I have tried few ajax features of jquery and they all >> work beautifully on firefox. But when I try them on IE7, they fail. The >> problem is with ajax and jquery. I load a div using ajax "load" function. >> The contents of the div also include some new jquery script to controller >> the behaviour of new dom elements. However, the document.ready() never >> gets fired up after the ajax div is loaded. >> >> here is example of what I am saying >> Origial Page >> >> >> document.ready(... >> $('button').click( >> $('#load_div').load(..some url.); >> }); >> >> >> >> . >> >> >> >> After Ajax >> >> >> document.ready(... >> $('button').click( >> $('#load_div').load(..some url.); >> }); >> >> >> >> . >> >> >> document.ready(){.}); >> >> >> >> >> >> I saw a similar issue on the mailing list and wasn't clear with the >> response. Can someone provide me a code example. >> >> Regards, >> Ritesh >> >> -- >> >> Even a clock that does not work is right twice a day. >> ~Polish Proverb >> >> >> ___ >> jQuery mailing list >> discuss@jquery.com >> http://jquery.com/discuss/ >> >> > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/JQuery-IE7-and-document.ready-tf3207782.html#a8910213 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] [Interface] snap on resize + prevent overlapping
Hi, I want to build draggable DIVs that snap on resize, like on http://www.yui-ext.com/deploy/yui-ext/examples/resizable/basic.html (Snapping). Furthermore I want to prevent overlapping between the DIVs, so that the overlaying DIV moves to a "free" position. Did someone already put effort in these issues ? E.g. is there a "snap on resize" feature planned for Interface-plugin ? For the overlapping maybe someone knows an algorithm to start with as I'm not good on math ;) Thanks for some info. cu Jan ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Miniscule (<1k) Drag'n'Resize for jqModal via jqDnR
On Feb 10, 3:02 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]> wrote: > Well, i used to disable alert like this: > > function alert() {} Oh, thanks. > But i guess you could tweak it to launch a modal window instead. I'll give > it a try Just curious, was your try success? -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery for President
Karl Swedberg schrieb: > But why would someone need to append a to the label instead of > just styling the label? > And why would someone want to use a and then make it > display:block instead of just using a ? > > Maybe I'm missing something? When the label float then is in NN7.0 this is not visible. Is a NN bug. If he wants to take into consideration this!? total overdressed, yes ;) -- Viele Grüße, Olaf --- [EMAIL PROTECTED] http://olaf-bosch.de www.akitafreund.de --- ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] asp.net and jquery
On 09/02/07, Kevin Fricovsky <[EMAIL PROTECTED]> wrote: > > Just curious how many asp.net developers are out there using jquery? > > I've been seeing a lot of .aspx extension on links to examples (like the > link below) > > Good to see. I use ASP.NET, but only for work sites (internal (i.e. intranets) and public (www sites)). The internal sites use jQuery throughout, but the public ones don't. What I don't like about ASP.NET is that it uses a server-side form that often is needed to wrap the contents of a whole page. So a lot of plugins that output tags (e.g. quicksearch), end up resulting in the page not being valid HTML (although they still work). ASP.NET does change names and ids of elements when they are added to elements in a user control (which is to prevent conflicts with other user controls with the same names). What I do to resolve this is wrap the user control in a div (or have the wrapper within the user control) and select items with: $("#mywrapper [EMAIL PROTECTED]") ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] tabs plugin with ajax support and callbacks
hi I've been using the tabs plugin for a while, I just updated to use the new ajax support. Works nice. Now I want to add a callback whenever a tab is updated: $(".tabs").tabs( { remote: true, loadingClass: 'progress', callback: function () { alert( 'done'); } } ); but the callback function is never actually called. any ideas why? thanks Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] FireFox and $( expr, context )
Ran this test page in FireFox 2.0.0.1: Test (function($) { $.fn.test = function(){ return this.each(function(){ var g = $('a', this); $(g).click(function(){ var i = $(g).index($(this)[0]); alert(i+' '+g.length); return false; }); }); }; })(jQuery); $(function(){ $('div#mydiv').test(); }); http://www.google.com Google http://www.msn.com MSN http://www.yahoo.com Yahoo Clicked on MSN and got expected result: '1 3' (index, length) I added ' BEFORE '' and ran test again. http://www.google.com Google http://www.msn.com MSN http://www.yahoo.com Yahoo Clicked on MSN and got: '2 4' IE7 returned expected result of '1 3' in both cases. Is this a bug or am I FUed? -- View this message in context: http://www.nabble.com/FireFox-and--%24%28-expr%2C-context-%29-tf3208028.html#a8908532 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/