osdir.com
mailing list archive

Subject: Re: [jQuery] Possible changes to hide/show - msg#01205

List: lang.javascript.jquery

Date: Prev Next Index Thread: Prev Next Index
On 10/13/06, John Resig <jeresig@xxxxxxxxx> wrote:
> (IMO, the best solution would be to just make the animations just
> reference the technology in .show() and .hide(), rather than having to
> duplicate it all over again)

Doing that causes some not-so-pleasent results when using the hide and
show from the fx module on the tables. However, the .show() and
.hide() methods should be used as it currently assumes the element is
*always* display: block ... but it is not the solution to this issue.

--
Brandon aaron


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: [jQuery] Form plugin revisited ;-)

> How does jQuery(':input', this) differ from > jQuery('input,textarea,select,button', this) ? Great question, Aaron, The ":input" selector will grab all elements and then filter them using a regex match of the nodeName against "input|select|textarea|button". On the other hand, the "input,textarea,select,button" selector will grab only those elements (using getElementsByTagName I believe) and it will grab them *in that order*. So the first expression guarantees us semantic ordering of the selected elements but is slower due to the regex matching. Mike

Next Message by Date: click to view message preview

Re: [jQuery] Ajax to update multiple fields

Klaus Hartl wrote: > > Scott Sharkey schrieb: >> Klaus Hartl wrote: >>>> Quick question though -- I've been trying to make the code you posted >>>> work, and the call is getting through to the php script properly, and >>>> the php script is correctly (I think) returning the XML to my program. >>>> At least, firebug is showing what I expect as the response. >>>> >>>> However, the two functions that fetch the returned values are giving me >>>> nothing (var state = $("state",xml).text(); var city = >>>> $("city",xml).text();) >>>> >>>> I put a debugger stop right after those functions, and I get empty >>>> variables. The response string that I'm sending back is... >>>> >>>> <response><city>Columbus</city><state>Oh</state></response> >>>> >>>> I am assuming that the returned xml is defined in the $ object, but I >>>> don't know how to figure out what's wrong. Any suggestions? >>> Scott, make sure that the responded XML has the right MIME type. With >>> PHP it's done this way: >>> >>> >>> header('Content-type: text/xml'); >> Hi Klaus, >> >> Yeah, I have the correct content type -- do I need the XML encoding >> line? and/or the charset? Here's the beginning: >> >> header('Content-Type: text/xml; charset=utf-8'); >> header('Cache-Control: no-cache, must-revalidate'); >> echo '<?xml version="1.0" encoding="ISO-8859-1"?>'; >> >> -Scott > > The charset specified in the HTTP header and in the encoding declaration > should match, it is considered an error if the document's encoding is > not what was declared or assumed. Maybe that's already where your > problem arouses... Tried both UTF-8 and utf-8 in the encoding -- no difference. Tried ISO-8859-1 on both, no difference. I may try stepping through the jQuery code to see if I can figure out why. -Scott > > > -- Klaus > > _______________________________________________ > jQuery mailing list > discuss@xxxxxxxxxx > http://jquery.com/discuss/

Previous Message by Thread: click to view message preview

Re: [jQuery] Possible changes to hide/show

I totally agree that eventually it should be put in the core. I should have been more clear. I think it will be best as a 'plugin' for now to get all the kinks worked out. Keeping big changes like this as plugins will make it easier for people to test. I say big changes because I believe some of the issue lies in the way jQuery attempts to find the height and width of an element. The fx module depends on this quite heavily. I would also say that this change somewhat ties into seperating out the css logic from the attr method. I have actually been working on this part as well, making it a plugin for easier testing. I think there are several 'quick fixes' that could be applied but it would just clutter up the core and make it harder to maintain. I also used 'plugin' pretty loosely. In this case it is not a new method but rather just overwritting the current implemention of a few methods. However, perhaps this is not the best approach ... it was just my thought process. -- Brandon Aaron On 10/13/06, Blair McKenzie <shib71@xxxxxxxxx> wrote: > I tend to agree with John on this - smoothing away these bumps doesn't make > a lot of difference individually, but all that polish in combination has and > is making jQuery a pleasure to use. > > Blair > > > On 10/14/06, John Resig <jeresig@xxxxxxxxx> wrote: > > > Okay so ... after looking over the code in the 1.0.2 release (and > > > possibly earlier versions) work just fine with the plain ol' show and > > > hide methods. However, the fx's show and hide methods just blow up. I > > > believe this type of functionality is going to be better suited as a > > > plugin. > > > > I disagree. While it would be 'painful' - I think adding it in to > > jQuery would be really good - that's why I added in the original > > hide/show hack. Rather than having more true features (since those can > > always be spun off into plugins), jQuery should have the "least amount > > of surprises". Having code behave as you would expect it to is much > > more powerful than having to apply hacks to work around problems. Do > > you agree with me? > > > > (IMO, the best solution would be to just make the animations just > > reference the technology in .show() and .hide(), rather than having to > > duplicate it all over again) > > > > --John > > > > _______________________________________________ > > jQuery mailing list > > discuss@xxxxxxxxxx > > http://jquery.com/discuss/ > > > > > _______________________________________________ > jQuery mailing list > discuss@xxxxxxxxxx > http://jquery.com/discuss/ > > >

Next Message by Thread: click to view message preview

Re: [jQuery] Possible changes to hide/show

After playin around with this some more ... I'm beginging to wonder if it is even possible to collapse a table row with .hide() and .show() from the fx module. I can't get a row height to be smaller than its conents unless I tell it to be display: block and then that really messes up the table in Firefox and Safari. I'm starting to think the best solution is to just short cut any table related elements to the plain .hide() and .show(). I haven't completely given up but everything I've tried thus far just isn't working ... or even close to working. -- Brandon Aaron On 10/13/06, Richard Thomas <lists@xxxxxxxxxxxx> wrote: > hide and show do not work properly on a table row within firefox, it > does however work in IE > > The reason being, firefox requires you use the "table-row" for the > display method instead of "block". > > > -- > Richard Thomas - CEO > Cyberlot Technologies Group Inc. > 507.398.4124 - Voice > > _______________________________________________ > jQuery mailing list > discuss@xxxxxxxxxx > http://jquery.com/discuss/ >
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by