Re: [jQuery] .height(val) - what am I missing?

2007-01-15 Thread Theo Welch
I'm not sure if this is the issue, Adam, but have you tried using a string
for the height value instead of an integer...and in doing so, also
specifying an explicit unit of measure (such as pixels)? Generally, CSS
rules won't honor values that don't have units (unless the value is zero in
which case units are obviously irrelevant). 

Also, as Sam said, to make sure the DOM element (in your case: ) you are trying to affect has been
loaded into memory by the browser, you need to wrap your statements inside
one of the several varieties of jQuery "load-check wrappers". Code within
these jQuery wrappers won't execute until the DOM is ready (one of the best
features of jQuery!). Extending Sam's example, try specifying a "600px"
height like so:









-THEO-



-Original Message-
From: Sam Collett [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 15, 2007 1:15 PM
To: jQuery Discussion.
Subject: Re: [jQuery] .height(val) - what am I missing?

On 15/01/07, John Resig <[EMAIL PROTECTED]> wrote:
> Hmm... I can't verify this. I popped open a test page and set the
> .height() and it worked just fine. Perhaps a more complete example is
> in order?
>
> --John
>
> On 1/15/07, agent2026 <[EMAIL PROTECTED]> wrote:
> >
> > All I"m trying to do is set the height of a div (jQuery 1.1), but no go.
> > What am I missing?
> >
> > 
> > 
> > 
> >
> > 
> >
> > Preparing to feel dumb,
> > Adam
> > --

Looks like you are trying to set it before the DOM has loaded. Try:










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


Re: [jQuery] IE 6 error when using thickbox on a secure connection

2007-01-27 Thread Theo Welch
I can't believe I'm writing these words,  :)  but from my experience,  
it is unlikely that this is due to an IE bug. I have seen the same  
thing before...where the warning about "some items not being secure"  
appears in IE but not Firefox. It may have been to some relaxed (or  
misconfigured) Firefox preference or something, but from what I  
eventually found in my situation, in my opinion, Firefox should have  
been triggering the same warning.

Anyway, I recommend that you use FireBug 1.0 (http://getfirebug.com/)  
in Firefox to find out what's causing the issue. Using Firebug's  
"Net" tab, inspect the URLs of every asset that your page is loading.  
You can invoke a thickbox and see what assets are called in while the  
thickbox appears. Note that if you hold your mouse over the asset's  
name you will see the full path of the request used to request the  
asset. If any of the assets don't start with "https://"; then that's  
your culprit. Then it would just be a matter of determining what code  
on your page (HTML or JavaScript) is causing that request to occur  
and modifying your code accordingly.

Good Luck!
-THEO-

P.S. Firebug rules. :)



On Jan 27, 2007, at 8:20 AM, [EMAIL PROTECTED] wrote:

> Yeah, that's the bug.  There are no actual non-SSL connections to  
> anything
> going on. Works just fine in Firefox.
>
>> If you are linking to any resources in the page (image/css/js) with a
>> http:// url you will get this message. Might also happen with ajax  
>> calls,
>> but not sure.
>>
>> Blair
>>
>> On 1/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>>
>>> I have a site on an https://domain.com.  When I click on a
>>> thickbox-enabled link in IE, I get an error that says somethings are
>>> secure, some are not.  Is there a fix for this?  Known issue?
>>>
>>> Thanks,
>>>
>>> Ben
>>>
>>> ___
>>> 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 guru wanted for small contract, good $

2007-02-07 Thread Theo Welch
That's true.  IE < 7 won't operate drop-downs in a pure-CSS-only  
solution (which uses the :hover pseudoclasses everywhere).


The other minor issue I have with the pure-CSS solutions is that the  
developer gives up any control for making the menus more user- 
friendly. For example, I've found it's often nice to set a timeout of  
about 1 second or so when the user mouses out of the drop-down menu  
before you hide the menu again. This gives folks with less mouse  
dexterity more wiggle room. With a pure CSS solution, the menu will  
disappear the instant a user mouses off the target area. There are  
workarounds in the pure-CSS solutions, such as adding padding around  
the menus to make an unintentional mouseout less likely. But tricks  
like that can cause other usability confusions sometimes.


