[jQuery] Curious as to why a fadeOut() won't work but a hide() does??
Hmm, I'm confused. I have a plugin which has this code: $(this).submit(function(){ $(this).fadeOut(slow); }); And it doesn't fade the form. But when I change it to: $(this).submit(function(){ $(this).hide(); }); It does. Why?
[jQuery] Re: Curious as to why a fadeOut() won't work but a hide() does??
Thanks for the reply Dave, I've actually just snipped this section out of the plug-in code. there is indeed a return false; at the end of the submit function. So the form isn't actually submitting and forcing a redirect. Any other ideas? :) On Nov 13, 12:07 pm, Dave Methvin dave.meth...@gmail.com wrote: My guess: If your function doesn't return false to stop the submit, the browser will start navigating to the submit action page immediately. It's probably starting to fade but the page changes before it's anywhere close to done.
[jQuery] Plugin has slow response in IE8 ...
Hi everyone, I'm wondering if someone could take a quick look at this slightly modified plugin that I'm using on a site. It seems to work fine in most browsers, but in IE8 it's real jittery. It's a plugin that works pretty much the same as jqZoom. Any help would be greatly appreciated. http://joelataylor.com/test/jquery.bezoom.js.txt
[jQuery] Can I access/change a variable in a plugin?
Hi, so, I have a pretty basic plugin, and I'm trying to access a variable that's set when the plugin is initialized. I'd also like to change that variable on the fly. Is it possible? (function($) { $.fn.plugin = function(options){ // default settings var settings = { marginLeft : 10, identifier : 'om', xidentifier : 'omx', height : 200, width : 200 } //extending options options = options || {}; $.extend(settings, options); this.each(function(i){ // do something }); } })(jQuery); $('div').plugin(); $('div).data('marginLeft'); Thanks for any help!
[jQuery] Re: Can I access/change a variable in a plugin?
Thanks for replying James. I'm still having some issues. Is there a place where I can read about Plugin scope? If I am adding settings in by the line you type, how do I access the properties of the object inside the main function? h On Oct 21, 2:58 pm, James james.gp@gmail.com wrote: Not with the way your code is currently structured. You'd have to move the settings variable outside of your function. Something set to like: $.fn.plugin.settings = { ... } On Oct 21, 7:28 am, Joel Taylor joelatay...@gmail.com wrote: Hi, so, I have a pretty basic plugin, and I'm trying to access a variable that's set when the plugin is initialized. I'd also like to change that variable on the fly. Is it possible? (function($) { $.fn.plugin = function(options){ // default settings var settings = { marginLeft : 10, identifier : 'om', xidentifier : 'omx', height : 200, width : 200 } //extending options options = options || {}; $.extend(settings, options); this.each(function(i){ // do something }); } })(jQuery); $('div').plugin(); $('div).data('marginLeft'); Thanks for any help!
[jQuery] Re: Can I access/change a variable in a plugin?
Thanks, I'll check it out. :) On Oct 21, 3:59 pm, James james.gp@gmail.com wrote: Try giving this article a read about plugin development pattern:http://www.learningjquery.com/2007/10/a-plugin-development-pattern That should answer your questions. On Oct 21, 10:46 am, Joel Taylor joelatay...@gmail.com wrote: Thanks for replying James. I'm still having some issues. Is there a place where I can read about Plugin scope? If I am adding settings in by the line you type, how do I access the properties of the object inside the main function? h On Oct 21, 2:58 pm, James james.gp@gmail.com wrote: Not with the way your code is currently structured. You'd have to move the settings variable outside of your function. Something set to like: $.fn.plugin.settings = { ... } On Oct 21, 7:28 am, Joel Taylor joelatay...@gmail.com wrote: Hi, so, I have a pretty basic plugin, and I'm trying to access a variable that's set when the plugin is initialized. I'd also like to change that variable on the fly. Is it possible? (function($) { $.fn.plugin = function(options){ // default settings var settings = { marginLeft : 10, identifier : 'om', xidentifier : 'omx', height : 200, width : 200 } //extending options options = options || {}; $.extend(settings, options); this.each(function(i){ // do something }); } })(jQuery); $('div').plugin(); $('div).data('marginLeft'); Thanks for any help!
[jQuery] Can I use ajax to force a download dialog window?
You know those sites that have the Your download will begin in 10 seconds - and then it brings up a download window? How could you do that with jQuery - I've been trying several methods with the ajax functions and php headers Any ideas out there? Joel
[jQuery] [validate plugin] - not working with multiple forms
hi all - so I'm using the 'validate' plugin, and I seem to have an issue where if I have multiple forms, the plugin only validates the first form. $('.validate').validate(); Obviously I have multiple forms, so I'm using a class selector. But when I'm testing the form, the validate plugin throws me to the first form with errors shown. I'm using jQuery version 1.2.6 (as 1.3.1 has Safari bugs) Any help?
[jQuery] Re: [validate plugin] - not working with multiple forms
Thanks Jorn! That worked. :) Phew. On Jan 29, 12:05 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Try this: $(.validate).each(function() { $(this).validate(); }); Jörn On Thu, Jan 29, 2009 at 7:00 PM, Joel Taylor joelatay...@gmail.com wrote: hi all - so I'm using the 'validate' plugin, and I seem to have an issue where if I have multiple forms, the plugin only validates the first form. $('.validate').validate(); Obviously I have multiple forms, so I'm using a class selector. But when I'm testing the form, the validate plugin throws me to the first form with errors shown. I'm using jQuery version 1.2.6 (as 1.3.1 has Safari bugs) Any help?
[jQuery] .parent().parent() ... better way to get parents' parent
Is there a better way to get a parents parent than to just do repeated '.parent()' ??
[jQuery] Re: Weirdness in IE
Ok, I tried both of those, and neither of them fixed the issue in IE7 (I didnt even check IE6) On 5/30/07, Richard D. Worth [EMAIL PROTECTED] wrote: On 5/25/07, Joel Taylor [EMAIL PROTECTED] wrote: I still need help with this one. See it here: http://dd-management.com/dev/TC/treatment.asp?sub=addiction-treatment I think I found a minimal test case for you. It's just IE, CSS, and DOM (no jQuery bug): !DOCTYPE HTML HEAD STYLE type=text/css /* layout.css */ .input:hover{} /* ie7-styles.css */ #content H1 + P { MARGIN-TOP: -10px } /STYLE SCRIPT src=scripts/jquery.js type=text/javascript/SCRIPT SCRIPT type=text/javascript $(document).ready(function(){ $(h1).after(hr class=\thinDivider\ ); }); /SCRIPT /HEAD BODY DIV id=content#content H1H1/H1 PP/P /DIV /BODY /HTML Talk about weird. Removing either the !DOCTYPE or the :hover{} seems to fix it. Looks like a strange IE bug. - Richard D. Worth
[jQuery] Re: Weirdness in IE
Richard, sorry for miss-understanding you. However, thank you, thank you, thank you for pointing out my error I changed that style to: #content h1 + p, #content hr + p and that fixed it! oh my gosh. mystery solved. Joel On 5/31/07, Richard D. Worth [EMAIL PROTECTED] wrote: On 5/31/07, Joel Taylor [EMAIL PROTECTED] wrote: On 5/30/07, Richard D. Worth [EMAIL PROTECTED] wrote: I think I found a minimal test case for you. It's just IE, CSS, and DOM (no jQuery bug): ... Talk about weird. Removing either the !DOCTYPE or the :hover{} seems to fix it. Looks like a strange IE bug. Ok, I tried both of those, and neither of them fixed the issue in IE7 (I didnt even check IE6) I'm using IE7 also. Those two things that I mentioned aren't fixes for your problem, they're just two things that make this minimal test case no longer a valid case for this IE bug (the bug being that the specified CSS doesn't update until you hover your mouse). The browser is doing what you have told it to do (albeit at a slightly off/late time, due to the bug). The css rule in ie7-styles.css says: #content H1 + P { MARGIN-TOP: -10px } When you insert a non-P just after that H1 (after the H1 and before the P) that P will no longer have a -10px top margin. That should happen as soon as you add the non-P element. In IE, it seems to be happening as soon as you hover your mouse on the document. I would guess your fix is change this rule, or add a similar one for your non-P element. - Richard
[jQuery] Re: Weirdness in IE
I still need help with this one. See it here: http://dd-management.com/dev/TC/treatment.asp?sub=addiction-treatment On May 24, 4:54 pm, Joel Taylor [EMAIL PROTECTED] wrote: append won't work either, I need the tag AFTER the h1, not inside it. I also tried insertAfter - but that didn't work either. any other options? On May 24, 3:21 pm, Jean Nascimento [EMAIL PROTECTED] wrote: try u use append? On 5/24/07, Joel Taylor [EMAIL PROTECTED] wrote: nope, that didnt help either (seriously, I'm not normally that sloppy with my code!) - I changed it back to the original, see what it does now. On 5/24/07, Sean Catchpole [EMAIL PROTECTED] wrote: $(document).ready(function(){ /*$(h1).after(hr class=\thinDivider\ /);*/ $(h1).after(span class=\thinDivider\/span); }); You forgot to end you span tag: $(function(){ $(h1).after(span class=\thinDivider\/span); }); ~Sean -- []´s Jeanwww.suissa.info Ethereal Agencywww.etherealagency.com