you can prevent 'tabbing' using document.activeElement: 1) save it, 2) blur
it, 3) focus saved (on exit).
p.s. not all browsers support it, so you'll have to 'do it yourself':
code
$(function(){
if (typeof document.activeElement == 'undefined') {
$('a, input, select, textarea,
Gavin M. Roy schreef:
The file size (6.2K) is based upon heavy whitespace and comments. I'm
working on a comment-less version to cut down on file size and will
offer both on the page.
You could reduce the code by using switch instead of all those if/else
statements. for example
// Apply
You could reduce the code by using switch
And by eliminating duplicate code:
$('#modalBackdrop').top(wt).css(css).height(winHeight +
'px').width(winWidth + 'px').show();
modalContent.top(mdcTop + 'px').left(mdcLeft + 'px');
switch(animation){
case 'fade':
modalContent.fadeIn(speed);
If you had the user define the animation effect in terms of the actual
jQuery method names (fadeIn, slideDown, show) and made the default be
show, you could replace all of that with one line:
modalContent.css({top: mdcTop+'px', left:
mdcLeft+px}).hide()[animation](speed);
Nice, Dave!
And
Other navigation keys need to be handled too (Home, Page Up, space bar, etc).
Currently, they can be used to get around the modality of the dialog and
access content that is not masked.
If changing the focus is handled, can you extend the mask to the entire
window instead of just the viewport?
I've released the very-quickly incremented modalContent plugin which is now
at 0.7. This release fixes bugs, adds animations to the display of the
modalContent and an unmodalContent() function which can turn off the
modalContent when using ajax or what not.
The file size (6.2K) is based upon
Your demo doesn't work in IE6 - the grey background and window were added
below the content instead of layered on each other.
Blair
On 12/1/06, Gavin M. Roy [EMAIL PROTECTED] wrote:
I've released the very-quickly incremented modalContent plugin which is
now at 0.7. This release fixes bugs,
Thanks, I've updated the code and released 0.9. It addresses the MSIE
issues.
On 11/30/06, Blair McKenzie [EMAIL PROTECTED] wrote:
Your demo doesn't work in IE6 - the grey background and window were added
below the content instead of layered on each other.
Blair
On 12/1/06, Gavin M. Roy
Now I'm getting Error: Expected identifier, string or number on line 1
during page load. When I continue and try to use the links I get Object
doesn't support this property or method on line 15.
On 12/1/06, Gavin M. Roy [EMAIL PROTECTED] wrote:
Thanks, I've updated the code and released 0.9.
Sorry, left something in I meant to take out. Please retest.
On 11/30/06, Blair McKenzie [EMAIL PROTECTED] wrote:
Now I'm getting Error: Expected identifier, string or number on line 1
during page load. When I continue and try to use the links I get Object
doesn't support this property or
Excellent. :)
On 12/1/06, Gavin M. Roy [EMAIL PROTECTED] wrote:
Sorry, left something in I meant to take out. Please retest.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Can I control the size of the window? Is it possible to bind an event to
close? Can one close from within JS instead of with an a.close element?
On 12/1/06, Blair McKenzie [EMAIL PROTECTED] wrote:
Excellent. :)
___
jQuery mailing list
Yes, the inner content is controlled by your css outside of the plugin.
You can close it via $(document).unmodalContent(); in addition to adding the
class close to anything you want the user to click that handles a click
event. Im not sure how to handle an event binding, but you could do
Gavin M. Roy wrote:
I've released the very-quickly incremented modalContent plugin which
is now at 0.7. This release fixes bugs, adds animations to the
display of the modalContent and an unmodalContent() function which can
turn off the modalContent when using ajax or what not.
The demo
Blair McKenzie wrote:
Can I control the size of the window? Is it possible to bind an event
to close? Can one close from within JS instead of with an a.close element?
It would also be nice to bind a custom function to open -- this way if
you call the .modalContent() on an empty (yet styled)
15 matches
Mail list logo