[jQuery] Re: Plugin design pattern (common practice?) for dealing with private functions

2010-01-16 Thread Dave Methvin
One issue keeps nagging me though, and that is how to deal with private functions in a powerful yet elegant manner. I'd recommend taking a look at the way the jQuery UI folks did it. You can get the gist of it from ui.core.js. I didn't really appreciate their design choices until I started

[jQuery] Re: Having hard time with customizing scroll bars

2010-01-16 Thread Dave Methvin
Where can I find more about those plugins? This search turned up jScrollPane, looks like that is what you want. http://lmgtfy.com/?q=jquery+scroll+plugin

[jQuery] Re: jQuery 1.4 LiveQuery

2010-01-15 Thread Dave Methvin
In 1.4 the built in live() function has been heavily extended, so perhaps you can switch to using that instead? Agreed, but I think livequery should still work. The error posted there is in blockUI and not livequery anyway. Jon Bennett, can you put up a simple page that is a complete test case?

[jQuery] Re: JSON.parse method of JQuery 1.4 will take a mistake in AIR 1.5.X

2010-01-15 Thread Dave Methvin
Ticket created: http://dev.jquery.com/ticket/5822

[jQuery] Re: Should I use code.jquery.com?

2010-01-15 Thread Dave Methvin
Google is hosting the file now, you could get it from there: http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js

[jQuery] Re: jQuery 1.2.6 clone problem with internet explorer.

2010-01-14 Thread Dave Methvin
If you're really stuck, you could try copying the clone function from 1.3 into 1.2.6.

[jQuery] Re: So sad, jquery 1.4rc1 continue to leak in ie7

2010-01-14 Thread Dave Methvin
Do you have a link to your leaking test case?

[jQuery] Re: JPONP - Callback Codes: like jsoncallback=jsonp1263478799445_=1263478799446

2010-01-14 Thread Dave Methvin
It works. Is there any documentation on this protocol? Hey, Google always has something. :) http://en.wikipedia.org/wiki/JSON#JSONP The reason jQuery uses a random number there is so that multiple requests can be in progress at once and will get separate functions to run on completion.

[jQuery] Re: what's up with zoho jquery forum???

2010-01-14 Thread Dave Methvin
The official forum will at http://forum.jquery.com/ so you might want to head over there and look around. This Google group will be around for a long time and you're free to post here, but at some point we'll turn moderation off and within a few weeks it will most likely be overrun by spammers.

[jQuery] Re: jQuery 1.4 LiveQuery

2010-01-14 Thread Dave Methvin
I've been using LiveQuery a fair bit in my projects, I've just tried updating to 1.4, and it appears to have broken it. Can you post a link to the simplest test case that shows the problem? It is probably a simple fix.

[jQuery] Re: jQuery stripping HTML tags from Ajax response

2010-01-13 Thread Dave Methvin
Is #thing a THEAD or TBODY tag? That would be the only valid place to append a TR.

[jQuery] Re: Make BlockUI synchronous

2010-01-12 Thread Dave Methvin
When the button is clicked, set a variable to the current time and return false from the handler to cancel the submit. When your ajax completes, do a settimeout for the difference between the variable you set and the min length of time you want to show the blockui. When the settimeout fires it

[jQuery] Re: jquery 1.2.1 script not working with 1.3.2

2010-01-08 Thread Dave Methvin
        $('t...@class^=child-]').hide().children('td'); Get rid of any @ for attribute selectors. In jQuery 1.3 we went to css standard syntax, which does not use the @.

[jQuery] Re: My table tags are getting stripped out.

2010-01-08 Thread Dave Methvin
Am I missing something? Well, *we're* missing something, like the markup that goes with the code. Can you point to a sample page maybe? Is #CalendarBody the TABLE tag? If so, you should be appending a THEAD or TBODY tag to it. Instead of returning HTML fragments, you might want to return JSON

[jQuery] Re: ie8 and title text value

2010-01-06 Thread Dave Methvin
I think document.title works on all browsers.

[jQuery] Re: PROBLEM WITH ENCODING (HEBREW - WINDOWS-1255) USING REMOTE

2010-01-05 Thread Dave Methvin
Ajax nearly always uses UTF-8 encoding. Can you switch to UTF-8 for the page and server?

[jQuery] Re: $(form).serialize() does not include submit button data