I've also found that, when none of the drop-downs are showing, it's  
really nice to set a half-second (or less) delay before showing the  
first menu. This allows the user to quickly slide their mouse up and  
down from the page header, or the browser's back button to the page  
content (passing over the main navigation) without having drop-downs  
flash in their face when they don't want them. But once one of the  
menus is showing, the half-second delay is removed so subsequent  
menus are displayed instantly upon mouseover of their parent button.  
When all of the menus are hidden again, the delay is reset so the  
user needs to hover over one of the menu buttons for a half-second or  
so before a menu displays again. So the delay (which should be almost  
unnoticeable) only happens for the initial menu-showing each time.


But having a pure-CSS solution is a great backup for users that  
intentionally disable javascript in their browsers.


Also, I recommend when creating pages that have a ton of navigation  
code in the HTML source, make sure to insert hidden (or visible)  
"Skip to Content" anchor links somewhere before the navigation.  
Actually, right after the opening  tag is usually the best  
place to put a "Skip to Content" link.


And if you hide "skipnav" links from view, make sure to hide them  
using something like this:


.hidden { display:block; width:0; height:0; overflow:hidden; }

...not like this:

	.hidden { display:none } /* most screen readers will ignore this  
content altogether */


OK, I'll shut up now.  :)

Cheers,
-THEO-




On Feb 6, 2007, at 4:32 PM, Christopher Jordan wrote:

Correct me if I'm wrong here (and I probably am, lol!) but in  
implementing something like this using css alone wouldn't the  
author have to worry about all the browser compatibility issues?  
Where as with jQuery the browser compatibility stuff has been taken  
care of for you... wouldn't that be one reason that you'd *want* to  
use jQuery and not straight css? well... it would be for me,  
because I'm not a css guru type person. I still get frustrated with  
it at times, especially when it comes to browser compatibility issues.


Just my thoughts. :o)

Chris

Alexandre Plennevaux wrote:

You can do this in pure css:

http://www.cssplay.co.uk/menus/doors_drop_line_three.html


He's got plenty of interesting experiments with only css.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Accordion plugin

2006-11-09 Thread Theo Welch
Brilliant, guys! Thanks a lot for sharing these enhancement ideas Joel and
Brandon. Not only can the text in the accordion now be resized with no
penalty, but this also makes it possible to swap out the contents of the
accordion sections at runtime! This was a big help (and enlightening). :)

Thanks,
-THEO-



-Original Message-
From: Joel Birch [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 09, 2006 9:38 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Accordion plugin


> On 11/9/06, Joel Birch <[EMAIL PROTECTED]> wrote:> To this:
>> var finished = function() { --running; this.style.height="auto"; };
>
> Perhaps it would be best to just allow the style sheet to define
> whether or not it is auto by setting the style to a blank string.
>
> var finished = function() { --running; this.style.height = ''; };
>
> --
> Brandon Aaron

Yes, that works too! I didn't know that was possible. And when I view  
the generated source with the webdeveloper toolbar, the height  
property has been deleted from the style attribute, which is better  
than adding height:'auto' to it.

Thanks Brandon.




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


Re: [jQuery] [Fwd: How to Add HTML to a page, and make it "active"?]

2006-11-10 Thread Theo Welch
Hi Scott, 

I may not understand the details of your situation, but it seems you are
quite close to the first part of a solution (I am no expert either). 

Could you just give each of your  fields a common class name as well
as the unique id:








And then your jQuery code could look like something this?

$("select.dynamicSelects").change(function() {
   var type = $(this).val();
   $.post("/ajax/get_material_list.php", {type:type}, function(xml) {

  ... function body to process the xml results here...
  )};
   )};


That would apply your operation to all of the  fields that were
assigned class="dynamicSelects". And if you had all of these  fields
inside a container such as a  tag that had an id), 


 









then you could avoid having to add a class to every select field and just
make your jQuery code "select" your select boxes like this:

