Re: [jQuery] new jQuery API draft
On 10/11/06, Jörn Zaefferer [EMAIL PROTECTED] wrote: Hi jQueryians, I'd like to present you a first draft for a new stylesheet for the jQuery API: http://joern.jquery.com/api-draft/cat.xml There is still lot's of work to do, but the main concern, a new concept for the navigation, is already functional. Both Alphabetical and Category lists will be provided as exapandable trees. Please don't waste your time checking it with IE, the draft works so far only with Firefox. Please post your opinions and ideas, I'm sure there are many. Regards Jörn -- Jörn Zaefferer http://bassistance.de Looks like it could be easier to use than the existing API page. The xml file does not include the version (i.e. docs version='1.0.3') though (which is important for tools that generate documentation etc), but that is probably just an oversight. Being bookmarkable is useful, although the hash should be self explanatory: #id0x03a3ff80 -- #after1 #id0x05f4f1a8 -- #after2 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] click event not working??
Hello, I'm running into a case where the click event is not working on one of my pages. The strange thing is that I know the code is alright, because I've pulled it out and used it on test pages. It's kind of hard to explain, so I'll jump right to a url: http://www.the-in.com/dev/Learn_UserProfile.aspx If you click the Login link in the upper-right - I'm successfully popping up a thickbox with a login form in it. My main question revolves around the Forgot your password? link in the thickbox. When you click on it, it should slide down a hidden div that allows you to get your password - but no dice... Here's what the link looks like: # Forgot your password? And here's where I wire up the click event: $(document).ready(function() { $(#lnkForgot).click(function() { $(#divForgot).slideDown(500); }); }); Because this same code has worked in my test pages, I would guess the issue lies with some other js/html on the page, but I'm not sure how. But then again, thickbox is working fine... so maybe not? Please help!! Thanks, Chad -- View this message in context: http://www.nabble.com/click-event-not-working---tf2612228.html#a7290742 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] click event not working??
Without even looking at the code, I would guess you're using the thickbox to display content that you have elsewhere on the page? If so, that would be the source of the problem. Cody's thickbox shows a copy of the elements for displaying inline, and the event handlers aren't applied to the copies. I ran in to this exact same thing trying to do a login box. Possible solutions are: use a different light box, hack up the thickbox code, or have your login page be a separate page that the thickbox loads through an iframe. --ErikOn 11/11/06, leftend [EMAIL PROTECTED] wrote: Hello, I'm running into a case where the click event is not working on oneof my pages.The strange thing is that I know the code is alright, becauseI've pulled it out and used it on test pages.It's kind of hard to explain, so I'll jump right to a url:http://www.the-in.com/dev/Learn_UserProfile.aspxIf you click the Login link in the upper-right - I'm successfully popping up a thickbox with a login form in it.My main question revolves around theForgot your password? link in the thickbox.When you click on it, itshould slide down a hidden div that allows you to get your password - but no dice...Here's what the link looks like:# Forgot your password?And here's where I wire up the click event:$(document).ready(function() {$(#lnkForgot).click(function() { $(#divForgot).slideDown(500);});});Because this same code has worked in my test pages, I would guess the issuelies with some other js/html on the page, but I'm not sure how.But then again, thickbox is working fine... so maybe not?Please help!!Thanks,Chad--View this message in context: http://www.nabble.com/click-event-not-working---tf2612228.html#a7290742 Sent from the JQuery mailing list archive at Nabble.com.___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] XML and handling namespaces
Hi jQueryians, currently, the pipe symbol (|) is inside expression used as an equivalent for a comma (,). On the other hand, it's the CSS symbol to select by namespaces, eg. soap:envelope would be selected with soap|envelope in CSS. So far I haven't seen anyone actually using the pipe as a replacement for a comma. I propose to remove this duplicate functionality and instead introduce namespace handling via a pipe in expressions. Your opinions please! -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] XML and handling namespaces
Jörn Zaefferer schrieb: Hi jQueryians, currently, the pipe symbol (|) is inside expression used as an equivalent for a comma (,). On the other hand, it's the CSS symbol to select by namespaces, eg. soap:envelope would be selected with soap|envelope in CSS. So far I haven't seen anyone actually using the pipe as a replacement for a comma. I propose to remove this duplicate functionality and instead introduce namespace handling via a pipe in expressions. Your opinions please! Its not that simple. The | is actually also part of an attribute selector...: [att|=val] Match when the element's att attribute value is a hyphen-separated list of words, beginning with val. The match always starts at the beginning of the attribute value. This is primarily intended to allow language subcode matches (e.g., the lang attribute in HTML) as described in RFC 1766 ([RFC1766]). http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors Is that supported in jQuery anyway? The selector comes in handy for example if you give all your navigations an id like nav-primary, nav-secondary, nav-whatever and you could select all of them with [id|=nav] (yes, I have used it like that already). Other than that I agree on the namespace topic. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin 2.0
Jason Yeckel schrieb: Klaus, How much work is it to change the css to be a vertical layout on the left or right side? It would be intresting if you could pass in a value to place the tab position around the content. thx for the great work so far the plug in is a must have no doubt! Jason Y www.purepressure.com Hi Jason, that wouldn't be too much work. I think I have already seen someone having done that... I'm going to check that out! -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
Aaron Heimlich schrieb: On 11/10/06, *Ⓙⓐⓚⓔ* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I don't think jq can get back the original default values. True, but I believe he wanted a way to *empty* the elements, not return them to their defaults. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ You are right, i just want to empty all input/textarea fields. I'm trying to use the elements attribute but i get an error telling me that the property is not known: var x = $(#editarticle/form).elements.length; I'm also not able to run the reset() function with: $(#editarticle/form).reset(); Do i refer to the wrong object ? Or how to get the dom properties out of an jquery object ? i'm relative new to the javascript thing so i think i'm missing some basics. best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
Hello Steven, Truppe Steven schrieb: You are right, i just want to empty all input/textarea fields. I'm trying to use the elements attribute but i get an error telling me that the property is not known: var x = $(#editarticle/form).elements.length; In this case, 'x' contains a jQuery-Objekt, not a DOM-element. I'm also not able to run the reset() function with: $(#editarticle/form).reset(); Try this (surely untested, and I'm absolutely *not a pro*): $(#editarticle/form).each( this.reset(); ); If you're sure that only one form matched your expression, this might work, too: var x = $(#editarticle/form) .get(0); x.reset(); Now x contains a DOM-Element. There was a nice expalanation of this behaviour on the list some days ago (Try a search after posts from Michael Geary) Do i refer to the wrong object ? Or how to get the dom properties out of an jquery object ? i'm relative new to the javascript thing so i think i'm missing some basics. as said look up the posts by Michael, he said something about posting something to his Blog about this as well. best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Marc -- Marc Jansen Reuterstraße 112 53129 Bonn 0228 / 2438694 Schwalbenweg 2 53947 Nett./Engelgau 02486 / 7644 [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] How I use jQuery
Hello jQuerilous friends, I have just launched a website and thought I would share it with anyone who might be interested. It uses jQuery heavily, mainly for hiding and showing content with animation, but also for submitting forms with Ajax etc. Klaus Hartl's Tabs 2.0 plugin gets a gig on the Services page and I also used Dave Methvin's Corners for browsers that can't handle full CSS corners (IE). All my clients love the eye-candy aspect of animation (I'm constantly having to explain why all-Flash sites are not what they want) but I tried to make sure I used it for a reason, and not to be a distraction. I''m sorry if posting this is off-topic but I know there was discussion of creating a list of sites using jQuery and I loved the idea myself. It would be great to see what everyone is using our beloved jQuery for. A BIG thanks to everyone in the community that I have learnt from - there are too many of you to mention. If you have any comments or criticism, I'd love to hear them as I work very much alone and don't know anyone who does this type of work, so its hard to get knowledgeable feedback. I'm a self-taught designer/developer/ whatever, so at the very least my jQuery code may give the experts a few good belly laughs. :) http://www.incomesolutions.com.au/ Cheers Joel Birch. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How I use jQuery
http://www.incomesolutions.com.au/ Hi Joel, beautiful! I was wondering about this one: $.browser.msie ? $('#caseStudyTabs').addClass('tabs').tabs() : /*IE too buggy to handle animation*/ $('#caseStudyTabs').addClass('tabs').tabs({fxSlide: true, fxFade: true, fxSpeed: 'slow'}); What exactly was too buggy? Has it something to do with the tabs? -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How I use jQuery
http://www.incomesolutions.com.au/ Hi Joel, beautiful! I was wondering about this one: $.browser.msie ? $('#caseStudyTabs').addClass('tabs').tabs() : /*IE too buggy to handle animation*/ $('#caseStudyTabs').addClass('tabs').tabs({fxSlide: true, fxFade: true, fxSpeed: 'slow'}); What exactly was too buggy? Has it something to do with the tabs? -- Klaus Ah, glad you noticed that! You don't miss a thing. I was getting all sorts of bugs creeping in with with both IE6 and IE7 - it's hard to remember which bug made me throw in the towel. Actually I just rechecked it locally and it's not as bad as what I thought since I cleaned up the CSS a little afterwards. I have given IE the animation also now - thanks for prompting the recheck! It was certainly nothing to do with your plugin, that I am sure of. Just crap CSS implementation of IE as per usual. The CSS for that site is beginning to get a little, um, complex for me. The bugs that are still there are that the images used to round the corners seem to move by a pixel or so in IE7, but the worst is that any use of the opacity filter in IE7 makes the type aliased which I hate. How dodgy is that! Your plugin was amazingly easy to get working, so thank-you, it's so cool. Joel. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Since updating to 1.0.3 converting to getJSON
4091 { asJSON: 1, class: jlink, id: htmlDoc }, if IE is suggesting the correct line of the error then its 4091 and then in that case the coma is required to separate the params from the callback The word class is a reserved word in Javascript. It isn't used but it's still reserved. http://www.javascripter.net/faq/reserved.htm ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jQuery API draft
I'd like to present you a first draft for a new stylesheet for the This is looking good, Jörn. Much easier to use than the old layout. Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Element tagName
I couldn't find a way using jQuery to get the tagName of an element I immediately thought of .attr(tagName) but it didn't work. Some paths through .attr() get both properties and attributes, others just attributes, others just properties. Any time there is an entry in the fix object, it gets properties _only_, so one way to support getting tagName would be to add an entry to fix. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jQuery API draft
Man you scared me... You meant new jQuery API DOCS, not new jQuery API right? What, you missed that thread? John has redone jQuery to avoid all the cryptic stuff. No more chaining for example. We're following the Yahoo UI model and namespacing the heck out of everything. So, this confusing piece of code: $(#links a).css(color: blue); Becomes this wonderful thing: var jObject = new jQuery(); jObject.element.getById(links, document); jObject.element.findByTagName(a); jObject.element.cascadingStyleSheet.setProperty(color, jQuery.color.getValueFromColorName(blue); As you can see, the new API is much more self documenting. ;-) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jQuery API draft
Hey Dave, So, this confusing piece of code: $(#links a).css(color: blue); Becomes this wonderful thing: var jObject = new jQuery(); jObject.element.getById(links, document); jObject.element.findByTagName(a); jObject.element.cascadingStyleSheet.setProperty(color, jQuery.color.getValueFromColorName(blue); As you can see, the new API is much more self documenting. ;-) You forgot to close one of the parenthesis in the example [right after getValueFromColorName(blue)]: jObject.element.cascadingStyleSheet.setProperty(color, jQuery.color.getValueFromColorName(blue)); Or is this part of the new api as well: ignorance of syntactical mistakes... i'd like that! ;-) Marc ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Since updating to 1.0.3 converting to getJSON
And to make it valid JSON, you have to quote all keys anyway (using double quotes): { asJSON: 1, class: jlink, id: htmlDoc } http://json.org/ Naw, that wouldn't be valid JSON. JSON doesn't allow named references like htmlDoc. But this object doesn't need to be JSON anyway. It's just an object literal being passed into a JavaScript function call. From the original message: $.getJSON( ./ajax/json.php, { asJSON: 1, class: jlink, id: htmlDoc }, function(json) { }); Quote the class and it should be good. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jQuery API draft
Dave Methvin schrieb: Man you scared me... You meant new jQuery API DOCS, not new jQuery API right? What, you missed that thread? John has redone jQuery to avoid all the cryptic stuff. No more chaining for example. We're following the Yahoo UI model and namespacing the heck out of everything. So, this confusing piece of code: $(#links a).css(color: blue); Becomes this wonderful thing: var jObject = new jQuery(); jObject.element.getById(links, document); jObject.element.findByTagName(a); jObject.element.cascadingStyleSheet.setProperty(color, jQuery.color.getValueFromColorName(blue); As you can see, the new API is much more self documenting. ;-) Hey Dave, I think it should read jObject.element.getElementById(links, document); so that one doesn't have to remember another function name after switching from W3C DOM to jQuery... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] XML and handling namespaces
currently, the pipe symbol (|) is inside expression used as an equivalent for a comma (,). On the other hand, it's the CSS symbol to select by namespaces, eg. soap:envelope would be selected with soap|envelope in CSS. So far I haven't seen anyone actually using the pipe as a replacement for a comma. I propose to remove this duplicate functionality and instead introduce namespace handling via a pipe in expressions. I agree. Its not that simple. The | is actually also part of an attribute selector...: [att|=val] Is that supported in jQuery anyway? Other than that I agree on the namespace topic. It's pretty easy for a lexical analyzer to check for | versus |= so that part isn't too much of a problem. I think John removed support for |= a while back anyway, there was a thread about it in the list. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
In order to access the underlying DOM object, you use the .get(n) method on the jQuery object. $(#editarticle/form).get(0).elements.length; $(#editarticle/form).get(0).reset(); Or, using jQuery, you could get all relevant form elements like so: $(#editarticle/form :input); And reset them like so: $(#editarticle/form :input).val(''); m. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Truppe Steven Sent: Saturday, November 11, 2006 4:57 AM To: jQuery Discussion. Subject: Re: [jQuery] Loop through all elements of a form Aaron Heimlich schrieb: On 11/10/06, *Ⓙⓐⓚⓔ* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I don't think jq can get back the original default values. True, but I believe he wanted a way to *empty* the elements, not return them to their defaults. -- -- ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ You are right, i just want to empty all input/textarea fields. I'm trying to use the elements attribute but i get an error telling me that the property is not known: var x = $(#editarticle/form).elements.length; I'm also not able to run the reset() function with: $(#editarticle/form).reset(); Do i refer to the wrong object ? Or how to get the dom properties out of an jquery object ? i'm relative new to the javascript thing so i think i'm missing some basics. best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
Marc Jansen schrieb: Hello Steven, Truppe Steven schrieb: You are right, i just want to empty all input/textarea fields. I'm trying to use the elements attribute but i get an error telling me that the property is not known: var x = $(#editarticle/form).elements.length; In this case, 'x' contains a jQuery-Objekt, not a DOM-element. Actually, $(...) is the jQuery object, and that doesn't have an elements property. This should work better: var x = $(#editarticle/form)[0].elements.length; I'm also not able to run the reset() function with: $(#editarticle/form).reset(); Try this (surely untested, and I'm absolutely *not a pro*): You are a pro (= professional) when you get money for what you are doing, and I don't know of anyone that is paid for working on jQuery :-) -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Another media plugin, but that fails in Firefox 2
If anyone is interested, it looks like this issue is resolved in the latest Firefox build. I tested it on 3.0a1(Minefield) play wrote: I setup a basic test page here: http://dev.noiseusse.org/testflash I've narrowed it down to passing an argument to flash from javascript. In firefox2, try the first three examples. They work fine. Then try the 4th example. Nothing happens and there is no error message and now the other examples don't work either. And the reset buttons also don't work. BoOz wrote: play a écrit : Having a similar problem. Looks like ExternalInterface.call breaks jQuery in firefox2. You must be right, jQuery still works fine in Firefox 2 if I don't call aflax.js. That's quite a pity that it used to work with firefox 1 and that it no longer does with FF2. BoOz ___ 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] Loop through all elements of a form
in the old html. before the xhtml reformation, we referred to forms by names or numbers, in jq, while keeping with the old teachings, I would say $('[EMAIL PROTECTED]')[0].reset(); But I'd still code document.forms.myform.reset(); because there is no magic involved. If I wanted some chainable magic $('[EMAIL PROTECTED]').each( function (){this.reset();}) ... and carry on with this unlikely chain. Of course $('textarea, [EMAIL PROTECTED]', form).val(''); clears the text fields, but what of the buttons and selects? A simple combo would be prudent. On 11/10/06, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: of course the standard js method is document.forms[0].reset() -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
On 11/11/06, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Of course $('textarea, [EMAIL PROTECTED]', form).val(''); clears the text fields, but what of the buttons and selects? A simple combo would be prudent. It was my understanding that he only wanted to clear the value of text type inputs and not reset them. -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How I use jQuery
On Nov 11, 2006, at 11:29 AM, Joel Birch wrote: but the worst is that any use of the opacity filter in IE7 makes the type aliased which I hate. How dodgy is that! Hey Joel, that's a great-looking site! So nice to see beautiful design work going into sites for what some might consider stodgy or dull industries. Helps things like finance seem a little less intimidating. About the opacity filter -- not sure if this is the same issue as the one with IE6, but a number of people on this discussion list have run into similar problems using fadeIn() / fadeOut(). Forgive me if I'm just repeating something you already know, but a common workaround for the aliasing problem is to make sure you're giving the containing element a background color. Cheers, Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] OO programming is confusing to old functional programmers
OK, How much of this is right? jQuery.Map = { // this is a public global attribute? // ie: global across all instances of jQuery.Map whatever : null, // a public function init : function(options) { // this is the jQuery search collection // self is a private pointer to the collection var self = this; // another private variable scoped to the function var _maph = 0; // an public attribute, accessed via $(#map).Map._maph this._maph= 0; // a method, accessed via $(#map).Map.recenter(x,y,dxy) this.recenter = function(x, y, dxy) { console.log(calling recenter()); }; return this.each( function(options) { // this is each respective object in the collection // this is a DOM object not a jQuery object // here I can modify the DOM, bind events, etc }; }; // This extends jQuery with my plugin jQuery.fn.extend( { Map : jQuery.Map.init } ); // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Is this right? I probably have some terminology mixed up. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
Ⓙⓐⓚⓔ schrieb: in the old html. before the xhtml reformation, we referred to forms by names or numbers, in jq, while keeping with the old teachings, I would say $('[EMAIL PROTECTED]')[0].reset(); But I'd still code document.forms.myform.reset(); because there is no magic involved. If I wanted some chainable magic $('[EMAIL PROTECTED]').each( function (){this.reset();}) ... and carry on with this unlikely chain. In XHTML, the name attribute for the form element is deprecated. http://www.w3.org/TR/xhtml1/#C_8 It is not recommended to use it in HTML either: This attribute has been included for backwards compatibility. Applications should use the id attribute to identify elements. http://www.w3.org/TR/html4/interact/forms.html#h-17.3 I pretty much assume that using an id is also faster. $('#myformid') ... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Media plugins
Just to make sure I'm understanding the problem, you want to hide the contents of #hdr (i.e. the html version of the nav, etc.) after the flash is inserted, right? If so, then all you should need to do is: $('#hdr').flash(sharkOptions.ufo, {version: 7}).find('embed').each(function(){ fc = new JSFCommunicator(this); sharkOptions.page.isFC = true; }).end(); And add the following to your stylesheet: .flash-replaced .alt { display: none; } The 'function(htmlOptions){...}' in the text-replacement example is used by jQuery.fn.flash() -- instead of the default, jQuery.fn.flash.replace -- to measure the content that's being replaced. You could use something similar if you want to literally replace the content of #hdr (instead of prepending into #hdr), like this: $('#hdr').flash(sharkOptions.ufo, {version:7}, function(htmlOptions){ $(this).html(jQuery.fn.flash.transform(htmlOptions)); }).find('embed').each(function(){ fc = new JSFCommunicator(this); sharkOptions.page.isFC = true; }).end(); Luke Sam Sherlock wrote: solved it myself, just whilst collecting the code to post. Late night early morning splurge of coding to excited to sleep after see this wonderful code yep thats solved but I would like to be able to hide replace code in the nested div looking at the sifr example I see that after the version object you have a function(htmlOptions) {...} when I try this // $('#hdr').flash(sharkOptions.ufo, {version: 7}).find('embed').each(function(){ fc = new JSFCommunicator(this); $('#hdr').addClass('flash-replaced'); sharkOptions.page.isFC = true; }).end(); it works though this is different from the sifr example since the class is added to the #hdr from within the each call that might not be crucial anyway - just perplexing - would like to know more to further my understanding though. thx -S On 11/11/06, *Luke Lutman* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Can you post the code (or a link to it)? What error does it throw? ... Also, my text-replacement example (http://jquery.lukelutman.com/plugins/flash/example-text-replacement.html http://jquery.lukelutman.com/plugins/flash/example-text-replacement.html) isn't fully cooked yet -- it's functional, but I'm planning to develop it as a proper plugin (soon, hopefully!). If you do want to try it, make sure you grab the fla, as that's custom too -- css (flash 7) and better anti-aliasing (flash 8). Luke Sam Sherlock wrote: astonishing stuff!!! That works a treat! I am also using the sifr jquery plugin (really feature filled site this) and have tried to alter the code to use your flash plugin instead. I guess its one stage at a time!! However I am unable to set the version it aways throws an error whatever I do!?! I updated to jquery 1.0.3 (had to make other changes json - getJSON) this did not solve the issue any idea about that? I think the issue with the version setting is causing some issue with using it instead of the sifr thingy since I need to have a htmloptions callback function ___ jQuery mailing list discuss@jquery.com mailto: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] Keydown Help
I have a set of rows that are currently adding a class selected and firing an ajax call to show information selected in another div if a subclass of caller is clicked. To make sure only one row is selected, I am removing the selected class for all rows before adding the class. Everything works perfected except now I want to allow for multiple rows to have the selected class and not to fire the ajax calls if the control key is pressed. This will allow me to run an ajax call on multiple rows much like the selectors plugin. Any help would be appreciated. - Brad Code: $(.row .caller).click(function(){ // add a if control keydown = true do the following: $.ajax({ type: POST, url: ?, data: task=viewmailmsg_id= + this.parentNode.id, success: function(msg){ $(#message_view).show().html(msg); } }); if ($(.row) != this.parentNode) { $(this.parentNode).removeClass(unread); $(.row).removeClass(selected); } // end if keydown statement $(this.parentNode).addClass(selected); }); -- View this message in context: http://www.nabble.com/Keydown-Help-tf2596613.html#a7242876 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] How do I add a js array of jquery objects to a jquery object?
Maybe there are other solutions to what I'm looking for... I've got a jquery script where I append (one by one) 50 new jquery objects to another jquery object, but it's taking way too much time, so I thought that it could be faster if I make an array buffer out of them and then aggregate the array as a whole, but I don't find out how to do it. -- View this message in context: http://www.nabble.com/How-do-I-add-a-js-array-of-jquery-objects-to-a-jquery-object--tf2614381.html#a7296909 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
Matt Grimm schrieb: In order to access the underlying DOM object, you use the .get(n) method on the jQuery object. $(#editarticle/form).get(0).elements.length; $(#editarticle/form).get(0).reset(); Or, using jQuery, you could get all relevant form elements like so: $(#editarticle/form :input); And reset them like so: $(#editarticle/form :input).val('') Many thanks are going out for the many replies send. Best mailing list ever ;) I think it would be a good idea to include some things mentioned here into the getting started guide. as soon as i find the time to setup my site i'll write a short article about getting started with jquery and the power of it's selectors with a few demos. I also have never seen something like: $(#editarticle/form :input) before. Can this be extended like: $(#editarticle/form :[EMAIL PROTECTED]'text']) ? This line was also new for me: $('textarea, [EMAIL PROTECTED]', form).val(''); So i can use the , inside a selection to add another selection ? best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
I also have never seen something like: $(#editarticle/form :input) before. Can this be extended like: $(#editarticle/form :[EMAIL PROTECTED]'text']) ? I don't think so. :input is a shortcut for all kind of form elements. If you need all inputs with a text type, just use this: $(#editarticle/form [EMAIL PROTECTED]'text']) This line was also new for me: $('textarea, [EMAIL PROTECTED]', form).val(''); So i can use the , inside a selection to add another selection ? jQuery supports CSS selectors. You can group selectors together like: h1, h2, h3 { color: red; } Thus jQuery supports that too. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] OO programming is confusing to old functional programmers
I don't think this approach will work quite the way you'd like. In your example: // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Those two $(#myMap) calls are going to result in different jQuery objects. How does the recenter() method know it applies to the Map object you created earlier? OTOH, you could easily get this to work: // Create a map object for an element var map = $(#myMap).Map({ options hash }); // later I can access a public function on this object like: map.recenter(x, y, dxy); But before I make any more specific suggestions, does your Map object always relate to a single map as in your example, or could one Map object relate to multiple maps, e.g. // Get a Map object that controls every map with class anyMap var maps = $('.anyMap').Map(); // Recenter all the maps maps.recenter( x, y, dxy ); -Mike From: Stephen Woodbridge OK, How much of this is right? jQuery.Map = { // this is a public global attribute? // ie: global across all instances of jQuery.Map whatever : null, // a public function init : function(options) { // this is the jQuery search collection // self is a private pointer to the collection var self = this; // another private variable scoped to the function var _maph = 0; // an public attribute, accessed via $(#map).Map._maph this._maph= 0; // a method, accessed via $(#map).Map.recenter(x,y,dxy) this.recenter = function(x, y, dxy) { console.log(calling recenter()); }; return this.each( function(options) { // this is each respective object in the collection // this is a DOM object not a jQuery object // here I can modify the DOM, bind events, etc }; }; // This extends jQuery with my plugin jQuery.fn.extend( { Map : jQuery.Map.init } ); // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Is this right? I probably have some terminology mixed up. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
On 11/11/06, Klaus Hartl [EMAIL PROTECTED] wrote: I also have never seen something like: $(#editarticle/form :input) before. Can this be extended like: $(#editarticle/form :[EMAIL PROTECTED]'text']) ? I don't think so. :input is a shortcut for all kind of form elements. If you need all inputs with a text type, just use this: Be careful with :input. It selects button elements too and resetting the button element's value to is probably not what you want to do. Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Loop through all elements of a form
On 11/11/06, Klaus Hartl [EMAIL PROTECTED] wrote: This line was also new for me: $('textarea, [EMAIL PROTECTED]', form).val(''); So i can use the , inside a selection to add another selection ? jQuery supports CSS selectors. You can group selectors together like: h1, h2, h3 { color: red; } Thus jQuery supports that too. The extra param passed to the $() method is the context the query should be run in. The 'form' variable would be the form DOM element. The description Klaus gave about using a comma only applies to the selector string (the first param passed to the $()). -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] OO programming is confusing to old functional programmers
Michael Geary wrote: I don't think this approach will work quite the way you'd like. In your example: // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Those two $(#myMap) calls are going to result in different jQuery objects. How does the recenter() method know it applies to the Map object you created earlier? This is what I'm having trouble understanding. So it sounds like Map object is not getting attached to the DOM object be to the jQuery object that the DOM object is wrapped in. So if you later search for the same DOM object, the jQuery result does not contain the Map. OTOH, you could easily get this to work: // Create a map object for an element var map = $(#myMap).Map({ options hash }); // later I can access a public function on this object like: map.recenter(x, y, dxy); So I need to save the instance I create an then work on that. But before I make any more specific suggestions, does your Map object always relate to a single map as in your example, or could one Map object relate to multiple maps, e.g. // Get a Map object that controls every map with class anyMap var maps = $('.anyMap').Map(); // Recenter all the maps maps.recenter( x, y, dxy ); It is conceivable that there will be multiple maps on a page and you might want to recenter them all or not. I will also want to be about to create a map and pass it to another map as a dependent map where it will get control by its owner. For example create a small overview map the shows the world and as the large map is zoom, it will tell the small map to display a rectangle showing its current extents. So ideally, I want a map object that I can attach to a DOM or jQuery object, that will expose some public methods. I then will have other controls on the page, that will manipulate the map object via these public methods. The map will be interactive based on events, like dragging the map, or selecting navigation tools on the map, or clicking or double clicking on the map, etc. I'm hoping to use other jQuery plugins for building this, like interface Resizable and Dragable, etc. I have a beasic shell I have started coding, but it has my head spinning. http://imaptools.com:8081/jmap/test.html I want to refactor/rewrite from scratch the mapping used in this: http://imaptools.com:8081/map/demo.html -Steve -Mike From: Stephen Woodbridge OK, How much of this is right? jQuery.Map = { // this is a public global attribute? // ie: global across all instances of jQuery.Map whatever : null, // a public function init : function(options) { // this is the jQuery search collection // self is a private pointer to the collection var self = this; // another private variable scoped to the function var _maph = 0; // an public attribute, accessed via $(#map).Map._maph this._maph= 0; // a method, accessed via $(#map).Map.recenter(x,y,dxy) this.recenter = function(x, y, dxy) { console.log(calling recenter()); }; return this.each( function(options) { // this is each respective object in the collection // this is a DOM object not a jQuery object // here I can modify the DOM, bind events, etc }; }; // This extends jQuery with my plugin jQuery.fn.extend( { Map : jQuery.Map.init } ); // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Is this right? I probably have some terminology mixed up. -Steve ___ 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] How I use jQuery
On 12/11/2006, at 5:44 AM, Karl Swedberg wrote: On Nov 11, 2006, at 11:29 AM, Joel Birch wrote: but the worst is that any use of the opacity filter in IE7 makes the type aliased which I hate. How dodgy is that! Forgive me if I'm just repeating something you already know, but a common workaround for the aliasing problem is to make sure you're giving the containing element a background color. Thanks for the kind words regarding the site Karl - hugely appreciated. I know the aliasing issue you are referring to but this is different. It only affects IE7 and it makes any type that has been faded (or even instantly hidden, then shown) look as if ClearType is off, whilst other type on the page is unaffected. Ugly. I think it has to do with IE7 only allowing one Filter at a time, and I think some of the quick-fixes Microsoft have rushed out for IE7 (PNG transparency, ClearType default etc.) have used up that one use of Filter already, leaving us out of luck when we want to use one. Another example of this is when I wanted to apply a slight transparency to a button that used a PNG image that itself had some transparency - the PNG file lost its new transparency support. I am finding IE6 easier to cope with regarding animation! I'm sure this won't be the last we hear of this. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How I use jQuery
On 11/11/06, Joel Birch [EMAIL PROTECTED] wrote: The bugs that are still there are that the images used to round the corners seem to move by a pixel or so in IE7, but the worst is that any use of the opacity filter in IE7 makes the type aliased which I hate. How dodgy is that! This is actually done on purpose to avoid the ugly text that happens in IE 6. -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How I use jQuery
On 12/11/2006, at 12:22 PM, Brandon Aaron wrote: This is actually done on purpose to avoid the ugly text that happens in IE 6. I'm not sure what you mean. Just to verify - when I say IE7 makes the type aliased I mean that it removes the smooth anti-aliasing, and ends up looking jaggy. If you look at the Services page of the site I posted with IE7 and toggle between the Baby Boomers, Thirties, and Seniors tabs, you will see that the type that gets faded in the process ends up jagged. This does not happen in IE6 with ClearType on. Or did you mean something else entirely? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] problem with element preceded by $(E ~ F)
jd wrote: I am having a problem with the element preceded by syntax for $. Looking at the code, if I'm reading it properly, it appears that $(E ~ F) will fail if E is the first child (1.0.3 rev 501). I filed a bug (#310) against the sibling operator a while back, but after a quick second look I am confused. In the current revision (557) there is this line in jQuery.sibling: 2041 elems.n = elems.length - 1; Looking elsewhere I was under the impression that elems.n was the element index of the element passed into the function, so I would have expected elems.n = i instead. Did you have a patch that seemed to give the desired results? -- View this message in context: http://www.nabble.com/problem-with-%22element-preceded-by%22-%24%28E-%7E-F%29-tf2611183.html#a7299002 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How I use jQuery
IE 7 will remove clear type on text that has an alpha filter (maybe others filters too) applied to it. This is their fix for the screwed up text in IE 6 with clear type and the alpha filter. -- Brandon Aaron On 11/11/06, Joel Birch [EMAIL PROTECTED] wrote: On 12/11/2006, at 12:22 PM, Brandon Aaron wrote: This is actually done on purpose to avoid the ugly text that happens in IE 6. I'm not sure what you mean. Just to verify - when I say IE7 makes the type aliased I mean that it removes the smooth anti-aliasing, and ends up looking jaggy. If you look at the Services page of the site I posted with IE7 and toggle between the Baby Boomers, Thirties, and Seniors tabs, you will see that the type that gets faded in the process ends up jagged. This does not happen in IE6 with ClearType on. Or did you mean something else entirely? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How I use jQuery
On 12/11/2006, at 1:34 PM, Brandon Aaron wrote: On 11/11/06, Joel Birch [EMAIL PROTECTED] wrote: On 12/11/2006, at 12:22 PM, Brandon Aaron wrote: This is actually done on purpose to avoid the ugly text that happens in IE 6. I'm not sure what you mean. Just to verify - when I say IE7 makes the type aliased I mean that it removes the smooth anti-aliasing, and ends up looking jaggy. If you look at the Services page of the site I posted with IE7 and toggle between the Baby Boomers, Thirties, and Seniors tabs, you will see that the type that gets faded in the process ends up jagged. This does not happen in IE6 with ClearType on. Or did you mean something else entirely? IE 7 will remove clear type on text that has an alpha filter (maybe others filters too) applied to it. This is their fix for the screwed up text in IE 6 with clear type and the alpha filter. Ah, I get you now. So, they fixed a bug caused by a hack with a hack which causes another bug. Sounds about right :) I preferred being able to make sure the text had a background and retaining the nice type. As it is now though, there seems to be no work around. Excuse me now while I go slam my head in a door. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Plugin Release: Tooltip
Hi Jörn Any guidelines for testing or finding circular references? Drip is probably what you are looking for. http://outofhanwell.com/ieleak/index.php?title=Main_Page Regards Roger Ineichen _ Projekt01 GmbH www.projekt01.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] help with a simple plugin to roll images
I put this aside for a while... I still can't get it to work! jQuery.fn.rolly = function(options) { var settings = jQuery.extend({ speed: 'fast', delay: 1 }, options || {}); var jq=this; var rollover = function() { jq.children().eq(0).appendTo(jq); setTimeout(rollover, settings.delay); }; rollover(); return this; }; var rollover = function(){ $(#footer).children().eq(0).appendTo(#footer); setTimeout(arguments.callee,1000); } + rollover(); works fine ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/