Re: [jQuery] Kinda funny way to getting jQuery some exposure

2007-03-30 Thread Brandon Aaron
On 3/30/07, Rey Bango [EMAIL PROTECTED] wrote:
 Thanks John  Joan! Fixed.

 Hey John, what'd you think of the page?!? Its like retro-Web 2.0 huh? ;o)

You mean it is like web 1.996. We've come a long way in the last few
thousandths of revisions. :)

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Known memory leaks?

2007-03-29 Thread Brandon Aaron
The ready hack for IE shouldn't be leaking but there is a patch to
change it up a little to avoid a weird issue with iframes and
refreshing the page.

http://dev.jquery.com/ticket/1061

--
Brandon Aaron

On 3/29/07, Choan Gálvez [EMAIL PROTECTED] wrote:

 On 28/03/2007, at 17:09, Markus Peter wrote:

  [...]
 
  We are currently trying to eliminate the memory leaks but are now
  running into a dead end.

 Same here. I'm currently investigating the ready hack for IE.

 As the `onreadystatechange` handler for the deferred script is
 defined as a closure, it seems as a candidate for leaking.

 Anyone?
 --
 Choan Gálvez
 [EMAIL PROTECTED]
 http://choangalvez.nom.es/




 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Quickly find the width of the window

2007-03-29 Thread Brandon Aaron
You could use the dimensions plugin which extends the $().width()
method to work on window and document.

$(window).width();

http://brandon.jquery.com/plugins/dimensions/

--
Brandon Aaron

On 3/29/07, Kenneth Love [EMAIL PROTECTED] wrote:
 Hey all, I'm needing to find the width of the window so I can find the
 relative position of an element. Any help?

 Kenneth


 --
 = the blog from beyond =
 = www.eyeheartzombies.com =
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Collapsing table Columns?

2007-03-29 Thread Brandon Aaron
The only time this still acts up is if you have the element
display:none; in a style sheet. However there is a ticket to fix this
issue with a patch that works 99% of the time.

--
Brandon Aaron

On 3/29/07, Richard Thomas [EMAIL PROTECTED] wrote:
 Sorry I don't know the xpath/selectors that well yet.

 I had problems with just the show and hide in the past, so I had to
 use custom code like the following

 toggleClasstr = 'block'
 // Supports DOM2 requires specific style
 if ( window.addEventListener != undefined ) {
toggleClasstr = 'table-row';
 }

 Looks like this was fixed in jquery which is nice I can get rid of my
 extra code.

 On 3/29/07, Karl Swedberg [EMAIL PROTECTED] wrote:
  On Mar 29, 2007, at 1:40 PM, Richard Thomas wrote:
  You would need to hide every cell in the row
 
   I don't know what you're getting at here. If you mean every cell in the
  *column*, then that is exactly what 'td:nth-child(n)' would get. But maybe
  I'm misunderstanding you.
 
 
  also I don't know if its
  fixed in jQuery but IE and Firefox differ in how to unhide the cell,
  one requires being set to block mode the other to table-cell or
  something, don't remember off the top of my head.
 
  This is only an issue with the animated show and hide methods. Just using
  .show() and .hide() isn't a problem.
 
  --Karl
  _
  Karl Swedberg
  www.englishrules.com
  www.learningjquery.com
 
 
 
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] nightly builds

2007-03-29 Thread Brandon Aaron
What kind of problems are you having? I do know that there are some
issues with fx in the nightlies but I don't know of any other issues.

--
Brandon Aaron

On 3/29/07, mmjaeger [EMAIL PROTECTED] wrote:

 anybody else experiencing problems with the nightly build downloads?
 --
 View this message in context: 
 http://www.nabble.com/nightly-builds-tf3488239.html#a9740412
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Beta Testers needed for Form Plugin file upload support

2007-03-29 Thread Brandon Aaron
On 3/29/07, Mike Alsup [EMAIL PROTECTED] wrote:
 Beta 4 is available now at:  http://www.malsup.com/jquery/form/file/

 Things seem to work well on ie6, ei7, ff2, and op9.  I'm still trying
 to sort out issues with op8 and Safari.

Really cool stuff Mike!

ff2 and op9 on mac worked perfectly for me. Safari worked great for
everything but xml. When trying to submit with xml selected the
overlay would just hang. It looked like it submitted but just didn't
get the response ... but I'm unsure if it actually did submit.

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Known memory leaks?

2007-03-28 Thread Brandon Aaron
I think the most likely candidate for the leaks is going to surround
the usage of AJAX and Events. Are you attaching events to html pulled
in via AJAX? I ask because I believe if you proceed to replace that
html without unbinding the events first, that might cause a leak ...
but I'm unsure ... just all I can think of for now.

--
Brandon Aaron

On 3/28/07, Markus Peter [EMAIL PROTECTED] wrote:
 Hello

 We're currently using jQuery 1.1.2 on a production site and have some
 issues with memory leaks, which seem to affect all browsers after a
 while, especially Safari, but also Firefox and IE seem to be
 affected. Users use our page for hours, and parts of the HTML page
 stay open all the time and are not reloaded for the whole session,
 which means even small leaks can easily accumulate and become a real
 problem.

 We are currently trying to eliminate the memory leaks but are now
 running into a dead end. The software is unfortunately too large
 (about 2500 lines of JavaScript code) to easily create reduced test
 cases for the leaks so we basically have no clue at all, where the
 leaks occur and whether they are in our code or in jQuery. We noticed
 the situation improved a bit by upgrading from 1.1.1 to 1.1.2, though.

 Now, the question is: Are there maybe any already _known_ memory
 leaks in version 1.1.2 which are maybe even be in the upcoming 1.1.3
 or the SVN repository, so we could simply cherry pick the
 corresponding patches. I tried searching through the ticket database
 but could not find anything related to memory leaks but might have
 overlooked someting. So, if any of the developers know of such a bug,
 it will save us a lot of time.

 We mainly use the jQuery CSS selection system, event system,
 animations and AJAX by the way - no XPath

 --
 Markus Peter - [EMAIL PROTECTED]  http://www.spin-ag.de/
 SPiN AG, Bischof-von-Henle-Str. 2b, 93051 Regensburg, HRB 6295
 Regensburg
 Aufsichtsratsvors.: Dr. Christian Kirnberger
 Vorstände: Fabian Rott, Paul Schmid



 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Problems with script replacement in Safari

2007-03-28 Thread Brandon Aaron
Last time I tried an ID on a script tag, Safari wouldn't find it.

--
Brandon Aaron

On 3/28/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote:
 Safari is very weird with script tags! any script tag is assumed to be
 javascript, and loaded in the beginning and that's it.
 Try making a new script tag, and inserting it.
 Safari broke many of my cute tricks!

 I'd never considered using an id on a script tag, but they are in the dom,
 so it should work.


 On 3/28/07, Yansky  [EMAIL PROTECTED] wrote:
 
  Hi guys, I'm trying to get the following to work in Safari, but it just
 wont
  add the script source  I can't figure out why.
 
  This is my code:
  head
  title/title
  script type=text/javascript src=jquery-latest.js/script
  script type=text/javascript
  $(document).ready(function() {
if($.browser.msie) {
  $('#scriptReplace').attr(src,test2-ie.js);
}
else {
  $('#scriptReplace').attr(src,
 test2-mozilla-EtAl.js);
}
  });
  /script
  link rel=stylesheet href=test2.css media=screen,projection
  type=text/css /
  script id=scriptReplace type=text/javascript /script
  /head
 
  It works fine in IE, Opera  Firefox, yet it wont work in Safari (2.0.4).
  Does it take longer for Safari's DOM to be ready? Is using an ID to locate
  the correct script tag the right way to go?
 
  Cheers.
  --
  View this message in context:
 http://www.nabble.com/Problems-with-script-replacement-in-Safari-tf3481746.html#a9718408
  Sent from the JQuery mailing list archive at Nabble.com.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 



 --
 Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Problems with script replacement in Safari

2007-03-28 Thread Brandon Aaron
Safari improves pretty rapidly and is pretty good about following
standards but it is not without its problems. It can be very
frustrating sometimes ... especially if you have to support 1.0.3 or
even 1.3.

--
Brandon Aaron

On 3/28/07, Yansky [EMAIL PROTECTED] wrote:

 Hmm ok, I guess the easiest solution would be to put all the javascript into
 one file and do the browser sniffing in that file.

 It's weird - people always complain about IE's bugs, but lately I've had a
 lot of problems getting things to work in Safari; whereas IE(7) will just
 work.


 Brandon Aaron wrote:
 
  Last time I tried an ID on a script tag, Safari wouldn't find it.
 
  --
  Brandon Aaron
 
  On 3/28/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote:
  Safari is very weird with script tags! any script tag is assumed to be
  javascript, and loaded in the beginning and that's it.
  Try making a new script tag, and inserting it.
  Safari broke many of my cute tricks!
 
  I'd never considered using an id on a script tag, but they are in the
  dom,
  so it should work.
 
 
  On 3/28/07, Yansky  [EMAIL PROTECTED] wrote:
  
   Hi guys, I'm trying to get the following to work in Safari, but it just
  wont
   add the script source  I can't figure out why.
  
   This is my code:
   head
   title/title
   script type=text/javascript src=jquery-latest.js/script
   script type=text/javascript
   $(document).ready(function() {
 if($.browser.msie) {
   $('#scriptReplace').attr(src,test2-ie.js);
 }
 else {
   $('#scriptReplace').attr(src,
  test2-mozilla-EtAl.js);
 }
   });
   /script
   link rel=stylesheet href=test2.css media=screen,projection
   type=text/css /
   script id=scriptReplace type=text/javascript /script
   /head
  
   It works fine in IE, Opera  Firefox, yet it wont work in Safari
  (2.0.4).
   Does it take longer for Safari's DOM to be ready? Is using an ID to
  locate
   the correct script tag the right way to go?
  
   Cheers.
   --
   View this message in context:
  http://www.nabble.com/Problems-with-script-replacement-in-Safari-tf3481746.html#a9718408
   Sent from the JQuery mailing list archive at Nabble.com.
  
  
   ___
   jQuery mailing list
   discuss@jquery.com
   http://jquery.com/discuss/
  
 
 
 
  --
  Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 

 --
 View this message in context: 
 http://www.nabble.com/Problems-with-script-replacement-in-Safari-tf3481746.html#a9722143
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery vs prototype

2007-03-27 Thread Brandon Aaron
Hi Denis,

Best thing you can do is experiment with both and even throw in some
of the others (YUI, Dojo, Mochi, mootools) and see which style fits
you best. The benefits of using one over the other are going to vary
differently for different people and different projects.

Once you play around with the different libraries out there. I believe
you will find jQuery to be more oriented at making your life much
easier when having to muck about with the DOM and your typical daily
tasks as a web developer. Once you start to really dig into jQuery you
will find that the code you write on top of jQuery is extremely small
and packs a large punch.

--
Brandon Aaron

On 3/27/07, Denis [EMAIL PROTECTED] wrote:
 can you help me?
 what benefits of JQuery vs prototype?(http://www.prototypejs.org/)


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] base href and jQuery

2007-03-26 Thread Brandon Aaron
I believe most of the problems arise when the base tag is not closed.
Try closing it with a /base tag and everything should work just
fine.

--
Brandon Aaron

On 3/26/07, agent2026 [EMAIL PROTECTED] wrote:

 I've read some posts about getting a base href=... to work with
 javascript (not sure if it works).  Is it possible for jQuery to recognize
 it?

 Adam
 --
 View this message in context: 
 http://www.nabble.com/base-href-and-jQuery-tf3466550.html#a9671726
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Learning jQuery

2007-03-22 Thread Brandon Aaron
Welcome to jQuery!

The code example where you use the .each can be written like this:

$('[EMAIL PROTECTED], [EMAIL PROTECTED]')
.click(function() { return false; })
.css({ cursor: 'default', textDecoration: 'none' })
.focus(function() { this.blur(); });

That is part of the huge benefit of chaining. jQuery will apply the
methods to all the elements matched by the selector. Also blur() is a
method of the element itself. So instead of doing this:

$(this).blur();

Which says, give me a jQuery object and then fire the blur event of
the element, you can do this:

this.blur();

Which only says, fire the blur event of the element.

--
Brandon Aaron

On 3/22/07, Rob Wilkerson [EMAIL PROTECTED] wrote:
 I'm a new jQuery user and just took it for a spin on a site I've taken
 over.  I blogged my first use case if anyone's interested.  Nothing
 revolutionary, just examples (and code samples) of how jQuery saved me
 a lot of time and effort.

 http://musetracks.instantspot.com/blog/index.cfm/2007/3/22/jQuery-isSmooth

 I'm sure I didn't use the most efficient means available, so I'd
 appreciate any feedback.

 Rob

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] toggle a div based on clicking a specific radio button

2007-03-21 Thread Brandon Aaron

On 3/21/07, Josh Nathanson [EMAIL PROTECTED] wrote:


 Hi Andy,

My approach with radio buttons:
- Bind a click function to the group
- when clicked, check the value - if it's the one you want, show -
otherwise, hide