$("#magicSelectFields select").change(function() {
   var type = $(this).val();
   $.post("/ajax/get_material_list.php", {type:type}, function(xml) {

  ... function body to process the xml results here...
  )};
   )};

You can Google "CSS Selectors" to learn more about the various ways to
specify particular elements and groups of elements within a document. There
is a lot of flexibility in this department.

This doesn't really help with any of the ajax-y stuff you're trying to do,
but that's a question for someone other than me. :)

Cheers,
-THEO- 




-Original Message-
From: Scott Sharkey [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 10, 2006 8:59 AM
To: discuss@jquery.com
Subject: [jQuery] [Fwd: How to Add HTML to a page, and make it "active"?]

I *think* that I can do something like:

$("#type_1").change(function() {
   var type = $("#type_1").val();
   $.post("/ajax/get_material_list.php", {type:type}, function(xml) {

  ... function body to process the xml results here...
  )};
   )};

except, of course that "#type_1" above needs to be a Javascript variable
string, rather than a constant.  

-Scott




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


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread Theo Welch
Here's another (probably older) approach to vertical centering with CSS I've
been using for a while. 

http://www.wpdfd.com/editorial/thebox/deadcentre3.html

This one doesn't need any proprietary IE code to get the centering to work
in IE, but it does require a bit of extra markup as well as using 'absolute'
positioning which can be a hassle in some situations.

I haven't tested the technique Klaus linked to, but I think I actually I
like that one better for most situations
(http://stilbuero.de/demo/vertical_centering/).  

Thanks for sharing, Klaus! :)

-THEO-



-Original Message-
From: Klaus Hartl [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 27, 2006 10:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Stop using thickbox!

Christopher Jordan schrieb:
> Thanks for the response, Klaus. :o)
> 
> Klaus Hartl wrote:
>> Hi Chris,
>>
>> that's right. But: the only reason I can think of to use tables, is, 
>> that you can easily have content vertically aligned in the middle. That 
>> is what CSS honestly lacks.
>>
>> This can also be achievend with a little dynamic property for IE, so 
>> that's one line for a hack versus improved accessibility plus increased 
>> flexibility/maintainability plus 50% less markup. That sounds like a 
>> good trade-off, doesn't it?
>>
>>   
> so what's the hack? don't leave me hangin', brotha! :o)


Hi Christopher, wasn't sure if you are interested... here's a demo:
http://stilbuero.de/demo/vertical_centering/

One more thing to know: With JavaScript disabled in IE it will not be 
centered. I think that's acceptable, because it degrades well.


-- Klaus




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


Re: [jQuery] hoverIntent r5 = plug-in ready to be plugged-in

2007-03-28 Thread Theo Welch

Great work, Brian! Thanks for sharing this really helpful plug-in!

On a site I am building (NDA'd) I am currently using setTimeout() to  
delay drop-down menu appearance (and disappearance) to avoid that  
"flicker" problem so common with drop-downs. It actually works quite  
well. But hoverIntent creates an even more intuitive and slick UI. I  
find that "insignificant" interface details like this can really make  
a website a pleasurable (or awful) to use. And it is jQuery with  
flexible plugins like yours that make websites a pleasure to build.


Cheers,
-THEO-



On Mar 28, 2007, at 2:25 AM, Brian Cherne wrote:

I'm happy to announce that my first plug-in, hoverIntent, is ready  
for general use.


< http://cherne.net/brian/resources/jquery.hoverIntent.html >

hoverIntent is a function that attempts to determine the user's  
intent onMouseOver. It works like, was derived from and is  
interchangeable with jQuery's built-in hover. However, instead of  
immediately calling the onMouseOver function, hoverIntent tracks  
the user's mouse and waits until it slows down enough before making  
the call.


hoverIntent r5
... is $-friendly
... has configurable options
... has onMouseOut timeout option

Thanks for all the feedback from before. I hope this is the first  
of many plug-ins. :)


Brian.

P.S. How does one get their plug-in linked to from the jQuery plug- 
ins page?

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


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