[jQuery] Close/hide div on click outside

2007-11-16 Thread Codex

I've searched the posts and the web but I can't find a clear answer/
solution. I hope someone can answer this one:

I want to hide a div when there's a click anywhere outside of the div.
How would one do this?

Gav


[jQuery] Problem using draggable and scrollbar

2007-11-16 Thread Jason Maskell

This is a bit of a newbie question, sorry. :)

I've got a floating dialog that is a draggable.. It has a table in it
with a scrollbar.. Now, of course, the scrollbar doesn't work properly
since it's in the draggable. How do I fix this?

I'm aware of the dragPrevention property, but the syntax isn't clear
to me. I've tried a bunch of things and just get various errors.
What's the proper syntax, and will that actually fix the problem if I
add table to the dragPrevention property? Or is there some other
element I should be adding to it to get the scrollbar to work properly?


[jQuery] Re: jRails plugin: jQuery on Rails

2007-11-16 Thread Klaus Hartl

On Nov 15, 4:36 pm, Aaron [EMAIL PROTECTED] wrote:
 Hey all,

 I've just built a plugin a that allows you to use jQuery as a
 replacement for Prototype/script.aculo.us in Rails. It also includes
 some of the visual effects that were missing since 1.2 came out and
 broke compatibility with interface. I still have work to do on the
 visual effects piece but it's a pretty solid release.

 If you use Rails or are interested in the visual effects
 implementations, check it out and let me know what you 
 think.http://ennerchi.com/projects/jrails

 Thanks,

 -Aaron

Interesting. Is it really just an replacement or is also taken care of
unobtrusiveness, like the UJS plugin?

--Klaus


[jQuery] Re: help for a zoom image

2007-11-16 Thread boca . alexandre

Hi,

I made a new version = http://www.hybridbears.com/zoombox/example-4.htm

But on IE6, it's very slow how to solve this problem?

Thanks

Alex


[jQuery] Re: Scriptdoc-file for jQuery 1.2.1

2007-11-16 Thread dehneg

On 15 nov, 04:27, Guy Fraser [EMAIL PROTECTED] wrote:
 Shame, it would have been nice to have it in Aptana Studio - I was
 wondering why I wasn't getting code hints, etc.

Your right Guy. Aptana team does not support the last jQuery version.
I suppose they will do it one day. Aptana users will wait months after
each jQuery release.

Scriptdoc file is a good **standard** to integrate documentation in
any IDE.
It is also a good way to work with documentation. I suppose that
Yehuda Katz use the jQuery scriptdoc file to generate is Visual jQuery
Documentation (http://www.visualjquery.com). The actual version of
Visual jQuery is for jQuery 1.1.2.


[jQuery] Re: Find text in a list item, remove it and replace with an image tag.

2007-11-16 Thread Wizzud

Example:

$('#topNavigation li a').map(function(){
// find STRONG element...
var b = $(this).find('strong');
// return STRONG element or this (an A)...
return b.length ? b[0] : this;
  })
  // for each A or STRONG found...
  .each(function(){
// get the text...
var me = $(this), txt = me.text();
// replace the text with constructed html...
me.html( [ 'img src=/images/topNav'
  , txt
  , '.gif alt='
  , txt
  , ' /'
  ].join('') );
  });

On Nov 15, 9:53 pm, Andy Matthews [EMAIL PROTECTED] wrote:
 Why would you want to keep the bold tag if it's just going to be wrapped
 around an image?

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of desmond
 Sent: Thursday, November 15, 2007 1:00 PM
 To: jQuery (English)
 Subject: [jQuery] Find text in a list item, remove it and replace with an
 image tag.

 Hi all,

 I am a bit stuck here, I've been looking around, but can't seem to find what
 I'm after. I am fairly new to Jquery and Javascript, so not sure exactly
 what to look for. Basically I have the following HTML:

 div id=topNavigation
 ul class=firstLevel
 li class=homea
 href=/index.phpstrongHome/strong/a/li
 li class=developmenta href=/front-end-
 development.phpDevelopment/a/li
 /ul
 /div

 I want to use Jquery to go through each list item, delete the text inside
 the href (not the strong tag though, if there is one), then add an image tag
 in it's place (whilst retaining the strong tag around the image if it's
 there). So the generated code would look like this:

 div id=topNavigation
 ul class=firstLevel
 li class=homea href=/index.phpstrongimg
 src=/images/ topNavHome.gif alt=Home//strong/a/li
 li class=developmenta
 href=/front-end-development.phpimg
 src=/images/topNavDevelopment.gif alt=Development//a/li
 /ul
 /div

 Now, I'm not sure if we can come up with a clever loop that uses the text to
 create the image name and alt tag? There are only 5 fixed links in the full
 version, so I can do manually if need be.

 I've been trying to use the wrap/prepend/append methods described 
 herehttp://docs.jquery.com/Tutorials:Rounded_Corners, but really I need to 
 strip
 the text and replace it with the image tag. Also, there is a strong tag
 inside the HREF sometimes to show a selected link. I need to keep that there
 and have the image tag inside it.

 I don't expect anyone to write the code for me, but if you can just send me
 some links or point me in the direction of tutorials where I can learn from,
 that would be great.

 Thanks
 Paul


[jQuery] Re: Problem unbinding event from button (function binds event each time it is run)

2007-11-16 Thread Wizzud

On Nov 15, 4:11 pm, window.close [EMAIL PROTECTED]
wrote:
 Hello Wizzud and thank you for your reply!

  Assuming that function A can be called an unknown/unspecified number
  of times before #button may actually be clicked, and that what happens
  when #button is eventually clicked is determined by the most recent
  call to function A, then ...

 No, after functionA is called, the page is blocked by blockUI - I can
 either unblock it with the submit button or the cancel button.

From your original code...
this.functionA = function(parameter1, parameter2){

// blockUI - yes I can see that
 $.blockUI(TextEditLayer, {border:'none'});

// ONE button here - submit or cancel, I don't know which.
// If there's a second button - as you state - somewhere else then
// this one may not be clicked for any 1 particular call to
functionA,
// in which case the first part of my assumption holds true
 $('#button').bind('click', function() {
 var oAjaxObject = new Array();
 oAjaxObject[0] = TextEditTextbox.value;
 oAjaxObject[1] = iJobNumber;
 myNamespace.myClass.myAjaxMethod(oAjaxObject);
 $.unblockUI();
 $('#button').unbind();
   });
}