$([EMAIL PROTECTED]).click(function() {
if(this.value == 'm') {
$('#manual').show(fast);
}
else {
 $('#manual').hide(fast);
}




The above could also be written as this:

$([EMAIL PROTECTED]).bind('click', function() {
   $('#manual)[this.value==m?'show':'hide']('fast');
});

--
Brandon Aaron
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery breaks iframes and back button?

2007-03-20 Thread Brandon Aaron
Thanks for tracking down the issue and creating a ticket Geoffrey!

--
Brandon Aaron

On 3/20/07, Geoffrey Knutzen [EMAIL PROTECTED] wrote:
 I have been able to reproduce this bug and have opened a ticket on it. #1061
 It really isn't the back button but how ie is refreshing the page.

 I think I found the cause of the problem and noted it in the ticket.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of clifforama
 Sent: Monday, March 19, 2007 10:27 AM
 To: discuss@jquery.com
 Subject: [jQuery] jQuery breaks iframes and back button?


 jQuery seems to cause unexpected behaviour in IE6 and IE7 when used in
 combination with iframes. In fact, it occurs without actually making use of
 jQuery, but just including it is enough. Here's the problem:

 I have two pages that each contain 2 iframes. For illustrative purposes,
 they will have the same contents:

 [container1.html and container2.html]
 html
 head
 script type=text/javascript src=jquery.js/script
 /head
 body
 iframe src=left.html/iframe
 iframe src=right.html/iframe
 /body
 /html

 The two pages loaded in each iframe simply contain the following bodies.
 Neither contain any reference to jQuery:

 [left.html]
 pThis is 'left'/p
 plt;a href=container2.html target=_parentgt;container2lt;/agt;/p

 [right.html]
 pThis is 'right'/p
 plt;a href=container2.html target=_parentgt;container2lt;/agt;/p

 Now, just load container1.html and click on either link. You will see no
 change, since container2.html is the same as container1.html. But, if you
 click the back button to return to container1.html, you will see that both
 iframes now contain the contents of right.html.

 If I simply remove the jQuery references, the problem goes away.

 Any ideas?

 Cliff

 --
 View this message in context:
 http://www.nabble.com/jQuery-breaks-iframes-and-back-button--tf3428574.html#
 a9556791
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions plugin Mozilla bug

2007-03-20 Thread Brandon Aaron
After some investigating, I'm not able to reproduce what you describe.
Could you possibly post up or send me a test case for this? The
highest the loop should go to is the body tag (in Mozilla). Once it
hits the body tag inside the loop you describe the code that gives you
an error *should* not run. Also, you might want to insure you have the
latest revision: 1485.

Thanks
--
Brandon Aaron

On 3/18/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Thanks for the bug ... I'll get this fixed soon!

 --
 Brandon Aaorn

 On 3/18/07, Wizzud [EMAIL PROTECTED] wrote:
 
  While playing with Ext I encountered a problem in Firefox whereby the offset
  function in dimensions was causing an elem.style error. The reason is that
  there is a do-while loop if options.scroll is set, and that loop will go all
  the way up to the document, at which point - if the browser is Mozilla - the
  code attempts to check the css for overflow not visible and falls over
  because document has no style.
  I fixed this in my version by modifying line 260 of dimensions.js and
  inserting a check for op, so the line now begins ...
 
  if (op  jQuery.browser.mozilla  
 
  This prevents the jQuery.css() call failing at the document level.
  --
  View this message in context: 
  http://www.nabble.com/dimensions-plugin-Mozilla-bug-tf3421935.html#a9537545
  Sent from the jQuery Plugins mailing list archive at Nabble.com.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-19 Thread Brandon Aaron
I've gone ahead and updated the docs, added a change log, changed the
name of the file to jquery.bgiframe.js and added a min version. I went
ahead and tagged this as 2.0
(http://dev.jquery.com/browser/tags/plugins/bgiframe/2.0).

Let me know if you find any bugs. :)

--
Brandon Aaron

On 3/18/07, John W [EMAIL PROTECTED] wrote:

 Hmm Didnt realize that would do the trick.  Because IE use an active x object
 and IE7 does not. I admit Im not the javascript expert. Thanks for pointing
 that out.

 // This is only for IE6
 if ( !($.browser.msie  typeof XMLHttpRequest == 'function') )
 return this;

 And yes I do hope they add in a method to check a browser version. I believe
 there is a plugin that adds that capability but It would be nice if it was
 just native to jquery.



 thumblewend wrote:
 
  On 18/03/2007, at 3:10 PM, John W wrote:
  Hey guys this is great stuff. Joel your menu works a lot better now
  under IE6
  and Brandon thanks for making Bgiframe updates.  One thing I was
  wondering,
  since IE7 doesnt really suffer from the same issue as IE6 perhaps
  there is a
  way not to fire the bgiframe for IE7. There isnt really a reason
  to  have
  the iframe with IE7 or maybe Im wrong?
 
  Too bad with with $.browser you cant specify the browser version
  only the
  type. Hint hint for a jquery update.
 
  Thanks John.
  Regarding excluding IE7 - the bgIframe already does that with these
  lines:
 
  // This is only for IE6
  if ( !($.browser.msie  typeof XMLHttpRequest == 'function') )
  return this;
 
  I was reading the archive of the dev list the other day and saw talk
  about introducing $.browser.msie6. I didn't find what the resolution
  of the thread was. Does anyone reading this know what was decided?
 
  Joel.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 

 --
 View this message in context: 
 http://www.nabble.com/bgiframe-update%2C-sneak-peak-tf3402941.html#a9537223
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions plugin Mozilla bug

2007-03-18 Thread Brandon Aaron
Thanks for the bug ... I'll get this fixed soon!

--
Brandon Aaorn

On 3/18/07, Wizzud [EMAIL PROTECTED] wrote:

 While playing with Ext I encountered a problem in Firefox whereby the offset
 function in dimensions was causing an elem.style error. The reason is that
 there is a do-while loop if options.scroll is set, and that loop will go all
 the way up to the document, at which point - if the browser is Mozilla - the
 code attempts to check the css for overflow not visible and falls over
 because document has no style.
 I fixed this in my version by modifying line 260 of dimensions.js and
 inserting a check for op, so the line now begins ...

 if (op  jQuery.browser.mozilla  

 This prevents the jQuery.css() call failing at the document level.
 --
 View this message in context: 
 http://www.nabble.com/dimensions-plugin-Mozilla-bug-tf3421935.html#a9537545
 Sent from the jQuery Plugins mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery scrollbar

2007-03-18 Thread Brandon Aaron
You might want to check out jScrollPane [1] and I'm currently working
on a new scroll window plugin myself [2], but jScrollPane is going to
be stable and mine will for sure be changing a lot in the near future.

BTW ... I'm still not convinced that using a custom designed scroll
bar cross-platform is a good thing. Couldn't it just confuse users who
are used to seeing a specific scroll bar? I guess it really just
depends on your audience.

[1]: http://kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html
[2]: http://brandon.jquery.com/plugins/scrollWindow/demo/

--
Brandon Aaron

On 3/18/07, Schnuck [EMAIL PROTECTED] wrote:
 hi husy,

 i somehow figured out how to have multiple instances of the jquery
 scrollbar on the same page - however, i would like to use those
 scrollable divs in a auto-centered fixed width layout. i cannot seem
 to be able to modify the code in a way so the scrollbars move with the
 centered layout. is there any way to fix this? i could imagine this
 could be of interest for others too since this technique finally gives
 cross platform identitical scrollbars and would help unifying designs.

 any help highly appreciated.

 thanks,

 s

 here is a test site:

 http://www.myonlyworkingeye.co.uk/schnuck/

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-17 Thread Brandon Aaron
Hey Joel,

Thanks for the information! It is true that the iframe is behind the
element it is called on by setting the z-index to -1 and by where it
is inserted into the DOM. The only time the iframe should show through
is if a child element (of the element that has the bgiframe method
called on it) has an opacity of less then 1 on it. I believe I will
take out setting the opacity by default (since in most cases it
doesn't matter) and add an option to include it.

--
Brandon Aaron

On 3/17/07, Joel Birch [EMAIL PROTECTED] wrote:
 On 15/03/2007, at 2:41 AM, Brandon Aaron wrote:
  Okay ... I've got a sneak peak of the new bgiframe plugin here:
  http://brandon.jquery.com/plugins/_bgiframe/test/
 
  This discussion started in the recent suckerfish plugin thread ...
  basically they ran into an issue where the expressions used by the
  bgiframe plugin slow down animations in IE6. This has been brought up
  before. Hopefully the flexibility provided by the new settings will
  help solve this problem and a few others.

 Hi Brandon,

 If you recall, the addition of an iframe to the superfish submenus
 interfered with the animations in IE6. You can see this in action on
 my demo page. However, I have found that if I delete this...

 filter:Alpha(Opacity=\'0\');

 ...from your plugin, all the animations work perfectly as per real
 browsers, and the submenus still stay above the select elements. I do
 realise it's possible that this only happens to be a good option in
 my case because I am adding the bgiframe solution only on hover (I
 would remove them on 'hoverOut' too), therefore I don't need to make
 the iframes invisible (I don't see the iframes even though I removed
 that line - I take it the iframe is behind the submenu?).

 Would it be possible to add an option to your plugin so that the
 opacity is not applied? That way developers have the option of
 dynamically applying and removing the iframe, allowing animations to
 work on the element the iframe is attached to.

 No rush of course - its the weekend :)

 Cheers
 Joel Birch.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] help with syntax, naming a function

2007-03-17 Thread Brandon Aaron
Thank you for a test page. I'm going to take a look at this in more
detail as soon as I get the chance.

--
Brandon Aaron

On 3/15/07, rolfsf [EMAIL PROTECTED] wrote:

 okay, so I figured it out... I think

 http://www.monkeypuzzle.net/testfiles/jquery/leftRight/index2.html

 jQuery.fn.sizeLayout = function() {
 if($.browser.msie){
 var ww = $(window).width();
 var wh = $(window).height();
 var pt = $('#rightPane').offset().top;
 var dw = $('#leftPane').outerWidth();
 $('#leftPane').css('height', (wh - pt - 10) + 
 'px'); // set height of
 left div
 $('#rightPane').css('height', (wh - pt - 10) 
 + 'px');
 $('#rightPane').css('width', (ww - dw - 30) + 'px');};
  };

 $().ready(function(){
 $(window).sizeLayout();
 $(window).resize(function(){
 $(this).sizeLayout();
 });
 });

 but can someone tell me why, on document load in IE6, there's an additional
 16px at the bottom, which disappears on resize? Dimensions.js seems to think
 there is a bottom scrollbar maybe?

 Thanks

 --
 View this message in context: 
 http://www.nabble.com/help-with-syntax%2C-naming-a-function-tf3409727.html#a9501497
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-17 Thread Brandon Aaron
Okay so I did some testing with this idea and if the element has a
background color on it, the iframe will show above it. You can see the
result on my test page.

--
Brandon Aaron

On 3/17/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Hey Joel,

 Thanks for the information! It is true that the iframe is behind the
 element it is called on by setting the z-index to -1 and by where it
 is inserted into the DOM. The only time the iframe should show through
 is if a child element (of the element that has the bgiframe method
 called on it) has an opacity of less then 1 on it. I believe I will
 take out setting the opacity by default (since in most cases it
 doesn't matter) and add an option to include it.

 --
 Brandon Aaron

 On 3/17/07, Joel Birch [EMAIL PROTECTED] wrote:
  On 15/03/2007, at 2:41 AM, Brandon Aaron wrote:
   Okay ... I've got a sneak peak of the new bgiframe plugin here:
   http://brandon.jquery.com/plugins/_bgiframe/test/
  
   This discussion started in the recent suckerfish plugin thread ...
   basically they ran into an issue where the expressions used by the
   bgiframe plugin slow down animations in IE6. This has been brought up
   before. Hopefully the flexibility provided by the new settings will
   help solve this problem and a few others.
 
  Hi Brandon,
 
  If you recall, the addition of an iframe to the superfish submenus
  interfered with the animations in IE6. You can see this in action on
  my demo page. However, I have found that if I delete this...
 
  filter:Alpha(Opacity=\'0\');
 
  ...from your plugin, all the animations work perfectly as per real
  browsers, and the submenus still stay above the select elements. I do
  realise it's possible that this only happens to be a good option in
  my case because I am adding the bgiframe solution only on hover (I
  would remove them on 'hoverOut' too), therefore I don't need to make
  the iframes invisible (I don't see the iframes even though I removed
  that line - I take it the iframe is behind the submenu?).
 
  Would it be possible to add an option to your plugin so that the
  opacity is not applied? That way developers have the option of
  dynamically applying and removing the iframe, allowing animations to
  work on the element the iframe is attached to.
 
  No rush of course - its the weekend :)
 
  Cheers
  Joel Birch.
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] event reattach

2007-03-15 Thread Brandon Aaron
You might also find the copyEvents plugin useful. It provides three
methods: copyEvents, copyEventsTo and cloneWithEvents. You can find
the docs inline and an example in the unit test.

http://brandon.jquery.com/plugins/copyEvents/

--
Brandon Aaron

On 3/15/07, Kush Murod [EMAIL PROTECTED] wrote:
 Hi,

 example:

 $('.buttons').click... attached an event

 at some stage I've replaced one of many '.buttons' using $.get/$.post
 via html(newButton)
 new button does not have click event attached anymore

 what's the best way to keep or re-attach event(s)

 Cheers,

 --
 Kush Murod, Web applications developer
 Sensory Networks
 [E] [EMAIL PROTECTED]
 [W] www.sensorynetworks.com
 [T] +61 2 8302 2745
 [F] +61 2 9475 0316
 [A] Level 6, 140 William Street East Sydney 2011


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to convert class to style='attrs ...'

2007-03-15 Thread Brandon Aaron
I didn't think MySpace allowed JavaScript either?

Here is how you could do it.
$(function() {
$('.myClass').css({ fontFamily:'verdana', fontSize:'12px' });
});

--
Brandon Aaron

On 3/15/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi,

 I'm trying to write a function to generate MySpace friendly HTML.  MySpace 
 does not accept link tags, so the HTML from my page that contains 
 class='whatever', will mean nothing on the mySpace page.

 My question is, given an element with a class, e.g. td 
 class='myClass'Hello/td, how would I use jQuery to rewrite that element 
 as td style='font-family:verdana;font-size:12px;...Hello/td?  Notice I 
 have replaced the class attribute with a style attribute with all the 
 attributes listed out.

 Thanks, - Dave

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] hoverIntent = my first plug-in

2007-03-14 Thread Brandon Aaron
On 3/13/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Brandon Aaron schrieb:
  I thought about this approach as well but then you gotta think that
  this is a plugin that others will use and possibly other plugins might
  depend on it as well. Then if the defaults changed, the plugin that
  depends on it could be confused and break. It is easy enough for a
  devloper to setup their own set of defaults that would not cause an
  issue like this.
 
  var myHoverDefaults = { interval: 250 };
 
  Now just pass that in and your set and don't potentially break any
  other plugins.
 
  As an example ... I'm updating my bgiframe plugin to accept an options
  hash. If I allowed a developer/plugin to change the defaults then all
  the plugins that depend on the defaults would then break.
 
  Hopefully that all made sense ... I'm writing it in a bit of a rush.
 
 Err, maybe, maybe not. Either way, I had a big mistake in my code
 example. Corrected:

 jQuery.fn.hoverIntent = function (on,off,options) {
var settings = jQuery.extend({}, jQuery.hoverIntent.defaults, options);
...
 };
 jQuery.hoverIntent = {};
 jQuery.extend(jQuery.hoverIntent, {
 defaults: { sensitivity: 4, interval: 100 },
 setDefaults: function(settings) {
 jQuery.extend(jQuery.hoverIntent.defaults, settings);
  }
 });

 I hope that makes more sense.

Maybe I can make more sense today ... hopefully. Lets say I had a
plugin that depended on this plugin and I changed the defaults in my
plugin. Now when the developer includes my plugin, the defaults have
been changed and the expected behavior of the plugin is different.
That would be very frustrating as a plugin developer and a developer
using the plugins.

My plugin:
...
jQuery.hoverIntent.defaults = { sensitivity: 10, interval 500 };
...

Now, my plugin depends on those defaults and the developer has
changed the defaults to something completely different. Of course as a
plugin developer I could *not* depend on the defaults but they
shouldn't be called defaults then. I believe it is best to keep the
defaults internal and not allow others to change the defaults for all
implementations of the plugin. It could also be a problem if the
defaults have been changed on a very big project with lots of
developers. I don't think it is a good idea to have a general
setDefaults function either unless it was per an instance based, not
global for the plugin.

Hopefully that made more sense.

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] bgiframe update, sneak peak

2007-03-14 Thread Brandon Aaron
Okay ... I've got a sneak peak of the new bgiframe plugin here:
http://brandon.jquery.com/plugins/_bgiframe/test/

This discussion started in the recent suckerfish plugin thread ...
basically they ran into an issue where the expressions used by the
bgiframe plugin slow down animations in IE6. This has been brought up
before. Hopefully the flexibility provided by the new settings will
help solve this problem and a few others.

Notice that if you don't pass anything it acts just like it did
before, which is usually enough for most situations. However, there
are a few situations where having more control would be really nice.
So, I've made it possible to manually pass a top and left, width and
height and the src of the iframe. On the test page I demo several
different usages and the settings I passed to the bgiframe method.

One of the bigger things that makes this nice is that you can now use
other values other than pixels by manually passing in the values. You
can also pass your own expression() too. I still highly suggest using
the 'auto' settings because that automatically adjust the top, left,
width and height properties as the elements changes. However, you can
very easily hook into the iframe and change its properties as the
element changes in advanced situations by selecting the element,
$('iframe.bgiframe',scope).doWhatYouNeedToIt().

I'm going to be doing some more testing and hopefully push it into SVN
soon. BTW I've tagged the previous version of the bgiframe plugin
here: 
http://dev.jquery.com/browser/tags/plugins/bgiframe/1.0/bgiframe.js?format=txt

--
Brandon Aaron

On 3/13/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Reading this has inspired me to update the bgiframe plugin. I'm going
 to have an options hash that can be passed in. The options will be:

 * offsetTop: auto || specific value
 * offsetLeft: auto || specific value
 * width: auto || specific value
 * height: auto || specific value
 * zIndex: -1 || specific value
 * tabIndex: -1 || specific value
 * src: 'javascript:false;' || specific value
 * className: 'bgiframe' || specific value

 The offsetTop and offsetLeft are automatically calculated as the
 border's width and height (depending on top or left). If you pass in a
 value for the offsetTop and offsetLeft, then the expressions used to
 calculate borders will not be included. Same applies for the width and
 height options.

 This will make the plugin more reusable across other plugins and
 sites. So instead of commenting out the expressions, you could just
 manually set and offsetTop and offsetLeft values for your particular
 situation.

 Feature/enhancement requests?

 Hopefully I can have something ready today but that depends on work. :)

 --
 Brandon Aaron

 On 3/13/07, Joel Birch [EMAIL PROTECTED] wrote:
  On 13/03/2007, at 4:43 PM, John W wrote:
   This is a very nice implementation of the suckerfish menu with
   jquery. One
   thing, however, is there any way to add the z-index checking using
   something
   like bgiframe for the IE6 issue of menu elements not hovering over
   select
   menus in IE6? I tried implementing it but it really bogs down the
   drop down
   menus in IE6 a lot which tells me Im doing something wrong.
 
  I was just reading the comments on the bgiframe file here:
  http://dev.jquery.com/browser/trunk/plugins/bgiframe/bgiframe.js?
  format=txt
 
  These parts seems to be relevant to us:
* It does take borders into consideration but all values
* need to be in pixels
 
  My demo uses ems to define the dimensions etc.
  also:
 
* NOTICE: This plugin uses CSS expersions in order to work
* with an element's borders, height and with and can result in poor
* performance when used on an element that changes properties
* like size and position a lot. Two of these expressions can be
* removed if border doesn't matter and performance does.
 
  That sounds especially relevant considering that an animation runs on
  the element when the menus are revealed. Maybe removing the
  expressions that relate to borders (if you don't need them) may help
  you. Otherwise, another option could be to do an instant reveal of
  the menu rather than a gradual animation (not as cool of course).
 
  Joel.
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread Brandon Aaron
Reading this has inspired me to update the bgiframe plugin. I'm going
to have an options hash that can be passed in. The options will be:

* offsetTop: auto || specific value
* offsetLeft: auto || specific value
* width: auto || specific value
* height: auto || specific value
* zIndex: -1 || specific value
* tabIndex: -1 || specific value
* src: 'javascript:false;' || specific value
* className: 'bgiframe' || specific value

The offsetTop and offsetLeft are automatically calculated as the
border's width and height (depending on top or left). If you pass in a
value for the offsetTop and offsetLeft, then the expressions used to
calculate borders will not be included. Same applies for the width and
height options.

This will make the plugin more reusable across other plugins and
sites. So instead of commenting out the expressions, you could just
manually set and offsetTop and offsetLeft values for your particular
situation.

Feature/enhancement requests?

Hopefully I can have something ready today but that depends on work. :)

--
Brandon Aaron

On 3/13/07, Joel Birch [EMAIL PROTECTED] wrote:
 On 13/03/2007, at 4:43 PM, John W wrote:
  This is a very nice implementation of the suckerfish menu with
  jquery. One
  thing, however, is there any way to add the z-index checking using
  something
  like bgiframe for the IE6 issue of menu elements not hovering over
  select
  menus in IE6? I tried implementing it but it really bogs down the
  drop down
  menus in IE6 a lot which tells me Im doing something wrong.

 I was just reading the comments on the bgiframe file here:
 http://dev.jquery.com/browser/trunk/plugins/bgiframe/bgiframe.js?
 format=txt

 These parts seems to be relevant to us:
   * It does take borders into consideration but all values
   * need to be in pixels

 My demo uses ems to define the dimensions etc.
 also:

   * NOTICE: This plugin uses CSS expersions in order to work
   * with an element's borders, height and with and can result in poor
   * performance when used on an element that changes properties
   * like size and position a lot. Two of these expressions can be
   * removed if border doesn't matter and performance does.

 That sounds especially relevant considering that an animation runs on
 the element when the menus are revealed. Maybe removing the
 expressions that relate to borders (if you don't need them) may help
 you. Otherwise, another option could be to do an instant reveal of
 the menu rather than a gradual animation (not as cool of course).

 Joel.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread Brandon Aaron
I'm thinking about changing the name of offsetTop to top and
offsetLeft to left. I think it would be less confusing, less typing
and more representing of what they really are. :)

--
Brandon Aaron

On 3/13/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Reading this has inspired me to update the bgiframe plugin. I'm going
 to have an options hash that can be passed in. The options will be:

 * offsetTop: auto || specific value
 * offsetLeft: auto || specific value
 * width: auto || specific value
 * height: auto || specific value
 * zIndex: -1 || specific value
 * tabIndex: -1 || specific value
 * src: 'javascript:false;' || specific value
 * className: 'bgiframe' || specific value

 The offsetTop and offsetLeft are automatically calculated as the
 border's width and height (depending on top or left). If you pass in a
 value for the offsetTop and offsetLeft, then the expressions used to
 calculate borders will not be included. Same applies for the width and
 height options.

 This will make the plugin more reusable across other plugins and
 sites. So instead of commenting out the expressions, you could just
 manually set and offsetTop and offsetLeft values for your particular
 situation.

 Feature/enhancement requests?

 Hopefully I can have something ready today but that depends on work. :)

 --
 Brandon Aaron

 On 3/13/07, Joel Birch [EMAIL PROTECTED] wrote:
  On 13/03/2007, at 4:43 PM, John W wrote:
   This is a very nice implementation of the suckerfish menu with
   jquery. One
   thing, however, is there any way to add the z-index checking using
   something
   like bgiframe for the IE6 issue of menu elements not hovering over
   select
   menus in IE6? I tried implementing it but it really bogs down the
   drop down
   menus in IE6 a lot which tells me Im doing something wrong.
 
  I was just reading the comments on the bgiframe file here:
  http://dev.jquery.com/browser/trunk/plugins/bgiframe/bgiframe.js?
  format=txt
 
  These parts seems to be relevant to us:
* It does take borders into consideration but all values
* need to be in pixels
 
  My demo uses ems to define the dimensions etc.
  also:
 
* NOTICE: This plugin uses CSS expersions in order to work
* with an element's borders, height and with and can result in poor
* performance when used on an element that changes properties
* like size and position a lot. Two of these expressions can be
* removed if border doesn't matter and performance does.
 
  That sounds especially relevant considering that an animation runs on
  the element when the menus are revealed. Maybe removing the
  expressions that relate to borders (if you don't need them) may help
  you. Otherwise, another option could be to do an instant reveal of
  the menu rather than a gradual animation (not as cool of course).
 
  Joel.
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] enhanced suckerfish-style menu plugin

2007-03-13 Thread Brandon Aaron
It will not increase file size very much at all, maybe up around 30%.
It would be worth it for the flexibility. :)

