[jQuery] Re: named function vs anonymous functions

2007-07-27 Thread Klaus Hartl
Stephan Beal wrote: On Jul 27, 5:48 pm, Christof Donat [EMAIL PROTECTED] wrote: so what is the proper syntax for calling this named function for that change event? $(this).change(myfunction); To expand on that a small bit: if you want to call a method of an object then you must create an

[jQuery] Re: named function vs anonymous functions

2007-07-27 Thread Klaus Hartl
Jeffrey Kretz wrote: So far as I know, $(this).change(myObject.myFunc); will work fine. But when the myFunc is executed, any reference to this inside that function will refer to the object that triggered the change, rather than its owner, myObject. JK Jeffrey, this is exactly what I was

[jQuery] Re: ANNOUNCEMENT: jQuery resetDefaultValue plugin

2007-07-26 Thread Klaus Hartl
Leandro Vieira Pinho wrote: Hu, I don´t think it´s a good suggestion. Imagine: I use the filter to avoid submit/reset/button buttons, for example, so if I did it: $('input').resetDefaultValue().height(30); All the input elements affected by plugin will have 30 pixels of height. If I use

[jQuery] Re: vs '

2007-07-26 Thread Klaus Hartl
Stephan Beal wrote: On Jul 26, 6:37 pm, Mitchell Waite [EMAIL PROTECTED] wrote: This going will make me sound really dumb but what is the difference between using single quote versus double quotes in jQuery, e.g. Mitchel, PLEASE don't hijack other people's threads to post a question. Start a

[jQuery] Re: Possible to retrieve image data via AJAX for display?

2007-07-25 Thread Klaus Hartl
Rob Desbois wrote: Traunic how does raw image data get you anything? Seems you want the data and the image URL via XHR and then dynamically insert your DOM bits (img tag w/ URL from response with some sort of wrapper containing your legend)... I mean, what you are talking about is

[jQuery] Re: Follow me to best pratice in create plugin to jQuery

2007-07-25 Thread Klaus Hartl
Leandro Vieira Pinho wrote: Hi Guys, I know that already exist a plugin to manage a defaultValue of input elements. But I create another. I´m new with jQuery, principally in create plugins. So, I would like someone look the plugin code and tell me if it´s in a best practice. Thanks. The

[jQuery] Re: Put attribute value in class

2007-07-25 Thread Klaus Hartl
Dan G. Switzer, II wrote: Jeroen, I'm trying to put an attribute value as a class in my element: HTML: ul li lang=entext/li li lang=nltext/li li lang=ittext/li /ul jQuery: $(li).each(function(){ var lang = $('#language [EMAIL PROTECTED]'); $(this).addClass(lang); }); Which

[jQuery] Re: Possible to retrieve image data via AJAX for display?