If the first part of my assumption is true, then the fact that your
code is binding a click handler to #button each and every time that
functionA is called means that the second part of the assumption must
also hold true.


 If I use$('#button').unbind('click').one('click', function() {

 the function is never called.

I assume you mean the anonymous click handler never runs?
If, having called functionA, you have a element on your page with a
*unique* id of 'button', and you click it, then there is absolutely no
reason why the following code would not run (assuming it doesn't
break)...
 var oAjaxObject = new Array();
 oAjaxObject[0] = TextEditTextbox.value;
 oAjaxObject[1] = iJobNumber;
 myNamespace.myClass.myAjaxMethod(oAjaxObject);
 $.unblockUI();
ie. everything inside the anonymous click handler function bound to
#button (I've excluded the unbind). The only thing that could prevent
it running when #button was clicked would be if some other bit of code
subsequently unbound the click event from #button before it could be
clicked upon?


 If I try$('#button').unbind('click');
 $('#button').bind('click', function() {

 no event is unbound - it's called as often as I call functionA

 Any guess?

Is #button unique?
What version of jQuery are you running?
Is there some other code I am unaware of ? Like the second button's
click handler, maybe?


[jQuery] Problem solved. Thank you!

2007-11-16 Thread window.close

Hi Wizzud,

I got it fixed by changing the handler from an anonymous function to a
known. I wanted to work with that anonymous handler because of the
parameters i could pass easily, but jQuery seem to have some problems
with the unbinding of anonymous handlers (but maybe I'm just to
stupid).

I use jQuery 1.2.1 - if still interesting.

 // ONE button here - submit or cancel, I don't know which.
 // If there's a second button - as you state - somewhere else then
 // this one may not be clicked for any 1 particular call to
 functionA,
 // in which case the first part of my assumption holds true
You see, I'm an idiot.

 I assume you mean the anonymous click handler never runs?
This little fellow showed me the answer...

 Is #button unique?
Yes

Thank you for your help!


[jQuery] Re: jRails plugin: jQuery on Rails

2007-11-16 Thread Nick Stakenburg

On 15 nov, 16:36, Aaron [EMAIL PROTECTED] wrote:
 I still have work to do on the visual effects piece but it's a pretty solid 
 release.

Instead of ripping my designs, you also need to work on your own
website.
Thanks.

http://www.nickstakenburg.com/projects/prototip

- Nick Stakenburg


[jQuery] superfish - using different animations?

2007-11-16 Thread slooodge

Hi,

(I think my previous post got lost...)

I just started using jQuery and I am absolutely stoked with the
library and all the beautiful extensions - Great work!

I am using the superfish and it's working absolute perfect. But I have
two different menues on my site and would like to use two different
menues on my hp and would like to use different animation types. I
have attached my code below. Unfotunately the declaration of the first
animation type gets overwritten by the second one.
Does anyone know how to implement two different menues on one page?

THANKS, I really appreciate your help, Hannes


$(document).ready(function(){
/*  Hauptnavigation   */
$(ul#nav)
.superfish({
animation : { height:show}
})
.find(li:has(ul))
.mouseover(function(){
$(ul, this).bgIframe({opacity:false});
})
.find(a)
.focus(function(){
$(ul, 
$(#navli:has(ul))).bgIframe({opacity:false});
});

/*  Subnavigation   */
$(ul#subnav)
.superfish({
animation : { opacity:show}
})
.find(li:has(ul))
.mouseover(function(){
$(ul, this).bgIframe({opacity:false});
})
.find(a)
.focus(function(){
$(ul, 
$(#subnavli:has(ul))).bgIframe({opacity:false});
});

/*  Kontrast*/
$(a.on).click(function(){
$(span).addClass(contrast);
});
$(a.off).click(function(){
   $(span).removeClass(contrast);
});
});


[jQuery] superfish - using different animations?

2007-11-16 Thread slooodge

Hi,
I am just starting with Jquery and I am stoked with it's
possibilities...
I question is the beautiful superfish plugin. Everythings works fine!
But I would like to use two different animation types for two
different menues that are on the same page.

I have attached my script below. Unfortunately the lastly declared
animation type overrides the first one.
I would really appreciate it if someone could help me out!

Thanks for the great work, Hannes



   $(document).ready(function(){
$(ul.nav)
.superfish({
animation : { height:show}
})
.find(li:has(ul)) /* .find(li[ul]) in jQuery less 
than v1.2*/
.mouseover(function(){
$(ul, this).bgIframe({opacity:false});
})
.find(a)
.focus(function(){
$(ul, 
$(.navli:has(ul))).bgIframe({opacity:false});
/* $(ul, 
$(.navli[ul])).bgIframe({opacity:false});
in jQuery less than v1.2*/
});


$(ul#subnav)
.superfish({
animation : { opacity:show}
})
.find(li:has(ul)) /* .find(li[ul]) in jQuery less 
than v1.2*/
.mouseover(function(){
$(ul, this).bgIframe({opacity:false});
})
.find(a)
.focus(function(){
$(ul, 
$(#supnavli:has(ul))).bgIframe({opacity:false});
/* $(ul, 
$(.navli[ul])).bgIframe({opacity:false});
in jQuery less than v1.2*/
});
});


[jQuery] Re: jquery cycle repositing of pager div according to each image height

2007-11-16 Thread Mike Alsup

Sounds like you need to use the before or after callbacks for this.
The pager is just and element like any other, so you should be able to
move it and size it dynamically as needed.

Mike


On Nov 15, 2007 6:27 AM, Doctorado 2005-2006 DUyOT UPM
[EMAIL PROTECTED] wrote:

 hi! i was trying without success to get the pager repositioned with
 each height of my image. I would like to get the pager always exactly
 on below where the image ends - for now I can only position de pager
 on a specific distance and it does not change with the different
 heights of my images - any suggestion? thanks a lot!



[jQuery] Re: AJAX form submission in CakePHP with jQuery Form Plugin?

2007-11-16 Thread Mike Alsup

You can use options with the form plugin.   This might get you going
in the right direction:

$('#addCommentForm').ajaxForm({
beforeSubmit: myValidationFn,
success:  mySuccessFn,
error: myErrorFn
});

function myValidationFn(formData, $form, opts) {
for (var i=0; i  formData.length; i++) {
if (!formData[i].value) {
alert('All fields are required!');
return false;
}
}
}

function mySuccessFn(data, status) {
// add response to comment list
$('#comments').append(data);
}

function myErrorFn(xhr, status, err) {
alert(Error submitting form:  + err);
}



On Nov 15, 2007 6:54 PM, Action [EMAIL PROTECTED] wrote:

 I was wondering if any of you jQuery + CakePHP users could help me out
 here...

 I have a blog-like page that contains a post, comments, and a new
 comment form. I want the new comment form to submit using ajax and
 have the newly added
 comment appear in the comments list.

 Currently, I'm using the jQuery Form Plugin to submit the form:
 http://www.malsup.com/jquery/form/.

 So far, the form submission works, but all that is happening is the
 data being saved. The view does not show any validation error messages
 defined in the model and does not show the new comment (I have to
 refresh the page to get the comment to show up and the validation
 error messages never show up).

 How can I fix this so the form not only submits using ajax, but the
 form data is also rendered in the view if saved, or the appropriate
 validation error messages appear?

 Thanks.



[jQuery] Select change event on item 1 not firing

2007-11-16 Thread ISSSSI


Hello,

I have the following  http://richmondshire.riverprojex.com/ page   the
select boxes are wired upto change event.  When user picks item the page
redirects. The issue is for some reason the first item does not trigger the
change event.  My code looks like this

$('#residentsSelect').change(function(){
 document.location.href=$('#residentsSelect option:selected').val();
 //have to do this to stop the post back which occurs
 return false;
});

Any ideas?
-- 
View this message in context: 
http://www.nabble.com/Select-change-event-on-item-1-not-firing-tf4822557s27240.html#a13796993
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jRails plugin: jQuery on Rails

2007-11-16 Thread Rey Bango


Hi Nick,

If Aaron took your design, I think it would be best to address it
directly with him as opposed to airing dirty laundry on a mailing list.

This isn't the place for it so please discuss this with him offline. I'm
sure you two can work this out without involving the whole jQuery list.

Thanks,

Rey Bango
jQuery Project Team

Nick Stakenburg wrote:

On 15 nov, 16:36, Aaron [EMAIL PROTECTED] wrote:

I still have work to do on the visual effects piece but it's a pretty solid 
release.


Instead of ripping my designs, you also need to work on your own
website.
Thanks.

http://www.nickstakenburg.com/projects/prototip

- Nick Stakenburg





[jQuery] Re: hiding checkbox AND label?

2007-11-16 Thread Karl Swedberg



SO CLOSE!  What I really need - is when the div collapses - is to HIDE
the unchecked items:


Isn't that what this does?
$(this).next('div:hidden').slideDown('fast').siblings('div:visible:not 
(:has(input:checked))').slideUp('fast');


It's showing the very next div, and then hiding any other sibling div  
that does not have a checked input.  I must be misunderstanding  
something. In the html snippet you provided, you had one checkbox per  
div.details and one div.details per h3. Will there be multiple  
checkboxes inside a div.details? Will there be multiple div.details  
following each h3? If so, that could change the equation.


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



On Nov 15, 2007, at 3:33 PM, Priest, James (NIH/NIEHS) [C] wrote:




-Original Message-
From: Karl Swedberg [mailto:[EMAIL PROTECTED]



$('div.demo-show:eq(0) ...

I doubt you'll need the :eq(0) part, and the demo-show
class was for a demo, so you can safely change that in the
HTML and match the change in the jQuery.


Yeah - I just wanted to keep it the same to make sure I wasn't messing
something up! :)


$(this).next('div:hidden').slideDown('fast').siblings('div:vis
ible:not(:has(input:checked))').slideUp('fast');


SO CLOSE!  What I really need - is when the div collapses - is to HIDE
the unchecked items:


Topics 1
0 item 1
0 item 2
0 item 3

Topics 2
Topics 3

So user selects




[jQuery] parser error on well-formed xml

2007-11-16 Thread tarini

i use this xml saved locally in projects.xml

?xml version=1.0 encoding=utf-8?
projects
project id=1
nameNome del progetto 1/name
noteNote del progetto 1/note
/project
project id=2
nameNome del progetto 2/name
noteNote del progetto 2/note
/project
/projects


it's well-formed but IE v7 show me a parser error...

onError : function(xhr, st, er) {
   //st = parsererror; er=undefined
   alert(ERRORE:\nstatus: +st+\nerror: +er);
}


[jQuery] .css(border-color) problem in FireFox

2007-11-16 Thread wellmoon

Hi,

I want to get the border-color of a div.  The following code works in
IE and alerts the color of the border:

$(#mydiv).each(function() {
  var borderColor = $(this).css(border-color);
  alert(borderColor);
});

In FireFox it just alerts 'undefined'

The border is set with CSS, not by javascript or jquery.  Am I doing
something worng or is this a bug?


[jQuery] Re: AJAX Response script is not executed

2007-11-16 Thread cjiang


Hi,

There might be one possibility that 1) you are using the latest JQuery
release, and 2) the return javascript is not in the root level
script tag (ie, you have someting like div (or
whatever) ...script Your javascript code /script... /div.  If
this is the case, due to JQuery's bug, the javascript won't be
evaluated. And you can solve this by put script as the root tag. Or
you use the latest Jquery code from the svn.

If this is not the case, I would like to see what exactly the repsone
look like.

Thanks,
Changsu


On Nov 15, 2:22 pm, Ufucuk [EMAIL PROTECTED] wrote:
 Hi;
 I use ajax for an application. I use JSON as data type and the
 response is something like;
 div id=\areaMan\ style=\display:none;\
 Messagebr /
 textarea/textarea
 /div
 a href=\javascript:void(0)\ id=\addNote\Not Ekle/a

 And Javascript is;

 $(#addNote).click(function () {
 $('#areaMan').show();

 });

 I execute this function when page is loaded, but ıt doesnt work for
 this response.
 What is wrong?


[jQuery] Re: hiding checkbox AND label?

2007-11-16 Thread trevorp

Jim,
  You started a new topic and abandoned your last one, not sure if
that was on purpose or not, but the code I pasted at the end of the
other topic seems to do exactly what you're asking for.  Like I said,
it's not necessarily elegant, but it does work.  I should have
probably copied your Topics 1, item 1, item 2 headings to make it more
meaningful, but I wrote it in a hurry, and forgot to go back and
change the words before I copied and pasted them in.

  For your reference, the other topic is located at:
http://groups.google.com/group/jquery-en/browse_thread/thread/f95d372a5bf258e0?hl=en

  Since I see you're a coldfusion programmer too, here's the cf code I
used to test this:

script
$(document).ready(
function() {
$('h3').click(function() {
$
(this).next().children('div').children(':checkbox').not(':checked').parent('div').toggle(fast);
})
});
/script

cfloop index=i from=1 to=#randRange(2,5)#
h3
Topics cfoutput#i#/cfoutput
/h3
div
cfloop index=j from=1 to=#randRange(2,5)#
div
input type=checkbox 
name=item_cfoutput#i#_#j#/cfoutput
item cfoutput#j#/cfoutputbr /
/div
/cfloop
/div
/cfloop

  Just copy and paste that into a page to test functionality.  The
only thing I omitted is the inclusion of your jquery library.

  -Trevor

On Nov 15, 3:36 pm, Priest, James (NIH/NIEHS) [C]
[EMAIL PROTECTED] wrote:
 Sorry - I hate Outlook...



   -Original Message-
   From: Karl Swedberg [mailto:[EMAIL PROTECTED]

   $('div.demo-show:eq(0) ...

   I doubt you'll need the :eq(0) part, and the demo-show
   class was for a demo, so you can safely change that in the
   HTML and match the change in the jQuery.

  Yeah - I just wanted to keep it the same to make sure I wasn't messing
  something up! :)

   $(this).next('div:hidden').slideDown('fast').siblings('div:vis
   ible:not(:has(input:checked))').slideUp('fast');

  SO CLOSE!  What I really need - is when the div collapses - is to HIDE
  the unchecked items:

 Topics 1
  0 item 1
  0 item 2
  0 item 3

  Topics 2
  Topics 3

  So user selects

  Topics 1
  x item 1
  0 item 2
  x item 3

  Topics 2
  Topics 3

 And then clicks Topics 2 they would see:

  Topics 1
  x item 1
  x item 3

  Topics 2
  0 item 1
  0 item 2
  0 item 3
  0 item 4

  Topics 3

 Hope that makes sense...  This is really close - I'm going to tinker
 with it a bit but would love to hear your input!

 Jim


[jQuery] QuickSearch plugin - triggering events

2007-11-16 Thread Sean O


Hi,


I'm trying to modify RikRIkRik Lomas' excellent QuickSearch plugin.  I
want to set up clickable links to remove all sorting, and to setup
predefined sorts (defined strings sent to the text input).

I can clear and fill in the text input box easily enough, of course.  But
that does nothing.  All sorting changes are tied to keypress events
(as-you-type updates a'la iTunes), and I can't determine how to trigger a
sort otherwise.  There is no clearly defined function (reSort(), e.g.) to
reference in the code.

Has anyone else worked with this plugin?


Thanks,
SEAN O
__
www.sean-o.com
-- 
View this message in context: 
http://www.nabble.com/QuickSearch-plugin---triggering-events-tf4822839s27240.html#a13798000
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: ColdFusion/jQuery Ajax Form Variables Question

2007-11-16 Thread Jack Killpatrick


Are you passing the value for co_name back to the server as a variable 
in the .load(url, data) statement?


Some things that you might find useful for form/CF/ajax interactions:

http://www.robgonda.com/blog/projects/ajaxcfc/

http://www.malsup.com/jquery/form/

- Jack


MikeyJ wrote:

Hi All,

I'm a relative newb when it comes to the Ajax concept so be
gentle. :-)  Let me tell you what I've got...
Main page with a dynamic select box that lists vendors. When I make a
selection I'm using

$(#vform).load(editvendor.cfm,{vid: $(this).val()});

to load a form into a div on the main page with it's fields populated
with the results of a query. Here's where it gets sketchy. When I want
to submit the form and run an update query that will return the
updated data back to the form I'm running into trouble.  Now, just as
a head's up in case it matters, I'm not actually doing a submit with
the form, I'm just using a regular html button and running the
jQuery .load method onclick of it.

I guess my question is: are form variables accessible to the page that
is being used in the jQuery .load method? When I try to refer to one
like I would in a normal CF form submission to do an update query,
#form.co_name#, it's telling me it's not defined. Maybe there's a
better way to do what I'm trying to do and I'm clueless?

Thx,
Mike

  





[jQuery] Re: hiding checkbox AND label?

2007-11-16 Thread Karl Swedberg

Hey Jim,

I think I'm beginning to understand what you're trying to do here.  
I'm a little slow. ;-)


When the user clicks on an h3, the following will happen:
1. all div.details with ALL checkboxes inside of them UNchecked will  
show all of their checkboxes (and labels)
2. all other unchecked checkboxes (excluding those in #1) will be be  
hidden
3. all checkboxes -- unchecked or checked, doesn't matter -- in the  
div.details immediately following the clicked h3 will be shown


Let me know if I'm still not getting it. Otherwise, enjoy:

$(document).ready(function() {
  $('div.topiclist h3').click(function() {
$(this).next().siblings('div.details').each(function() {
  var $this = $(this);
  var $children = $this.children();

  if ( !$this.find('input:checked').length ) {
$children.show();
  } else {
$children.not(':has(:checked)').hide();
  }
})
.end()
.children('div:hidden').slideDown('fast');
  });
});



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



On Nov 16, 2007, at 9:23 AM, Priest, James (NIH/NIEHS) [C] wrote:




-Original Message-
From: Karl Swedberg [mailto:[EMAIL PROTECTED]




Isn't that what this does?
$(this).next('div:hidden').slideDown('fast').siblings('div:vis
ible:not(:has(input:checked))').slideUp('fast');


This is getting closer:

$(this).next('div:hidden').slideDown('fast').siblings().find 
('input:chec

kbox').not(':checked').parent().hide();

But then it won't expand a .details with only unchecked items.

Jim




[jQuery] Re: Select box (selectedIndex) problems in Internet Explorer (ie) on refresh and back buttons

2007-11-16 Thread [EMAIL PROTECTED]

I use the plugin above to remove the options I don't want to see.
But when I remove them, I cache them in a variable attached to the
select object.  I then provide a new function called restoreOptions()
which uses the data in the cache variable to add the options back into
the select box.  So a summary, would go something like this:

1) Remove unneeded options from select box to match parent select box
value
2) Parent select box is changed
3) Restore all the options that were previously removed (they are in a
different order at this point, but that doesn't matter for my use).
4) Remove unneeded options from select box to match new parent select
box value
(repeat as necessary)

So, the goal is to be able to hide (remove) / show (add) options from/
to a select box.  We can't just use $().hide() b/c IE doesn't support
hiding an option element.

The above works just fine, unless you are in IE and hit refresh or
go to the next page and hit back.  IE reloads the page and DOM in
such a way that the selected index for the child select box is lost.
This is a serious situation since it can result in lost data in the
web application I am building.

The problem is caused because IE tries to reset the child element
based on the selectedIndex (instead of value).  But it does that after
it has reloaded the element (putting the options back in the select
box that were originally in the HTML source) but before the javascript
is run, which means that when it resets the selectedIndex, it resets
it to the wrong element.  Then, when the javascript is run, the
element that is selected (wrongly) gets removed by the JS, and the
value is then lost and the user must reset it.

There are two ways to work around this that I can see 1) use a hidden
input element to cache the value of the child select box, and then use
that to restore the option (I am using this solution); 2) use a cookie
to store the value of the child select box

Neither are good options IMO.  I would like to find a cleaner
solution.  I would like to find a way to keep the child element from
losing its value in IE using an unobtrusive and reliable solution.

Does that help?

On Nov 14, 4:15 pm, Flesler [EMAIL PROTECTED] wrote:
 You should explain HOW do you worked around hiding the option in IE.
 What do you need to do exactly?
 I had the opposite problem some time ago, I was all cursing Firefox,
 for not respecting the selected=selected on refreshes.
 You could force the selectedIndex to 0 (or something else) on start,
 or use a cookie to remember the last selected option and force it to
 be the selected one.
 If this is not enough.. then explain a bit what do you want IE to
 do..

 Ariel Flesler

 On 14 nov, 12:56, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  Anyone?  I could really use some insight into this problem.


[jQuery] Re: I need use bgIframe plugin with ClockPick puglin

2007-11-16 Thread Josh Nathanson


Hi Andres,

I don't see where you are calling ClockPick?

Also, you will probably need to apply bgIframe to ALL the classes of 
ClockPick, or else they will appear under the select menu.  They all start 
with CP, so probably the easiest way to do that would be like so:


$(div[class^=CP], div[id^=CP]).bgIframe();

Finally, since the divs are not added to the DOM until the plugin is 
executed, you may have to pass the bgIframe call as a callback to the 
ClockPick call, like so:


$(#inputelement).clockpick( options,  function() {
  $(div[class^=CP], div[id^=CP]).bgIframe();
   });

Let me know if that works for you, and I will add it to the ClockPick docs 
page so others can use the information in the future.  Or, if it's still not 
working please mention exactly what is not working.


-- Josh


- Original Message - 
From: [EMAIL PROTECTED] [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Friday, November 16, 2007 7:16 AM
Subject: [jQuery] Re: I need use bgIframe plugin with ClockPick puglin



hi Josh, thanks for your reply. I try to do that, but it didn´t work.
Here is how I put the code in the head:

script type=text/javascript src=../js/jquery-1.2.1.min.js/
script
script type=text/javascript src=../js/jquery.clockpick.1.1.js/
script

script type=text/javascript src=../js/date.js/script
script type=text/javascript src=../js/jquery.bgiframe.js/
script

script type=text/javascript src=../js/jquery.datePicker.js/
script
script type=text/javascript charset=utf-8
$(function()
{
$('.date-pick').datePicker({startDate:'01/01/1996'});
$(.CP).bgIframe();
});


/script

The datepicker is another plugin that I´m using.

Andres



On 15 nov, 19:06, Josh Nathanson [EMAIL PROTECTED] wrote:

Hi Andres,

Josh here, the ClockPick plugin creator...both the hour and minute 
container

have a class of CP, so you should be able to use bgIframe on that class
without changing the ClockPick plugin itself.

Somewhere after you include the ClockPick script, add this:

$(.CP).bgIframe();

Give that a try and see how it goes.

-- Josh

- Original Message -
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: jQuery (English) jquery-en@googlegroups.com
Sent: Thursday, November 15, 2007 12:26 PM
Subject: [jQuery] I need use bgIframe plugin with ClockPick puglin

Hi, I´m new. I want to use the bgIframe plugin with ClockPick puglin,
because I have a select near to the clockPick and when you make a
click and the clockpick expands the select is always first in Internet
Explorer. I made this change in the ClockPick.js but only fix the div
of the hours, not the div of minutes:

line 56 of version 1.1 so so

$hourcont = jQuery(div id='CP_hourcont' class='CP' /);
$hourcont.bgIframe();//this is my line
jQuery(body).append($hourcont);
binder($hourcont);

I hope you can help me and sorry for my bad english.

andres. 




[jQuery] Re: Find text in a list item, remove it and replace with an image tag.

2007-11-16 Thread Paul Collins

Sorry to take so long to get back Andy. I want to keep the strong tag
is it depicts a selected state on the navigation.

Basically, the image is positioned absolutely in the LI, the LI has a
fixed height which is half that of the image. If there is a strong tag
around the image, it shifts up 50%, showing a selected state.

I hope that makes sense, that's why I would only want it sometimes. If
you want me to post more code up, let me know.

Thanks

On 15/11/2007, Andy Matthews [EMAIL PROTECTED] wrote:

 Why would you want to keep the bold tag if it's just going to be wrapped
 around an image?

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of desmond
 Sent: Thursday, November 15, 2007 1:00 PM
 To: jQuery (English)
 Subject: [jQuery] Find text in a list item, remove it and replace with an
 image tag.


 Hi all,

 I am a bit stuck here, I've been looking around, but can't seem to find what
 I'm after. I am fairly new to Jquery and Javascript, so not sure exactly
 what to look for. Basically I have the following HTML:

 div id=topNavigation
 ul class=firstLevel
 li class=homea
 href=/index.phpstrongHome/strong/a/li
 li class=developmenta href=/front-end-
 development.phpDevelopment/a/li
 /ul
 /div

 I want to use Jquery to go through each list item, delete the text inside
 the href (not the strong tag though, if there is one), then add an image tag
 in it's place (whilst retaining the strong tag around the image if it's
 there). So the generated code would look like this:

 div id=topNavigation
 ul class=firstLevel
 li class=homea href=/index.phpstrongimg
 src=/images/ topNavHome.gif alt=Home//strong/a/li
 li class=developmenta
 href=/front-end-development.phpimg
 src=/images/topNavDevelopment.gif alt=Development//a/li
 /ul
 /div

 Now, I'm not sure if we can come up with a clever loop that uses the text to
 create the image name and alt tag? There are only 5 fixed links in the full
 version, so I can do manually if need be.

 I've been trying to use the wrap/prepend/append methods described here
 http://docs.jquery.com/Tutorials:Rounded_Corners, but really I need to strip
 the text and replace it with the image tag. Also, there is a strong tag
 inside the HREF sometimes to show a selected link. I need to keep that there
 and have the image tag inside it.

 I don't expect anyone to write the code for me, but if you can just send me
 some links or point me in the direction of tutorials where I can learn from,
 that would be great.

 Thanks
 Paul





[jQuery] Re: jCarousel - IE6 issue, carousel overlapping a nested nav

2007-11-16 Thread Josh V

anybody?

On Nov 14, 10:57 am, Josh V [EMAIL PROTECTED] wrote:
 Hi,

 Please check out the following url where im using jcarousel to act as
 an image slideshow. to the left of the clip container i have a nested
 navigation list that is showing underneath the clip container in IE6.
 the nested navigation toggles on above the clip container just fine in
 other modern browsers but i can't seem to figure out why its acting up
 in IE6.

 when the page loads in IE6, i can see that the navigation appears
 before the clip container appears. but in firefox the clip container
 loads first then everything else. any ideas? Is this an issue with
 document ready or window ready? I have also tried to set the z-index
 of the navigation above that of the clip container, but its not fixing
 the issue. Thanks for your time.

 newwinter.tnvacation.com


[jQuery] Re: Displaying same input box

2007-11-16 Thread Merlin

Hello Adrian,

I tried your code but on click of the button there is absolutly
nothing happening?! I also tried to locate the potential error, but my
JQuery knowledge is limited so far.

Regards,

Merlin

On Oct 26, 1:30 pm, Adrian Lynch [EMAIL PROTECTED] wrote:
 How about creating the form once and moving it to where ever it's
 needed. Something like this:

 script type=text/javascript

 var replyForm = $('div id=replyForm/div');

 $(document).ready(function() {

 replyForm.append($('textarea id=replyText/textarea'));
 replyForm.append($('input type=button value=SAVE
 id=saveReply / OR input type=button value=CANCEL
 id=cancelReply /'));

 $(.reply).click(showReplyForm);

 // We haven't injected the form into the DOM yet so we give a
 reference to where out form is
 $(#cancelReply, replyForm).click(cancelReply);
 $(#saveReply, replyForm).click(saveReply);

 });

 function showReplyForm() {

 var buttonPressed = $(this)

 // Show any that might be hidding, they'll usually be one
 $(.reply).show();

 // Get the text from the message. There's bound to be a 
 better way
 to do this!
 var messageText =
 buttonPressed.parent().find(.messageText).text();

 $(#replyText, replyForm).text(messageText);

 replyForm.insertAfter(buttonPressed);

 replyForm.show();

 buttonPressed.hide();

 }

 function cancelReply() {
 $(replyForm).hide();
 $(.reply).show();
 }

 function saveReply() {
 alert(Saving...);
 }

 /script

 div class=message
 div class=messageTextThis is message one/div
 button class=replyReply to message 1/button
 /div

 div class=message
 div class=messageTextThis is message two/div
 button class=replyReply to message 2/button
 /div

 Any good?

 Adrian

 On Oct 26, 7:53 am,Merlin[EMAIL PROTECTED] wrote:

  Hello everybody,

  I am new to jquery and do currently try to add a reply field to each
  of many user comments under a picture.

  Therefore I have create a function in jquery that displays a html form
  with a save and cancel button.
  My goal is now to show this form whenever someone clicks on one of the
  many reply buttons. Somehow I have a problem with the object and the
  code does not work. I hope to get a bit starting help inside this
  group. Thank you for any help.

  Here is the code:

  html
head
  script src=/app_global/jquery-1.2.1.pack.js type=text/
  javascript/script
  script type=text/javascript
  $(document).ready(function() {
$('#slickbox').hide();

$('a#reply-box').click(function() {
  var textarea = 'divtextarea rows=4 
  cols=60'+$(this).html()
  +'/textarea';
  var button   = 'divinput type=button 
  value=SAVE
  class=saveButton / OR input type=button value=CANCEL
  class=cancelButton //div/div';
  var revert = $(obj).html();
  $(obj).after(textarea+button).remove();
  $('.saveButton').click(function(){saveChanges(this, 
  false, i);});
  
  $('.cancelButton').click(function(){saveChanges(this, revert,
  i);});
});

$('a#slick-down').click(function() {
  $('#slickbox').toggle('slow');
  return false;
});

  });

  /script
/head
body
  a href=# id=slick-downShow test div/abr
  div id=slickboxpShow div/div
  Text underneathbr
  a href=# id=reply-boxReply/abr
  Comment text 1br
  a href=# id=reply-boxReply/abr
  Comment text 2br
/body
/html

  Best regards,

 Merlin


[jQuery] Re: Delibarately create ajax errors from PHP script

2007-11-16 Thread Irfan

I know that you can use JSON or XML for the Ajax response section but
somehow I had not thought of using JSON
for this error checking part.

Thanks for the answers.

Have a nice day


On Nov 15, 4:13 pm, Eric Martin [EMAIL PROTECTED] wrote:
 You could force your PHP to respond with an error header, but I
 personally don't think that is a very good practice.

 What I've done in the past is have the PHP script return a JSON
 response that would look something like:

 In the case of no validation errors:
 {'valid':'true'}

 In the case of validation errors:
 {'valid':'false', 'error_msg': 'your validation errors here'}

 Then you'd have:

 $.ajax({
 type: POST,
 url: script.php,
 dataType: 'json',
 data: {
 ...
 },
 success:
 function(t) {
 if (t.valid) {
  show the result of successful ajax call
 }
 else {
  show the result of t.error_msg
 }
 },
 error:
 function() {
  show the result of a failure : server timeout
 etc.
 }

 });
 }

 Just an idea ;)

 -Eric

 On Nov 14, 11:53 pm,Irfan[EMAIL PROTECTED] wrote:

  Sorry if this has been posted before but I searched the group and
  could not find a clue.
  I have a problem which I believe has a simple solution but could not
  come up with a good way.

  While using Jquery with PHP, I want error checking to be implemented
  on the server side - with PHP. As it's much safer and also easier for
  me. All of the articles/tutorials I've seen about Jquery uses client
  side Javascript.

  Whilst I have no  problems doing this with PHP , if the server side
  validation fails [ex: missing a required field or an out of range
  value in a form etc] I would like the results of this to be printed as
  a result of errror: section.

  A typical ajax request is :

  $.ajax({
  type: POST,
  url: script.php,
  data: {
  ...
  },
  success:
  function(t) {
   show the result of successful ajax call
  },
  error:
  function() {
   show the result of a failure : server timeout etc.
  }

  });
  }

  If the validation fails I would like to output the error messages as a
  result of the error: section because on the success part I usually
  hide/fadeout the form elements. But as the PHP script has been
  completed successfully output of the php falls to success section

  I try to overcome this problem by attaching another event to the
  output of script, ie: document.ready.function( .
  but this is really cumbersome.

  I would highly appreciate other people's solutions, ideas on this
  subejct

 Irfan


[jQuery] Re: hiding checkbox AND label?

2007-11-16 Thread Priest, James (NIH/NIEHS) [C]

 -Original Message-
 From: Priest, James (NIH/NIEHS) [C] 

 Last question - would it be possible to have it collapse the 
 checkboxes
 both when you click on the parent H3 or any other H3 (as it does now)?
 That may not be possible but what do I know :)  I'm going to show this
 as it is now which may be good enough...

Actually I'm tinkering with Karl's latest example with a greater data
set (eventually there may be 100 checkboxes in each topic) - and the
only problem is that Topics with NO checked items don't collapse... I
had this sort of working with my attempt at hacking your show/hide
accordian code (from learningjquery.com) but I'm stuck at the point
where I collapse things and hide the unchecked items... hence my color
change experiment below...

script type=text/javascript
// scrollTo: function will scroll the page back to the top when
a user collapses a div near the bottom of the page
$.fn.extend({
scrollTo : function(speed, easing) {
return this.each(function() {
var targetOffset = $(this).offset();
$('html').animate({scrollTop: targetOffset},
speed, easing);
});
}
});

$(document).ready(function() {
// toggle the visibility of each topic when another is selected
$('div.topiclist h3').click(function() {
// call custom function to scroll up
$(this).scrollTo();
// switch graphic indicator
 
$(this).removeClass('right').addClass('down').siblings('h3').removeClass
('down').addClass('right');
// hide unchecked items (for testing  those are red)
$(this).next('div:hidden').slideDown('fast').siblings('div:visible:not(:
has(input:checked))').slideUp('fast').siblings().find('input:checkbox').
not(':checked').parent().css('color', 'red');
/script

I'm trying to write this out so it makes sense (for you and me) :)

---
1) When the page initially loads - the topics list is collapsed with
only the first topic expanded showing the list of unchecked items (this
assumes ALL checkboxes are unchecked initially).

Topic 1
0 item 1
0 item 2
Topic 2
Topic 3
---
2) User then selects Topic 2

Topic 1
Topic 2
0 item 1
0 item 2
Topic 3
---
3) User checks item 2 - then selects Topic 3

Topic 1
Topic 2
x item 2
Topic 3
0 item 1
0 item 2
---
4) User selects Topic 1

Topic 1
0 item 1
0 item 2
Topic 2
x item 2
Topic 3
---
5) User checks item 1  2 then selects Topic 2

Topic 1
x item 1
x item 2
Topic 2
0 item 1
x item 2
Topic 3
---

Does that even remotely make sense

Jim



[jQuery] Re: hiding checkbox AND label?

2007-11-16 Thread Priest, James (NIH/NIEHS) [C]

 -Original Message-
 From: trevorp [mailto:[EMAIL PROTECTED] 

   You started a new topic and abandoned your last one, not sure if
 that was on purpose or not, but the code I pasted at the end of the

Unintentional - it was an Outlook glitch on my part!

   For your reference, the other topic is located at:
 http://groups.google.com/group/jquery-en/browse_thread/thread/
 f95d372a5bf258e0?hl=en

   Just copy and paste that into a page to test functionality.  The
 only thing I omitted is the inclusion of your jquery library.

Trevor - I think I tried this a bit and then changed my inputs to use
labels and then ran into issues and then got sidetracked trying to use
Karls show/hide examples on learningjquery.com... :(

I just changed my code around and got your example working too!  It is a
bit simpler functionality compared to the one Karl has been helping me
with but it DOES work!  I'll keep this one as 'Example Two' when I show
it!  

Thanks!
Jim


[jQuery] Re: hiding checkbox AND label?

2007-11-16 Thread Priest, James (NIH/NIEHS) [C]

 -Original Message-
 From: Karl Swedberg [mailto:[EMAIL PROTECTED] 
 Sent: Friday, November 16, 2007 12:31 PM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Re: hiding checkbox AND label?

 I think I'm beginning to understand what you're trying to do 
 here. I'm a little slow. ;-)
 
 When the user clicks on an h3, the following will happen:
 1. all div.details with ALL checkboxes inside of them 
 UNchecked will show all of their checkboxes (and labels)
 2. all other unchecked checkboxes (excluding those in #1) 
 will be be hidden
 3. all checkboxes -- unchecked or checked, doesn't matter -- 
 in the div.details immediately following the clicked h3 will be shown
 
 Let me know if I'm still not getting it. Otherwise, enjoy:


Karl - you are NOT slow - I'm just doing a terrible job at describing
things! :)

This is REALLY close.  I'm going over your code -  I *knew* it would
need to loop over an if/else just didn't know how! :) I'm going to have
to tinker with your code to see what it's doing exactly :) :)

Last question - would it be possible to have it collapse the checkboxes
both when you click on the parent H3 or any other H3 (as it does now)?
That may not be possible but what do I know :)  I'm going to show this
as it is now which may be good enough...

Thanks so much for this!  Now I'm off to the docs to see what all this
is doing... I saw .end() in the docs but couldn't figure out how you'd
use that and I see you used it here... :)

Jim


[jQuery] Thickbox opens off screen in IE7 - must fix, site already launched!

2007-11-16 Thread MichaelEvangelista


Here is the site
www.inkedpress.com

Type your name in the text box and click submit.
Then click any of the thumbnails to pick a letter
you should see a thickbox popup with a set of thumbnails and some buttons.

The broken version looks like this
http://mredesign.com/downloads/mephotos/iP-thickbox-error.jpg
with the bottom of the modal window being cut off.

I am going to move the buttons up, and try to adjust what I can using the 
current size and layout,

but would really like to get it centering correctly in all browsers!

This is being verified as consistently broken in IE7,
on both Vista and XP systems ... though apparently *not in all*IE7 systems,
which makes it hard to track down.

Any help is *greatly* appreciated, as the site is live and otherwise fully 
functional.



--

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com





[jQuery] Re: hiding checkbox AND label?

2007-11-16 Thread Priest, James (NIH/NIEHS) [C]

 -Original Message-
 From: Karl Swedberg [mailto:[EMAIL PROTECTED] 

 It's showing the very next div, and then hiding any other 
 sibling div that does not have a checked input.  I must be 
 misunderstanding something. In the html snippet you provided, 
 you had one checkbox per div.details and one div.details per 
 h3. Will there be multiple checkboxes inside a div.details? 
 Will there be multiple div.details following each h3? If so, 
 that could change the equation.

Karl - sorry the example HTML wasn't clear - it's ColdFusion and is
dynamically generating the list...  So yes - I'll have only ONE H3 per
.details, and then MULTIPLE checkboxes per .details!!

It DOES work in that it won't collapse if there is a checkbox checked.
I just need to hide the unchecked ones.  Then I'm thinking I could add
an element at the bottom of the list that says Show unchecked items or
something... or maybe a global 'show all' which I sort of have working
already.

Here is an example of the actual rendered HTML from ColdFusion:
===
div class=topiclist
h3 class=rightDisease or Condition/h3
div class=details
div
label class=label for=topic_1input
type=checkbox value=1 name=topic_1 id=topic_1
Acute lung injury/label/div
div
label class=label for=topic_2input
type=checkbox value=2 name=topic_2 id=topic_2
ADHD/label/div
div
label class=label for=topic_3input
type=checkbox value=3 name=topic_3 id=topic_3
Agricultural workers' diseases/label/div
/div
h3 class=rightMajor Scientific Discipline/h3
div class=details
div
label class=label for=topic_59input
type=checkbox value=59 name=topic_59 id=topic_59
Applied mathematics/label/div
div
label class=label for=topic_60input
type=checkbox value=60 name=topic_60 id=topic_60
Biochemistry/label/div
div
label class=label for=topic_61input
type=checkbox value=61 name=topic_61 id=topic_61
Biophysics/label/div
/div
/div 

Thanks so much for the assistance!!!

Jim


[jQuery] Re: Thickbox opens off screen in IE7 - must fix, site already launched!

2007-11-16 Thread Jeffrey Kretz

Just tested it in IE7 and the thickbox popup on your page was centered for
me.

Where it was breaking, does the size of the browser window affect it?

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of MichaelEvangelista
Sent: Friday, November 16, 2007 10:07 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Thickbox opens off screen in IE7 - must fix, site already
launched!


Here is the site
www.inkedpress.com

Type your name in the text box and click submit.
Then click any of the thumbnails to pick a letter
you should see a thickbox popup with a set of thumbnails and some buttons.

The broken version looks like this
http://mredesign.com/downloads/mephotos/iP-thickbox-error.jpg
with the bottom of the modal window being cut off.

I am going to move the buttons up, and try to adjust what I can using the 
current size and layout,
but would really like to get it centering correctly in all browsers!

This is being verified as consistently broken in IE7,
on both Vista and XP systems ... though apparently *not in all*IE7 systems,
which makes it hard to track down.

Any help is *greatly* appreciated, as the site is live and otherwise fully 
functional.


-- 

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com






[jQuery] Performing actions at specific times of day, or at random?

2007-11-16 Thread zarino

Hi there!

I'd like to load a different css stylesheet depending on the time of
day. If it's 6am-12noon, it'll be one sheet. If it's 12noon-6pm it'll
be another. And 6pm-6am, it'll be a third.

I'm sure there must be an easy way of getting jQuery to take the
browser's time and date, check which time range it falls within, and
summon up the correct stylesheet (or simply add a class to the body
tag, to which I'll hook css rules).

Similarly, how would I get it to choose a stylesheet at random, from
the list of three possibilities?

Many thanks,
Zarino Zappia


[jQuery] Selector Not Working in IE7?

2007-11-16 Thread Rob Wilkerson

I'm trying to manually interact with the multifile plugin and, as
part of that endeavor, I need to systemically access the anchor tag
that provides Delete functionality.  The following works great in FF
(of course):

$('a[href^=#multimulti_]')

The objects are returned as expected and alert ( $
('a[href^=#multimulti_]').length ) returns the expected number of
elements.  In IE7, though, the former value is undefined and the
latter is 0.  Anyone have any idea why this might be happening?

A high level end-to-end process looks like this:

1.  User selects a file to upload
2.  File is uploaded via the ajax file upload plugin and validated
3.  If an error is thrown (dimensions incorrect, file size too large,
etc.), the error is displayed and the delete link is triggered so that
the file is removed from the display.

Any insight would be much appreciated.  I don't see any indication in
the jQuery docs that this type of selector shouldn't work in IE...

Thanks.

Rob


[jQuery] Re: Close/hide div on click outside

2007-11-16 Thread Codex

Ok, I see how this is working, but... if you click on the target div
it triggers the close also. Is there a way to 'tell' the target that
when it's open, all underlying divs are disabled?

On 16 nov, 10:29, Feijó [EMAIL PROTECTED] wrote:
 Can you provide an code of your attempt?

 It may be simple, or not.  Depend on your page.

 You could set a master div, then just bind a click event on it to hide the
 target div

 div id=master
 div id=target
 target content
 /div
 master content
 /div

 script
 $('#master).click(function() {
   $('#target).fadeOut('slow');});

 /script

 Feijó

 - Original Message -
 From: Codex [EMAIL PROTECTED]
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Friday, November 16, 2007 2:45 AM
 Subject: [jQuery] Close/hide div on click outside

  I've searched the posts and the web but I can't find a clear answer/
  solution. I hope someone can answer this one:

  I want to hide a div when there's a click anywhere outside of the div.
  How would one do this?

  Gav


[jQuery] news rotator - looking for some help in cleaning up my code

2007-11-16 Thread sperks

I've got my code working (adapted of Karl Swedberg's Scroll Up News
Reader) http://docs.jquery.com/Tutorials:Scroll_Up_Headline_Reader,
but I'm sure there's a cleaner (more dynamic) way of checking where I
am in the loop so that I don't have to do all the individual click
checks
$(#topStoryButtons li a:eq(0)).click(function() {
$(#topStoryButtons li a:eq(1)).click(function() {
$(#topStoryButtons li a:eq(2)).click(function() {
$(#topStoryButtons li a:eq(3)).click(function() {

I think I'm just looking for a way to capture the instance of the link
I'm clicking and pass that variable on. Any help appreciated - Steve

/*
 * rotator
 * */

var headline_count;
var headline_interval;
var old_headline = 0;
var current_headline = 0;

$(document).ready(function(){
$(div#topStories #topStoryButtons).addClass(active);
headline_count = $(div.topStoryItem).size();
$(div.topStoryItem:eq(+current_headline+)).css('left','0');
$(#topStoryButtons li a:eq(+current_headline
+)).addClass('activeControls');

headline_interval = setInterval(headline_rotate,7000); //time in
milliseconds

$(#topStoryButtons li a:eq(0)).click(function() {
selected_headline = 0;
$(div.topStoryItem:eq( + current_headline + 
)).animate({left:
-622},slow, function() {
$(this).css('left','622px');
});
$(#topStoryButtons li a:eq( + current_headline +
)).removeClass('activeControls');
$(#topStoryButtons li a:eq(0)).addClass('activeControls');
$(div.topStoryItem:eq(0)).show().animate({left: 0},slow);
current_headline = selected_headline;
clearInterval(headline_interval);
return false;
});
$(#topStoryButtons li a:eq(1)).click(function() {
selected_headline = 1;
$(div.topStoryItem:eq( + current_headline + 
)).animate({left:
-622},slow, function() {
$(this).css('left','622px');
});
$(#topStoryButtons li a:eq( + current_headline +
)).removeClass('activeControls');
$(#topStoryButtons li a:eq(1)).addClass('activeControls');
$(div.topStoryItem:eq(1)).show().animate({left: 0},slow);
current_headline = selected_headline;
clearInterval(headline_interval);
return false;
});
$(#topStoryButtons li a:eq(2)).click(function() {
selected_headline = 2;
$(div.topStoryItem:eq( + current_headline + 
)).animate({left:
-622},slow, function() {
$(this).css('left','622px');
});
$(#topStoryButtons li a:eq( + current_headline +
)).removeClass('activeControls');
$(#topStoryButtons li a:eq(2)).addClass('activeControls');
$(div.topStoryItem:eq(2)).show().animate({left: 0},slow);
current_headline = selected_headline;
clearInterval(headline_interval);
return false;
});
$(#topStoryButtons li a:eq(3)).click(function() {
selected_headline = 3;
$(div.topStoryItem:eq( + current_headline + 
)).animate({left:
-622},slow, function() {
$(this).css('left','622px');
});
$(#topStoryButtons li a:eq( + current_headline +
)).removeClass('activeControls');
$(#topStoryButtons li a:eq(3)).addClass('activeControls');
$(div.topStoryItem:eq(3)).show().animate({left: 0},slow);
current_headline = selected_headline;
clearInterval(headline_interval);
return false;
});
});

function headline_rotate() {
current_headline = (old_headline + 1) % headline_count;
$(div.topStoryItem:eq( + old_headline + )).animate({left:
-622},slow, function() {
$(this).css('left','622px');
});
$(#topStoryButtons li a:eq( + old_headline +
)).removeClass('activeControls');
$(#topStoryButtons li a:eq( + current_headline +
)).addClass('activeControls');
$(div.topStoryItem:eq( + current_headline +
)).show().animate({left: 0},slow);
old_headline = current_headline;
}


[jQuery] Re: .css(border-color) problem in FireFox

2007-11-16 Thread Kevin Scholl

borderColor is a reserved word, so it shouldn't be used as a
variable name. Try using something else, maybe bColor or something
like that. Also, you might want to replace css(border-color) with
css(borderColor) for consistency.

$(#mydiv).each(function() {
  var bColor = $(this).css(borderColor);
  alert(bColor);

HTH

On Nov 16, 9:32 am, wellmoon [EMAIL PROTECTED] wrote:
 Hi,

 I want to get the border-color of a div.  The following code works in
 IE and alerts the color of the border:

 $(#mydiv).each(function() {
   var borderColor = $(this).css(border-color);
   alert(borderColor);

 });

 In FireFox it just alerts 'undefined'

 The border is set with CSS, not by javascript or jquery.  Am I doing
 something worng or is this a bug?


[jQuery] Re: thickbox IE7 position

2007-11-16 Thread MichaelEvangelista

{bump}

any further thoughts on this? Still fumbling for a cure...



On Nov 6, 4:59 pm, MichaelEvangelista [EMAIL PROTECTED] wrote:
 I am using a thickbox modal window to show an ajax routine on an ecommerce
 site.
 Everything's working great, except in IE7 where the thickbox is aligning to
 the bottom of the page, rather than centering vertically.
 (When the page is longer than the viewer's browser window,this results in
 part of the window being below the viewable area, with no way to scroll or
 otherwise get to the crucial select/cancel buttons that allow the user to
 continue from that point.)

 Is this a common thickbox issue, and if so, is there a sure-fire fix?
 Everything is fine in IE6 and in Firefox.
 I've seen other posts with the same problem, but none of the suggested fixes
 are fixing my page.

 If this isn't a stock 'the fix is abc' situation, I will post an example
 link
 (for now I'd rather keep the site from the spiders until its a bit further
 along)

 Any suggestions greatly appreciated.
 I did spend some time googling about the issue, but found more questions
 than answers.

 tia

 --

 --
 Michael Evangelista, Evangelista Design
 Web :www.mredesign.com
 Newsgroups: news://forums.mredesign.com
 Blog :www.miuaiga.com


[jQuery] Re: Close/hide div on click outside

2007-11-16 Thread Feijó

Can you provide an code of your attempt?

It may be simple, or not.  Depend on your page.

You could set a master div, then just bind a click event on it to hide the 
target div

div id=master
div id=target
target content
/div
master content
/div

script
$('#master).click(function() {
  $('#target).fadeOut('slow');
});
/script


Feijó


- Original Message - 
From: Codex [EMAIL PROTECTED]
To: jQuery (English) jquery-en@googlegroups.com
Sent: Friday, November 16, 2007 2:45 AM
Subject: [jQuery] Close/hide div on click outside



 I've searched the posts and the web but I can't find a clear answer/
 solution. I hope someone can answer this one:

 I want to hide a div when there's a click anywhere outside of the div.
 How would one do this?

 Gav
 



[jQuery] ajax load and javascript

2007-11-16 Thread george.gsgd

I'm loading the content of an external page via load but I don't want
the script content, as it buggers up ie6 (it's a page with jquery
included and that seems to cause problems).

Is it possible to tell load not to run scripts on the HTML it loads?

Thanks,
George.


[jQuery] Re: hiding checkbox AND label?

2007-11-16 Thread Priest, James (NIH/NIEHS) [C]

 -Original Message-
 From: Karl Swedberg [mailto:[EMAIL PROTECTED] 


 Isn't that what this does?
 $(this).next('div:hidden').slideDown('fast').siblings('div:vis
 ible:not(:has(input:checked))').slideUp('fast');

This is getting closer:

$(this).next('div:hidden').slideDown('fast').siblings().find('input:chec
kbox').not(':checked').parent().hide(); 

But then it won't expand a .details with only unchecked items.

Jim


[jQuery] Target secon

2007-11-16 Thread skube

I have a simple problem, but for some reason I can't figure out the
jQuery way to do it. Basically, all I want is to target every child
(except the first one) of a group of elements.

Say, for example, one has multiple divs:
div class=myDiv
  pFirst/p
  pSecond/p
  pThird/p
/div
div class=myDiv
  pFirst/p
  pSecond/p
  pThird/p
/div

And say, I want to hide every p except the first one of every div:
div class=myDiv
  pFirst/p
/div
div class=myDiv
  pFirst/p
/div

I thought I could simply:
$('div.myDiv p').not(':first').hide();

But that only acts on the first div  and not all of them resulting
in:
div class=myDiv
  pFirst/p
/div
div class=myDiv
  pFirst/p
  pSecond/p
  pThird/p
/div

So I thought I have to act on each div:
$('div.myDiv').each(function(){
 $('p').not(':first').hide();
})

But that only acts on the first div as well. I know it's something
fundamental I missing, but for the life of me can't see it...




[jQuery] Re: Target secon

2007-11-16 Thread skube

I figured out the following works:

$('div.myDiv').each(function(){
  $(this).children('p').not(':first').hide();
})

However it still seems like there must be a better way. Anyone?


[jQuery] How to control order of events or wait until something is loaded?

2007-11-16 Thread dougXN

So this isn't specific to validate, but it seems to be the one that
for what ever reason causes me pain.

I usually try not to load the same javascript over and over so I do
something like this:

if (typeof(writeLog) == 'undefined') {
$.getScript(/javascript/mystuff/logger.js);
}

This happens after I make sure jquery is loaded.

But when I do this with validate(???), it takes longer to load for
some reason and the next script starts loading and executing and I get
a bunch of undefined errors:

load jquery

script type=text/javascript
if (typeof( $ ) == 'undefined') {
var head = document.getElementsByTagName(head)[0];
script = document.createElement('script');
script.id = 'jquery-1.2.js';
script.type = 'text/javascript';
script.src = '/javascript/jquery/jquery-1.2.js';
head.appendChild(script);
}
/script

script type=text/javascript
if (typeof($.validator) == 'undefined')
$.getScript(
/javascript/jquery/jquery.validate.js,
function() { alert(jquery.validate script loaded and
executed.); }
);
/script

script type=text/javascript
$.validator.setDefaults({ submitHandler: function()
{ alert(submitted!); } });
.


If I forget about checking if it is loaded and replace the check with
a direct script load:

script src=/javascript/jquery/jquery.validate.js type=text/
javascript/script

then everything is fine.


Anyone know what the best way to get around this issue?

thanks
dn


[jQuery] Re: .css(border-color) problem in FireFox

2007-11-16 Thread Dave Methvin

 I want to get the border-color of a div.

The border-color property is most useful for setting all the border
sides at once. When getting the colors it's more complicated. Which
side of the div do you want to examine: top, right, bottom, or left?
Each can be a different color. If they were different colors, what
would you want border-color to return--and would all the browsers meet
your expectation?

If you know for sure that all the sides are the same color, just pick
a side; you could use border-left-color. However, I'm not sure all
browsers return a valid result unless border-left-style is something
other than 'none' so you may need to check for that first if you're
not sure the element has a border. I know that Opera used to return
width -1 for borders that had style set to 'none', which was a pain.



[jQuery] jQuery Ajax throws parseerror in IE

2007-11-16 Thread 1Marc

When using jQuery Ajax, I am receiving a parseerror in IE (Firefox 
Safari work).  Has anyone run into this before - and know how to fix
it?  Or something I can at least try.

CODE 

object = {
   path : 'data.xml',
   data : 'lat=40.935lng=-125.000'
}

$.ajax({
   url: object.path,
   data: object.data,
   type: 'GET',
   dataType: 'xml',
   timeout: 1000,
   error: function(XMLHttpRequest, textStatus, errorThrown) {
   alert('Error loading data: ' + textStatus);
   },
   success: function(xml){
...
   }
});

OUTPUT  'Error loading data: parseerror'


[jQuery] Re: limit to only jpeg when file upload

2007-11-16 Thread dfgonzalez

This works fine, except for the toLowerCase() function thar throws an
error, if you remove that it's just fine.

On Oct 31, 7:11 pm, Erik Beeson [EMAIL PROTECTED] wrote:
 Untested:

 form method=POST action=...
 input id=file name=file  type=file
 /form

 $('form').bind('submit', function() {
   var ext = $('#file').val().split('.').slice(-1).toLowerCase();
   if(ext != 'jpg'  ext != 'jpeg') {
 alert('JPEG Only');
 return false;
   }

 });

 --Erik

 On 10/31/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



  so where to attach the code? in the onClick of submit button?

  On Nov 1, 12:04 am, Giovanni Battista Lenoci [EMAIL PROTECTED]
  wrote:
   [EMAIL PROTECTED] ha scritto: Hi,

I'm using this to upload file:

input id=file name=file  type=file

It works very well, now I'd like to find a way to check only jpeg
files are uploaded, any way to do this in jQuery? Thanks.

A.C.

   I think the only thing you can do client-side is to check the extension.

   $pieces = $('#file')[0].value.split('.');
   $extension = $pieces[$pieces.length-1].toLowerCase();
   if($extension == 'jpg' || $extension == 'jpeg') {
 alert('accepted');

   }


[jQuery] Re: Thickbox opens off screen in IE7 - must fix, site already launched!

2007-11-16 Thread MichaelEvangelista



Where it was breaking, does the size of the browser window affect it?


Yes definitely.
Smaller browser windows get it off-screen.
With a larger monitor at full screen the window is not exactly centered, but 
not so far south as to be out of visibility at the bottom.


--

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com


Jeffrey Kretz [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]


Just tested it in IE7 and the thickbox popup on your page was centered for
me.

Where it was breaking, does the size of the browser window affect it?

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of MichaelEvangelista
Sent: Friday, November 16, 2007 10:07 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Thickbox opens off screen in IE7 - must fix, site 
already

launched!


Here is the site
www.inkedpress.com

Type your name in the text box and click submit.
Then click any of the thumbnails to pick a letter
you should see a thickbox popup with a set of thumbnails and some buttons.

The broken version looks like this
http://mredesign.com/downloads/mephotos/iP-thickbox-error.jpg
with the bottom of the modal window being cut off.

I am going to move the buttons up, and try to adjust what I can using the
current size and layout,
but would really like to get it centering correctly in all browsers!

This is being verified as consistently broken in IE7,
on both Vista and XP systems ... though apparently *not in all*IE7 
systems,

which makes it hard to track down.

Any help is *greatly* appreciated, as the site is live and otherwise fully
functional.


--

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com










[jQuery] Re: Target secon

2007-11-16 Thread Wizzud

Try...
$('div.myDiv p:not(:first-child)').hide();

On Nov 16, 9:17 pm, skube [EMAIL PROTECTED] wrote:
 I figured out the following works:

 $('div.myDiv').each(function(){
   $(this).children('p').not(':first').hide();

 })

 However it still seems like there must be a better way. Anyone?


[jQuery] Re: Target secon

2007-11-16 Thread skube

Nope, that results in all of the p's being hidden in the first
div:
div class=myDiv
/div
div class=myDiv
  pFirst/p
/div


[jQuery] Re: Close/hide div on click outside

2007-11-16 Thread Wizzud

$('#master).click(function(e) {
(e.target  e.target.id == 'target') || $
('#target).fadeOut('slow');
return false;
  });

blockui plugin?
jqmodal plugin?

On Nov 16, 4:58 pm, Codex [EMAIL PROTECTED] wrote:
 Ok, I see how this is working, but... if you click on the target div
 it triggers the close also. Is there a way to 'tell' the target that
 when it's open, all underlying divs are disabled?

 On 16 nov, 10:29, Feijó [EMAIL PROTECTED] wrote:

  Can you provide an code of your attempt?

  It may be simple, or not.  Depend on your page.

  You could set a master div, then just bind a click event on it to hide the
  target div

  div id=master
  div id=target
  target content
  /div
  master content
  /div

  script
  $('#master).click(function() {
$('#target).fadeOut('slow');});

  /script

  Feijó

  - Original Message -
  From: Codex [EMAIL PROTECTED]
  To: jQuery (English) jquery-en@googlegroups.com
  Sent: Friday, November 16, 2007 2:45 AM
  Subject: [jQuery] Close/hide div on click outside

   I've searched the posts and the web but I can't find a clear answer/
   solution. I hope someone can answer this one:

   I want to hide a div when there's a click anywhere outside of the div.
   How would one do this?

   Gav


[jQuery] Re: jQuery Ajax throws parseerror in IE

2007-11-16 Thread 1Marc

Here is an update.  I tried using Google's API for Ajax and it is
returning the data but I am unable to parse it with jQuery.

CODE 

GDownloadUrl(object.path + '?' + object.data, function(data,
responseCode) {
 if (responseCode == '200') {
  $('node', data);
 }
});

OUTPUT  firebug outputs this:
ret[i].getElementsByTagName is not a function jquery.js (line 23)

On Nov 16, 4:07 pm, 1Marc [EMAIL PROTECTED] wrote:
 When using jQuery Ajax, I am receiving a parseerror in IE (Firefox 
 Safari work).  Has anyone run into this before - and know how to fix
 it?  Or something I can at least try.

 CODE 

 object = {
path : 'data.xml',
data : 'lat=40.935lng=-125.000'

 }

 $.ajax({
url: object.path,
data: object.data,
type: 'GET',
dataType: 'xml',
timeout: 1000,
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert('Error loading data: ' + textStatus);
},
success: function(xml){
 ...
}

 });

 OUTPUT  'Error loading data: parseerror'


[jQuery] Re: Thickbox opens off screen in IE7 - must fix, site already launched!

2007-11-16 Thread Wizzud

IE7 v7.0.5730.11 on XP - no problem.

On Nov 16, 9:54 pm, MichaelEvangelista [EMAIL PROTECTED] wrote:
  Where it was breaking, does the size of the browser window affect it?

 Yes definitely.
 Smaller browser windows get it off-screen.
 With a larger monitor at full screen the window is not exactly centered, but
 not so far south as to be out of visibility at the bottom.

 --

 --
 Michael Evangelista, Evangelista Design
 Web :www.mredesign.com
 Newsgroups: news://forums.mredesign.com
 Blog :www.miuaiga.com

 Jeffrey Kretz [EMAIL PROTECTED] wrote in message

 news:[EMAIL PROTECTED]



  Just tested it in IE7 and the thickbox popup on your page was centered for
  me.

  Where it was breaking, does the size of the browser window affect it?

  JK

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of MichaelEvangelista
  Sent: Friday, November 16, 2007 10:07 AM
  To: jquery-en@googlegroups.com
  Subject: [jQuery] Thickbox opens off screen in IE7 - must fix, site
  already
  launched!

  Here is the site
 www.inkedpress.com

  Type your name in the text box and click submit.
  Then click any of the thumbnails to pick a letter
  you should see a thickbox popup with a set of thumbnails and some buttons.

  The broken version looks like this
 http://mredesign.com/downloads/mephotos/iP-thickbox-error.jpg
  with the bottom of the modal window being cut off.

  I am going to move the buttons up, and try to adjust what I can using the
  current size and layout,
  but would really like to get it centering correctly in all browsers!

  This is being verified as consistently broken in IE7,
  on both Vista and XP systems ... though apparently *not in all*IE7
  systems,
  which makes it hard to track down.

  Any help is *greatly* appreciated, as the site is live and otherwise fully
  functional.

  --

  --
  Michael Evangelista, Evangelista Design
  Web :www.mredesign.com
  Newsgroups: news://forums.mredesign.com
  Blog :www.miuaiga.com


[jQuery] Re: Clear a siblings $.toggle() function

2007-11-16 Thread Wizzud

unbind('click')

On Nov 16, 2:28 am, Chris J. Lee [EMAIL PROTECTED] wrote:
 I've tried to search for this in the discussion. but didn't know what
 to search.

 Is there a way to clear a toggle? Say on a callback of an effect I
 clear the toggle event for a sibling of this element?

 My example is online if you're curious:http://hire.chrisjlee.net


[jQuery] Re: Browser Exit Event

2007-11-16 Thread Wizzud

I hesitate to suggest that a simpler approach may be to store the
positions as they change, rather than wait until the browser suddenly
disappears, shuts down, moves to another page, or whatever?

On Nov 15, 11:50 pm, Klaus Hartl [EMAIL PROTECTED] wrote:
 On Nov 15, 9:35 pm, Bil Corry [EMAIL PROTECTED] wrote:

  [EMAIL PROTECTED] wrote on 11/15/2007 8:12 AM:

   I'd just like to know what the jQuery best practice for catching the
   browser exit event is?

  Probably just bind your code to the onunload event.  From the jQuery docs:

  $(window).unload( function () { alert(Bye now!); } );

  More info here:

  http://docs.jquery.com/Events/unload

  - Bil

 I doubt persisting data via an Ajax call on the unload event will work
 cross browser if at all... but I'm not sure about this.

 --Klaus


[jQuery] HELP with default tooltip

2007-11-16 Thread [EMAIL PROTECTED]

Hi,

I need to prevent the browsers ( All ) to show the title link and the
alt message of img as tootltip.
The prevention must be made only on a particular link that wrap an
image.

Any suggestion?

Thanks

Andrea


[jQuery] Re: Thickbox opens off screen in IE7 - must fix, site already launched!

2007-11-16 Thread MichaelEvangelista


Good to know, thanks for checking!

(sure wish I could pin down the difference on some systems, or adjust some 
css somewhere with an IE hack... just not sure where to begin, and more than 
a bit hesitant for fear of breaking the thickbox altogether)


--

--
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog : www.miuaiga.com


Wizzud [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]


IE7 v7.0.5730.11 on XP - no problem.

On Nov 16, 9:54 pm, MichaelEvangelista [EMAIL PROTECTED] wrote:

 Where it was breaking, does the size of the browser window affect it?

Yes definitely.
Smaller browser windows get it off-screen.
With a larger monitor at full screen the window is not exactly centered, 
but

not so far south as to be out of visibility at the bottom.

--

--
Michael Evangelista, Evangelista Design
Web :www.mredesign.com
Newsgroups: news://forums.mredesign.com
Blog :www.miuaiga.com

Jeffrey Kretz [EMAIL PROTECTED] wrote in message

news:[EMAIL PROTECTED]



 Just tested it in IE7 and the thickbox popup on your page was centered 
 for

 me.

 Where it was breaking, does the size of the browser window affect it?

 JK

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of MichaelEvangelista
 Sent: Friday, November 16, 2007 10:07 AM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Thickbox opens off screen in IE7 - must fix, site
 already
 launched!

 Here is the site
www.inkedpress.com

 Type your name in the text box and click submit.
 Then click any of the thumbnails to pick a letter
 you should see a thickbox popup with a set of thumbnails and some 
 buttons.


 The broken version looks like this
http://mredesign.com/downloads/mephotos/iP-thickbox-error.jpg
 with the bottom of the modal window being cut off.

 I am going to move the buttons up, and try to adjust what I can using 
 the

 current size and layout,
 but would really like to get it centering correctly in all browsers!

 This is being verified as consistently broken in IE7,
 on both Vista and XP systems ... though apparently *not in all*IE7
 systems,
 which makes it hard to track down.

 Any help is *greatly* appreciated, as the site is live and otherwise 
 fully

 functional.

 --

 --
 Michael Evangelista, Evangelista Design
 Web :www.mredesign.com
 Newsgroups: news://forums.mredesign.com
 Blog :www.miuaiga.com







[jQuery] Re: Target secon

2007-11-16 Thread Karl Swedberg


On Nov 16, 2007, at 5:59 PM, skube wrote:



Nope, that results in all of the p's being hidden in the first
div:
div class=myDiv
/div
div class=myDiv
  pFirst/p
/div


Actually, Wizzud's suggestion worked for me when I tested it locally:

$('div.myDiv p:not(:first-child)').hide()

Hides all p elements that are descendants of div class=myDiv and  
are not the first child of their parent. The result I got was:


div class=myDiv
  pFirst/p
/div
div class=myDiv
  pFirst/p
/div


--Karl

[jQuery] Re: superfish - using different animations?

2007-11-16 Thread Joel Birch

On 17/11/2007, slooodge [EMAIL PROTECTED] wrote:
  Unfotunately the declaration of the first
 animation type gets overwritten by the second one.
 Does anyone know how to implement two different menues on one page?

Hi Slooodge!

Thanks very much for pointing this out. The first version of Superfish
did this correctly, but sometime since then I must have overlooked
testing multiple menus on a page with different options for each. The
good news is that I have fixed the problem (along with a couple other
bugs) and you can now download version 1.3.2 from the usual place:
http://users.tpg.com.au/j_birch/plugins/superfish/

There's nothing you need to know to get it to work how you want - just
drop in the updated superfish.js file and you should be all set. Let
me know if you do experience any problems though.

Joel Birch.


[jQuery] Re: superfish bug?

2007-11-16 Thread Joel Birch

Hi Arjan,

Thanks for the bug report - I found that it happens in both IE6 and
IE7. This was such a bizarre thing - I still have no idea why or even
how it possibly could occur, but I seem to have found an ugly but
effective fix for it which I have added to the latest version of
Superfish (now updated to version 1.3.2) which you can find in the
usual place here:
http://users.tpg.com.au/j_birch/plugins/superfish/

Cheers
Joel Birch.


[jQuery] Re: Superfish v1.3.1 - ie third level menu clipping display problem

2007-11-16 Thread Joel Birch

Hi Jared,

I have not been able to reproduce this problem at all so it's hard to
give any decent advice. The thread you linked to shows that Noobert's
problem was resolved and his issue turned out to be other CSS on the
page interfering with the menu.

Quote from that thread:
Aha! I found the problem. It has nothing to do with your excellent plugin.
There was a z-index issue with some of the absolutely positioned elements on
the page. My mistake.

If this was a Superfish bug then I would think that the vertical example:
http://users.tpg.com.au/j_birch/plugins/superfish/vertical-example/
...would suffer from it as there are four levels of menu there, but it
works perfectly for me in IE6 and IE7. Do you have a link we could
look at so we can investigate further and get to the bottom of the
matter in your case?

Joel Birch.


[jQuery] Re: Superfish not working on PHP page

2007-11-16 Thread Joel Birch

I had a look at your page and it seems that you just need to adjust
your widths and padding of all the elements involved. I altered the
css from within Firebug to what I think is a more robust set of
values. The resulting css should be more stable across all browsers.
I've posted the resulting file here for you to look at:
http://users.tpg.com.au/j_birch/clinicnine/clinicnine.css

I think you could just use this file instead of your current
vertical.css file, however, note that I also included a rule to
override the .main #sidebar1 width and padding to suit the new values
for the rest of the nav.

Hope this helps.

Joel Birch.


[jQuery] Re: Superfish - issues with hover links in IE6

2007-11-16 Thread Joel Birch

Hi Carleigh,

Sorry for the delay in replying - I've been really busy.

This should solve it I think. In the css rule with the selector:
#nav li:hover, #nav li.sfHover, #nav a:focus, #nav a:hover, #nav
a:active { ... }

you need to have this selector also: #nav li:hover a, #nav li:sfHover a
I notice that further down in that file you have #nav li:hover  a,
#nav li.sfHover  a but that will not work in IE6 as that type of
selector was not supported in that browser. Hope this helps.

As for why the class instead of id: I wanted to make it easy for
people to add Superfish to already existing suckerfish menus which
likely already have an id associated with them. I figured adding a
class to the nav and adding the bits of Superfish css as necessary
would be less work than the other way. Also, if you want multiple
menus on a page a class approach is better than an id.

Good luck.
Joel Birch.