--
Brandon Aaron

On 3/13/07, Joel Birch [EMAIL PROTECTED] wrote:
 Sounds great Brandon. My only thought is that currently your plugin
 is nice and light which is  great for such a useful utility plugin.
 Wouldn't adding all these features bump up the size to almost 200%?

 On the other hand I'm sure you have weighed the pros and cons of this
 so... awesome!

 Joel.

 On 14/03/2007, at 12:45 AM, Brandon Aaron wrote:
  I'm thinking about changing the name of offsetTop to top and
  offsetLeft to left. I think it would be less confusing, less typing
  and more representing of what they really are. :)
 
  --
  Brandon Aaron
 
  On 3/13/07, Brandon Aaron [EMAIL PROTECTED] wrote:
  Reading this has inspired me to update the bgiframe plugin. I'm going
  to have an options hash that can be passed in. The options will be:
 
  * offsetTop: auto || specific value
  * offsetLeft: auto || specific value
  * width: auto || specific value
  * height: auto || specific value
  * zIndex: -1 || specific value
  * tabIndex: -1 || specific value
  * src: 'javascript:false;' || specific value
  * className: 'bgiframe' || specific value
 
  The offsetTop and offsetLeft are automatically calculated as the
  border's width and height (depending on top or left). If you pass
  in a
  value for the offsetTop and offsetLeft, then the expressions used to
  calculate borders will not be included. Same applies for the width
  and
  height options.
 
  This will make the plugin more reusable across other plugins and
  sites. So instead of commenting out the expressions, you could just
  manually set and offsetTop and offsetLeft values for your particular
  situation.
 
  Feature/enhancement requests?
 
  Hopefully I can have something ready today but that depends on
  work. :)
 
  --
  Brandon Aaron


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] hoverIntent = my first plug-in

2007-03-13 Thread Brandon Aaron
Very nice. I believe this will be getting a fair amount of usage!

 - ability to override default settings (sensitivity, polling interval, etc)
This would be great and probably should be done by passing an options
hash as the third argument. Usually options as passed as the first
argument in plugins but it makes sense to be the third in this case.

I would imagine it looking something like this:

jQuery.fn.hoverIntent = function(f,g,o) {
o = jQuery.extend({ sensitivity: 4, interval: 100 }, o || {});
...
};


 - make it more jQuery $-friendly (first few attempts have failed)
As already mentioned by Klaus, you can force block scope by wraping
your code in the following self calling function.

(function($) {
...
})(jQuery);

--
Brandon Aaron

On 3/13/07, Brian Cherne [EMAIL PROTECTED] wrote:
 WHAT?
 hoverIntent is a function that attempts to determine the user's intent...
 like a crystal ball, only with mouse movement! It works like (and was
 derived from) jQuery's built-in hover. However, instead of immediately
 calling the onMouseOver function, it waits until the user's mouse slows down
 enough before calling the function.

 WHERE?
 My sorely out-dated web site.
 http://cherne.net/brian/resources/jquery.hoverIntent.html
 

 WHY?
 To delay or prevent the accidental firing of animations or ajax calls.
 Simple timers work for small areas, but if your target area is large it may
 execute regardless of intent. Also, because jQuery animations cannot be
 stopped once they've started it's best not to start them prematurely. ...
 and I wanted something that was easy to swap in/out with hover (so
 hoverIntent returns the same this and event objects as hover).

 WHAT'S NEXT?
 Your feedback! Tear it shreds! Tell me what you think. I would like to keep
 the script as small as possible, but if I could make this more useful (and
 more likely to be used) I'm happy to make some enhancements... like...
 - more compelling/verbose demo/documentation
 - ability to override default settings (sensitivity, polling interval, etc)
 - option of a simple onMouseOut timer
 - make it more jQuery $-friendly (first few attempts have failed)
 - suggestions for code style/commenting/optimization


 Thanks in advance,
 Brian.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] is there a simple function to swap two classes?

2007-03-13 Thread Brandon Aaron
You can use toggleClass to toggle a particular class on/off. So you
could chain two calls together to turn two classes on/off. One would
be on and one would be off.

div class=class1.../div
$('div').toggleClass('class1').toggleClass('class2');

Would result in:
div class=class2.../div

Doing it again would swap out class2 for class1.

API docs for toggleClass:
http://jquery.bassistance.de/api-browser/#toggleClassString
--
Brandon Aaron

On 3/13/07, rolfsf [EMAIL PROTECTED] wrote:

 Is there something like a swapClass function that will toggle between two
 classes? Or do I need to toggle between functions that addClass and
 removeClass?

 Thanks
 --
 View this message in context: 
 http://www.nabble.com/is-there-a-simple-function-to-swap-two-classes--tf3397695.html#a9460455
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] hoverIntent = my first plug-in

2007-03-13 Thread Brandon Aaron
I thought about this approach as well but then you gotta think that
this is a plugin that others will use and possibly other plugins might
depend on it as well. Then if the defaults changed, the plugin that
depends on it could be confused and break. It is easy enough for a
devloper to setup their own set of defaults that would not cause an
issue like this.

var myHoverDefaults = { interval: 250 };

Now just pass that in and your set and don't potentially break any
other plugins.

As an example ... I'm updating my bgiframe plugin to accept an options
hash. If I allowed a developer/plugin to change the defaults then all
the plugins that depend on the defaults would then break.

Hopefully that all made sense ... I'm writing it in a bit of a rush.

--
Brandon Aaron

On 3/13/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Brandon Aaron schrieb:
  Very nice. I believe this will be getting a fair amount of usage!
 
 
  - ability to override default settings (sensitivity, polling interval, etc)
 
  This would be great and probably should be done by passing an options
  hash as the third argument. Usually options as passed as the first
  argument in plugins but it makes sense to be the third in this case.
 
  I would imagine it looking something like this:
 
  jQuery.fn.hoverIntent = function(f,g,o) {
  o = jQuery.extend({ sensitivity: 4, interval: 100 }, o || {});
  ...
  };
 
 How about this then...

 jQuery.fn.hoverIntent = function (on,off,options) {
   var settings = jQuery.extend({}, jQuery.hoverIntent.defaults, options);
 ...
 };
 jQuery.hoverIntent = {};
 jQuery.extend({
 defaults: { sensitivity: 4, interval: 100 },
 setDefaults: function(settings) {
 jQuery.extend(jQuery.hoverIntent.defaults, settings);
 }
 });

 I like that approach. Gives your users the chance to set defaults
 directly or more then one using setDefaults:

 jQuery.hoverIntent.setDefaults({
 interval: 250
 });

 --
 Jörn Zaefferer

 http://bassistance.de


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New Plugin: jqChart - Charts plugin for jQuery

2007-03-12 Thread Brandon Aaron
Hey,

There was a last minute bug in 1.1.2 that would crash Safari. We
re-released 1.1.2 with the fix. Please re-download 1.1.2.

Thanks!

--
Brandon Aaron

On 3/12/07, ashutosh bijoor [EMAIL PROTECTED] wrote:
 Hi again

 Thanks to everyone for trying out the first cut version and reporting
 problems in IE / Safari

 Please check out the new version 0.2 at:
 http://www.reach1to1.com/sandbox/jquery/jqchart/

 Have fixed the IE specific bugs, and tested in IE6.
 Have not tried in Safari. But now have made provision for selecting the
 rendering engine between HTML Canvas and the JS Graphics library by Walter
 Zorn (
 http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm). So
 this should work in Safari too.
 Would appreciate feedback regarding this.

 I would also like to automate the selection of the rendering engine between
 HTML Canvas and JS Graphics. Any ideas how without doing a browser check?

 Regards
 Ashutosh


 On 3/10/07, rolfsf [EMAIL PROTECTED] wrote:
 
  Looks great in FF
  Not working in Safari - it's just blank where the chart should be
  looking forward to this!
 
 
  ashutosh bijoor-2 wrote:
  
   Hi
   http://www.reach1to1.com/sandbox/jquery/jqchart/
   Been working on this for a while now, and finally have a first cut
 version
   up and running.
   Only tested in Firefox 2.0
   Would appreciate feedback.
   Regards
   Ashutosh Bijoor
  
  
  
 
  --
  View this message in context:
 http://www.nabble.com/New-Plugin%3A-jqChart---Charts-plugin-for-jQuery-tf3378352.html#a9404315
  Sent from the JQuery mailing list archive at Nabble.com.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 



 --
 Reach1to1 Technologies
 http://www.reach1to1.com
  http://on2.biz
 [EMAIL PROTECTED]
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Custome selectors use : as seperator, which is an official character for id's

2007-03-08 Thread Brandon Aaron
There is a ticket for this: http://dev.jquery.com/ticket/143

--
Brandon Aaron

