[jQuery] Problem with .height/.css?
I've been out of the loop on the list here for a little while, and I've recently thrown on the latest SVN JQuery. Running into some odd problems. I've got something like the following: $(.edit).click(function(){ $(body).append(div id='overlay'/diviframe id='edit' src='http://www.google.com'/iframe); $(window).scroll(function(){ $(#overlay).top(window.pageYOffset + 'px'); $(#edit).top(window.pageYOffset + 100 + 'px'); }); }); which is intended to be a one-shot lightbox style deal (Thickbox seems good, but overkill for what I wanted.) However when I change.. $(#overlay).top(window.pageYOffset + 'px'); to $(#overlay).height(window.pageYOffset + 'px'); so that the effect works a little bit smoother, I'm greeted with nothing: the overlay div just sits there. Same if I were to use .css(height, etc) I've also tried using the center plugin which is back by including it in the head, and copying and pasting it at the end of my SVN build, but I'm also yet unable to get that one to work too on a div that is not being appended to the page Basically, am I missing something stupid here in my 2-3 months of JQuery rustiness? Any help would be appreciated! Mike Rubits Web/Graphic Designer, d8d.org E-Mail: [EMAIL PROTECTED] ICQ: 4029304 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Problem with .height/.css?
However when I change.. $(#overlay).top(window.pageYOffset + 'px'); to $(#overlay).height(window.pageYOffset + 'px'); The jQuery part of the code is correct, however I'm not following your logic here. What happens if you set the .height() to something like .height( 500px ) - does that work as expected? --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] 3d Universe in jQuery
In IE or not in IE, I think that essential calculations in rotator.js referencing to document.body should be performed on $(document).ready - this is what this function is for. After implementing this change and making necessary adjustments, there is no problem with IE more. With simpler http://www.willjessup.com/sandbox/jquery/rotator/rotator.html text-based rotator , there were no problems. With http://www.willjessup.com/sandbox/jquery/solar_system/rotator.html planet images , loading time is longer. I will send corrected version of rotator.js to Will Jessup. BTW. Pluton should be definitely removed. Waiting for official jQuery 1.0! -- View this message in context: http://www.nabble.com/3d-Universe-in-jQuery-tf2032253.html#a5979969 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Recommended version
John Resig schrieb: Klaus, Good news! Any chance that the slide bug I mentioned two times will be fixed until then? This is the only thing that holds me back from switching to 1.0. You can see it here: http://stilbuero.de/jquery/tabs/ (see the slide example - the height is somehow miscalculated...) Or maybe I'm simply doing something wrong? Using the latest jquery-svn.js and making two changes to your code: Removing stuff like: .css({display: '', height: 'auto'}); and: .css('display', 'none') Makes it works perfectly. It doesn't completely explain why its happening - but at least it works now. Hi John, I made a new build an hour ago (226) and removed all that code you mentioned, but the bug still occurs (in Firefox at least)... :-( Any ideas? -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] 3d Universe in jQuery
BTW. Pluton should be definitely removed. What's so bad about Pluto? ;-) /k ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] 3d Universe in jQuery
Op 25-aug-2006, om 11:26 heeft Klaus Hartl het volgende geschreven: BTW. Pluton should be definitely removed. What's so bad about Pluto? ;-) Yesterday scientists agreed about the fact that Pluto shouldn't be called 'Pluto' anymore, but 'Dwarf' from now on. The name is choosen because it's the smallest (discovered) planet in the universe, and a so called 'dwarf'-planet.. Steef ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuery and XHTML as XML
Hi, I just spotted in Revision 226, that jQuery will not by all means support XHTML as XML. Line 743 reads: if ( table this.nodeName == TABLE a[0].nodeName != THEAD ) { nodeName in XML preserves case, that means in XHTML as XML it would return table and thead so that doesn't work here. This may not have high priority but needs to be fixed, maybe in jQuery 1.01 or something? Fix: if ( table this.nodeName.toUpperCase() == TABLE a[0].nodeName.toUpperCase() != THEAD ) { -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] 3d Universe in jQuery
Yesterday scientists agreed about the fact that Pluto shouldn't be called 'Pluto' anymore, but 'Dwarf' from now on. The name is choosen because it's the smallest (discovered) planet in the universe, and a so called 'dwarf'-planet.. Not true! Yes, Pluto is now classified as a dwarf planet instead of a planet. But it's still named Pluto. http://en.wikipedia.org/wiki/Pluto -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Recommended version
Good news! Any chance that the slide bug I mentioned two times will be fixed until then? This is the only thing that holds me back from switching to 1.0. You can see it here: http://stilbuero.de/jquery/tabs/ (see the slide example - the height is somehow miscalculated...) Or maybe I'm simply doing something wrong? Using the latest jquery-svn.js and making two changes to your code: Removing stuff like: .css({display: '', height: 'auto'}); and: .css('display', 'none') Makes it works perfectly. It doesn't completely explain why its happening - but at least it works now. Hi John, I made a new build an hour ago (226) and removed all that code you mentioned, but the bug still occurs (in Firefox at least)... :-( Any ideas? If I change line 943: jQuery.swap( e, { visibility: hidden, position: absolute, display: block }, to this: jQuery.swap( e, { display: block }, everything works out fine. The height is calculated wrong with the other styles applied (this my also be a bug in Firefox). I assume you are cloning the element if it is not displayed to retrieve width and height here, but I can't really tell and don't know what side effects this change might have... But if so I think its sufficient to not append the clone to the DOM. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery and XHTML as XML
On Fri, August 25, 2006 7:18 am, Klaus Hartl said: Hi, I just spotted in Revision 226, that jQuery will not by all means support XHTML as XML. Line 743 reads: if ( table this.nodeName == TABLE a[0].nodeName != THEAD ) { nodeName in XML preserves case, that means in XHTML as XML it would return table and thead so that doesn't work here. This may not have high priority but needs to be fixed, maybe in jQuery 1.01 or something? Fix: if ( table this.nodeName.toUpperCase() == TABLE a[0].nodeName.toUpperCase() != THEAD ) { Actually the standard fix I've seen most often is to fold to lowercase, not uppercase. (Lowercase, because it's variable height, is generally easier to read.) This is an incompatibility between HTML (where JS folds to uppercase) and XHTML/XML (where JS stays at the existing lowercase). Case folding to lower is the recommended future-friendly method, I think. --Larry Garfield ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Bug in 226: elem has no properties
Hi, with revision 226 Firefox throws an error 'elem has no properties' if I use the following snippet: $('#someIdul').size() or $('#someIdul')[0] if element #someId does not contain a ul. Can someone second this? Regards, Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Recommended version
One quick thing about your demo page - you have some PHP at the top of your jquery.js file which causes issues in Opera, etc. Ups, I copied that from another project... fixed. I'll see if I can get a demo up of my page, that works, without that particular change. Thanks for your efforts! -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Visual jQuery (An update)
Can't wait! !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Resig Sent: Friday, August 25, 2006 12:27 PM To: jQuery Discussion. Subject: Re: [jQuery] Visual jQuery (An update) woohoo! Isnt jQuery 1.0 coming out today? Or was that next week? Today. I'm working feverishly :-) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] 3d Universe in jQuery
I think they should call it Plutito. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] CNET's expansive banner jquery implementation
Does anyone remember those 790x90 pixel banners on CNET that would expand vertically to display a big version of the banner. This would occur the first time the user accessed the page. Then, after a few seconds, then banner would contract into a regular 790x90 pixel banner. The user would have the option to expand the banner by clicking on a link in the top right corner labeled, obviously, expand.Is there a jquery implementation of this type of banner? Thanks in advance.-- Ivan Quintero ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] CNET's expansive banner jquery implementation
Aren't those usually done in Flash? !//--andy matthewsweb developercertified advanced coldfusion programmerICGLink, Inc.[EMAIL PROTECTED]615.370.1530 x737--//- -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of ivan quinteroSent: Friday, August 25, 2006 3:40 PMTo: discuss@jquery.comSubject: [jQuery] CNET's expansive banner jquery implementationDoes anyone remember those 790x90 pixel banners on CNET that would "expand" vertically to display a big version of the banner. This would occur the first time the user accessed the page. Then, after a few seconds, then banner would "contract" into a regular 790x90 pixel banner. The user would have the option to "expand" the banner by clicking on a link in the top right corner labeled, obviously, "expand".Is there a jquery implementation of this type of banner? Thanks in advance.-- Ivan Quintero ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] SVN 228 jquery.pack.js does not work in Safari
Hi all, Any idea why the compressed version (jquery.pack.js) of the latest SVN (228) doesn't work in Safari? Compare these two pages in Safari:http://sandbox.englishrules.com/index.htm - pointing to uncompressed, "lite" jquery .http://sandbox.englishrules.com/pack.htm - pointing to compressed jquery. You should see a paragraph with a yellow background. Works in index.htm, but not in pack.htm. I suppose I could wait for 1.0 sometime later today, but I'm impatient. :) Besides, this should probably be fixed before launch, no?Any help would be much appreciated. thanks,Karl.___Karl Swedbergwww.englishrules.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $() Iframes
I found out how to do the iframe inside ouside inter-access. And I wrote some test code in the traditional js way(tested with IE, Firefox). I've tried to write these code using jquery, but not success yet. the main page code 1html 2head 3 titleMAIN/title 4 scripttype=text/_javascript_ 5 // 主页面访问IFrame页面DOM内容6 functionoinit(){7alert(getIFrameDoc( iframe1).getElementById( idiv).id);8} 9functiongetIFrameDoc(id){10 variframe= document.getElementById(id);11var doc=(iframe.contentWindow||iframe.contentDocument );12if(doc.document){ 13doc=doc.document; 14}15return doc;16}17 /script 18/head 19bodyonload =oinit() 20divid =odiv 21iframeid =iframe1src =iframe.html/ iframe22 /div23 /body 24/html// the iframe page code 1html 2head 3 titleIFRAME/title 4 scripttype=text/_javascript_ 5 // IFrame页面访问外层页面DOM内容6 functioniinit(){7alert(window.parent.document.getElementById( odiv).id);8 }9/script 10/ head11 bodyonload=iinit() 12 divid=idiv 13 /body14 /html On 8/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:I have a scenario where I am trying to get to a div located within an iframe from the parent using the jQuery $() selector. I have triedmultiple things but seem to have no luck. I was wondering if anyonehad some suggestions or some past issues with this.Thanks in advance, Jeff___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ -- 刘远志QQ:2065254 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Can the content of a node of xml be placed inside a div when xml source is loaded using .get
Try: $(main,xml).html() instead of: $(main,xml).text() On 8/25/06, Sam Sherlock [EMAIL PROTECTED] wrote: the dynamic xml source creates a structure along the following linescontent titlemy title/title main pabout/p /main script /script/contentthe jquery code that I am using to take load the xml source and take the content $.get(./content/?id=+htmlDoc,function(xml){ var innerHeight = 0; // however this return the text stripped of mark up alert( $(main,xml).text() ); //i need to retain the mark and place it in mymain div $(div#main).html($(main,xml).text()); innerHeight =document.getElementById('innerMain').offsetHeight; $(div#main).css({height: innerHeight+px}); $(div#content).css({height: innerHeight+px}); //$(div#main).slideDown(slow); //console.info(new height + innerHeight); init(); }); is there a way to do this??___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $('foo').css('min-width') fix for Internet Explorer
John Resig wrote: You caught me in the middle of some updates, so it's now in rev 226, slightly modified to be more generic: http://jquery.com/src/jquery-svn.js var np = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()}); r = e.currentStyle[p] || e.currentStyle[np]; In your (commendable) effort to make the jQuery source a bit friendlier, it looks like you missed a stray 'np' in SVN revision 229: ret = elem.currentStyle[prop] || elem.currentStyle[np]; ^^ That should be 'newProp', no? Best wishes, Dave Cardwell. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Slide down bug
Hi folks, please have a look at this bug report and John' reply: http://proj.jquery.com/dev/bugs/bug/133/ To fix the problem in my example with Firefox (http://fuzz.bassistance.de/slidebug/starterkit.html), what do I have to change? I don't quite get the explanation John provided... -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Can the content of a node of xml be placed inside a div when xml source is loaded using .get
.text works if you put the HTML in cdata.though I have some odd display issues, or am I still going wrong??On 8/26/06, Sam Sherlock [EMAIL PROTECTED] wrote:I have tried that but no joy, when I dump the mark up to the console var newContent = ;...console.info(' main from xml source: ' + newContent); main from xml source: undefined what am I doing wrong??On 8/26/06, Jonathan Howard [EMAIL PROTECTED] wrote: Try: $(main,xml).html() instead of: $(main,xml).text() On 8/25/06, Sam Sherlock [EMAIL PROTECTED] wrote: the dynamic xml source creates a structure along the following lines content titlemy title/title main pabout/p /main script /script/contentthe jquery code that I am using to take load the xml source and take the content $.get(./content/?id=+htmlDoc,function(xml){ var innerHeight = 0; // however this return the text stripped of mark up alert( $(main,xml).text() ); //i need to retain the mark and place it in mymain div $(div#main).html($(main,xml).text()); innerHeight =document.getElementById('innerMain').offsetHeight; $(div#main).css({height: innerHeight+px}); $(div#content).css({height: innerHeight+px}); //$(div#main).slideDown(slow); //console.info(new height + innerHeight); init(); }); is there a way to do this??___jQuery mailing list discuss@jquery.comhttp://jquery.com/discuss/ ___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Can the content of a node of xml be placed inside a div when xml source is loaded using .get
Sam - Try doing this: $(main,xml).children().appendTo(#main); or this: $(#main).append( $(main,xml).children() ); I think they may get you the effect that you desire. This is with the (soon to be) jQuery 1.0: http://jquery.com/src/jquery-svn.js --John On 8/25/06, Sam Sherlock [EMAIL PROTECTED] wrote: .text works if you put the HTML in cdata. though I have some odd display issues, or am I still going wrong?? On 8/26/06, Sam Sherlock [EMAIL PROTECTED] wrote: I have tried that but no joy, when I dump the mark up to the console var newContent = ; ... console.info('main from xml source: ' + newContent); main from xml source: undefined what am I doing wrong?? On 8/26/06, Jonathan Howard [EMAIL PROTECTED] wrote: Try: $(main,xml).html() instead of: $(main,xml).text() On 8/25/06, Sam Sherlock [EMAIL PROTECTED] wrote: the dynamic xml source creates a structure along the following lines content titlemy title/title main pabout/p /main script /script /content the jquery code that I am using to take load the xml source and take the content $.get(./content/?id=+htmlDoc,function(xml){ var innerHeight = 0; // however this return the text stripped of mark up alert( $(main,xml).text() ); // i need to retain the mark and place it in my main div $(div#main).html($(main,xml).text()); innerHeight = document.getElementById('innerMain').offsetHeight; $(div#main).css({height: innerHeight+px}); $(div#content).css({height: innerHeight+px}); // $(div#main).slideDown(slow); //console.info(new height + innerHeight); init(); }); is there a way to do this?? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Slide down bug
On 8/25/06, John Resig [EMAIL PROTECTED] wrote: Solution 1) Don't include a width on the outer box. Solution 2) Provide a static width for the inner dds. Something like: dd { width: 250px; } Out of curiosity I tried these out, they do indeed seem to fix the problem. Uploaded them just for the heck of it: http://ruphus.com/stash/jorn-solution1.html http://ruphus.com/stash/jorn-solution2.html I hope your bird is okay ☺ -p@ -- ᗷɭoℊẚᗰսɳᑯѲ⁈⁈⁈ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuery 1.0
I'd like to take this opportunity to announce the brand new jQuery 1.0! A lot of work has gone into this release. A lot of bugs fixed, a ton of new features, and a complete overhaul of how the jQuery development process is run. In reality, this release is so large, it's going to take a couple days to release it (this includes a new version of the jQuery web site). So bare with us as we make the transition over to full release. There's some kinks that'll have to be worked out (namely, finalizing the new documentation) but it's all in the pipeline and will be ready within the next couple days. For now, here are some relevant links to get you started: * jQuery 1.0 http://jquery.com/src/jquery-1.0.js * jQuery 1.0 - Compressed http://jquery.com/src/jquery-1.0.pack.js * API Documentation http://jquery.com/api/ * (Partial) Test Suite http://jquery.com/test/ If you want to build your own copies of jQuery, you can check it out of Subversion and build it from the command line. You can get the latest jQuery by doing: svn co svn://jquery.com/jquery There's so much more to come. I'll be doing a post every day this week detailing some aspect of jQuery 1.0 along with some screencasts demonstrating what you can do with all the new code. Please, if you spot any bugs, file them in the bug tracker: * Bug Tracker: http://proj.jquery.com/dev/bugs/ * Submit New Bug: http://proj.jquery.com/dev/bugs/new/ I'd like to thank everyone who made this release possible. It's been a lot of work, but the journey is only just beginning. I can't wait to delve into some of the very exciting advances that we have planned. Happy Coding! --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/