2010-01-03 Thread Dave Methvin
I would think the submit button data would also be included when doing $(form_obj).serialize()? When you submit a form manually, the value of the submit button clicked is sent as part of the form. If you serialize the form using Javascript, no button was clicked so none of them are serialized.

[jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released?

2009-12-31 Thread Dave Methvin
There should be an announcement of another beta within a few days. The stack overflow has been reported/fixed.

[jQuery] Re: jquery.color.js no longer maintained?

2009-12-17 Thread Dave Methvin
To be sure, you're talking about this plugin? http://plugins.jquery.com/project/color The plugins site is due to get a redesign for the jQuery 1.4 in January and I think that will help some of the plugins that have been neglected. Maybe we can get some people to adopt the plugins that seem to be

[jQuery] Re: How to compare data in 2 jQuery data() elements

2009-12-16 Thread Dave Methvin
 var o = $(#original-fields), n = $(#new-fields);  if (o != n) { // -- BRICK WALL   someAJAXFunctionThatSavesTheFieldsThatChanged();  } How can I compare the #original-fields data with the #new-fields data?  As it is, the two always differ; I assume this is because they are different

[jQuery] Re: .focus() and non-IE browsers.

2009-12-14 Thread Dave Methvin
For some reason, it seems that the .focus() method (at least how I'm using it) isn't properly setting the focus to what I'm specifying. Yeah, I think that may be broken, it's already been reported. http://dev.jquery.com/ticket/5652

[jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-04 Thread Dave Methvin
ok, I've used some code I had lying around and put dummy content in there:http://www.tnt.be/bugs/jquery/moovsjquery/ I actually don't really see a difference on my Ubuntu box (using FF 3.6b4), but there's a huge difference on a colleague's G4 (OS X 10.4, Firefox 3.5.5), so try to find a

[jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Dave Methvin
I refrained from replying because the OP seemed trollish, but he has a point, IMHO. It would be great if someone who knew both frameworks could set up a page that demonstrated a side-by-side case where Mootools has smoother animations than jQuery. Otherwise it's hard do know what might be

[jQuery] Re: Get the td below and above

2009-11-18 Thread Dave Methvin
If the table is really big it might be better to use event delegation: $('table').click(function(e){ var $td = $(e.target).closest('td'), $tr = $td.parent(), pos = $tr.children().index($td), $up = $tr.prev().children().eq(pos), $dn = $tr.next().children().eq(pos);

[jQuery] Re: non well-formed

2009-11-18 Thread Dave Methvin
My Servlet return json string generated with json-lib... for example: {descrizione:Questa è la descrizione del computer,disponibile:false,id:1,nome:Computer,prezzo: 123.456} Is this just a formatting issue, or is there really a newline in the string Questa è la descrizione del computer ?

[jQuery] Re: Document Click triggered onSubmit

2009-11-17 Thread Dave Methvin
I'm having a bit of trouble understanding why a click event attached to the document is being triggered when submitting a form through the enter key. When you press Enter, Firefox (looks like this wasn't tested in IE) triggers the click event on the default submit button. That bubbles up to

[jQuery] Re: Problem adding values in select box (select)

2009-11-17 Thread Dave Methvin
but this line $('#state').add(option); is not adding value to the select box state The .add() method only adds the option element to the jQuery object, it doesn't modify the document. You probably wanted this: $('#state').append(option);

[jQuery] Re: imitate link

2009-11-17 Thread Dave Methvin
Can make b behave as a ? Why would you not just use CSS to style an a element to be bold and not underlined? Definitely the way to go. That way the link works with the keyboard and screen readers as well. Apps that require the mouse drive me crazy.

[jQuery] Re: Rounding numbers

2009-11-16 Thread Dave Methvin
Try this var test = 3.141592; alert(test.toFixed(2));

[jQuery] Re: Description of filter()

2009-11-13 Thread Dave Methvin
Just wondered if the Filter description could be made a little clearer on:http://docs.jquery.com/API/1.3/Traversing Yes, I can't say that I don't agree with you. :-) I updated the docs to use fewer negatives. Because the function only removes an element when it returns an actual Boolean false

[jQuery] Re: Curious as to why a fadeOut() won't work but a hide() does??

2009-11-13 Thread Dave Methvin
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] Re: find( ':contains( something with bracket ) ' ) - crashes in firefox 3.5.3

2009-11-13 Thread Dave Methvin
I already posted this on the jQuery BugTracker, but nobody seems to notice. Maybe I can get some help here and I hope you don't regard this a  double post. (the link to the bug report ishttp://dev.jquery.com/ticket/5482) I noticed the bug, thanks for reporting it. Bugs are usually fixed in

[jQuery] Re: Curious as to why a fadeOut() won't work but a hide() does??

2009-11-13 Thread Dave Methvin
Any other ideas? :) Well, from the code that you originally showed the possible causes were pretty limited. If there is arbitrary code both before and after that line you showed, it could be almost anything! Can you create a simple test case?

[jQuery] Re: jQuery form plugin and document.domain failure

2009-11-11 Thread Dave Methvin
.ajaxForm uses $.ajax, which uses XMLHttpRequest. There are some issues with the way xhr interacts with document.domain, independent of jQuery. http://fettig.net/weblog/2005/11/28/how-to-make-xmlhttprequest-connections-to-another-server-in-your-domain/

[jQuery] Re: jQuery Tabs -- Long content in hidden tabs

2009-11-09 Thread Dave Methvin
If this is UI Tabs you should ask in the jQuery UI group.

[jQuery] Re: How to keep two select items having the same value

2009-11-09 Thread Dave Methvin
What I want is: When the user choose an item from the number1 select, the number2select will automatically change to the same value to the number2. Maybe something like this? $(select[name=number1]).change(function(){ $(select[name=number2]).val( $(this).val() ); }); If the

[jQuery] Re: Return key doesn't invoke OK button in JQuery dialog

2009-11-09 Thread Dave Methvin
For some reason, Return key doesn't invoke OK button in JQuery dialog. Any idea what could be the issue? Do you have some simple code demonstrating the problem? If the OK button is a submit button in a form this generally should work, but an example would be good.

[jQuery] Re: Benefit of extending jQuery with a function vs. a JavaScript function?

2009-11-09 Thread Dave Methvin
Hello, Marty McGee here.  I was hoping to open a discussion about the benefits of extending jQuery with your own custom functions versus simply writing your functions in JavaScript and calling them without extending jQuery first. I am not a fan of extending the jQuery object with unrelated

[jQuery] Re: AJAX POST causing 500 unimplemented method

2009-11-03 Thread Dave Methvin
Any idea what that OPTIONS and 500 unimplemented method mean It sounds like somehow type got set to OPTIONS and when sent to the server it justifiably returned a 500 unimplemented HTTP error code because it didn't know what to do with that method type. Take a look at the more code here stuff and

[jQuery] Re: how i can get the id of the dropped tag

2009-11-02 Thread Dave Methvin
You'd be better off asking this in the jQuery UI group.

[jQuery] Re: My jQuery Pumpkin... Jealous?

2009-11-01 Thread Dave Methvin
jQuery Pumpkin: Fright less. Do More.

[jQuery] Re: Cycle Font Size off one button

2009-10-30 Thread Dave Methvin
I would like the first 4 clicks to run the increase font size function then the 5th click to reset the font. jQuery 1.3 lets you specify multiple functions to .toggle(), you could take advantage of that. I haven't tested this code but maybe something like this? It looks like your original code

[jQuery] Re: Resending an XMLHttpRequest

2009-10-30 Thread Dave Methvin
I'm wondering if there is a good way to resend an ajax request if it has produced an error. Not that I know of, but it's an interesting question. The standard XMLHttpRequest object doesn't have a way to resend the request. The original $.ajax options are still around but they're not passed to

[jQuery] Re: Improvements jQuery.support

2009-10-27 Thread Dave Methvin
I found this website which has done a great job writing some detection functions for some of the new html5 capabilities. Perhaps this is something that could be added to jQuery.support? I added your find to an open ticket on HTML5 issues, thanks! http://dev.jquery.com/ticket/4668

[jQuery] Re: cluetip memory leak

2009-10-26 Thread Dave Methvin
I think a lot of plugins have this problem but most people aren't creating and deleting them a lot. My splitter has this issue but I solved that problem because I was too lazy to support splitters being destroyed. See, the real problem is that you have a destroy option! :-) Since $this and

[jQuery] Re: jQuery.ajax() not calling beforeSend?

2009-10-22 Thread Dave Methvin
It's our own existing auth service (and I'm not on the implementation team). Most other usages of this service are not directly from the browser, but from the back-end via java. I thought about proxying it via my service, but my service isn't SSL, so proxying still doesn't give me security

[jQuery] Re: slow performance on this site - any suggestions?

2009-10-22 Thread Dave Methvin
I built a site for a client and somewhere along the line, I added some code that slowed down the jQuery performance.  I thought it was my crusty old laptop, but my brand new quad core PC also shows the animations quite slowly and choppily.  Thus, the problem is with my code. The Firebug

[jQuery] Re: load(file) then bind(...) ?

2009-10-22 Thread Dave Methvin
In other words, i have a main page with a menu that loads external files in the #content div with the load(file) function. The external file contains a DIV, and i want to bind a function to it $ (#mynewdivfromexternalfile).click(function() {alert ('it worx!'} ); You can use a callback in the

[jQuery] Re: Jquery Corner IE issues [Solution]

2009-10-21 Thread Dave Methvin
Right, you can't corner an img element because the img element can't have children. Put the img in a div and round that. Better yet, create the img src with rounded transparent corners!

[jQuery] Re: jQuery selector return parent

2009-10-21 Thread Dave Methvin
Is there anyway to write a custom filter which returns the parent nodes of the selector? ie) div.someClass:parentNode or ancestor: div.someClass would return the parent element of div.someClass. Not that I know of, but you might be able to use the :has selector if you know enough about the

[jQuery] Re: Strange formatting error (FF3 and jQuery)

2009-10-21 Thread Dave Methvin
A paragraph element placed after an image is not honoring the margin-top CSS parameter. The IMG is an inline element unless you have changed it in CSS. Did you try making it a block element, or wrapping it in a DIV?

[jQuery] Re: newbie: test for null selection

2009-10-21 Thread Dave Methvin
How can I test that a control selection failed to find anything? if ( $(#missing).length == 0 ) { // it's not there } However, remember that if you apply jQuery methods to an empty selection it does nothing: $(#missing).hide(); // no-op

[jQuery] Re: jQuery.ajax() not calling beforeSend?

2009-10-21 Thread Dave Methvin
That's correct, the problem is that it's an authentication service and while I *could* put the credentials on the URL, it would be sending them in the clear across the internet, which is not acceptable. That's a tough one. A typical jsonp implementation uses either iframes or (in jQuery's

[jQuery] Re: $(document).ready firing before Google Maps scripts are fully loaded

2009-10-15 Thread Dave Methvin
So all those extra scripts are injected into the head with document.write? If so they should have definitely been there before any script below them executed. Have you found the place where Google Maps is actually doing the document writes for the other scripts? I am wondering whether it might be

[jQuery] Re: Best way to construct DOM objects

2009-10-15 Thread Dave Methvin
There are a lot of ways to accomplish this. Karl's post demonstrated one way to create larger fragments directly with jQuery. In addition to .append() you can look at using the .wrap() methods. Mike Geary may come by and give you a pointer to his DOM creation methods, which I used on several

[jQuery] Re: the implementation of jQuery.boxModel

2009-10-12 Thread Dave Methvin
I wanna know why the implementation of jQuery.boxModel changed? Most likely because it was using browser detection via the userAgent, which is not reliable. If it's causing trouble, make a post in the jQuery-dev group with an example.

[jQuery] jQuery bug reports

2009-10-12 Thread Dave Methvin
In preparation for the push to a new release of jQuery, I've been cleaning up bug reports in the jQuery core bug tracker. Many tickets languiished because they weren't actually jQuery core bugs, but instead should have been reported on the forums or sent to the author of the plugin. jQuery UI

[jQuery] Re: Problem with extend() when source object contains functions

2009-10-08 Thread Dave Methvin
I only set settings.buttons[Ok']. Somehow extend() causes this behaviour can anyone explain why? Sounds like you wanted the deep option. Otherwise your nested objects won't be duplicated, just copied as object references. http://docs.jquery.com/Utilities/jQuery.extend#deeptargetobject1objectN

[jQuery] Re: JQuery Won't Parse RSS?

2009-10-06 Thread Dave Methvin
What does your xml look like? I am guessing it may not be well formed. If $.get returns a string and you pass it to $() it will attempt to parse it as html and an html link tag isn't supposed to have children. If you force xml then it might return nothing if the xml is not well formed.

[jQuery] Re: IE7 does not play nice with $.load

2009-10-01 Thread Dave Methvin
Is there some easy way of forcing IE to make ajax calls? You can use the old trick of adding a random number to the end of the url. It would probably also work to have the server return a Cache- Control http header, if you can do that.

[jQuery] Re: Getting Last ID

2009-09-30 Thread Dave Methvin
What is the best method to get the last ID so I have 1 3 4 Here's my untested solution: function addNewRow() { var $tbody = $(#list tbody:first); var newId = +($tbody.find(tr:last).attr(id) || 0) + 1; var $row = $(tr /).attr(id, newId).appendTo($tbody); ... } If there are no rows

[jQuery] Re: Prevent jagged text in IE

2009-09-30 Thread Dave Methvin
I'm not sure why this 'fix' should be added to fadeOut? It seems most applicable to fadeIn and fadeTo. Whoops, right. So the problem would be that in IE only, .fadeTo (slow, 1) makes the element completely visible and then pops to 50% opacity based on the stylesheet when the element's filter

[jQuery] Re: Prevent jagged text in IE

2009-09-29 Thread Dave Methvin
This is a nice simple solution to a common cross-browser issue, so wouldn't it be reasonable for this to be added to the standard jQuery animate method? The extra size is minimal. That solution assumes no opacity was specified in a stylesheet. style #glory { opacity: 0.5; filter:

[jQuery] Re: Convert MooTools to jQuery

2009-09-26 Thread Dave Methvin
So it looks like you're trying to fade in #europe as someone types into the input. The opacity value should go from 0 to 1, though, so I'm not sure why the values above 1 are there. Also, I would think you'd want to set the initial state based on the input field. If all of that is true, something

[jQuery] Re: $() and Object doens't support error

2009-09-26 Thread Dave Methvin
Most likely, jQuery.noConflict was called somewhere in the page so that the $ variable could be used by something else. If you are including a lot of plugins, one of them may have done it.

[jQuery] Re: Frustrating Scope Question with getJSON

2009-09-19 Thread Dave Methvin
I'd ideally just like the function to return the shortUrl from the json results but can't seem to get it anywhere but the callback function. ...          $.getJSON(http://api.bit.ly/shorten?version=2.0.1longUrl=; + url + login= + apiLogin + apiKey= + apiKey, function(data){                

[jQuery] Re: Clear selection of text on ul element

2009-09-19 Thread Dave Methvin
I am trying to get/set only text  of list only element text value. But for some reason I can not select it in clear way. ul li id=myid  Here text that I want to modify ul li id=dfdfi don't want modify this/li li id=dfdfi don't want modify this/li /ul /li ul You didn't show your code,

[jQuery] Re: Port Prototype Code to jQuery?

2009-09-04 Thread Dave Methvin
Any thoughts on my previous reply? Leave the markup as-is and replace the Prototype script with this jQuery. I tried to make the selectors do most of the work, but it still has the downsides of the original code such as not validating price inputs. $(function(){ var calculate = function() {

[jQuery] Re: New iPhone-style button plug-in released...

2009-09-04 Thread Dave Methvin
We've just released another jQuery plug-in which emulates the iPhone-style button used to toggle settings on/off. Very nice, Dan. I like the way you haven't forgotten keyboard access.

[jQuery] Re: error when uploading files

2009-09-04 Thread Dave Methvin
I get an error Error: Form elements must not be named submit This is a handy page to use for checking your code, or just for reading the notes to be sure you aren't using any of the special DOM names that trigger problems. http://yura.thinkweb2.com/domlint/

[jQuery] Re: Port Prototype Code to jQuery?

2009-09-01 Thread Dave Methvin
I think you can let the selector do all the work: var sum = 0; $(.fieldpair :checked + :text).each(function(){ sum += +this.value; }); It's rare I ever find a use for the sibling selector!

[jQuery] Re: checkbox application/xhtml+xml

2009-08-17 Thread Dave Methvin
Has this issue been addressed? Im seeing the exact same thing. Is this the same issue? http://dev.jquery.com/ticket/4283

[jQuery] Re: css() function returns different results on different browsers

2009-06-12 Thread Dave Methvin
The issue is on what I get from this function in Internet Explorer and in Firefox: IE : url(http://blabla/images/bg_round.png;) FF : url(http://blabla/images/bg_round.png) Either is valid CSS; the URL only needs to be quoted if it contains certain special characters.

[jQuery] Re: input field name include . jquery cann't parse

2009-05-27 Thread Dave Methvin
The HTML spec allows characters in ids that the CSS selector spec (used by jQuery) requires to be escaped. Is there some solution that has been overlooked by jQuery and the W3C? http://www.w3.org/TR/2009/CR-CSS2-20090423/syndata.html#characters In CSS, identifiers (including element names,

[jQuery] Re: adding $(script) node actually runs the script - correct behavior?

2009-05-20 Thread Dave Methvin
I don't want to execute it. I want to print it out to the html page so the user knows how to embed this stuff on their page. It sounds like you want .text() then. That will not interpret html code.

[jQuery] Re: Compatibility Issues

2009-05-20 Thread Dave Methvin
I have a client using 1.1.4.js and we are using 1.2.6.min.js. If the client upgrades, will it break their 1.1.4.js code? Is there any way to tell? The best way to tell is to test it. It will depend on what features they (and the plugins they use) are using. The release notes will tell you

[jQuery] Re: ActiveX Confirmation Popup in IE with jQuery 1.3.2 but not with 1.2.6

2009-05-05 Thread Dave Methvin
It is probably this bug: http://dev.jquery.com/ticket/4017 Fixed here: http://dev.jquery.com/changeset/6268 Possibly it is this one: http://dev.jquery.com/ticket/4550

[jQuery] Re: jQuery + Firefox - Potential bug with hover event?

2009-04-22 Thread Dave Methvin
Happens here as well. Does it happen with bare DOM functions too?

[jQuery] Re: How to rewrite this in jQuery?

2009-04-19 Thread Dave Methvin
How can I make jQuery read say this code: div rel=tab-1/div div rel=tab-2/div and replace the 'rel' with 'id' ? Or is this asking too much? How about this? $(div[rel]).each(function(){ $(this).attr(id, $(this).attr(rel)); });

[jQuery] Re: Error with BlockUI: 'parentNode' is null or not an object

2009-04-10 Thread Dave Methvin
Doesn't that mean #prg is missing from the document then? That sounds like a logic error in your code.

[jQuery] Re: error in ajax submit with special characters ,

2009-04-08 Thread Dave Methvin
I am submitting a ajax request with special characters (!...@#$%^*()_+} {:?;'[]) for a form field and I am getting a error. A little more information would help; code would be best. Are the special characters in the URL, the form element names, the form data, or somewhere else?

[jQuery] Re: Cannot capture resize event on anything BUT the window

2009-03-12 Thread Dave Methvin
I have a scenario where i need to detect when the content area of the browser changes size. Now, normally one would just attach to the window's resize event and be done with it. But, this does not work when something on the page causes a scrollbar to appear. The window never raises and event

[jQuery] Re: live() not working in IE8?

2009-03-11 Thread Dave Methvin
$('#orderlineform #product_id').live('change',isRentalActive); The change event isn't one of the ones supported by .live(), in fact it's specifically documented as not supported: http://docs.jquery.com/Events/live#typefn The .live() method requires events to bubble to the document level where

[jQuery] Re: .append misbehavior in MSIE7 with cross-window element injection

2009-03-10 Thread Dave Methvin
Try this: $(li /, opener.document) That way it will create the li element in the right document. http://docs.jquery.com/Core/jQuery#htmlownerDocument

[jQuery] Re: Jquery.param encoding wrong

2009-03-09 Thread Dave Methvin
jQuery.param encodes the string in UTF-8 because it uses encodeURIComponent internally. If you know your parameters only contain accented characters and not ones like , perhaps you could build the URL yourself and let the browser do its default encoding? http://dev.jquery.com/ticket/3611

[jQuery] Re: Problems with jQuery 1.3.2

2009-03-04 Thread Dave Methvin
It has some old selectors. I just had to update it for a project myself. There were just 4 lines that I changed, which got it to work for my situation. There may be other issues for more complex trees; I just had a two-level tree hierarchy. - var branches = $(li[ul], this); + var

[jQuery] Re: Best practice for processing JSON quickly

2009-03-03 Thread Dave Methvin
Another thought is that you could just do a replace on 0, 1 and 2 in the string: replace each number with the div you want, then wrap that in a div. Yeah, I was wondering whether the regexp engine would be faster. Something like this: for(var item in items){ html.push( 'div

[jQuery] Re: Objects Methods as event handlers.

2009-03-03 Thread Dave Methvin
one area of functionality has me befuddled - using object methods to handle events. To continue Karl's point, if you use jQuery the same way you would use prototype then you'll be fighting it all the way. The prototype solution squirrels away references to the DOM objects in the class and then

[jQuery] Re: jQuery.ajaxSetup({ success: ... }) behavior

2009-03-02 Thread Dave Methvin
So it appears that $.ajaxSetup's success method is a fallback I think that's correct, although the docs need some clarification on that. Is there a way to define my desired actions without having to place the function in every callback function? Try ajaxSuccess, the global ajax event:

[jQuery] Re: IE no error tracking, jquery not working

2009-03-02 Thread Dave Methvin
Something like Firebug for IE? http://www.fiddlertool.com Also, IE8 has a very good built-in debugger and DOM inspector. I just wish it was possible to have multiple IE versions on one computer without a lot of hassle.

[jQuery] Re: Determining if form was submitted using jQuery

2009-03-01 Thread Dave Methvin
I want to determine if a form has been submitted with jQuery or not. Ajax requests have this header: X-Requested-With: XMLHttpRequest You could use that to determine how the form was submitted.

[jQuery] Re: splitter plugin: messes up the layout

2009-03-01 Thread Dave Methvin
Chris, I don't have Firefox 2 handy and it's working fine on Firefox 3. In general it works best to initialize nested splitters from the inside out; there are a few situations where initializing the outer splitter will not work. It looks like your sample is very close to being a table with

[jQuery] Re: JSON handling: A modest non-proposal

2009-02-26 Thread Dave Methvin
Please consider the following snippet of code, which transparently intercepts all Ajax requests, detects whether the data being POSTed is a JSON object, and based on that, switches the content type to application/json, and serializes the data to a string: That's detecting whether s.data is a

[jQuery] Re: IE6 - what's the absolute fastest way to append DOM nodes?

2009-02-24 Thread Dave Methvin
Is there any way to do this faster? Create the full table in a string, including the table tags, and insert it into the document at one time. Each time you insert an element into the document, the browser does some calculations and checks. By doing it in one insert you save it work. Whenever

[jQuery] Re: invalid array length wit jquery.extend

2009-02-23 Thread Dave Methvin
If the object has a length property, it is assumed to be Array-like. There are several Objects that have Array-like behavior, like jQuery objects, DOM NodeList objects, and Function.arguments. In this case, you've specified a deep copy so when $.extend sees the nested object in prop it thinks

[jQuery] Re: the jquery form plugin and the accents !

2009-02-19 Thread Dave Methvin
It sounds like the problem may be related to this bug report: http://dev.jquery.com/ticket/3611

[jQuery] Re: Striping Sometimes Doesn't Work

2009-02-19 Thread Dave Methvin
Did you define the .even class? I don't see it in Firebug.

[jQuery] Re: Checkbox checked attribute no set when trigger using click()

2009-02-19 Thread Dave Methvin
However, in the click handler when I get the event.target.checked is ALWAYS false for the above call.  All is as expected when the handler is called based on a real UI click. The click event is a little strange. When a real click happens you see the effect of the click in the handler, such as

[jQuery] Re: jquery context menu plugin: issue with find()

2009-02-16 Thread Dave Methvin
console.log('plugin is disabling option : ' + d[i]); // RETURNS A VALID ANSWER $(this).find('a[href=' + d[i] + ']').parent().addClass('disabled');  // THE SELECTOR RETURNS 0 ELEMENTS, ALTHOUGH THE MARKUP IS CORRECT. Break down the selector there a bit. It seems like the most

[jQuery] Re: case insensitive :contains()

2009-02-14 Thread Dave Methvin
I tried various solutions to have a case insensitive :contains() on google but couldn't find one that works with jquery 1.3: This seems to work fine: $.extend($.expr[:], { containsNC: function(elem, i, match, array){ return (elem.textContent || elem.innerText ||

  1   2   3   4   >