On 3/8/07, Christopher Jordan [EMAIL PROTECTED] wrote:
 Have you posted this on the developer list? That's probably a really
 good place for this post.

 Cheers,
 Chris

 manfred berry wrote:
  Hi
 
  I wonder why jquery is using the : as seperator for custom selectors as this
  is just another character which can be used in any element id.
 
  In other words this means that for example if I have an id=my:elem this
  element is the not selectable like $('#my:id') as the regexp on
  line 949: re2 = /^([#.]?)([a-z0-9\\*_-]*)/i;)   // jquery 1.1.1
  does split that and uses the :elem as custom selector.
 
  You might now ask why am I using : as element id's.
  The answer is pretty easy. JSF uses a : to automatically generate element
  id's in HTML and that's unfortuntely not changeable. And I have to use jsf.
 
  But I really like jquery a lot and would love to use it in my future
  projects together with JSF.
 
  Any way that for example, before splitting the id and use the 2nd part of
  the id as custom selector do a search for the full ID as specified, and if
  no element is found fall back to the custome selector way of splitting?
 
  Or even better that the custom selector character could be configurable?
 
  Would you guys (jquery members) consider that as an option if I would send a
  patch for that for future releases?
  I prefere to go with official releases as otherwise updating to newer
  versions gets a pain
 
 
  Tx for your help.
 

 --
 http://www.cjordan.us


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New version of jquery and IE6 bugs

2007-03-08 Thread Brandon Aaron
Could you possibly post up an example? It is hard to know what is
really going on without seeing it.

--
Brandon Aaron

On 3/8/07, Jeremy Dill [EMAIL PROTECTED] wrote:


 I am having major issues with the newer versions of JQuery with IE6.
 Everything works beautifully in Firefox and IE 7.  Jquery 1.04 is stable in
 IE 6, but jquery1.11+ causes an occasionally crash IE runtime error when
 using radio buttons that are triggering xajax calls.  A bigger issue is that
 now I have really messeded CSS issues.  To solve the Radio button issues, I
 am probably just going to remodel that part of the page without radios.
 But, as far as the CSS, I am at a loss.  Any ideas on how Jquery 1.1.1+
 could cause css issues in IE?  I am looking for clues, but haven't found any
 yet.  Each refresh causes different div backgrounds to appear and dissappear
 in a seemingly random pattern.

 Can somebody wave a magic wand and make IE6 go away?

 thanks,

 jeremy

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Flickering with SlideToggle in Firefox

2007-02-28 Thread Brandon Aaron
Upgrade to 1.1.2.

--
Brandon Aaron

On 2/27/07, Arkon [EMAIL PROTECTED] wrote:

 Hey, So I've basically made a page that slides open with a submenu for
 navigation, and you can click a main link, and the menu closes, ajax loads
 the new menu, and then opens up to reveal the new menu.

 This works great in Internet Explorer 7 [not sure about other versions], but
 just before the menu slides open, it 'flickers' for half a second on
 Firefox.  I've found similiar threads, but people always abandon their
 threads- so I don't know if they found a solution and didn't bother posting
 it, or they just gave up.

 So basically what is the problem, and how can I fix it?

 Demo page-http://www.rs-wildy.com/flicker/index.html , it might take a few
 tries to see the flicker, but it's definitely there...
 --
 View this message in context: 
 http://www.nabble.com/Flickering-with-SlideToggle-in-Firefox-tf3304690.html#a9192554
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] PLUGIN: jdMenu 1.3 FINAL BETA

2007-02-27 Thread Brandon Aaron
This is some great work!

There is a new version of the bgiframe and the dimensions plugin in
SVN that fix a couple of bugs (no API changes, I promise). Also, the
slide down effect suffers from the mac firefox flicker that is solved
in the latest SVN/nightlies.

--
Brandon Aaron

On 2/27/07, Jonathan Sharp [EMAIL PROTECTED] wrote:
 Greetings!

 jdMenu 1.3 is in final beta and there are quite a number of changes! jdMenu
 1.3 is a total rewrite from the ground up

 [New Features]
 * Dual delay settings for showing and hiding of menus
 * Accessibility support - support for keyboard navigation of menus (items
 have to have an A tag to get focus)
 * Smart menu positioning - menus will position themselves to be in the
 browser viewport at all times
 * Vertical menu capable
 * Easy Dynamic feature - Callback for incredibly easy dynamic menus
 allowing you to manipulate the DOM when a menu is triggered to be shown or
 hidden
 * Custom animation support - Callback to allow for easily integrating custom
 animations and effects
 * Enhanced behavior support - Allows for your callback to return a boolean
 to control whether a menu should be shown/hidden. This allows for
 customization such as locking menus

 [Updates]
 * CSS Theme support - Simplifed styles and broke these out into two
 stylesheets allowing for easier theme development
 * jQuery 1.1.1 compliant
 * Converted IE iframe fix to use the bgiframe plugin
 * Updated jdMenu's use of the dimensions plugin to fix a dimensions API
 change

 http://jdsharp.us/code/jQuery/plugins/jdMenu/1.3.beta/

 I'm hoping to get the documentation updated, a few more examples online and
 the release packaged in the next night or so but we're moving into a house
 at the end of the week. So orderly chaos best describes our apartment and
 my schedule!

 Feedback/code review greatly appreciated!

 Cheers,
 -Jonathan
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Reference to newly inserted item?

2007-02-23 Thread Brandon Aaron
Hey Dave,

I'm glad to hear you are using the Copy Events plugin. There is a new
version in SVN which is compatible with both 1.1.1(and less) and the
nightlies of jQuery. Just wanted to give you heads up so that when you
upgrade to the latest jQuery, you know you need to also upgrade to the
latest Copy Events plugin. You can actually go ahead and get it now if
you wanted since it works with both versions.

--
Brandon Aaron

On 2/23/07, Dave Treagust [EMAIL PROTECTED] wrote:

  Hi

  I found this reply really useful..

 Event handlers are not preserved when cloning elements.
  So:
  * you can reassign the event handlers to the cloned elements or
  * you can use the copyEvents plugin:
 http://www.learningjquery.com/2007/01/copy-events-from-one-element-to-another

  Best.
 -- Choan http://choangalvez.nom.es/ I have a table that has a hidden 1st
 row, this is the chunk of code that gets cloned :)
  This row has several form fields and a mouseover of the TR which toggles a
 delete image for that row.

  I tried several ways todo it and this was the ONLY WAY TODO IT.

  Though looking at the 1st option i did'nt reassign the event handlers so i
 opted for the copyEvents plugin.

  Triggsley


  On 22/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:


  Hi,

 If I have

 $(this).parents(div.sidebarToDo).find(td.sidebarText).empty().append('input
 type=text value= size=10 class=editableItem');

 What is the best way to get a reference to the newly created text field?
 Note that it does not have an ID and I would prefer a more generic way of
 finding it other than input.editableItem because on PC IE 6, if I insert
 multiple text fields, like the above, this call ...

 $(this).parents(div.sidebarToDo).find(input.editableTDItem);

 only returns a correct reference for the first time a textfield is added. I
 cant get the most recent addition with the above call if there had been text
 fields added in the past.

 Thanks, please let me know what info I can provide to make this question
 more clear, - Dave

  You could try this:

 var editableitem = $('input type=text value= size=10
 class=editableItem');
 $(this).parents(div.sidebarToDo).find(td.sidebarText).empty().append(editableitem);
 editableitem.change(checkText);

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/





 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jqModal r7 release!

2007-02-23 Thread Brandon Aaron
This is really great work. I think you might be able to save a few
extra bytes by dropping the closing tag when creating single elements.
jQuery will add them for you.

This:
$('div') and $('iframe')

Instead of this:
$('div/div') and $('iframe/iframe')

--
Brandon Aaron

On 2/23/07, Brice Burgess [EMAIL PROTECTED] wrote:
 Ladies and Gentleman of the jQuery,

   ...errr, more so the Gentleman...

 I am happy to bring you jqModal r7, codenamed listen. R7 is a major
 feature enhancer, and brings about some API changes and parameter
 reduction. I recommend upgrading  porting your existing code to the new
 version... well worth the added flexibility // maintaining support.

 Plugin Page;

 http://dev.iceburg.net/jquery/jqModal/

 I've updated the examples, and included a demonstration on overriding
 alert() + confirm() dialogs.

 Here's what has changed;

 ---
   +  Added $.jqmShow, $.jqmHide to manually hide/show dialogs
   +  Added $.jqmAddTrigger and $.jqmAddClose to bind show/hide to elements
   +  Added onLoad callback (called after ajax return)
   +  Added support for handling multiple dialogs @ once across ALL functions
   -  Removed auto-fire parameter, replaced via $(e).jqm().jqmShow()
   -  Removed $.jqmClose()
   -  Removed wrapClass parameter, updated base CSS
   *  CSS z-index value takes priority over zIndex parameter
   *  Triggers can hide, show, or hide AND show jqModals
   *  Overlays+IE6 iframe are now fixed positioned - support for ie6
 quirks + standards mode
   *  Internal Improvements, no event data

 Well, I guess we now have the EXT widgets to look forward to :) .. but
 the good news is that I was able to accomplish all these changes in 
 120 bytes -- so we're still looking at a  3k full featured dialog plugin.

 Enjoy,

 ~ Brice

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jqModal r7 release!

2007-02-23 Thread Brandon Aaron
On 2/23/07, Kelvin Luck [EMAIL PROTECTED] wrote:
 Apparently that causes JS errors when a page is served as
 content-type=application/xhtml+xml. A user of my date picker told me
 this and replacing the $('div')'s with $('div/div')'s fixed their
 problems... I know the general opinion seems to be that
 content-type=application/xhtml+xml is a waste of time but it's nice for
 a plugin to allow users to serve their pages as they like...

Agreed. Thanks for the info Kelvin!

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jqModal r7 release!

2007-02-23 Thread Brandon Aaron
On 2/23/07, Chris Ovenden [EMAIL PROTECTED] wrote:
 That sounds like something that ought to be fixed in jQ itself.

Should it though? It is passing jQuery invalid XHTML when you are
telling the browser to expect true XHTML.

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Release: jQueryHelp - code reference application

2007-02-23 Thread Brandon Aaron
On 2/23/07, Wil Stuckey [EMAIL PROTECTED] wrote:
 That's pretty sweet. Now who's going to build the quicksilver plugin? :)

WOOT!

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Flickering problem with Interface Slide in FF2

2007-02-22 Thread Brandon Aaron
It is fixed in the core but I believe Interface rewrites the fx module
of jQuery and the bug probably exists there as well.

Stefan, I can provide a patch for Interface if needed.

--
Brandon Aaron

On 2/22/07, Sanyi [EMAIL PROTECTED] wrote:
 Sorry Karl, this did not have been fixed, as I tried it, the flickering
 still exists on all effects except of fadeIn and fadeOut!
 Bye Alex(Sanyi)


 On 2/22/07, Karl Swedberg [EMAIL PROTECTED] wrote:
 
 
  Hi Jim,
 
 
  this bug has been fixed in the jQuery core (post 1.1.1). You can get a
 copy of the most recent nightly build here:
  http://docs.jquery.com/Downloading_jQuery#Nightly_Builds
 
 
 
 
 
  --Karl
  _
  Karl Swedberg
  www.englishrules.com
  www.learningjquery.com
 
 
 
 
 
 
  On Feb 22, 2007, at 3:02 PM, Jim Nimblett wrote:
 
 
  Hi everyone,
 
 
  I am trying to get an image to slide out and then back in again.
  Eventually, I will be displaying a new image with each rotation of the
  slider. Unfortunately, there seems to be an issue in Firefox 2 were the
  image is briefly displayed before it slides back in. This shows up as a
  quick flicker.
 
 
  I know there have been a few posts with similar problems... I was just
  wondering if anyone found a solution. Perhaps I am just going about it
  the wrong way.
 
 
  Here is an example:
 
 
  http://www.xrag.com/testing/animate/
 
 
  Code is pretty simple:
 
 
$(document).ready( function() {
   $(#testit).click(function() {
  $(#foo).SlideToggleRight(2000, foo(),
 'easeboth');
  return false;
   });
});
function foo()
{
   $(#foo).SlideToggleRight(2000, null,
 'easeboth');
   return false;
}
 
 
 
 
  Thank you in advance.
 
 
  - Jim
 
 
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Text looks choppy in IE7 with Opacity

2007-02-22 Thread Brandon Aaron
Man that was going to be so cool if it worked. :/

I appreciate the tests Mike and Joel. :)

--
Brandon Aaron

On 2/22/07, Joel Birch [EMAIL PROTECTED] wrote:
 Brandon you inspired me to test it. Alas, I could not get it to solve
 the problem. I tried with the transparent gif and then with a regular
 image gif. I tried applying the image to the element being animated,
 and also tried it on the actual elements that contained the text
 node. No luck.

 Sorry I can't show you a test page - I just quickly tested it on a
 client's site so it looked hideous for a second or two.

 Joel Birch.


 On 23/02/2007, at 1:09 PM, Brandon Aaron wrote:

  I haven't had the chance to test this yet. Can anyone else confirm
  that setting a background image, even just a 1x1 transparent gif,
  solves this issue?
 
  --
  Brandon Aaron
 
  On 2/21/07, David [EMAIL PROTECTED] wrote:
 
   Hi,
 
   I fixed this in a previous project by applying a background-image
  rather
  than a background-color. I just checked it in IE7 and the text
  still appears
  to be fading in/out smoothly.
 
   Regards,
 
   David
 
 
   Brandon Aaron wrote:
   This bug used to be fixable by applying a background color but not
  anymore (that I know of anyways).
 
  --
  Brandon Aaron
 
  On 2/21/07, Klaus Hartl [EMAIL PROTECTED] wrote:
 
 
   Rey Bango schrieb:
 
 
   Hey all,
 
  Have a buddy of mine thats having an issue and he asked if I can
  help.
 
  Here's what he said:
 
  Only problem I have had with jQuery is regarding opacity changes
  with
  the hide/show effects in IE7 with cleartype in XP. It makes the text
  look choppy after any sort of opacity change on the parent
  element. Have
  tryed to find a solution but with no success.
 
  You can see it here:
 
  http://down2night.com/seattle
 
  Just click on the What's Down? button to show the slider results.
 
  When you swap between FireFox and IE7 and you'll see how the text
  is choppy.
 
  Any suggestions?
 
  Rey...
 
   Isn't that the bug, that can be fixed by applying a background
  color to
  the element that gets its opacity changed?
 
 
  -- Klaus
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
   ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
 
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions and IE offset problem

2007-02-21 Thread Brandon Aaron
Thanks for the report Glenn. I'm going to do some testing and see what
I can figure out.

--
Brandon Aaron

On 2/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I am seeing some behavior in IE that I don't understand and that I don't see 
 in Firefox.
 The offset is being shifted by the margins of the body. If I explicitly set 
 the body to
 have no margin, it lines up, if I just leave the default, it is shifted. I 
 can demonstrate
 it with:

 html
 head
 script src=jquery.js/script
 script src=dimensions.js/script
 script

 $(document).ready(function()
 {
 var offset = {};
 var options = {}
 $(#bar).offset(options, offset);
 $(#movetest).css(offset);
 });
 /script

 style
 #movetest{ height: 100px; width: 100px; background: #dd; border: 1px 
 solid black;
 position: absolute;}
 #bar {height: 100px; width: 100px; background: #ee; border: 1px solid 
 #dd;}

 /style
 /head
 body

 div id=bar
 /div

 div id=movetest
 /div

 /body
 /html


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions and IE offset problem

2007-02-21 Thread Brandon Aaron
Hey Glen I've got a fix but it looks as if SVN is down right now. You
can grab the patched version from here[1] but the revision and last
modified tags will not be up-to-date until SVN is back up.

[1]: http://brandon.jquery.com/plugins/dimensions/

--
Brandon Aaron

On 2/21/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Thanks for the report Glenn. I'm going to do some testing and see what
 I can figure out.

 --
 Brandon Aaron

 On 2/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I am seeing some behavior in IE that I don't understand and that I don't 
  see in Firefox.
  The offset is being shifted by the margins of the body. If I explicitly set 
  the body to
  have no margin, it lines up, if I just leave the default, it is shifted. I 
  can demonstrate
  it with:
 
  html
  head
  script src=jquery.js/script
  script src=dimensions.js/script
  script
 
  $(document).ready(function()
  {
  var offset = {};
  var options = {}
  $(#bar).offset(options, offset);
  $(#movetest).css(offset);
  });
  /script
 
  style
  #movetest{ height: 100px; width: 100px; background: #dd; border: 1px 
  solid black;
  position: absolute;}
  #bar {height: 100px; width: 100px; background: #ee; border: 1px solid 
  #dd;}
 
  /style
  /head
  body
 
  div id=bar
  /div
 
  div id=movetest
  /div
 
  /body
  /html
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions.js lesson needed

2007-02-21 Thread Brandon Aaron
I believe you are better off letting CSS deal with this. The
performance of the CSS is going to greatly outweigh the JavaScript in
this scenario. You should check out the YUI Grids CSS [1], maybe it
can help you get what you need without too much overhead.

[1]: http://developer.yahoo.com/yui/grids/

--
Brandon Aaron

On 2/21/07, rolfsf [EMAIL PROTECTED] wrote:

 I've got a basic layout that looks like this:

 div id=wrapper
 div id=top/div
 div id=container
   div id=leftPane/div
   div id=rightPane/div
 /div
 /div

 All divs are flexible in height and width depending on the viewport, except
 #leftPane, which has a fixed width.
 I want to set:
 #container width to be equal to viewport width
 #container height to be equal to (viewport height - #top height)
 #leftPane height to be equal to #container height
 #rightPane height to be equal to #container  height
 #leftPane width is equal to 300px;
 #rightPane width to be equal to (#container width - #leftPane width)

 (what I'm trying to get to is to have #leftPane and #rightPane with
 autoscroll, and have #rightPane expand when #leftPane slides left and
 closes, and all divs adjust when the viewport is resized)

 My question: How do go about a) getting these dimensions, b) setting
 dimensions based on a,  c) updating when the viewport is resized. Hints are
 appreciated!


 --
 View this message in context: 
 http://www.nabble.com/dimensions.js-lesson-needed-tf3269066.html#a9088452
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Text looks choppy in IE7 with Opacity

2007-02-21 Thread Brandon Aaron
This Microsoft's solution to the previous issue of using opacity with
clear-type text and it looking *REALLY* bad without a background
color. When you set an opacity or any other filter the clear-type is
removed. Sucks...

--
Brandon Aaron

On 2/21/07, Rey Bango [EMAIL PROTECTED] wrote:
 Hey all,

 Have a buddy of mine thats having an issue and he asked if I can help.

 Here's what he said:

 Only problem I have had with jQuery is regarding opacity changes with
 the hide/show effects in IE7 with cleartype in XP. It makes the text
 look choppy after any sort of opacity change on the parent element. Have
 tryed to find a solution but with no success.

 You can see it here:

 http://down2night.com/seattle

 Just click on the What's Down? button to show the slider results.

 When you swap between FireFox and IE7 and you'll see how the text is choppy.

 Any suggestions?

 Rey...

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Big problem with FF2, flickering on all animate effect

2007-02-21 Thread Brandon Aaron
This issue has been resolved since 1.1.1 release. Please update to the
latest SVN or grab one of the nightlies
http://jquery.com/src/nightlies/.

--
Brandon Aaron

On 2/21/07, Sanyi [EMAIL PROTECTED] wrote:
 Hi All,

 I would like to make a simple animation effect:


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Text looks choppy in IE7 with Opacity

2007-02-21 Thread Brandon Aaron
This bug used to be fixable by applying a background color but not
anymore (that I know of anyways).

--
Brandon Aaron

On 2/21/07, Klaus Hartl [EMAIL PROTECTED] wrote:
 Rey Bango schrieb:
  Hey all,
 
  Have a buddy of mine thats having an issue and he asked if I can help.
 
  Here's what he said:
 
  Only problem I have had with jQuery is regarding opacity changes with
  the hide/show effects in IE7 with cleartype in XP. It makes the text
  look choppy after any sort of opacity change on the parent element. Have
  tryed to find a solution but with no success.
 
  You can see it here:
 
  http://down2night.com/seattle
 
  Just click on the What's Down? button to show the slider results.
 
  When you swap between FireFox and IE7 and you'll see how the text is choppy.
 
  Any suggestions?
 
  Rey...

 Isn't that the bug, that can be fixed by applying a background color to
 the element that gets its opacity changed?


 -- Klaus


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Smooth Scrolling for same-page links

2007-02-19 Thread Brandon Aaron
I believe there are some syntax errors in the version Klaus posted.
Here is a version that *should* work (untested).

$('[EMAIL PROTECTED]#]').bind('click', function() {
if (location.pathname != this.pathname  location.host != this.host) 
return;

var target = $(this.hash);
target = target.size()  target || $('[EMAIL PROTECTED]' + 
this.hash.slice(1) +']');

if (target.size()) {
target.ScrollTo(400);
return false;
}
});

Also if you are using the latest jQuery you can save a line and
unnecessary binds by writing it like this:

$('[EMAIL PROTECTED]#]').bind('click', function() {
var target = $(this.hash);
target = target.size()  target || $('[EMAIL PROTECTED]' + 
this.hash.slice(1) + ']')

if (target.size()) {
target.ScrollTo(400);
return false;
}
});