2007-07-25 Thread Klaus Hartl
Rob Desbois wrote: I never noticed that they ever were browser-independent. I know, that's why I said 'that IE has supported for years' and why I can't use them. Despite the ways there are to do this such as these canvas projects or something big and bulky client-side (Java, Flash

[jQuery] Re: Toggling an objects visiblty without show and hide

2007-07-25 Thread Klaus Hartl
Michael Geary wrote: Rob, I think you left out the return statement that you meant to put in. :-) (Outstanding explanation, BTW!) For clarity, it could be: jQuery.fn.toggleVis = function() { this.each(function() { if (this.style.visibility == 'hidden') {

[jQuery] Re: safari failing to remove()

2007-07-25 Thread Klaus Hartl
RwL wrote: Can't figure out for the live of me why remove() is working on this function in every browser but Safari: http://www.lifford.org/exp/tmr.html to summarize what's going on, this is my only function: $(document).ready(function() { $('a').not($(#nav [EMAIL

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread Klaus Hartl
RwL wrote: Thanks John; thanks Klaus. Responding to Klaus: That said, $(a).not( $(#nav a) ) is not supposed to work if I understood that correctly. Having reread the spec, I agree with you, but oddly $(a).not( $ (#nav a) ) DID work as I expected it to. No matter. Your final suggestion

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread Klaus Hartl
RwL wrote: You don't need to wrap the parameter to not in $(...). Maybe try: $(a).not(#nav a).click(function() { alert('...'); return false; }); You know, that's what I thought too, but the not selection didn't work at all until I wrapped my NOT selection with $() -- that is, #nav a was

[jQuery] Re: Plug-ins: Tabs and Cookies

2007-07-25 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: Hi, having some small troubles with the tabs plug-in from Klaus Hartl (http://www.stilbuero.de/jquery/tabs/). I'm trying to implement his cookies plug-in (see code below) and can't seem to get the tabs to change to the defined tab using the method Start With Custom Tab

[jQuery] Re: What am I missing from this plugin?

2007-07-23 Thread Klaus Hartl
Stephan Beal wrote: On Jul 22, 11:57 pm, Klaus Hartl [EMAIL PROTECTED] wrote: IMHO it is bad practice to store that element in the self, i.e. jQuery, object. ... A simple var should be sufficient. jQuery.fn.myPlugin = function(targetField) { var textfield = jQuery(targetField

[jQuery] Re: Country drop down behaves strangely

2007-07-23 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: Hi Im using the following code for a country / city dropdown. when a user selects a country, the dropdown for city populates with the appropriate list i.e: UK London, Manchester, Liverpool etc... An issue that Im seeing in Firefox but not in IE is that when I attempt

[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Klaus Hartl
Web Specialist wrote: Karl, I'll want to suggest a little change in your clueTip plugin. Using this code: A class=cluetip_Help id=http://localhost/local/cluetip/demo/ajax4.htm; title=Testing new clueTip Plugin Test /A will display the hint for that link. This occurs because IE reads

[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Klaus Hartl
Web Specialist wrote: Wow! Thanks for the fast response. Please look this image: How to remove the hint(native IE) message? Is it possible(using title argument for clueTip plugin)? Cheers Hm, after looking through the code it turns out, that the plugin already does what I was talking

[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Klaus Hartl
Karl Swedberg wrote: yes, I agree with Klaus on this one, and actually thought I had built in that feature. I declare the variable so it can be used in the clueTip: var tipTitle = $this.attr(defaults.titleAttribute) // default titleAttribute is title, of course then on show, I remove

[jQuery] Re: What am I missing from this plugin?

2007-07-22 Thread Klaus Hartl
Stephan Beal wrote: On Jul 22, 2:16 am, barophobia [EMAIL PROTECTED] wrote: I think I understand but how do I handle the #passwordField part within the plugin? In your plugin implementation, simply store a reference to the #passwordField passed to your plugin. For example, if you plugin

[jQuery] Re: Animate bug under IE6?

2007-07-21 Thread Klaus Hartl
Dan G. Switzer, II wrote: Collin, Hey all -- I'm new to the list (but not so new to jQuery), and was hoping I could get some assistance regarding what appears to be a bug in the .animate function when running under IE6. Inside a .click function assigned to a specific anchor tag, I call

[jQuery] Re: Long running script IE6, help!

2007-07-20 Thread Klaus Hartl
Giuliano Marcangelo wrote: Josh, Maybe another improvement you could make is to use *table* { table-layout: fixed }, if you are confident that your content will not overflow their respective tablecells...link:

[jQuery] Re: using tabIndex

2007-07-19 Thread Klaus Hartl
Brian Cherne wrote: Hi Phil, #elem1 must already have tabindex set input id=elem1 tabindex=1 / $(e).attr('tabindex') returns a string, so you should multiply it by 1 to convert it to a number, otherwise #elem2 will end up with a tabindex of 11 $(#elem2).attr(tabindex,

[jQuery] Re: Better way to select parent form?

2007-07-18 Thread Klaus Hartl
jarrod wrote: I'm trying to write a script that responds to a keyup event in any field of a given form. If the form is valid, the submit button of that form is enabled. The problem is that there are several forms on the page. My script has to enable the right one. I have a way that works, but

[jQuery] Re: Better way to select parent form?

2007-07-18 Thread Klaus Hartl
Klaus Hartl wrote: jarrod wrote: I'm trying to write a script that responds to a keyup event in any field of a given form. If the form is valid, the submit button of that form is enabled. The problem is that there are several forms on the page. My script has to enable the right one. I

[jQuery] Re: Opacity problem, IE7, Tabs plugin

2007-07-17 Thread Klaus Hartl
Bruce MacKay wrote: Hi folks, I'd greatly appreciate some help with an opacity problem (I think that's what it is) on a page where I'm using the tabs plugin: http://horticulture127.massey.ac.nz/degreecdays_test.asp When I move from one tab to another in IE7, the font quality breaks up.

[jQuery] Re: selectbox: change selected item

2007-07-17 Thread Klaus Hartl
zenx wrote: Hi, I don't know how to change the selected item in a selectbox. I tried this but it doesn't work as expected. HTML code: = select id=id_cliente name=cliente size=1 option value= selected=selected-/option option value=1First/option option

[jQuery] Re: selectbox: change selected item

2007-07-17 Thread Klaus Hartl
Dan G. Switzer, II wrote: I don't know how to change the selected item in a selectbox. I tried this but it doesn't work as expected. HTML code: = select id=id_cliente name=cliente size=1 option value= selected=selected-/option option value=1First/option option

[jQuery] Re: selectbox: change selected item

2007-07-17 Thread Klaus Hartl
Mike Alsup wrote: Klaus, As Dan pointed out, his Field plugin is very adept at getting, setting and otherwise manipulating data for field elements and Dan is adding new capabilities regularly. The Form plugin is mostly geared at providing ajax capabilities for the submit process. It also

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Klaus Hartl
Gilles (Webunity) wrote: I've build something similar to this; here's how i did it: on my webserver, there are a bunch of JS and CSS files. During each page load, i create an array of CSS and JS files, which have to be included on that page. Currently i store these in session, but that isn't

[jQuery] Re: Tabs plugin in floated container

2007-07-16 Thread Klaus Hartl
Rob Desbois wrote: Klaus, Yes, apologies the code I posted was absolute rubbish. The code you posted was what it actually looked like. Sorry for that! If you think about it the tabs styling will always break the page if inside a floated layout: the rule that makes the end of the ul.tabs-nav

[jQuery] Re: Tabs plugin in floated container

2007-07-16 Thread Klaus Hartl
Rob Desbois wrote: Klaus, Try adding height: 200px; to div#sidebar and you can see the problem. Floating div#content left or right solves that problem, but does mean the div's don't expand to fill the client area anymore :-( I see. The reason why I never ran into this kind of problem is

[jQuery] Re: .css(border-color) returning undefined

2007-07-16 Thread Klaus Hartl
Karl Swedberg wrote: You could have a look at the Interface plugin, which does handle this: http://interface.eyecon.ro/ Good call. The Interface plugin suite has an animation module that extends (or overwrites; can't remember which) the .animate() method. It overwrites unfortunately. One

[jQuery] Re: unordered list each li a different background

2007-07-16 Thread Klaus Hartl
Stephan Beal wrote: On Jul 16, 12:47 pm, Armand Datema [EMAIL PROTECTED] wrote: Hi What is the best way to give a different class to each item in an unordered list just a for each and then apply a new class or is there something better Applying classes has the limitation that you have to

[jQuery] Re: How do you delay for a few seconds

2007-07-16 Thread Klaus Hartl
Andy Matthews wrote: I think a pause method would be of great use. I looked for this very thing time and time again. It would be nice to have it available. Here's a one liner: jQuery.fn.pause = function(ms) { return this.animate({ opacity: 1 }, ms); }; I know I know, it's still not in the

[jQuery] Re: unordered list each li a different background

2007-07-16 Thread Klaus Hartl
Armand Datema wrote: Hi Yeah I agree on that but i can do it either returned from back end code or with a javascript. http://itbuzz.howardshome.com/ right now I have it with classes in the css as well as html. The best option would be an ordered list but with image bullet instead of

[jQuery] Re: dev tip: combining JS script files

2007-07-16 Thread Klaus Hartl
Erik Beeson wrote: This part of the text seems contradictory with jQuery's habits. Why do we load jQuery.js and all its plugins in the head section? (answer: to have .ready()). But should we do it all the time and for all plugins? My understanding is we put script tags in the head so as to

[jQuery] Re: Tabs plugin in floated container

2007-07-16 Thread Klaus Hartl
Rob Desbois wrote: Aha, the solution failed in IE6 though! (Including your test page). A quick play shows the floating #sidebar and #content right instead of left, and putting #content before #sidebar in the source to fix the problem. I daren't go near Opera/Safari now ;-) Opera and

[jQuery] Re: what do I have wrong?

2007-07-15 Thread Klaus Hartl
Rick Pasotto wrote: The following code doesn't work. There are no errors reported but nothing happens. What have I misunderstood and therefore gotten wrong? Am I even on the right track to do what I want? The dimensions.js and cluetip.js plugins have been loaded. // have: td1420/td // want:

[jQuery] Re: dev tip: combining JS script files

2007-07-15 Thread Klaus Hartl
Stephan Beal wrote: Hi, all! i just wanted to take a moment to share a tip which i don't see used too often on live sites: Combine all of your JS scripts into a single file. This helps reduce the load time of the page by reducing the number of separate GET requests. In principal you should

[jQuery] Re: jquery tabs collapsing

2007-07-13 Thread Klaus Hartl
Bruce wrote: You know what? While some of us don't know it all, aren't highly evolved programmers, and maybe even don't ask a question or ask for help in the proper way. None of you knew anything when you started either. jquery may be great, but completely ignoring help requests from

[jQuery] Re: jquery tabs collapsing

2007-07-13 Thread Klaus Hartl
Klaus Hartl wrote: Bruce wrote: You know what? While some of us don't know it all, aren't highly evolved programmers, and maybe even don't ask a question or ask for help in the proper way. None of you knew anything when you started either. jquery may be great, but completely ignoring

[jQuery] Re: Tabs plugin in floated container

2007-07-13 Thread Klaus Hartl
Rob Desbois wrote: Happy Friday 13th all ;-) Just mocking up a new interface and attempting to use floated divs for layout. The right div of two floated next two each other needs to be a tabbed container...but the tabs plugin floats the li elements then does a clear:both afterwards which

[jQuery] Re: Syntactic sugar for checking whether an element exists

2007-07-13 Thread Klaus Hartl
Christof Donat wrote: Hi, I'd like: $('.whatever').text(); // = [foo, bar, baz] $('.whatever').text(','); // = foo,bar,baz But at the moment $('.whatever').text(','); would set the text in all elements to ','. I don't think we should change that behaviour because it is the more

[jQuery] Re: Tabs plugin in floated container

2007-07-13 Thread Klaus Hartl
Klaus Hartl wrote: Rob Desbois wrote: Happy Friday 13th all ;-) Just mocking up a new interface and attempting to use floated divs for layout. The right div of two floated next two each other needs to be a tabbed container...but the tabs plugin floats the li elements then does

[jQuery] Re: Syntactic sugar for checking whether an element exists

2007-07-13 Thread Klaus Hartl
Christof Donat wrote: I also think that text() is problematic as well. It should better return an Array of strings. If I need what text currently does I can do $('.whatever').text().join(''). I even could do $('.whatever').text().join(' - oh my god - '), which is not possible with the

[jQuery] Re: Tabs plugin in floated container

2007-07-13 Thread Klaus Hartl
Rob Desbois wrote: Happy Friday 13th all ;-) Just mocking up a new interface and attempting to use floated divs for layout. The right div of two floated next two each other needs to be a tabbed container...but the tabs plugin floats the li elements then does a clear:both afterwards which

[jQuery] Re: Tabs plugin in floated container

2007-07-13 Thread Klaus Hartl
Rob Desbois wrote: Am I right in thinking that the a tags are given display:block and then floated to make them all automatically the same width? Or not? Bah, darn CSS trickery... The as are given block to make them expand to the whole available width, or more generally spoken to increase

[jQuery] Re: Selector Optimisation Question

2007-07-12 Thread Klaus Hartl
NeilM wrote: I have just started to use jQuery in my web development and have a question concerning optimising element selection. I find that I create a lot of references to id'd elements: img id=myImage src=todaysimage.gif width=20 height=20 / Then, in my JavaScript, I want to obtain a

[jQuery] Re: addClass only works once

2007-07-12 Thread Klaus Hartl
stef wrote: Im using the code below to display / hide form fields depending on what value is selected from a drop down list (id='category'). the optional form fields are all hidden by default when DOM is ready, using $(document).ready(function() { $(#dimensions).addClass(hidden)

[jQuery] Re: slightly OT: tiny webdesign utility

2007-07-12 Thread Klaus Hartl
Stephan Beal wrote: Hi, all! i wanted to pass along a trivial utility which i find indispensable in my day-to-day web work. It's 100% cross-platform and doesn't require any special know-how to use. i call it a PNG Image. Here's how it works... Grab this image:

[jQuery] Re: addClass only works once

2007-07-12 Thread Klaus Hartl
stef wrote: will the line below work even if there is no class hidden to remove - will the addClass part still work? Im thinking it wont ... $(#dimensions,#inthebox).removeClass(hidden).addClass(show) It will! --Klaus

[jQuery] Re: Interested in porting another DOM creation plugin?

2007-07-12 Thread Klaus Hartl
Josh Bush wrote: Agreed! In addition, I'd like to see the nested element syntax slightly cleaned up: 'div#parentdiv#childdiv#grandchild' and 'div#parentdiv#child1,div#child2' The latter could become 'div#parent div#child1 + div#child2' to remain in CSS selector syntax? --Klaus

[jQuery] Re: An open letter to non-Believers...

2007-07-11 Thread Klaus Hartl
Stephan Beal wrote: A public jQuery forum is probably not the place to address non- Believers - that is, people who do not use jQuery - but my hope is that some of the Believers here will take this and pass it on to any non-Believers who they know, to help convert the Poor Sods who are wasting

[jQuery] Re: Syntactic sugar for checking whether an element exists

2007-07-11 Thread Klaus Hartl
hj wrote: On Jul 9, 10:19 am, Felix Geisendörfer [EMAIL PROTECTED] wrote: I've just been wondering if jQuery has some syntactic sugar for checking if an element exists. I know the following works: if ($('#my-element').length) { //

[jQuery] Re: Making internet explorer behave with jquery

2007-07-10 Thread Klaus Hartl
Luke wrote: Basically what I'm trying to do is apply a .text and a .textFocus to certain elements. for example: input and input:focus, respectively. So what I've done is this: I am not concerned with the focus portion at this point... only with applying the correct class to the correct

[jQuery] Re: Return attribute content from XPath match //[EMAIL PROTECTED]'banner']/@alt

2007-07-10 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: with something like.. img id=banner alt=This is a banner / //[EMAIL PROTECTED]'banner']/@alt would return This is a banner. Doing it this way does not work, but is valid in XPather https://addons.mozilla.org/en-US/firefox/addon/1192 Is there another way to do this in

[jQuery] Re: Thickbox Reloaded

2007-07-10 Thread Klaus Hartl
Txt.Vaska wrote: Bonjour: I haven't seen any talk about Thickbox Reloaded since mid-May. And I noticed that Thickbox 3 is out now. Is Thickbox Reloaded still happening? The alpha files I got my hands on didn't work in Safari...but...yeah...it's an Alpha. Any word, hint,

[jQuery] Re: Thickbox Reloaded

2007-07-10 Thread Klaus Hartl
Sam Collett wrote: Perhaps it needs a new name as well (rather than just 'Thickbox Reloaded'), because it does function slightly differently to Thickbox? Thickbox Reloaded was just a working title for me (it was supposed to become TB 3 at that time), but now that there is an official TB 3,

[jQuery] Re: Return attribute content from XPath match //[EMAIL PROTECTED]'banner']/@alt

2007-07-10 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: Well bad example, I will not be using it will the id attribute, and I will be getting more the one results, so $().attr() will not work. On Jul 10, 3:41 am, Klaus Hartl [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: with something like.. img id=banner alt

[jQuery] Re: how can i get only the id's of a container's child elements

2007-07-09 Thread Klaus Hartl
Glen Lipka wrote: var myString = ; $(#container .item).each(function(i){ myString = myString + , + this.id http://this.id; }); $(#myInput).val(myString); Hope this helps. Glen I like oneliners: var ids = $.map($('#container [EMAIL PROTECTED]'), function() { return this.id;

[jQuery] Re: how can i get only the id's of a container's child elements

2007-07-09 Thread Klaus Hartl
Klaus Hartl wrote: Glen Lipka wrote: var myString = ; $(#container .item).each(function(i){ myString = myString + , + this.id http://this.id; }); $(#myInput).val(myString); Hope this helps. Glen I like oneliners: var ids = $.map($('#container [EMAIL PROTECTED]'), function() { return

[jQuery] Re: how can i get only the id's of a container's child elements

2007-07-09 Thread Klaus Hartl
Glen Lipka wrote: *boggle*. Ill have to study that. Looks complicated. Glen Glen, it's not complicated at all :-) I'm using jQuery's $.map method to translate one array - the result set $('#container [EMAIL PROTECTED]') - into another array, containing all the ids of the items in

[jQuery] Re: Syntactic sugar for checking whether an element exists

2007-07-09 Thread Klaus Hartl
Felix Geisendörfer wrote: Felix, not to worry, there's nothing wrong at all with using .length - and it is obviously faster than a function call. I figured that by now. I think Matt was much better at explaining why I think an alternative exists() function is useful - it simply is the most

[jQuery] Re: Set element's css 'min-height' to browser's viewport height?

2007-07-08 Thread Klaus Hartl
Karl Swedberg wrote: Another plugin that might be helpful is Dave Cardwell's jqMinMax, which adds support for min- and max-height (and width) to browsers that don't support them in their CSS implementations (notably, IE6). http://davecardwell.co.uk/javascript/jquery/plugins/jquery-minmax/

[jQuery] Re: Set element's css 'min-height' to browser's viewport height?

2007-07-08 Thread Klaus Hartl
zarino wrote: Hi! I'd like to set all elements with the class .inner to have a minimum height equal to the height of the browser's viewport. So, if the window height is 550px, each of the '.inner' divs will have a minimum height of 550px. I suspect it's bound to be super-easy to do with

[jQuery] Re: how to disable and enable submit button via jQuery [code included]

2007-07-06 Thread Klaus Hartl
Allan Mullan wrote: I believe this is because you can't actually remove the attribute disabled - Instead try doing $(#submitanswer).attr(enabled, enabled); No, there is nothing like an enabled attribute. Just set the disabled attribute to true or false (I found that to be the most

[jQuery] Re: latest jQuery and thickbox 2

2007-07-06 Thread Klaus Hartl
Karl Swedberg wrote: Hey everyone, I just helped a friend of mine solve a problem he was having with thickbox 2 and the latest jQuery (1.1.3.1), so I thought I'd share the info in case anyone else is having the same problem. He was getting an error running it in IE6. Changing line 270

[jQuery] Re: Hidden divs, showing based on anchor in URL

2007-07-06 Thread Klaus Hartl
sccr410 wrote: Unfortunately I don't see how to use this - History plugin uses Ajax to bring content onto a page. I am linking to another page. Really no clue on how that plugin applies, sorry. If you take a closer look at the demo, there's also an example with showing/hiding a paragraph

[jQuery] Re: Opposite of .append

2007-07-05 Thread Klaus Hartl
Benjamin Sterling wrote: If the cell is can be emptied after mouseout do $(selector).empty(); Otherwise try this: var appendable = $('spanAppend me/span'); $('#mouseover').hover( function() { appendable.appendTo('#append-here'); }, function() {

[jQuery] Re: tabs plugin help

2007-07-05 Thread Klaus Hartl
Robert O'Rourke wrote: Hi everybody I'm using Klaus' tabs plugin and was wondering how to return or pull out information like attribute values from the clicked tab. Is anything like this possible? $(#mycontainer).tabs({ onClick: myFunction(args) }); Sorry if that's unclear. I

[jQuery] Re: Problem with a possible race condition

2007-07-05 Thread Klaus Hartl
Chris Jordan wrote: Bump. Can anyone shed some light on this? Thanks heaps, Chris On Jul 4, 3:42 pm, Christopher Jordan [EMAIL PROTECTED] wrote: Okay, just an update for anyone thinking of helping. I ran the dialog page by itself (sans thickbox) and the focus gets set just fine. So this is

[jQuery] Re: $(#container element.class) possible, but what about everything except a class?

2007-07-05 Thread Klaus Hartl
Glen Lipka wrote: I expanded my demo page to show the different possibilities. http://www.commadot.com/jquery/selectors/ John/Gordon, your code doesn't seem to find the grandchildren. This one just was itching at my mind, but I think I found the perfect selector: $(#container *).not(.notme)

[jQuery] Re: Tabs plugin, using iframes

2007-07-04 Thread Klaus Hartl
Kia Niskavaara wrote: Thank you for your suggestion. Yes, it does work. One problem though: I've got lots of tabs. And the src of all iframes get loaded at once. I'd prefer if each iframe got loaded when I click on that tab, using the loading.gif -- like the

[jQuery] Re: jQuery plugin architecture info

2007-07-04 Thread Klaus Hartl
Jörn Zaefferer wrote: Adding to the local scope could overwrite a prototype method with the event handler. Imagine a handler-plugin: $.fn.handler = function() { ... }; Now adding to this could actually have a bad effect: $.fn.plugin = function() { this.handler = function() {

[jQuery] Re: How do I return false if no elements found using XPath?

2007-07-04 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: I am trying to find a particular parentElement without knowing the ID. If not I need to find a different element. SO: var parentXpath = [EMAIL PROTECTED]@id=+obj.id+]/.. [EMAIL PROTECTED]; if (*noobjectfound*) { find new object } How can I do this? I did the

[jQuery] Re: Loading Klaus Hartl's Plugin? Tabs...

2007-07-03 Thread Klaus Hartl
Ganeshji Marwaha wrote: The tabs plugin expects the html markup in a certain structure... Recently the plugin has more flexibility towards the markup structure, nevertheless, you need to set that up correctly in order for it to work.. For starters, a couple of pointers are 1. you will have

[jQuery] Re: Loading Klaus Hartl's Plugin? Tabs...

2007-07-03 Thread Klaus Hartl
Jim Newfer wrote: Hi everyone, I am back, I apologize for such a basic Question. Yep, I have the tabs png, and the loading pngs loading correclty they are displaying. Here is the markup I am using, I am thinking it is a problem here. All of my content is displaying for all the tabs at once. Any

[jQuery] Re: Loading Klaus Hartl's Plugin? Tabs...

2007-07-03 Thread Klaus Hartl
Jim Newfer wrote: I should also add that I am loading in the header in this order, the jquery library js file, the niceHead file I have set up that contains this block of code $(document).ready(function() { $('#container').tabs(); }); And then I finally include the css file in my header.

[jQuery] Re: Tabs plugin, using iframes

2007-07-03 Thread Klaus Hartl
Kia Niskavaara wrote: On 7/3/07, *Klaus Hartl* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Kia Niskavaara wrote: I want to load some external data into the content part of the page. This only works with ajax: |$('#container').tabs({ remote: true

[jQuery] Re: jQuery 1.1.3: 800%+ Faster, still 20KB

2007-07-02 Thread Klaus Hartl
John Resig wrote: Hi Everyone - I'm pleased to announce the release of jQuery 1.1.3. After many months of testing, developing, and more testing, we have a very solid release available for download. It comes with roughly 80+ fixed bugs and a handful of enhancements for good measure.

[jQuery] Re: History / Remote Plugin Instructions

2007-06-30 Thread Klaus Hartl
Benjamin Sterling wrote: cfloop... a class=remote href=color-#currentrow#li class=ProductColor#currentrow#/li/a /cfloop Be aware, that the above is not correct XHTML. you can probably get away with: li href=url class=remote/li That isn't correct (X)HTML either. And

[jQuery] Re: [Critical BUG] ID Selector

2007-06-26 Thread Klaus Hartl
Alex Objelean wrote: I've created a ticket, see here - [http://dev.jquery.com/ticket/ 1321#preview] Hope it will be fixed ASAP (in 1.1.3 release ?). This pops up here regularly. The dot has a special meaning in CSS (being a class selector). Thus a selector #div_container.bug will select the

[jQuery] Re: displaying an offscreen row

2007-06-23 Thread Klaus Hartl
Phil Glatz wrote: I have a table inside a div; the div has a fixed height and overflow set to scroll. When the page is opened, the row containing the last selected data is highlighted, via jquery/DOM. the problem I have is that if the list (number of rows in the table) is bigger than can

[jQuery] Re: Digg now uses jQuery

2007-06-22 Thread Klaus Hartl
Rey Bango wrote: Yes sir. Brandon just pointed that out to me. I spy: script src=/js/16/jquery.js type=text/javascript/script script src=/js/16/jquery-dom.js type=text/javascript/script script src=/js/16/jquery-digg.js type=text/javascript/script script src=/js/16/jquery-slideFade.js

[jQuery] Re: Easing rocks

2007-06-21 Thread Klaus Hartl
Erik Beeson wrote: I like backin/out. It feels like the virtual equivalent of physical toggle switches that work like that (often used as power switches). I disagree about having that stuff in the core though. Often I don't even need animations or ajax, but part of what I really like about

[jQuery] Re: Ajax call - lost event handlers

2007-06-21 Thread Klaus Hartl
AJ wrote: By coincidence, I was about to post a very similar issue today. It seems that any time I include content via ajax, and that content also needs to use jQuery functions from the containing page, the content included via ajax seems to lose the functions. I've tried and tried to find

[jQuery] Re: Ajax call - lost event handlers

2007-06-21 Thread Klaus Hartl
AJ wrote: It is true and it will be officially released once jQuery 1.1.3 is released. If you don't mind using jQuery 1.1.3 alpha and getting your hands dirty with inline docs and minimal examples ... then you can start using it now. Wow, thanks! I am in a real crisis with a site right now,

[jQuery] Re: Radio button

2007-06-21 Thread Klaus Hartl
Mike Alsup wrote: This should work: $(document).ready(function() { $([EMAIL PROTECTED]'section']).click(function(){ $(this).css('background', this.checked ? 'red' : ''); }) }); On top of that I'd like to suggest a better separation of the presentational aspect. It's the

[jQuery] Re: Radio button

2007-06-21 Thread Klaus Hartl
rayfidelity wrote: Thanks but it doesn't work. On Jun 21, 6:39 pm, Mike Alsup [EMAIL PROTECTED] wrote: This should work: $(document).ready(function() { $([EMAIL PROTECTED]'section']).click(function(){ $(this).css('background', this.checked ? 'red' : ''); }) }); Here's what

[jQuery] Re: Radio button

2007-06-21 Thread Klaus Hartl
rayfidelity wrote: Klaus thanks it works! Since you made a great suggestion, here's the thing it's like this ul liinput type=radio name=section value=bla bla/li liinput type=radio name=section value=bla bla 2/li /ul i'd actually like to change the background of the list item,

[jQuery] Re: Radio button

2007-06-21 Thread Klaus Hartl
Chris W. Parker wrote: On Thursday, June 21, 2007 9:48 AM Klaus Hartl said: $(document).ready(function() { $([EMAIL PROTECTED]'section']).click(function(){ $(this)[this.checked ? 'addClass' : 'removeClass']('checked'); }); }); What kind of syntax is that third line? (I don't mean

[jQuery] Re: Radio button

2007-06-21 Thread Klaus Hartl
rayfidelity wrote: Hmm the removeclass part doesn't seem to work, when i click on the other radio button the previous stays red... On Jun 21, 7:27 pm, Klaus Hartl [EMAIL PROTECTED] wrote: rayfidelity wrote: Klaus thanks it works! Since you made a great suggestion, here's the thing it's like

[jQuery] Re: create an empty jquery object

2007-06-20 Thread Klaus Hartl
Gordon wrote: Just a quick question, is there a way to quickly create a jQuery object that contains no elements at all so you can add() them as needed later in the script? I suggest (although I've never tested or used it): var empty = $([]); Note that $() will include the document

[jQuery] Re: jQuery Tabs with AJAX and href=javascript:...

2007-06-18 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: Hi, I am using the jquery tabs with dynamically generated divs (the AJAX variant): div ul lia href=somefile.htmlink/a/li ... /ul /div When the user clicks on the tab nav, I want to display a loading image in the content area (=the dynamically generated

[jQuery] Re: How to create an endless animation?

2007-06-18 Thread Klaus Hartl
Arne-Kolja Bachstein wrote: Hi there, well, it’s all in the topic: What is the best (least CPU usage is important I think) way to create an endless animation? I know how to generally use effects, but I do not know how to loop an animation. Any hints are welcome… or maybe even links to

[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-16 Thread Klaus Hartl
Glen Lipka wrote: I want to thank all the little people. (Under 5 ft tall). Seriously, I have been involved in alot of 'communities' in the last decade and every single one was a complete pain in the ass. This is the very first one that I actually enjoy. I think its a testament to how easy

[jQuery] Re: ANNOUNCE: Please Welcome New jQuery Team Member Glen Lipka

2007-06-16 Thread Klaus Hartl
Karl Swedberg wrote: Glen, I'm thrilled that you've officially joined the cult ... ummm ... I mean ... team. As a member of the welcoming committee, I'm pleased to announce that we have sent you some /fabulous/ membership prizes via carrier pigeon, including an upside-down flower pot, a 10%

[jQuery] Re: How is height calculated?

2007-06-16 Thread Klaus Hartl
Fred Janon wrote: Hi, I am trying to understand how the height of an element is calculated in jQuery. I don't understand how the height can be calculated especially when the element is hidden with display:none. Thanks Fred Fred, if the particular element is hidden, it is absolutely

[jQuery] Re: Can I select just one?

2007-06-14 Thread Klaus Hartl
Chris Jordan wrote: Hi folks, I've not really had a need to do this before, but is it possible to tell jQuery that when doing a selection I just want the first one found? I know that I can reference the zeroth element in the array of matches. As it happens, right now I've got a need to just

[jQuery] Re: different name and id issue?

2007-06-14 Thread Klaus Hartl
Roger Ineichen wrote: Hi all We at the Zope3 dev mailinglist have a question to you genious JQuery developers. We run into a IE 67 issue related to DOM element id and name. The following two onclick handler return both Bar as value in IE 6 and 7. Does anybody know why? html

<    2   3   4   5   6   7   8   9   >