--
Brandon Aaron

On 2/19/07, Karl Swedberg [EMAIL PROTECTED] wrote:


 On Feb 19, 2007, at 10:46 AM, Klaus Hartl wrote:

 hcabbos schrieb:
 Hey Klaus. Do you think you could post the new code that includes everyone's
 final recommendations?

 I think that is already the code I posted, I took Sam's improvements
 into account already... Karl?


 -- Klaus
 Yep, that was it. :)

 Here it is once more for good measure:


 $('[EMAIL PROTECTED]#]').click(function() {
if (location.pathname == this.pathname  location.host == this.host) {
  var target = $(this.hash);
  target = target.size()  target || $([EMAIL PROTECTED] +
 this.hash.slice(1) +']');

  if (target.size()) {
  target.ScrollTo(400);
  return false;
  }
 });



 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] CORE BUG: NAME attribute masquerades as ID in $('#id') selector IE6/7

2007-02-19 Thread Brandon Aaron
This is a known issue with IE. The name and id attribute share the
same namespace. I think a fix for this would greatly decrease the
performance of selecting by ID in IE.

None-the-less could you post this over on the dev list?
http://jquery.com/mailman/listinfo/dev_jquery.com

--
Brandon Aaron

On 2/19/07, Brice Burgess [EMAIL PROTECTED] wrote:
 While implementing Interface Sliders, I learned that under IE6/7 jQuery
 1.1.1's ID selector ($('#uniqueID')) will return either an element with
 ID of uniqueID or an element with a NAME of uniqueID -- whichever
 comes first.

 Firefox  in unaffected, returning ONLY the element with ID of uniqueID
 (if found) -- the expected behavior.

 This looks to be a reported; http://dev.jquery.com/ticket/951  although
 the ticket incorrectly limits the scope to anchor tags. Here is an
 example using input;
 ---
 form
 input type=hidden id=vmps name=mps/input
 div id=mps/div
 /form

 script type=text/javascript
 $().ready(function(){
 $('#mps').append('#mps selector worked br /');
 $('form div').append('formdiv selector worked br /');
 });
 /script
 ---
 This will result in a script error in IE, as you can't call $.append()
 on an input.

 The point is; it should be calling $.append on div id=mps ... (as FF
  Opera do).

 ~ Brice



 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Display hidden elements in print layout

2007-02-18 Thread Brandon Aaron
What is happening is that .hide() and even .fadeOut() set an inline
style to display: none;. Inline styles overwrite styles found in the
style sheet.

You need to set your display property for the images to none in the
screen style sheet. Then in your JavaScript you need to do a .show()
to show the images and then do a .css('display', '') to remove the
inline style and use the display:none; specified in the screen style
sheet. Then in your print style sheet just set the images to display:
block;.

Of course neither situation is ideal. Now with JavaScript turned off
the images are hidden.

It would be so nice if we had standard beforeprint and afterprint events.

--
Brandon Aaron


On 11/27/06, Bernd Matzner [EMAIL PROTECTED] wrote:

 Hi,

 I'm using a JQuery-based script which displays a number of elements of a
 slideshow (namely, dd tags containing images). The script then shows them.
 Now, while it looks nice when printing with JS turned off, I can't get the
 hidden images to display when printing. Unfortunately, no such thing as the
 onbeforeprint event exists in Firefox and Opera which I could use to display
 the images in the print layout. I have a style media=print.. definition,
 but even trying to check for a css property using jquery's css() function
 which is only defined in the print css doesn't change anything, neither does
 trying to force visibility by adding the !important declaration. Anyone
 have an idea on how to change css properties targeted for the media=print
 scenario?

 Thanks,
 Bernd
 --
 View this message in context: 
 http://www.nabble.com/Display-hidden-elements-in-print-layout-tf2711681.html#a7559846
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] creating and inserting a form on-the-fly

2007-02-17 Thread Brandon Aaron
It hasn't been fixed yet.
http://jquery.com/dev/bugs/bug/910/

--
Brandon Aaron

On 2/17/07, Bruce McKenzie [EMAIL PROTECTED] wrote:
 I've got an app where I want the user to be able to add and submit
 forms. [ I'm using v 1.1.1 ]

 In the case of the following:

 $(function(){
  var myForm1=divform1input type=text value=Fred /
/formdiv;
  var myForm2= form2input type=text value=Harry //form;
  $(myForm1).appendTo(body);
  $(myForm2).appendTo(body);
 });

 The first form, wrapped in a div, works ok. But with the unwrapped form,
 only the input field is added to the DOM.

 I can insert an unwrapped form by cloning, but that presents other
 complications for my app. I don't particularly want to wrap the form in
 a div (unless, of course, that's considered good form :-) Am I
 overlooking something obvious?

 I saw a discussion here last month about problems creating the form
 element itself in jquery v 1.1.1
 http://www.nabble.com/cant-append%28%29-form-objects-tf3095501.html#a8593734


 but I can't see that it was resolved.

 Bruce

 --
 Bruce McKenzie
 http://www.2MinuteExplainer.com

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Handling you javascript files

2007-02-14 Thread Brandon Aaron
I would highly recommend merging as much as you can into one file.
Each additional request could tack on a couple 100 milliseconds. The
best thing you can do though is to get the latest firebug console
(www.getfirebug.com) and use the 'Net' tab to compare both methods and
see which is better for your situation.

--
Brandon Aaron

On 2/14/07, Kristinn Sigmundsson [EMAIL PROTECTED] wrote:
 Hi there.

 I'm working on a site that will be using alot of ajax for
 edit-in-place, aswell as alot of other javascript. The thing is that
 there is practicly no javascript for regular users, compared to
 administrators. So I figured that in the top of my indexfile where all
 the scripts are I'd do something like this:
 ?php
 if ($user-getRights('news')
   echo 'script src=newsScripts.js type=text/javascript/script';
 ?

 for every page that needs javascript. The thing is that for this to
 work properly (and without having the same code on different places) I
 have to split some .js files down to each function.

 Is this a good idea in the first place, having (at most) up to 10 script 
 tags?
 Would it be better to make a big file for all the adminfunctions when
 the development is done (compressed it is abt 20kb, not including
 jQuery and a few plugins).

 I kinda the latter better. Then I can have a file that is common.js
 with all my common functions and different scriptfiles for more
 specific stuff. But when the development is done I put them all to one
 adminstration.js file and compress it.

 What are your thoughts on this? How do you manage your javascript in a
 development, on a running site?

 Would be pleased with every input you make.
 // Kiddi

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Attribute Selector issue

2007-02-13 Thread Brandon Aaron
This has been fixed in SVN but you'll need Revision 1323 or greater.

--
Brandon Aaron

On 2/13/07, Aaron Heimlich [EMAIL PROTECTED] wrote:
 On 2/13/07, Allan Mullan [EMAIL PROTECTED] wrote:
  Hey all,
 
  I'm probably just tired but I would have thought that the following
  should get any links with a href=/home.html
 
  $('[EMAIL PROTECTED]/home.html]')
 
  But it doesn't work... What's the correct way of getting these elements?
 

 Nope, you're not tired (OK, maybe you are, but that isn't the problem). IE
 has a nasty habit of storing the full URL in the href attribute, even if
 that's not what you put there.

 I've seen this issue come up a bunch of times and I'm happy to say this
 issue was (hopefully) resolved in SVN revision 1316[1]. The bad news, is
 that if you're not comfortable grabbing jQuery from SVN, you'll probably
 have to wait until the next official release until you can take advantage of
 it.

 [1] http://jquery.com/dev/svn/rev/1316/

 --
 Aaron Heimlich
 Web Developer
 [EMAIL PROTECTED]
  http://aheimlich.freepgs.com
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Attribute Selector issue

2007-02-13 Thread Brandon Aaron
And actually I just fixed an issue with the ^= selector and href in
firefox. So you will actually need REV 1336.

a href=#test/a
$('[EMAIL PROTECTED]#]').size(); // previous to 1336 in firefox would report 0

Hopefully that wraps up the href attribute selector issues.

--
Brandon Aaron

On 2/13/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 This has been fixed in SVN but you'll need Revision 1323 or greater.

 --
 Brandon Aaron

 On 2/13/07, Aaron Heimlich [EMAIL PROTECTED] wrote:
  On 2/13/07, Allan Mullan [EMAIL PROTECTED] wrote:
   Hey all,
  
   I'm probably just tired but I would have thought that the following
   should get any links with a href=/home.html
  
   $('[EMAIL PROTECTED]/home.html]')
  
   But it doesn't work... What's the correct way of getting these elements?
  
 
  Nope, you're not tired (OK, maybe you are, but that isn't the problem). IE
  has a nasty habit of storing the full URL in the href attribute, even if
  that's not what you put there.
 
  I've seen this issue come up a bunch of times and I'm happy to say this
  issue was (hopefully) resolved in SVN revision 1316[1]. The bad news, is
  that if you're not comfortable grabbing jQuery from SVN, you'll probably
  have to wait until the next official release until you can take advantage of
  it.
 
  [1] http://jquery.com/dev/svn/rev/1316/
 
  --
  Aaron Heimlich
  Web Developer
  [EMAIL PROTECTED]
   http://aheimlich.freepgs.com
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery Design Decisions? Comparison to MooTools?

2007-02-13 Thread Brandon Aaron
I find having the doSomething part as separate plugins works very
nicely and allows me to be flexible with different sites and not load
a bunch of stuff I'm not actually using. I then just create an ant
task to put all the files into one and compress.

--
Brandon Aaron

On 2/13/07, Matt Kruse [EMAIL PROTECTED] wrote:

 Thank you to everyone for all your responses. I have indeed decided to go
 with jQuery as a base for future work, so I also plan to contribute to the
 project with my own plugins, etc.

 I like the summary of jQuery that has been expressed like this:
$('selectSomething').doSomething()

 It seems that the library has heavy emphasis on the selectSomething in its
 core, and depends a lot on plugins for the doSomething part. I can forsee
 writing my own jQuery++ or whatever that adds a lot more functionality
 that I consider to be core rather than depending on multiple plugins.

 Is there a better official form plugin? The one listed is weak for basic
 form functions, so I plan to adapt my own form functions into jQuery style
 and make it a plugin. I can't live without isChanged() on form fields!

 I really don't like the idea of forking jQuery, but I'd much rather have
 less selectSomething logic and more doSomething logic, so maybe at some
 point I'll prepare a version of about the same size (or bigger) with
 emphasis on the opposite end. Or maybe not. jQuery does things about 80% the
 way I would do it myself, so I guess I have to sacrifice the 20% and do
 things the jQuery way. I need to write a blog entry titled How I Learned To
 Stop Worrying And Love The jQuery!

 I also plan to adapt my table sort/filter/autofiler/page/stripe/etc
 functions into a plugin. The existing table sorter seems to do the job, but
 I like to have all my table functionality in one place, and I think I handle
 it a little faster and more robustly in my code, so look for that at some
 point if you're interested.

 I've found a version of a Cheat Sheet but it's not nearly as cool as the
 latest Prototype cheat sheet. I was hoping to find a cool color printable
 sheet to hang on my wall as a reference. The API is great, but a bit too
 long-winded to hang on a wall ;)

 Thanks again,

 Matt

 --
 View this message in context: 
 http://www.nabble.com/jQuery-Design-Decisions--Comparison-to-MooTools--tf3218550.html#a8953902
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Improve jQuery.prop, was: Setting an image caption width

2007-02-13 Thread Brandon Aaron
No, you are correct that you could do this without the dimensions
plugin. The reason it didn't work was because you where passing a
function and Jörn's patch addressed that scenario.

--
Brandon Aaron

On 2/13/07, Klaus Hartl [EMAIL PROTECTED] wrote:
 Jörn Zaefferer schrieb:
  Klaus Hartl schrieb:
  Stupid me, I forgot a return statement (too much Ruby lately)... and
  also the unit seems to be required:
 
  $('div.image p').css('width', function() {
   return $(this).prev().width() + 'px';
  });
 
  jQuery.prop could be modified to append the px to computed values like
  in the above example. This should do it:
 
  Index: I:/dev/workspace/jquery/src/jquery/jquery.js
  ===
  --- I:/dev/workspace/jquery/src/jquery/jquery.js  (revision 1327)
  +++ I:/dev/workspace/jquery/src/jquery/jquery.js  (working copy)
  @@ -1280,7 +1280,7 @@
prop: function(elem, value, type, index, prop){
// Handle executable functions
if ( jQuery.isFunction( value ) )
  - return value.call( elem, [index] );
  + value = value.call( elem, [index] );
 
// exclude the following css properties to add px
var exclude = 
  /z-?index|font-?weight|opacity|zoom|line-?height/i;
 
// Handle passing in a number to a CSS property
return value  value.constructor == Number  type 
  == curCSS  !exclude.test(prop) ?
value + px :
value;
},
 
  Is there anyway where that could break?
 

 I actually thought jQuery was already doing this, that's why I was
 surprised. But now I think I confused that with the dimensions plugin.

 Sounds reasonable to me.



 -- Klaus

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Checking for a class?

2007-02-11 Thread Brandon Aaron
You can use the .is() method to check if an element has a particular
class like this.

$('#id').is('.someClass');

It will return true if it has that particular class and false if it doesn't.

The .is() method can also be used to check other things as well. Here
are the docs for the method.
http://jquery.bassistance.de/api-browser/#isString

--
Brandon Aaron

On 2/11/07, Tom Holder [EMAIL PROTECTED] wrote:
 How can I check to see if there is a particular css class on an element?

 Presumably I could just do $(#id).attr(class); but I'm doing it in a
 loop where the class names have multiple classes on them and I only want to
 check for a specific one. Bith loathed to write a regexp for something so
 simple.

 Cheers
 Tom
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Problem with [EMAIL PROTECTED]

2007-02-09 Thread Brandon Aaron
We just fixed this for the href attribute. Is IE actually returning
the whole URL? Are there other attributes that IE doesn't return what
is actually there?

--
Brandon Aaron

On 2/9/07, Dave Methvin [EMAIL PROTECTED] wrote:

 switch($(this).attr(src)) {
 case '1.gif':

 That definitely won't work in IE, because IE gives you the whole URL
 including http:// and domain. You'll need to strip that off before your
 switch.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Problem with [EMAIL PROTECTED]

2007-02-09 Thread Brandon Aaron
Yes it was fixed in REV 1293. http://jquery.com/dev/svn/rev/1293/

--
Brandon Aaron

On 2/9/07, Karl Swedberg [EMAIL PROTECTED] wrote:
 That's great news, Brandon! Thanks!

 Was this a post-1.1.1 fix?


 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com




 On Feb 9, 2007, at 10:03 AM, Brandon Aaron wrote:

 We just fixed this for the href attribute. Is IE actually returning
 the whole URL? Are there other attributes that IE doesn't return what
 is actually there?

 --
 Brandon Aaron

 On 2/9/07, Dave Methvin [EMAIL PROTECTED] wrote:


switch($(this).attr(src)) {
case '1.gif':

 That definitely won't work in IE, because IE gives you the whole URL
 including http:// and domain. You'll need to strip that off before your
 switch.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Problem with [EMAIL PROTECTED]

2007-02-09 Thread Brandon Aaron
Question remains, is src the only other attribute that we need to fix for IE?

--
Brandon Aaron

On 2/9/07, Dave Methvin [EMAIL PROTECTED] wrote:
  Yes it was fixed in REV 1293. http://jquery.com/dev/svn/rev/1293/

 Wow, it's so new it still smells minty fresh! :)


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Taconite Plugin - New and Improved!

2007-02-08 Thread Brandon Aaron
And if you already have one or more p tags on the page already and
just adding more you could use the Copy Events plugin (in SVN) to just
copy events from an existing p tag to the new p tags.

$(newPTags).copyEvents(existingPTag);

BTW Mike, great plugin!

--
Brandon Aaron

On 2/8/07, Mike Alsup [EMAIL PROTECTED] wrote:
   Is there a way to reapply handlers after executing a Taconite request? For
  example, there may be click handlers that are applied to all the p
  elements on a page. When you make XML request and Taconite does it's magic,
  how would you reapply those click handlers to the loaded content?

 Hi David,

 You can reapply handlers the same way you do for any other ajax
 request.  Just use a success callback.  For example:

 $.get('myUrl', function() {
// reapply handlers here
 });

 If you're not sure what parts of the page have been updated you could
 filter out elements that already have a click handler like this:

 $.get('myUrl', function() {
 $('p').each(function() {
 if (this.onclick) return;
 $(this).click(myClickHandler);
 });
 });

 Mike

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Trouble with event position X/Y - anyone else?

2007-02-07 Thread Brandon Aaron
Which browser(s)? Are you using the latest version of the dimensions
plugin from SVN?

I haven't had any issues with floated elements yet or heard of any. If
you could provide a stripped down version or even just the version in
its current state it would help me/others identify the issue.

--
Brandon Aaron

On 2/7/07, Tim McCormack [EMAIL PROTECTED] wrote:
 I'm developing a little app that involves positioning a translucent
 div near the cursor, and the numbers aren't adding up. I'm using the
 Dimensions plugin and subtracting an element's offset from the event's
 pageX/Y coordinates, and the X coordinate is consistently about 53
 pixels off. Not coincidentally, the element is centered within a
 larger element, and the distance between their (left) edges is 53
 pixels. That parent element is floated right, if it makes a
 difference.

 (I'll try to create a stripped-down version for poking-at, but I don't
 have time at the moment.)

 Is there something I should know about calculating element offsets
 with floats and centering? Has anybody else had problems with the
 Dimensions plugin, or event coordinates?

  - Tim McCormack

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery().hover() not working as intended in IE?

2007-02-07 Thread Brandon Aaron
The signature for the offset method in the dimensions plugin did
recently change. Is this the issue or is it a bug in the offset
method?

--
Brandon Aaron

On 2/7/07, Jonathan Sharp [EMAIL PROTECTED] wrote:
 Hi Scott,

 I was able to duplicate this and have isolated it to some changes that took
 place in the dimensions plugin around the 1.1.1. I'm going to handle
 positioning differently in the new version which should address these
 issues.

 Cheers,
 -js




 On 2/7/07, Weaver, Scott [EMAIL PROTECTED] wrote:
 
 
 
 
  Hi Jonathan,
 
 
 
  In a nutshell, the drop down menu was positioned wy to the right.
 What you can do is just rename the existing menu class from ugsMenu to
 jd_menu and change the $(document).ready() to invoke the jdMenu plugin as
 opposed to mine.  Hopefully, this should give you an idea of what I
 encountered.  I used the base, jdMenu.css to test it.
 
 
 
  Thanks for the help,
 
  -scott
 
 
 
 
  

 
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Jonathan Sharp
  Sent: Wednesday, February 07, 2007 1:22 PM
  To: jQuery Discussion.
  Subject: Re: [jQuery] jQuery().hover() not working as intended in IE?
 
 
 
 
 
  Hi Scott,
 
 
 
 
 
  I've developed the jdMenu plugin and am working on an updated version of
 it. What positioning problems were you running into? Do you have a demo page
 somewhere?
 
 
 
 
 
  Cheers,
 
 
  -Jonathan
 
 
 
 
  On 2/7/07, Weaver, Scott  [EMAIL PROTECTED] wrote:
 
 
 
  Hello,
 
 
 
  I am using the jQuery.hover() event binding to create drop down menus from
 an unordered list.  I attempted to use the jdMenu plugin but the positioning
 wasn't coming out right with the layout I am using (the piefecta from
 http://www.positioniseverything.net/piefecta-rigid.html).
 I decided it would be easier to roll my own than to dig through the jdMenu
 code to figure out the issue.
 
 
 
  This was drop-dead simple to do using the .hover() event binding.  This
 works wonderfully in FF.  Unfortunately, IE 6 has decided to be a
 little…well you know how she is.  Mousing over the menu heading works fine
 and the sub-menu appears underneath (as expected).  However, as I move down,
 over the sub-menu, the sub-menu disappears (not supposed to happen).
 
 
 
  I am attaching the source file (you may need to change the source path
 location of jquery, I am using version 1.1.1).  Oh, ignore the content of
 the page as it all pretty much a verbatim copy of piefecta layout ;-)
 
 
 
  Thanks in advance,
 
  -scott
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
 
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery().hover() not working as intended in IE?

2007-02-07 Thread Brandon Aaron
I took it out for performance and I'm still investigating better
(faster) ways to get the relative offset. In the mean time the safest
way to handle this is to get the parent offset first and then subtract
it from the element's offset. I know it is more code. I believe you
are one of the only ones that I've heard using that feature.

BTW ... I don't have a time for getting that feature back in.

--
Brandon Aaron

On 2/7/07, Jonathan Sharp [EMAIL PROTECTED] wrote:
 Here's an example line:

 $(li).offset( $(li).parents('ul.myclass')[0] );

 I can fix this easy enough in the code by getting the parent's offset first
 and then subtracting the elements offset from that, but it would be nice to
 have this still supported. =)

 Cheers,
 -js



 On 2/7/07, Jonathan Sharp [EMAIL PROTECTED] wrote:
 
  I belive it's an issue relating to the signature change. I was using the
 .offset(ELEMENT) to get the offset in relation to a parent element.
 
  Could this feature be added back in (possibly passing in an element
 reference in the object hash)?
 
  -js
 
 
 
  On 2/7/07, Brandon Aaron [EMAIL PROTECTED]  wrote:
   The signature for the offset method in the dimensions plugin did
   recently change. Is this the issue or is it a bug in the offset
   method?
  
   --
   Brandon Aaron
  
   On 2/7/07, Jonathan Sharp [EMAIL PROTECTED] wrote:
Hi Scott,
   
I was able to duplicate this and have isolated it to some changes that
 took
place in the dimensions plugin around the 1.1.1. I'm going to handle
positioning differently in the new version which should address these
issues.
   
Cheers,
-js
   
   
   
   
On 2/7/07, Weaver, Scott  [EMAIL PROTECTED] wrote:




 Hi Jonathan,



 In a nutshell, the drop down menu was positioned wy to the
 right.
What you can do is just rename the existing menu class from ugsMenu
 to
jd_menu and change the $(document).ready() to invoke the jdMenu
 plugin as
opposed to mine.  Hopefully, this should give you an idea of what I
encountered.  I used the base, jdMenu.css to test it.



 Thanks for the help,

 -scott




 
   

 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 On
Behalf Of Jonathan Sharp
 Sent: Wednesday, February 07, 2007 1:22 PM
 To: jQuery Discussion.
 Subject: Re: [jQuery] jQuery().hover() not working as intended in
 IE?





 Hi Scott,





 I've developed the jdMenu plugin and am working on an updated
 version of
it. What positioning problems were you running into? Do you have a
 demo page
somewhere?





 Cheers,


 -Jonathan




 On 2/7/07, Weaver, Scott  [EMAIL PROTECTED] wrote:



 Hello,



 I am using the jQuery.hover() event binding to create drop down
 menus from
an unordered list.  I attempted to use the jdMenu plugin but the
 positioning
wasn't coming out right with the layout I am using (the piefecta from
   
 http://www.positioniseverything.net/piefecta-rigid.html).
I decided it would be easier to roll my own than to dig through the
 jdMenu
code to figure out the issue.



 This was drop-dead simple to do using the .hover() event binding.
 This
works wonderfully in FF.  Unfortunately, IE 6 has decided to be a
little…well you know how she is.  Mousing over the menu heading works
 fine
and the sub-menu appears underneath (as expected).  However, as I move
 down,
over the sub-menu, the sub-menu disappears (not supposed to happen).



 I am attaching the source file (you may need to change the source
 path
location of jquery, I am using version 1.1.1).  Oh, ignore the content
 of
the page as it all pretty much a verbatim copy of piefecta layout ;-)



 Thanks in advance,

 -scott


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/





 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


   
   
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
   
   
  
   ___
   jQuery mailing list
   discuss@jquery.com
   http://jquery.com/discuss/
  
 
 


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Trouble with event position X/Y [browser and code version]

2007-02-07 Thread Brandon Aaron
Ahh yes, if you use firebug and run the following $('#image-box
img').offset() it returns the correct values. You are getting
incorrect values because you are firing the methods before the image
is loaded *and* you haven't given the image a width and height. The
document.ready function fires as soon as the DOM is ready. Try using
$(window).bind('load', fn) instead and it should provide the correct
results.

The reason it sometimes resolves itself is because it has pulled from
the cache just as quick as the dom ready has been fired.

--
Brandon Aaron

On 2/7/07, Tim McCormack [EMAIL PROTECTED] wrote:
 I should add that the dimensioning/positioning problem occurs *most*
 of the time, but will occasionally spontaneously resolve. (Perhaps
 when I hit the back button, or let a page site, etc.) Very odd.

  - Tim

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] display inline vs block

2007-02-06 Thread Brandon Aaron
When using hide and show methods they have to set the display to block
for the height and width animations to work. The fadeIn is a different
story and is being worked on and hopefully something will be ready in
the near future. In the mean time ... try adjusting the markup+css to
accommodate a display: block element.

Of course you could always create a simple custom animation if it was
necessary. Just use a setInterval or setTimeout and call
css('opacity', num)

--
Brandon Aaron

On 2/6/07, Jon Ege Ronnenberg [EMAIL PROTECTED] wrote:
 When using hide(), show, fadeIn() etc. jQuery make the elements
 display:block, while I'm sure there is a good reason for this I wonder is
 there anyway to get jQuery to set them as display:inline?

 Regards, Jon.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] BUG occurs with jQ 1.1.1 and Mac FF only. Related to opacity.

2007-02-03 Thread Brandon Aaron
Please upgrade to the latest SVN as it fixes the flicker.

--
Brandon Aaron

On 2/3/07, Joel Birch [EMAIL PROTECTED] wrote:
 Hi everyone.

 I want to report this issue. It's an animation bug that only occurs
 in Mac Firefox and somehow relates to old known issues that it has
 with opacity and text-rendering. I would worry that this bug is
 unfixable for Mac Firefox *except* that it did not occur using jQuery
 Rev. 303 (version 1.0.4 I think).

 Please look at my test page as it explains the bug fully, I hope.

 http://users.tpg.com.au/j_birch/macFFflicker/

 The only way around this for me at the moment is to go back to 1.0.4
 (no way!) or remove opacity:. from my CSS - which will send me
 back to square one regarding the Mac FF text rendering issue.

 Thanks in advance.
 Joel Birch.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] BUG occurs with jQ 1.1.1 and Mac FF only. Related to opacity.

2007-02-03 Thread Brandon Aaron
On 2/3/07, Joel Birch [EMAIL PROTECTED] wrote:
 Hi Brandon. After a long  and gruelling battle with my old nemesis,
 the SVN repository, I seem to have managed to get the latest SVN
 and it does indeed seem to fix the flicker. I assume you were
 responsible for the fix so thank you greatly.

Yes, I was the one that fixed it ... and ... well ... truth be told. I
was also the one that caused it. :) Glad it fixed the issue! BTW ...
if you are on PC I highly recommend Tortoise SVN
(http://tortoisesvn.tigris.org/) and if you are on a MAC I would
suggest using svnX
(http://www.versiontracker.com/dyn/moreinfo/macosx/24158).

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ANN: Brandon Aaron Joins learningjquery.com

2007-02-02 Thread Brandon Aaron
To get the browser's window width and height you just need the
dimensions plugin found in SVN. It extends the core .height() and
.width() methods to work with window and document in addition to HTML
elements. So if you wanted to get the browser's window available width
and height you can do it like this:

$(window).height();
$(window).width();

Thanks for the kind words everyone! I look forward to writing lots of
informational articles for learningjquery.com.

--
Brandon Aaron

On 2/2/07, Alexandre Plennevaux [EMAIL PROTECTED] wrote:


 as a beginner myself, may i suggest a tutorial describing thoroughly what is
 possible and the limits of chaining? also, how to get the browser
 available width, height in jquery?

  
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Karl Swedberg
 Sent: vendredi 2 février 2007 16:30

 To: jQuery Discussion.
 Subject: Re: [jQuery] ANN: Brandon Aaron Joins learningjquery.com


 Exellent! Thanks, Andy. I'll be sending you and Alex Cook an email off-list
 as soon as I catch my breath.





 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com





 On Feb 2, 2007, at 9:17 AM, Andy Matthews wrote:


 I'd be willing to try my hand at some beginner level stuff. I could gear it
 towards Coldfusion usage even.

  
  From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Karl
 Swedberg
 Sent: Thursday, February 01, 2007 5:12 PM
 To: jQuery Discussion.
 Subject: Re: [jQuery] ANN: Brandon Aaron Joins learningjquery.com


 Yes, Rick, you're absolutely right about the need for beginner-level
 tutorials. I have a couple in the works, but my time the past month or so
 has been very limited. It doesn't look like it's going to get much better
 for another few months, but I'll try my best to keep them coming.


 If someone else out there would like to hop on board and write some
 tutorials, let me know and we can chat.


 Cheers,

 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com





 On Feb 1, 2007, at 4:24 PM, Rick Faircloth wrote:




 Please include some newbie tutes! :o)



 I'm making use of jQuery in my web apps now, but

 have only barely scratched the surface and what I am

 doing is very simple.



 I could use some hand-holding during infancy!



 Besides, easy and quickly-gratifying simple tutes

 help bring more people into the jQuery fold who

 have little or no previous experience with JS, like me.



 Perhaps some others with sufficient knowledge could

 provide some simples tutorials for the site… ???



 Rick





 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Andy
 Matthews
 Sent: Thursday, February 01, 2007 3:30 PM
 To: 'jQuery Discussion.'
 Subject: Re: [jQuery] ANN: Brandon Aaron Joins learningjquery.com



 Hurray! The more tutes the better.


  


 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Karl
 Swedberg
 Sent: Thursday, February 01, 2007 2:25 PM
 To: jQuery Discussion.
 Subject: [jQuery] ANN: Brandon Aaron Joins learningjquery.com

 Hello dear friends,





 Just a quick note to announce that Brandon Aaron -- regular contributor to
 this list, member of the jQuery development team, and plugin author -- has
 agreed to join me in publishing tutorials on learningjquery.com. He will
 focus on intermediate- and advanced-level topics.





 Check out his first entry, posted last night, about his cloneEvents()
 plugin:


 Copy Events from One Element to Another


 http://www.learningjquery.com/2007/01/copy-events-from-one-element-to-another





 He also has some great ideas for redesigning the site and enhancing it with
 jQuery magic.







 Stay tuned for more from Brandon coming your way!





 Cheers,


 --Karl


 _


 Karl Swedberg


 www.englishrules.com


 www.learningjquery.com









 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



 --
  Ce message Envoi est certifié sans virus connu.
  Analyse effectuée par AVG.
  Version: 7.5.441 / Base de données virus: 268.17.19/663 - Date: 1/02/2007
 14:28

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery 1.1.1 Question : type mis-match

2007-02-02 Thread Brandon Aaron
Could possibly post the code that is trying to set the attributes?
That else statement you posted is actually used to set style values
and if you are just using .attr() and not .css() then the code
shouldn't even be in that block.

--
Brandon Aaron

On 2/2/07, Jeffrey McClure [EMAIL PROTECTED] wrote:

 I'm in the process of upgrading my code to use the latest API and get a type
 mis-match error in IE on this code from jQuery.js:

 else {
 name = name.replace(/-([a-z])/ig,function(z,b){return 
 b.toUpperCase();});
 if ( value != undefined ) elem[name] = value;
 return elem[name];
 }

 The mis-match is at:  elem[name] = value;

 I am using the attr method to pull id, href, and rel values.  Is there a
 condition where these values can cause this error?

 Any ideas as to why this might be happening?

 *

 --
 View this message in context: 
 http://www.nabble.com/jQuery-1.1.1-Question-%3A-type-mis-match-tf3161725.html#a8770035
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Adding to the browsers onclick?

2007-02-01 Thread Brandon Aaron
Try adding return true; to both of the methods.

--
Brandon Aaron

On 2/1/07, Will [EMAIL PROTECTED] wrote:
 I'm trying to replace labels with graphics.  They're for check boxes and I
 need the image background to change and stay changed on click.  I have my
 css all set and a little jQuery toggle() makes it all very easy:

 $(.musthave label).toggle(function(){
$(this).addClass(musthavechecked);
  },function(){
$(this).removeClass(musthavechecked);
  });


 the problem is that it's not checking the actual form box!  When I remove
 the above bit of code from my js file, clicking the label toggles my check
 box, as expected.  Here's my html.

 input name=importance id=importance type=checkbox value=required /
 label for=importanceMust Have/label

 Again, with js off, the label works just fine.

 I'm not really sure what's going on but I'm assuming that jQuery is entirely
 replacing the default browser onClick event for labels but what I really
 want to do is append the onClick, much like $(doc).ready().  Am I on the
 right path? Is this possible?


 Thanks!
 Will
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Adding to the browsers onclick?

2007-02-01 Thread Brandon Aaron
On 2/1/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Try adding return true; to both of the methods.

I meant to include the code. :)

$(.musthave label)
.toggle(function(){
$(this).addClass(musthavechecked);
return true;
},function(){
$(this).removeClass(musthavechecked);
return true;
});

It looks like .toggle is returning false if you don't explicitly set
it to return true. Let me know if this works or not.

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Adding to the browsers onclick?

2007-02-01 Thread Brandon Aaron
Hmmm... Well lets simplify things instead. :)

$(.musthave label)
.bind('click', function() {
$(this).toggleClass('musthavechecked');
});

--
Brandon Aaron

On 2/1/07, Will [EMAIL PROTECTED] wrote:
 Thank you Brandon.  A great idea but it didn't seem to do the trick.  :(

 Will


 On 2/1/07, Brandon Aaron  [EMAIL PROTECTED] wrote:
  On 2/1/07, Brandon Aaron  [EMAIL PROTECTED] wrote:
   Try adding return true; to both of the methods.
 
  I meant to include the code. :)
 
  $(.musthave label)
  .toggle(function(){
  $(this).addClass(musthavechecked);
  return true;
  },function(){
  $(this).removeClass(musthavechecked);
  return true;
  });
 
  It looks like .toggle is returning false if you don't explicitly set
  it to return true. Let me know if this works or not.
 
  --
  Brandon Aaron
 


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] What is the best way to replace an element using JQuery?

2007-01-31 Thread Brandon Aaron
You should be able to do something like this.

$('#myElement').before('replacement').remove();

--
Brandon Aaron

On 1/31/07, George Adamson [EMAIL PROTECTED] wrote:

 Despite having used JQuery for some time and also written plugins, I've never
 discovered a good way to replace one element with another.

 Just need something like: $(#myElement).replaceWith(divnew
 element/div)

 Depending on the circumstances I usually find I have to resort to DOM
 methods or if myElement has no siblings then I can use
 .parent().html(...).

 Any thoughts? Am I missing something?!

 Cheers

 George
 --
 View this message in context: 
 http://www.nabble.com/What-is-the-best-way-to-replace-an-element-using-JQuery--tf3148907.html#a8729470
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Data falling out of Container Div

2007-01-31 Thread Brandon Aaron
Hey Rey,

This was fixed in 1.1. That is why 'show' and 'hide' *now* removes the
hardcoded styles left behind.

--
Brandon Aaron

On 1/31/07, Rey Bango [EMAIL PROTECTED] wrote:
 Hey all,

 I'm having some trouble with a getting a div to size correctly. In some
 instances, the results that I'm getting back are being displayed outside
 of the container div.

 Steps to see the issue:

 1) Go to http://dev.healthybuyersclub.com/reyship.cfm
 2) Click on Go button and you should get 1 result back
 3) Change state to Florida and zipcode to 33065
 4) Click on Go button and you should get 3 results back but you'll see
 that the results are outside of the main container div

 The JS code can be found here:

 http://dev.healthybuyersclub.com/scripts/sopreview.js

 Styles can be found here:

 http://dev.healthybuyersclub.com/css/style.css

 I'm stuck on this and I'm hoping someone could help me out.

 Thanks,

 Rey...

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Bug Fix: Animation Flickers

2007-01-31 Thread Brandon Aaron
I just checked in a fix for the flickers that have been happening in
the fx module. Anyone that was having problems with flickers in their
animations (mostly in Firefox) please grab the latest from SVN and let
me know if it solves your problems or not.

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Really Ugly?

2007-01-31 Thread Brandon Aaron
Standards vs. Reality ... doesn't always mix very well. If someone
feels very strongly about *not* using the innerHTML property, then
that someone could use any one of the several DOM creation plugins
that are available. They all use the long route to adding elements to
the DOM (if I remember correctly).

I'm all for standards but I'm also in the trenches crunching out web
sites. The reality is that innerHTML works and it is fast. When used
by jQuery (in the respect of .append('html string')) it becomes very
readable, maintainable and I become more productive.

Let's not forget that xmlHttpRequest is also not standard.

It should be noted that when the elements are actually added to the
DOM, jQuery does *not* use innerHTML. It only uses innerHTML to
normalize some cross-browser issues and quickly get the actual
elements out of an HTML string.

--
Brandon Aaron

On 1/31/07, Karl Swedberg [EMAIL PROTECTED] wrote:


 Hello my jQuery friends,

 I received a comment on learningjquery.com this evening from someone who had
 a grievance with part of some example code. I was wondering if any of you
 would be willing to shed some light on this for me. I think what he's
 getting at is the whole innerHTML is evil thing, but since he doesn't
 really explain why he think it's really ugly, I'm just not sure.

 Here is the relevant snippet of his comment:



 Nice post, but …
  This part of code :

  $('#show-alert').click(function() {
  $('div class=quick-alertAlert! Watch me before it\'s too late!/div')
 .insertAfter( $(this) );
  }

  should be AVOIDED as is. Inserting HTML code like this is really ugly, it's
 a lot better to use the DOM methods :

  $('#show-alert').click(function() {
  var oDIV = document.createElement('div');
  oDiv.className = 'quick-alert';
  oText = document.createTextNode(Alert ! Watch me before it's too late !);
  $(oDiv).append(oText);
  $(oDiv).insertAfter(this);
  }
 I'd love to hear your opinions about this. With HTML/CSS stuff, I'm obsessed
 with standards and such. And one of the things that has always really
 attracted me to jQuery is its unobtrusiveness. I also read Jeremy Keith's
 DOM Scripting book and really appreciated his approach -- which is similar
 to what this commenter is suggesting. But I also love the super-fast
 development that can be done with jQuery and don't want to have to give that
 up if it's just a matter of someone's aesthetic sensibility being offended.
 I guess I just want to do the right thing.

 thanks,

 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com




 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Really Ugly?

2007-01-31 Thread Brandon Aaron
On 1/31/07, Rey Bango [EMAIL PROTECTED] wrote:
 [...] And I think also select (but I'm not sure
 anymore, because I cannot find anything in the docs).

It is read-only for select elements too.

 Most relevant here are table and select elements I guess. Populating a
 selectbox by simply changing innerHTML ( $('select').html('option ...
 /option') ) doesn't work. For tables a fix is already in jQuery. 

Actually it is possible since 1.0.4 to just use the DOM Manipulation
methods on select elements as it is fixed like it is for tables.

Just wanted to clear that up.

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Really Ugly?

2007-01-31 Thread Brandon Aaron
I'm pretty sure it is still a working draft:
http://www.w3.org/TR/XMLHttpRequest/

However, it is pretty much guaranteed to be a standard. :)

--
Brandon Aaron

On 1/31/07, Joel Birch [EMAIL PROTECTED] wrote:
 On 01/02/2007, at 1:07 PM, Brandon Aaron wrote:

  Let's not forget that xmlHttpRequest is also not standard.

 I thought this was recently made standard.
 Joel.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Strangeness with fade(), alpha-opacity PNGs and IE

2007-01-30 Thread Brandon Aaron
I wonder if setting the background color to transparent will work?
background-color: transparent;

--
Brandon Aaron

On 1/30/07, spl1nter [EMAIL PROTECTED] wrote:

 This appears to be the case but unfortunately 8 bit PNGs don't have
 alpha-transparency. I've found one way to prevent it and that's by setting a
 background colour. Unfortunately I can't do that with my design :(


 Jonathan Sharp wrote:
 
  I think it has to do with whether it's saved as an 8 bit or 24 bit PNG.
 
  -js
 
 
  On 1/29/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 
  I haven't found the secret yet. Some of my pngs do it and others don't.
 
  --
  Brandon Aaron
 
  On 1/29/07, spl1nter [EMAIL PROTECTED] wrote:
  
   Ah, well that's a tad annoying. Is there anyway to prevent this? Any
  settings
   I can use in Photoshop or such?
  
  
   Brandon Aaron wrote:
   
This is a known bug in IE7. Sometimes you can get PNGs in IE7 to get
that black background when you zoom in or out. They support them,
  just
not very well.
   
--
Brandon Aaron
   
On 1/29/07, spl1nter [EMAIL PROTECTED] wrote:
   
I've only tested this with IE7 (don't have IE6 available - I'd
  imagine
it'd
be worse what with it's lack of native alpha-transparency support)
  but
it's
pretty strange.
   
http://www.devioustree.co.uk/
   
At the link above I'm using fadeIn() and fadeOut(). It works fine
  apart
from
when I've got a PNG background that uses alpha-transparency. For
  some
reason
IE7 shows a black (maybe dark-blue) background behind the PNG during
  the
transition and reverts back to normal afterwards.
   
I'm assuming this has something to do with IE7s PNG rendering but I
thought
they supported alpha-transparency fully now?
--
View this message in context:
   
  http://www.nabble.com/Strangeness-with-fade%28%29%2C-alpha-opacity-PNGs-and-IE-tf3136699.html#a8692085
Sent from the JQuery mailing list archive at Nabble.com.
   
   
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
   
   
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
   
   
  
   --
   View this message in context:
  http://www.nabble.com/Strangeness-with-fade%28%29%2C-alpha-opacity-PNGs-and-IE-tf3136699.html#a8693629
   Sent from the JQuery mailing list archive at Nabble.com.
  
  
   ___
   jQuery mailing list
   discuss@jquery.com
   http://jquery.com/discuss/
  
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 

 --
 View this message in context: 
 http://www.nabble.com/Strangeness-with-fade%28%29%2C-alpha-opacity-PNGs-and-IE-tf3136699.html#a8712458
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Scrolling in Opera? Only works with block elements

2007-01-30 Thread Brandon Aaron
I just fixed a problem in the offset method in the dimensions plugin
dealing with inline elements in opera. It was setting the .scrollLeft
and .scrollTop properties to the same as .offsetLeft and .offsetTop.
Not sure if it is related or not but thought I would share anyways.

--
Brandon Aaron

On 1/30/07, PragueExpat [EMAIL PROTECTED] wrote:

 If the target element (to scroll to) is an inline element, Opera will not
 scroll. FF and IE work correctly. If I change the element to a block
 element, Opera will work.

 Because I wanted to use the existing a href=#xxx and a
 name=xxx anchors, this will not work in Opera.

 Change the p target elements in the interface scrollto demo page to
 a or span elements to see what I mean (see the difference
 between IE/FF and Opera).

 Stefan, could you comment on this? Is it a limitation of Opera?

 Thanks in advance for any insight...



 PragueExpat wrote:
 
  that link in the original post should have been ...has a lot of a
  href=#xxx and a name=xxx anchors...
 
  Guess I should preview first :)
 
 
  PragueExpat wrote:
 
  Has anyone else had the problem of Opera not scrolling when using the
  ScrollTo in interface?
 
  (By the way, Stefan and Paul, thanks for your work on interface - I use
  it a lot)
 
  My page has a lot of  #xxx  and   anchors and I wanted to use the
  ScrollToAnchors method in interface. Since the method looks for elements
  to scroll to (not named anchors), I made this (small) change to the
  method:
 
  ScrollToAnchors : function(speed, axis, easing) {
   return this.each(
   function()
   {
   jQuery(this).click(
   function(e)
   {
   parts = 
  this.href.split('#');
   jQuery('[EMAIL 
  PROTECTED]'+parts[1]+']').ScrollTo(800);
   return false;
   }
   );
   }
   )
   }
 
  and used this in the document ready:
 
  $('[EMAIL PROTECTED]#]').ScrollToAnchors(800);
 
  Works great in FF, IE but not in Opera. I tried a straight ScrollTo
  function in Opera, which also failed.
 
  Can anyone confirm?
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Scrolling-in-Opera--tf3138253.html#a8714081
 Sent from the jQuery Plugins mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dynamic id's for show/hide toggle?

2007-01-30 Thread Brandon Aaron
I'm a little confused about what you are needing. Could you show an
example of what is currently up? That would also show the structure of
your code. You might just be able to use selectors instead of IDs to
find the elements you want to show/hide.

--
Brandon Aaron

On 1/30/07, Priest, James (NIH/NIEHS) [C] [EMAIL PROTECTED] wrote:
 I'm just getting started with jquery so bear with me :)

 I'm working on displaying a dynamic list generated with ColdFusion.  I
 found the slicker show/hide tutorial and have that working - but need
 to show/hide elements on each row of my list.  Right now it works - but
 when I click my show/hide link - ALL the hidden elements are displayed
 :)

 So I'm guessing I need jquery to respond to a dynamically generated
 ID...

 a href=# id=myID-#currentRow#show/hide/a
 div id=details-#currentRow#Lorem Ipsum goes here/div

 But so far all my searches have been unsuccessful.  I'm sure others have
 run into this...

 Anyone have an example showing how to do this?

 Thanks!
 Jim

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dynamic id's for show/hide toggle?

2007-01-30 Thread Brandon Aaron
Oh okay ... just do something like this:

$(function() { // document.ready
$('.details').hide();
$('a.slick-toggle').bind('click', function() {
$(this)
.parent() // the p tag
.next('div.details') // the details we want
.toggle(400);
});
});

Untested but that should at least point you in the right direction.
Check out the API docs for DOM / Traversing for more info on the
parent() and next() method.

--
Brandon Aaron

On 1/30/07, Priest, James (NIH/NIEHS) [C] [EMAIL PROTECTED] wrote:
 Unfortunately I'm behind a firewall :(

 Basically I'm looping over a query returned from a database...

 cfoutput query=myQuery
 div class=desc
 pThis requirement description/p
 p class=showhide[+] a href=##
 class=slick-toggleShow/hide requirement details/a/p

 div class=details  !-- this div will be initially
 hidden --
 ul
 liList item 1/li
 liList item 2/li
 liList item 3/li
 /ul
 /div
 /div
 /cfoutput


 Ideally I want a compact list of requirements - then when the user
 clicks on the 'show/hide' link - the requirement details for that
 particular requirement drop down.  Right now it works but ALL the
 details for all the list items display as one! :)  So I'm assuming I
 need to assign a unique ID to each one:

 So in ColdFusion I can do:

 cfoutput query=myQuery
 div class=desc-#currentRow#
 pThis requirement description/p
 p class=showhidedetails-#currentRow#[+] a href=##
 class=slick-toggleShow/hide requirement details/a/p

 div class=details-#currentRow#
 ul
 liList item 1/li
 liList item 2/li
 liList item 3/li
 /ul
 /div
 /div
 /cfoutput


 Which would really output in HTML:


 div class=desc-1
 pThis requirement description/p
 p class=showhidedetails-1[+] a href=##
 class=slick-toggleShow/hide requirement details/a/p

 div class=details-1
 ul
 liList item 1/li
 liList item 2/li
 liList item 3/li
 /ul
 /div
 /div
 div class=desc-2
 pThis requirement description/p
 p class=showhidedetails-2[+] a href=##
 class=slick-toggleShow/hide requirement details/a/p

 div class=details-2
 ul
 liList item 1/li
 liList item 2/li
 liList item 3/li
 /ul
 /div
 /div


 Etc...

 But I'm not sure how to reference those dynamic class names in jquery.
 I'm guessing I need to loop over my jquery somehow but not being that
 familiar with jquery - I'm not sure.

 My jquery script looks like:

 script type=text/javascript
 $(document).ready(function() {
  // hides the slickbox as soon as the DOM is ready
  // (a little sooner than page load)
   $('.details').hide();
  // toggles the slickbox on clicking the noted link
   $('a.slick-toggle').click(function() {
 $('.details').toggle(400);
   });
 });
 /script

 Thanks for the help!
 Jim




  -Original Message-
  I'm a little confused about what you are needing. Could you
  show an example of what is currently up? That would also show
  the structure of your code. You might just be able to use
  selectors instead of IDs to find the elements you want to show/hide.
 
  --
  Brandon Aaron
 
  On 1/30/07, Priest, James (NIH/NIEHS) [C]
  [EMAIL PROTECTED] wrote:
   I'm just getting started with jquery so bear with me :)
  
   I'm working on displaying a dynamic list generated with
  ColdFusion.  I
   found the slicker show/hide tutorial and have that working - but
   need to show/hide elements on each row of my list.  Right
  now it works
   - but when I click my show/hide link - ALL the hidden elements are
   displayed
   :)
  
   So I'm guessing I need jquery to respond to a dynamically generated
   ID...
  
   a href=# id=myID-#currentRow#show/hide/a
   div id=details-#currentRow#Lorem Ipsum goes here/div
  
   But so far all my searches have been unsuccessful.  I'm sure others
   have run into this...
  
   Anyone have an example showing how to do this?
  
   Thanks!
   Jim
  
   ___
   jQuery mailing list
   discuss@jquery.com
   http://jquery.com/discuss/
  
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 

 ___
 jQuery mailing list
 discuss@jquery.com
 http

Re: [jQuery] Checking length/size of hash object

2007-01-30 Thread Brandon Aaron
You could loop through the elements and count them like this.

var hashLength = function(hash) {
var count = 0;
for (var i in hash) count++;
return count;
};

--
Brandon Aaron

On 1/30/07, Nate Cavanaugh [EMAIL PROTECTED] wrote:

 Hi All,
 is there a native, or jQuery way to check the size/length of a hash object?

 For instance to check the length of an array, you would do something like:
 var x = [1,2];
 x.length; // is 2

 But how would I check this:

 var x = {n:2,m:4};

 Thanks in advance :)
 --
 View this message in context: 
 http://www.nabble.com/Checking-length-size-of-hash-object-tf3144960.html#a8718115
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] mouseover and out triggering

2007-01-29 Thread Brandon Aaron
The .hover() method is what you are thinking about. Try it instead of
just binding a mouseout to the p.

--
Brandon Aaron

On 1/29/07, Andreas Wahlin [EMAIL PROTECTED] wrote:
 I have html like this
 p
a
a
 /p

 that is, a paragraph with some links in it. I bind a mouseout on the
 paragraph, then bind mouseover and on the links.
 Now as I move my mouse over the different links, the p.onmouseout
 gets triggered all the time, even though the links are nested inside
 it, I thought that wasn't suppose to happen, or is it just the .hover
 that behaves differently?
 What I would like is the p.onmouseout to only trigger once I leave
 the paragraph, not for every link I leave.
 Now I seem to remember this as normal JavaScript behaviour, but I
 thought I read somewhere that this had been coded around in jQuery?

 andreas

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Strangeness with fade(), alpha-opacity PNGs and IE

2007-01-29 Thread Brandon Aaron
This is a known bug in IE7. Sometimes you can get PNGs in IE7 to get
that black background when you zoom in or out. They support them, just
not very well.

--
Brandon Aaron

On 1/29/07, spl1nter [EMAIL PROTECTED] wrote:

 I've only tested this with IE7 (don't have IE6 available - I'd imagine it'd
 be worse what with it's lack of native alpha-transparency support) but it's
 pretty strange.

 http://www.devioustree.co.uk/

 At the link above I'm using fadeIn() and fadeOut(). It works fine apart from
 when I've got a PNG background that uses alpha-transparency. For some reason
 IE7 shows a black (maybe dark-blue) background behind the PNG during the
 transition and reverts back to normal afterwards.

 I'm assuming this has something to do with IE7s PNG rendering but I thought
 they supported alpha-transparency fully now?
 --
 View this message in context: 
 http://www.nabble.com/Strangeness-with-fade%28%29%2C-alpha-opacity-PNGs-and-IE-tf3136699.html#a8692085
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Strangeness with fade(), alpha-opacity PNGs and IE

2007-01-29 Thread Brandon Aaron
I haven't found the secret yet. Some of my pngs do it and others don't.

--
Brandon Aaron

On 1/29/07, spl1nter [EMAIL PROTECTED] wrote:

 Ah, well that's a tad annoying. Is there anyway to prevent this? Any settings
 I can use in Photoshop or such?


 Brandon Aaron wrote:
 
  This is a known bug in IE7. Sometimes you can get PNGs in IE7 to get
  that black background when you zoom in or out. They support them, just
  not very well.
 
  --
  Brandon Aaron
 
  On 1/29/07, spl1nter [EMAIL PROTECTED] wrote:
 
  I've only tested this with IE7 (don't have IE6 available - I'd imagine
  it'd
  be worse what with it's lack of native alpha-transparency support) but
  it's
  pretty strange.
 
  http://www.devioustree.co.uk/
 
  At the link above I'm using fadeIn() and fadeOut(). It works fine apart
  from
  when I've got a PNG background that uses alpha-transparency. For some
  reason
  IE7 shows a black (maybe dark-blue) background behind the PNG during the
  transition and reverts back to normal afterwards.
 
  I'm assuming this has something to do with IE7s PNG rendering but I
  thought
  they supported alpha-transparency fully now?
  --
  View this message in context:
  http://www.nabble.com/Strangeness-with-fade%28%29%2C-alpha-opacity-PNGs-and-IE-tf3136699.html#a8692085
  Sent from the JQuery mailing list archive at Nabble.com.
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 

 --
 View this message in context: 
 http://www.nabble.com/Strangeness-with-fade%28%29%2C-alpha-opacity-PNGs-and-IE-tf3136699.html#a8693629
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery 1.1.1 and .width / .height

2007-01-29 Thread Brandon Aaron
You do not need the dimensions plugin for the .height and .width
methods. However, the dimensions plugin simply extends the .height()
and .width() method to return proper values for document and window.

--
Brandon Aaron

On 1/29/07, Webunity | Support [EMAIL PROTECTED] wrote:
 Hi guys,

 I am porting my sites from 1.0 to 1.1.1, and i was wondering if i still
 need the dimensions plugin with 1.1.1, since there is a new .width() and
 .height() in form of .css(width) and .css(height).

 Can anybody advise?

 Thanx
 Gilles

 p.s. sorry for the repost

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery Tools: API Browser

2007-01-28 Thread Brandon Aaron
Love it! It is going to get a lot of use. Great job.

--
Brandon Aaron

On 1/28/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:

  According to the feedback I got via IRC and on this list, there are several
 people using my API browser (so far known as api-draft).

  This feedback gave me the motivation to further improve the browser
 (including a few more plugins), and to create an official release.

  The time has come:
 http://jquery.bassistance.de/api-browser/

   My own tests yielded good results in Firefox 2.0, Opera 9 and IE6: The
 browser works quite consistent with and without JavaScript. Of course it is
 recommended to view it with JavaScript, because you get:


 Tabbed navigation
 Treeview on categories
 Quicksearch on both navigation and main content
 code highlighting for both HTML and JavaScript snippets
 a vertical splitter that allows you to resize navigation/content panes
 highlighting selected methods in the content
 styled tooltips for method arguments Without JavaScript, the browser
 still provides both categorized and alphabetic navigation, and to a certain
 extend, bookmarks.

  The issue with bookmarks is this: The first time you visit the browser, you
 can select any method and the location hash is properly updated. Once you
 bookmark the location, including the hash, and return to the site, it jumps
 to the correct method, but does not update the hash anymore on further
 navigations. This occurs in both IE and FF, Opera simply fails to jump to
 the correct method in the first place, but updates the hash on following
 clicks.

  If you like the tool and want to use it in your daily jQuery development:
 there is a download link at the header of the browser.

  Of course your feedback is still appreciated!
  --
 Jörn Zaefferer

 http://bassistance.de

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dimensions.js console.log error message

2007-01-28 Thread Brandon Aaron
Yikes! Thank Bruce for pointing that out. It is now fixed.

Also you can pack the dimensions plugin with Dean's packer.
http://dean.edwards.name/packer/

--
Brandon Aaron

On 1/28/07, Bruce McKenzie [EMAIL PROTECTED] wrote:
 The version of dimensions.js available on the jquery plugins pages
 contains this on line 233

 console.log(' ' + parent.id + ' ' + x + ' ' + y);

 which triggers an 'error-on-page' message in IE6.

 BTW, is there a packed version of this excellent plugin available?

 Bruce
 --
 http://www.2MinuteExplainer.com

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dropdown menu with IE select fix?

2007-01-25 Thread Brandon Aaron
It just needs to be applied to the element that *should* show up on
top of a select in IE.

--
Brandon Aaron

On 1/24/07, rolfsf [EMAIL PROTECTED] wrote:


 What element would I apply bgiframe to - the select or the nested lists in
 the menu? I've played a bit with the lists but it's not working yet.


 Sure, just use the bgiframe plugin found in the plugins svn.
 http://jquery.com/dev/svn/trunk/plugins/bgiframe/bgiframe.js?format=txt

 --
 Brandon Aaron


 --
 View this message in context: 
 http://www.nabble.com/dropdown-menu-with-IE-select-fix--tf3084885.html#a8594257
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] cant append() form objects

2007-01-25 Thread Brandon Aaron
Is this just in IE or in other browsers too?

--
Brandon Aaron

On 1/24/07, Jeremy Dill [EMAIL PROTECTED] wrote:


 After upgrading from 1.0.4 to 1.1.1 the following code no longer works.
 Please tell me if there is a solution to this issue.

 ---WORKING HTML TEST
 PAGE
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
 titletest/title
 style
 .layerbox{font-size:8pt;text-align:left;padding:10px;margin:20px;border:1px
 solid #B2C5EC; background-color:#FCFCFC;float:left;
 clear:left;height:200px;width:200px}
 /style
 script type='text/javascript'
 src='/js/jquery111.js'/script
 /head

 body
 div id='content'/div
 script language=JavaScript
 function appLayer(id){
  //create layerbox
   var layerbox=document.createElement('div');
   layerbox.id=id+_layer;
   layerbox.className=layerbox;
   $(#content).prepend(layerbox);
   this.divName=layerbox.id;
   this.layerobj=layerbox;
  //create form
   var frm=document.createElement('form');
   frm.id=id+_form;
   frm.name=id+_form;
   frm.action = index.php;
   frm.method = post;
this.frm=frm.id;
 //---HERE IS THE PROBLEM-///
   $(#+this.divName).append(frm);
 //---APPEND DOESNT WORK FOR FORM OBJECT--///
   //create main div
  var main=document.createElement('div');
  main.id=id+_main;
  main.className=morebox;
  main.innerHTML=This box should get created, but it doesnt because form
 didnt get created;
  $(#+this.frm).prepend(main);
 }
 tst=new appLayer('Test');
 /script
 /body
 /html
 END PAGE-

 The form object does not get created.  I don't have any problems appending
 other objects such as divs, but the form object won't work anymore.

 It works fine in 1.0.4.  Try it out.

 Thanks in advance.

 Jeremy
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] in 1.1.1, get(0) returns the document when it

2007-01-25 Thread Brandon Aaron
Yes, this is annoying to me as well.

The workaround is to use the .size() method.

if ( $('nonexistent').size()  0)

or you could just shortcut it to
if ($('nonexistent').size())

--
Brandon Aaron

On 1/25/07, Jan Vorisek [EMAIL PROTECTED] wrote:
 So far I tried revision 1172 and it does not fix the issue.

 What is the clean approach to test if any object is found?
 if( $('nonexistent')[0] )?
 if( $('nonexistent').length0)?
 if( $('nonexistent').get(0))?

 Jan.

  But after upgrading to 1.1.1, I got an error saying focus() wasn't a
  method.  So I added a little debugging alert, and apparently,
  $(.focus).get(0) is returning the document object!  If I call
  $(.focus).size() it returns 0, but yet when I call .get(0) it's
  returning something?  Anyone else seeing this?
 

 Yes: http://jquery.com/dev/bugs/bug/861/


 -- Klaus

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] New Plugin: Clone Events

2007-01-25 Thread Brandon Aaron
I've noticed several times on the list people asking why .clone()
doesn't clone the events along with the elements. No more worries ...
now you can clone those events if you need too!

var $elements = $('.elements');
$elements
.clone()
.cloneEventsFrom($elements);

There is also a .cloneEventsTo() which acts like .appendTo().

var $elements = $('.elements');
var $clonedElements = $elements.clone();
$elements.cloneEventsTo($cloneElements);

You can find this plugin in SVN:
http://jquery.com/dev/svn/trunk/plugins/cloneEvents/cloneEvents.js?format=txt

You can run the unit tests here:
http://brandon.jquery.com/plugins/cloneEvents/test/unit.html

--
Brandon Aaron

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New Plugin: Clone Events

2007-01-25 Thread Brandon Aaron
Duh! I'll add the cloneWithEvents() method to the plugin shortly. I
was thinking how to make the plugin as flexible as possible and allow
for other use-cases instead of just with clone. Lets say for example
that you have an unordered list and each list item has events. Then
you add some more list items via AJAX but need to rebind the events.
Just use the cloneEventsFrom method.

Thanks John ... I believe that completes this plugin.

--
Brandon Aaron

On 1/25/07, John Resig [EMAIL PROTECTED] wrote:
 I think this is a little different from what was originally asked for.
 Something along the lines of:

 jQuery.fn.cloneWithEvents = function( deep ) {
   var old = this;
   return this.clone( deep ).cloneEventsFrom( old );
 };

 This way you can do the cloning (and the event cloning) all in one operation:

 $(div.toggle).cloneWithEvents().appendTo(#container);

 --John

 On 1/25/07, Brandon Aaron [EMAIL PROTECTED] wrote:
  I've noticed several times on the list people asking why .clone()
  doesn't clone the events along with the elements. No more worries ...
  now you can clone those events if you need too!
 
  var $elements = $('.elements');
  $elements
  .clone()
  .cloneEventsFrom($elements);
 
  There is also a .cloneEventsTo() which acts like .appendTo().
 
  var $elements = $('.elements');
  var $clonedElements = $elements.clone();
  $elements.cloneEventsTo($cloneElements);
 
  You can find this plugin in SVN:
  http://jquery.com/dev/svn/trunk/plugins/cloneEvents/cloneEvents.js?format=txt
 
  You can run the unit tests here:
  http://brandon.jquery.com/plugins/cloneEvents/test/unit.html
 
  --
  Brandon Aaron
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New Plugin: Clone Events

2007-01-25 Thread Brandon Aaron
Right on. I agree and have changed the name of the plugin to
copyEvents and added the cloneWithEvents method.

Update links:
You can find this plugin in SVN:
http://jquery.com/dev/svn/trunk/plugins/copyEvents/copyEvents.js?format=txt

You can run the unit tests here:
http://brandon.jquery.com/plugins/copyEvents/test/unit.html

--
Brandon Aaron


On 1/25/07, John Resig [EMAIL PROTECTED] wrote:
 Ahhh... I see, that's pretty useful.

 I think I would be inclined to use the following naming convention:
 - copyEvents
 - copyEventsTo
 - cloneWithEvents

 This way clone is always associated with cloning elements.
 Additionally, adding in the From seems sort of redundant (it's not
 used elsewhere in jQuery (.appendFrom?)

 Finally, now that I see what your goal is, I think this would be an
 interesting goal:

 $(#foo).load(some.html,function(){
   $(this).copyEvents( true, #otherfoo );
 });

 And this would do a deep traversal of the contents of #foo, attempting
 to copy over events from similar elements in #otherfoo.

 Of course, an ultimate goal would be:

 $(a).click(...);
 $(li).addClass(test);

 $(#foo).liveLoad( foo.html );

 and having all the a elements receive that particular event handler,
 and all li elements receive a class of test.

 Of course, the technical aspects behind this are quite daunting, but
 it would certainly be a cool effect.

 --John

 On 1/25/07, Brandon Aaron [EMAIL PROTECTED] wrote:
  Duh! I'll add the cloneWithEvents() method to the plugin shortly. I
  was thinking how to make the plugin as flexible as possible and allow
  for other use-cases instead of just with clone. Lets say for example
  that you have an unordered list and each list item has events. Then
  you add some more list items via AJAX but need to rebind the events.
  Just use the cloneEventsFrom method.
 
  Thanks John ... I believe that completes this plugin.
 
  --
  Brandon Aaron
 
  On 1/25/07, John Resig [EMAIL PROTECTED] wrote:
   I think this is a little different from what was originally asked for.
   Something along the lines of:
  
   jQuery.fn.cloneWithEvents = function( deep ) {
 var old = this;
 return this.clone( deep ).cloneEventsFrom( old );
   };
  
   This way you can do the cloning (and the event cloning) all in one 
   operation:
  
   $(div.toggle).cloneWithEvents().appendTo(#container);
  
   --John
  
   On 1/25/07, Brandon Aaron [EMAIL PROTECTED] wrote:
I've noticed several times on the list people asking why .clone()
doesn't clone the events along with the elements. No more worries ...
now you can clone those events if you need too!
   
var $elements = $('.elements');
$elements
.clone()
.cloneEventsFrom($elements);
   
There is also a .cloneEventsTo() which acts like .appendTo().
   
var $elements = $('.elements');
var $clonedElements = $elements.clone();
$elements.cloneEventsTo($cloneElements);
   
You can find this plugin in SVN:
http://jquery.com/dev/svn/trunk/plugins/cloneEvents/cloneEvents.js?format=txt
   
You can run the unit tests here:
http://brandon.jquery.com/plugins/cloneEvents/test/unit.html
   
--
Brandon Aaron
   
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
   
  
   ___
   jQuery mailing list
   discuss@jquery.com
   http://jquery.com/discuss/
  
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] A fadeout effect makes the page jump up in IE7

2007-01-24 Thread Brandon Aaron
Indeed and it should be mentioned that an improved fx engine is in the works.

--
Brandon Aaron

On 1/24/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 sholby schrieb:
  I'm wondering if this is a known issue ?
 
  (Apparently the type also becomes aliased before the fade completes.)
 
  I am thinking of removing the function altogether for IE, but i've
  already removed so much niceties from my layout for that browser that
  there is barely anything left...
 Whenever I encountered serious problems with animations (be it IE or
 FF), I simply switched to plain hide/show/toggle calls, without animations.

 There are several known issue, like slow animations in FF due to several
 parallel timeouts, ugly fade outs because of unnecessary display-block
 styles, etc.

 Not really a big help, but good for orientation.

 --
 Jörn Zaefferer

 http://bassistance.de


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] dropdown menu with IE select fix?

2007-01-24 Thread Brandon Aaron
Sure, just use the bgiframe plugin found in the plugins svn.
http://jquery.com/dev/svn/trunk/plugins/bgiframe/bgiframe.js?format=txt

--
Brandon Aaron

On 1/24/07, rolfsf [EMAIL PROTECTED] wrote:

 I've seen a few JQuery interpretations of the Suckerfish menu, but has anyone
 taken them a little further to include a fix for the IE Select bug wherein
 the dropdown menu will appear behind a Select menu in IE6? The only fix I've
 seen for the bug involves slipping an iframe under the dropdown.

 This script combines the idea behind Suckerfish menus with an iframe on
 hover... but is there a JQuery version of this idea?
 http://homepage.mac.com/igstudio/design/ulsmenus/vertical-uls-iframe-2.html
 --
 View this message in context: 
 http://www.nabble.com/dropdown-menu-with-IE-select-fix--tf3084885.html#a8573656
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


  1   2   3   4   5   >