[jQuery] Re: [validate] delayed validation

2008-09-09 Thread Jörn Zaefferer
You could try to implement for completion code as a custom method and
add a rule before the date validation. Or just implement your own date
validation as part of the completion method.

Jörn

On Mon, Sep 8, 2008 at 8:22 PM, Mike Nichols [EMAIL PROTECTED] wrote:

 Hi
 I have a text field which is evaluated on its onblur event and
 corrected by inserting the default year. So I might enter '0508' and
 it will convert to '05/08/2008' onblur.

 The validate plugin is evaluating the field's value before my plugin
 can change it so it says 'Please enter a valid date', as '0508' isn't
 a valid date.

 I do have my plugin binding to the onblur event before validate
 (appears first in $.ready) so I am wondering if there is a recommended
 approach for something like this?

 Thank you
 Mike



[jQuery] Using JQuery with other libraries (Lightbox)

2008-09-09 Thread adeking

Hi,

I have read the documentation on using JQuery with other libraries by
using the Noconflict call.  I have to admit to being a total novice at
this.

I want to use Jquery to do a text replace on my search box for my site
- and I have lightbox working for my images.

I cannot get the two libraries to work together.  If I try to
implement both then only Lightbox will work.  If I comment out
lightbox then JQuery works.

The code from my head tag is below and here is the link -
http://www.macmillan-academy.org.uk/zeltha/index.php

script type=text/javascript src=js/common.js/script
script language=JavaScript src=tabs/nav-h.js type=text/
JavaScript/script

script type=text/javascript src=?php print
$root.lightbox2.04/js/prototype.js?/script
script type=text/javascript src=?php print 
$root.lightbox2.04/
js/scriptaculous.js?load=effects,builder?/script
script type=text/javascript src=?php print
$root.lightbox2.04/js/lightbox.js?/script
script type=text/javascript src=?php print $root.js/
jquery.js?/script
script language=JavaScript src=?php print $root.js/
jquery.hint.js? type=text/JavaScript/script


script type=text/javascript charset=utf-8
var $j =jQuery.noConflict();
$(function(){
// find all the input elements with title
attributes
$('input[title!=]').hint();
});
/script

Many thanks for your time.


[jQuery] Re: Traversing table

2008-09-09 Thread Jayzon

Hi Rene!

Thanks for your answer - that would be a nice solution for one single
table. But I'd like to use the script for various tables on different
pages. That's why it is getting more complicated. If I could get this
done, other editors wouldn't have to care about IDs etc., but could
just wrap the price in the span.price  everything would be fine.

Anyway, thanks for your effort!

Markus

On 9 Sep., 05:21, Rene Veerman [EMAIL PROTECTED] wrote:
 put valid id's on all relevant tags, then reference by id?



 On Mon, Sep 8, 2008 at 10:38 PM, Jayzon [EMAIL PROTECTED] wrote:

  Hi!

  I've got a table with multiple rows which I'd like to traverse in a
  special way - here's the html (for better reading, I just included two
  rows, these rows are duplicated with different values):

  tbody
  tr class=pricing
  tdExample A/td
  tdspan class=price1,20/span euro;/td
  tdspan class=price2,40/span euro;/td
  /tr
  tr class=calc
  tdCalculator/td
  tdinput /span class=result0,00/span euro;/td
  tdinput /span class=result0,00/span euro;/td
  /tr
  /tbody

  What I'd like to do: If an input filed is focussed, a price should be
  calculated. To keep the script as efficient as possible, I want to
  travel up from the input field to the cell above it (i.e. one row up,
  second or third cell in that row). My problem is: How can I traverse
  the DOM in this way?

  I imagine the following: The script should know where the starting
  point was (second or third cell in row) and then get the corresponding
  cell. I'm sure this is possible, but I have no idea how to achieve it.

  If I get the DOM traversing right, I want to get the value of
  span.price to calculate the input with it  update the result in -
  yes, span.result ;-)

  I'm sure this is a pretty easy thing to achieve for people how know
  jQuery well - I unfortunately don't (yet!). Could someone please
  explain this?

  Thanks for your effort!

  Markus- Zitierten Text ausblenden -

 - Zitierten Text anzeigen -


[jQuery] removing a row dynamically...

2008-09-09 Thread [EMAIL PROTECTED]

Hi,
I have the requirement to dynamically add and remove a row. Below is
the code to dynamicaaly remove a row and it works fine in Mozilla but
not in IE. Can anyone please advise me on this. Thanks.

$('a.remove').click(function(){
  $(this).parents(tr).remove();
});

- M


[jQuery] Re: Jquery .load() can't load style and js in html file on Safari and Chrome??

2008-09-09 Thread Jove

This is a solution about style, but how about js in loaded page?


[jQuery] url serialize or getUrlParam

2008-09-09 Thread drlinux

Hello,
I want to get lastest url paramaters and add this paramater another
url like that:
http://blabla.com/action.php?q=1page=1rows=50sidx=id
to
http://blabla.com/action.php?q=5page=1rows=50sidx=id

I tried out getUrlParam but it doesn't work with jqgrid.
Thanks a lot.
King Regards,
Ibrahim
PS: You can see the code below:

http://dpaste.com/76882/


[jQuery] javascript enabled

2008-09-09 Thread [EMAIL PROTECTED]

Hello again,
howcan be detect whether or not the user has javascript enabled and
then write certain if statements to account for that. How do I detect
a user's javascript setting?

thanks for ur help :)

samrad


[jQuery] Re: New jQuery Website...

2008-09-09 Thread Sam Collett

As much as we don't like it, sites still have to be designed to cater
for IE 6+

We are still on IE 6 at work, because some of the systems we use (not
ones I have worked on of course!) only seem to work in IE 6. You would
have thought when you pay for a system, it is updated as new browsers
come out... should be in the Service Level Agreement.

I'm sure there are still a lot of corporate intranet's still depending
on IE 6 (developers not caring about standards or really understanding
web development outside the GUI used...)

-Sam

PS While IE7 may have some annoyances (Firefox does too), it is still
much better (standards wise) than IE6

jeremyBass wrote:
 I don't know if this is just me but the site is all kinds of broken...
 I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs...
 I'd give a url but ... well it's almost everywhere... cool idea
 though...

 On Sep 8, 10:03�am, Rick Faircloth [EMAIL PROTECTED] wrote:
  Yes, it does look great!
 
  Rick
 
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Chris Jordan
  Sent: Monday, September 08, 2008 12:58 PM
  To: jQuery Group
  Subject: [jQuery] New jQuery Website...
 
  I really like the look of the new jQuery website. When did it get launched? 
  My hats off to the
  designers! It looks fantastic!! :o)
 
  Chris
 
  --http://cjordan.us
 
  No virus found in this incoming message.
  Checked by AVG -http://www.avg.com
  Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date: 9/8/2008 
  7:01 AM


[jQuery] Re: New jQuery Website...

2008-09-09 Thread Rick Faircloth

It's relatively simple to make CSS-based layout work for IE6, IE7, and FF3,
which are my target browsers for design.  I make sure all my sites work well
on all three and it doesn't take much extra work at all.

I use conditional stylesheets for all browser-specific tweaks, so that once
a browser's use is pretty much over, all I have to do is delete the stylesheet
rather than change a bunch of tweaked code.

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sam 
 Collett
 Sent: Tuesday, September 09, 2008 6:58 AM
 To: jQuery (English)
 Subject: [jQuery] Re: New jQuery Website...
 
 
 As much as we don't like it, sites still have to be designed to cater
 for IE 6+
 
 We are still on IE 6 at work, because some of the systems we use (not
 ones I have worked on of course!) only seem to work in IE 6. You would
 have thought when you pay for a system, it is updated as new browsers
 come out... should be in the Service Level Agreement.
 
 I'm sure there are still a lot of corporate intranet's still depending
 on IE 6 (developers not caring about standards or really understanding
 web development outside the GUI used...)
 
 -Sam
 
 PS While IE7 may have some annoyances (Firefox does too), it is still
 much better (standards wise) than IE6
 
 jeremyBass wrote:
  I don't know if this is just me but the site is all kinds of broken...
  I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs...
  I'd give a url but ... well it's almost everywhere... cool idea
  though...
 




[jQuery] Re: url serialize or getUrlParam

2008-09-09 Thread Tony

Hello,
Use setGridParam something like

jQuery(#mygridid).setGridParam({url:my_newurl.php});

Regards
Tony

On Sep 9, 11:59 am, drlinux [EMAIL PROTECTED] wrote:
 Hello,
 I want to get lastest url paramaters and add this paramater another
 url like that:http://blabla.com/action.php?q=1page=1rows=50sidx=id
 tohttp://blabla.com/action.php?q=5page=1rows=50sidx=id

 I tried out getUrlParam but it doesn't work with jqgrid.
 Thanks a lot.
 King Regards,
 Ibrahim
 PS: You can see the code below:

 http://dpaste.com/76882/


[jQuery] Re: jQuery and swapping name values

2008-09-09 Thread Velcrobelly

Anyone?

On Sep 8, 5:01 pm, Velcrobelly [EMAIL PROTECTED] wrote:
 I am using the following to do a Hide/Show feature, and it works
 exactly as I want...

 --snip-
 script type=text/javascript
 $(function(){
         $('#sender').click(function(){
                         $('#container div.toggleit').slideToggle('normal');
         });});

 /script

 style type=text/css
 table#container div.hidden { display: none; }
 /style

 table id=container
 tr
 tdinput type=checkbox id=sender /
 div class=toggleitinput name=data01 type=text value=show
 first/div
 div class=toggleit hiddeninput name=data02 type=text
 value=show second/div/td
 /tr
 tr
 /table
 -end snip-

 But now I need to be able to swap the name values of the text fields
 on the toggle as well, so that the visible text field always carries
 the name value of data01.

 I cannot figure out how to do this and hope someone can help out.

 I hope this makes sense, and thank you in advance for any help...


[jQuery] Re: removing a row dynamically...

2008-09-09 Thread Ca-Phun Ung

[EMAIL PROTECTED] wrote:
 Hi,
 I have the requirement to dynamically add and remove a row. Below is
 the code to dynamicaaly remove a row and it works fine in Mozilla but
 not in IE. Can anyone please advise me on this. Thanks.

 $('a.remove').click(function(){
   $(this).parents(tr).remove();
 });

 - M
   
Just tested this and it works in IE6  7. I'm using jQuery 1.2.6. Maybe 
try this:

$('a.remove').click(function(e){
  $(this).parents(tr).remove();
  e.preventDefault();
});

e.preventDefault() stops the click from reloading the page.


[jQuery] find specific parents?

2008-09-09 Thread rudgr

Hi,

I have the code below to add a highlight class to the parent div if an
input field gets focus

-
jQuery(this).parents(div:eq(0)).addClass('highlighted');
--
div class=formrow
  input type=text
/div
--

This works fine, but I would like to further specify the filter
expression in the parents() function to only include divs that have
the attribute class=formrow:

parents(div:eq(0))

Is this possible?

PS: Sorry, I'm relatively new to jQuery, so if there's a better way to
do this I'd like to hear it!

Thanks in advance,

rudgr


[jQuery] Re: How to select a specific descendant of curent object

2008-09-09 Thread Ca-Phun Ung

Glen Lipka wrote:
 Wouldnt this work too?
 $(#box .grandchild).
Yes but if you read the original question you'd see why I gave that 
particular solution:

  so is there a travesting method, or any other method which could
  select any descendant of curent element?




[jQuery] Re: Selecting a checkbox by clicking anywhere on a row

2008-09-09 Thread Michael Smith

Thank you - this seemed the neatest solution and worked nicely for me.

Michael

On Tue, Sep 9, 2008 at 12:53 AM, Karl Swedberg [EMAIL PROTECTED] wrote:
 Hi Michael,
 You could do it a little differently. This should work:
 $('.myrow').click(function(event) {
   if (event.target.type != 'checkbox') {
 $('input:checkbox', this).trigger('click');
   }
 });
 so, when the user clicks somewhere in the row, if the click isn't directly
 on a checkbox, it triggers a click for that row's checkbox.
 --Karl
 
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com



 On Sep 8, 2008, at 4:18 PM, Michael Smith wrote:

 Thanks for the reply.

 I added a return false;

 http://dev.savingforchildren.co.uk/mjs/row_select_2.epl

 But it doesn't seem to make any difference.

 Am I missing something?

 Thanks again

 Michael


 On Mon, Sep 8, 2008 at 7:18 PM, Danny [EMAIL PROTECTED] wrote:

 add  return false;  to your click handler to keep the click from

 getting to the checkbox itself.

 Danny

 On Sep 8, 10:55 am, Michael Smith [EMAIL PROTECTED] wrote:

 Hi there,

 I'm trying to make a page which automatically toggles a checkbox when

 you click anywhere on the row.

 Here's a version I've cut down to the bare bones to illustrate

 http://dev.savingforchildren.co.uk/mjs/row_select.epl

 It seems to work fine unless the user actually clicks on the checkbox

 itself.  In this case it seems that it actually gets toggled twice and

 so reverts to its original state.

 Any suggestions on the cleanest / simples way to avoid this? (I can

 think of a few messy ways)

 Thanks

 Michael





[jQuery] how to control a imageover making one image to fade in a menu and fade out when....

2008-09-09 Thread Aaron

ok my problem is that I have the user upload a image file this image
file on the page is a picture of them.

What I want to do is when the mouse is over the image I want to fade
in a menu this menu would contain buttons for editing the which photo
to show and many other things about the image.

the problem I run into is I seek a if statement. I want the mouse over
the image to when going off meaning mouseout I want to fade out the
menu only if the mouse is not on the menu.

If I just put a mouseover and a mouseout on this image it would fade
in the menu and when you try to put the mouse on the menu it would
fade out.

SO  I just made the mouseover and mouseout for both the menu and the
persons image.
This caused a bad effect. When you put the  mouse over the persons
image it would fade in the menu and when you go off the image to go on
the menu the menu would fade out and then fade back in.

I want it in a way where when  my mouse leaves the persons image that
if the mouse is on the menu it would fade out at all and only fade out
only if the mouse is not on the persons image or the menu.


How can I do this ??? can you give an example???


[jQuery] Re: Traversing table

2008-09-09 Thread Karl Swedberg

Hi Markus,

Can you show us just a bit more of the HTML? It would help a great  
deal if we could see where the input field is in relation to the spans  
that you want to modify.


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 8, 2008, at 4:38 PM, Jayzon wrote:



Hi!

I've got a table with multiple rows which I'd like to traverse in a
special way - here's the html (for better reading, I just included two
rows, these rows are duplicated with different values):

tbody
tr class=pricing
tdExample A/td
tdspan class=price1,20/span euro;/td
tdspan class=price2,40/span euro;/td
/tr
tr class=calc
tdCalculator/td
tdinput /span class=result0,00/span euro;/td
tdinput /span class=result0,00/span euro;/td
/tr
/tbody

What I'd like to do: If an input filed is focussed, a price should be
calculated. To keep the script as efficient as possible, I want to
travel up from the input field to the cell above it (i.e. one row up,
second or third cell in that row). My problem is: How can I traverse
the DOM in this way?

I imagine the following: The script should know where the starting
point was (second or third cell in row) and then get the corresponding
cell. I'm sure this is possible, but I have no idea how to achieve it.

If I get the DOM traversing right, I want to get the value of
span.price to calculate the input with it  update the result in -
yes, span.result ;-)

I'm sure this is a pretty easy thing to achieve for people how know
jQuery well - I unfortunately don't (yet!). Could someone please
explain this?

Thanks for your effort!

Markus




[jQuery] Re: find specific parents?

2008-09-09 Thread Karl Swedberg
You can use a CSS selector. just add .formrow to the selector you  
already have:


jQuery(this).parents(div.formrow:eq(0)).addClass('highlighted');


http://docs.jquery.com/Selectors


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 9, 2008, at 6:16 AM, rudgr wrote:



Hi,

I have the code below to add a highlight class to the parent div if an
input field gets focus

-
jQuery(this).parents(div:eq(0)).addClass('highlighted');
--
div class=formrow
 input type=text
/div
--

This works fine, but I would like to further specify the filter
expression in the parents() function to only include divs that have
the attribute class=formrow:

parents(div:eq(0))

Is this possible?

PS: Sorry, I'm relatively new to jQuery, so if there's a better way to
do this I'd like to hear it!

Thanks in advance,

rudgr




[jQuery] Re: Validate and FileStyle problem. Could someone, please, help me out?

2008-09-09 Thread shapper

Please, anyone?

I am on this for 2 days ...

Thanks,
Miguel

On Sep 8, 6:34 pm, shapper [EMAIL PROTECTED] wrote:
 Hello,

 I am using JQuery Validate plugin to validate a input of type file.

 I am also styling the same input using FileStyle 
 plugin:http://www.appelsiini.net/projects/filestyle

 The error message is added to the HTML markup but it is not visible.
 The generated HTML code is:

 label for=PathFicheiro/label
 input class=file style=display: inline; width: 320px;/
     div style=background: transparent url(../Image/FileUpload.jpg)
 no-repeat scroll right center; overflow:
 hidden; width: 20px; height: 15px; -moz-background-clip: -moz-initial;-
 moz-background-origin: -moz-initial; -moz-background-inline-policy: -
 moz-initial; display: inline; position: absolute;
         input id=Path class= type=file value= name=Path
 style=position: relative; height: 15px; width: 320px; display:inline;
 cursor: pointer; opacity: 0; margin-left: -142px;/
        label class=Error for=Path generated=trueSelect a
 document/label
 /div

 I am using the following code:

   $(input[type=file]).filestyle({
     image: ../Image/FileUpload.jpg,
     imageheight: 15,
     imagewidth: 20,
     width: 320
   });

   $(#Create).validate({
     errorClass: Error,
     errorElement: label,
     errorPlacement: function(error, element) {
       if (element.is(input[type=file]))
         error.insertAfter(element.next());
       else
         error.insertAfter(element);
     },
     rules: {
       Path: {
         accept: flv|gif|jpg|png|swf,
         required: true
       }
     },
     messages: {
       Path: {
         accept: Use only files with  the following extensions flv,
 gif, jpg, png ou swf,
         required: Select a document
       }
     }
   });

 Could someone, please, help me in solving this problem?

 Thanks,
 Miguel


[jQuery] Re: jQuery and swapping name values

2008-09-09 Thread tlob

Can you be more specific? I dont get it
Sorry

You fill out the first Input, save the form via a submit button and
then?


  But now I need to be able to swap the name values of the text fields
  on the toggle as well, so that the visible text field always carries
  the name value of data01.


[jQuery] Re: Using JQuery with other libraries (Lightbox)

2008-09-09 Thread MorningZ

And making things even easier (isn't that what we're all after?)

There's tons and tons of jQuery lightbox scripts out there... perhaps
switching to one of those will make your conflict a moot point (plus
won't make the users of the page download two libraries!)


[jQuery] [validate] metadata bug

2008-09-09 Thread Mike Nichols

If this is in a form:
input class=required type=text/

and the form is validated with:
jQuery(#demo_form).validate({meta:validate}); // inside $.ready

Then I get this :
meta is undefined
file:///C:/Development/Assets/test/datetime/jquery.validate.js
Line 507

Which is caused by this:
return meta.messages  meta.messages[method];

I think this is a new function in the 1.4 script but I think it should
check for !meta before calling 'meta.messages' :

if(!meta){   return; }

This fixes the bug

Mike



[jQuery] Re: [validate] metadata bug

2008-09-09 Thread Jörn Zaefferer
Could you file a ticket for this? http://dev.jquery.com/newticket

Thanks
Jörn

On Tue, Sep 9, 2008 at 3:22 PM, Mike Nichols [EMAIL PROTECTED] wrote:

 If this is in a form:
 input class=required type=text/

 and the form is validated with:
 jQuery(#demo_form).validate({meta:validate}); // inside $.ready

 Then I get this :
 meta is undefined
 file:///C:/Development/Assets/test/datetime/jquery.validate.js
 Line 507

 Which is caused by this:
 return meta.messages  meta.messages[method];

 I think this is a new function in the 1.4 script but I think it should
 check for !meta before calling 'meta.messages' :

 if(!meta){   return; }

 This fixes the bug

 Mike




[jQuery] Re: Traversing table

2008-09-09 Thread Jayzon

Hi Karl,

I'm not sure if you missed them, but I placed the input fields inside
the table, they are in tr.calc (the second row in the html in my first
post). It's just an input / tag. That input field would then be a
nice starting point, because it's placed directly under the span
including the price  in the same cell as the span to be modified.

Greetings,

Markus

On Sep 9, 2:23 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 Hi Markus,

 Can you show us just a bit more of the HTML? It would help a great  
 deal if we could see where the input field is in relation to the spans  
 that you want to modify.

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 8, 2008, at 4:38 PM, Jayzon wrote:





  Hi!

  I've got a table with multiple rows which I'd like to traverse in a
  special way - here's the html (for better reading, I just included two
  rows, these rows are duplicated with different values):

  tbody
  tr class=pricing
  tdExample A/td
  tdspan class=price1,20/span euro;/td
  tdspan class=price2,40/span euro;/td
  /tr
  tr class=calc
  tdCalculator/td
  tdinput /span class=result0,00/span euro;/td
  tdinput /span class=result0,00/span euro;/td
  /tr
  /tbody

  What I'd like to do: If an input filed is focussed, a price should be
  calculated. To keep the script as efficient as possible, I want to
  travel up from the input field to the cell above it (i.e. one row up,
  second or third cell in that row). My problem is: How can I traverse
  the DOM in this way?

  I imagine the following: The script should know where the starting
  point was (second or third cell in row) and then get the corresponding
  cell. I'm sure this is possible, but I have no idea how to achieve it.

  If I get the DOM traversing right, I want to get the value of
  span.price to calculate the input with it  update the result in -
  yes, span.result ;-)

  I'm sure this is a pretty easy thing to achieve for people how know
  jQuery well - I unfortunately don't (yet!). Could someone please
  explain this?

  Thanks for your effort!

  Markus- Hide quoted text -

 - Show quoted text -


[jQuery] Re: JQuery Form Plugin and json

2008-09-09 Thread Stefan Sturm

Hello,

 I'm using the jQuery Form PlugIn( http://www.malsup.com/jquery/form/ )
 to handle my Forms. I like it, but I have a question about an
 improvment:
 At this time all form fields are send using post, but it wold be nice,
 to send all form fields json encoded as one post parameter.

 Is there a way to do this?

I still searching for a solution for this...

Hope, the developer is reading here :-)

Greetings,
Stefan Sturm


[jQuery] Re: Set cursor position in textarea/input

2008-09-09 Thread Quess

hi Greeg,

Probably you've found solution for your question but because I had
faced the same problem as you, and it get me a while to find out
solution i'll answer just in case somebody else will meet the same
problem.
Check this page
http://codeclimber.net.nz/archive/2008/04/11/Beware-the-.-in-jQuery-elementId--document.getElementByIdelementId.aspx

In case if it's offline:

The problem is because JQuery always return array even if
documentation say that should be one element, so use $('#id')[0] to
get clean dom object :)

On Aug 27, 1:18 pm, Greeg [EMAIL PROTECTED] wrote:
 i know its of the annoying topics but...
 im using this function to set cursor position:

 function setSelectionRangeX(input, selectionStart, selectionEnd) {
    // IE
    if (input.createTextRange) {
       var range = input.createTextRange();
       range.collapse(true);
       range.moveEnd('character', selectionEnd);
       range.moveStart('character', selectionStart);
       range.select();
     // real browsers :)
     } else if (input.setSelectionRange) {
       input.focus();
       input.setSelectionRange(selectionStart, selectionEnd);
     }

 }

 while im sending input object as
 document.getElementById('myTextarea') all works fine, but when ill
 try to use jQuery selector $('#myTextarea') it just set the cursor
 position at the end of the field, without any err message or warning.

 so the seems to be that $('#myTextarea').setSelectionRange returns
 'undefined'.

 im kind of a noob with jquery, but all other built-in function works
 fine even if they are applied on jq-selected object, so i dont really
 know whats happening :(

 annyone knows hw to fix this?


[jQuery] non-recursive element filtering

2008-09-09 Thread Dominique

hi,

i have been trying to do something simple for the last couple of hours
and i
just can't seem to solve this problem:

maybe easier to give a dom tree first:
...
div class=list
div class=item A
div class=list style=margin-left:10px;
div class=item1 button+/button/div
div class=item2 button+/button/div
div class=item3 button+/button/div
/div
button+/button
/div
div class=item B
div class=list style=margin-left:10px;
div class=item1 button+/button/div
div class=item2 button+/button/div
div class=item
3
div class=list style=margin-left:10px;
div class=item3.1 button+/button/div
div class=item3.2 button+/button/div
div class=item3.3 button+/button/div
/div
button+/button
/div
/div
button+/button
/div
/div
...

given the outer DIV.list element, how can i find all BUTTON elements,
except
for the ones that are in sub DIV.list's?

i would have thought something like $
(myouterdiv).find('button:not('.list
button)') would have worked, but apparently not...

$(myouterdiv).find('button').not('.list button') gives the same
results

i have tried plenty of other selectors, but nothing works...

any idea what could be wrong with that at all?
It just gives me all the BUTTON elements... if anything, i would have
expected it to give me zero since myouterdiv also has the .list class


cheers,
dominique



[jQuery] Re: find specific parents?

2008-09-09 Thread rudgr

Thanks!

On Sep 9, 2:28 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 You can use a CSS selector. just add .formrow to the selector you  
 already have:

 jQuery(this).parents(div.formrow:eq(0)).addClass('highlighted');

 http://docs.jquery.com/Selectors

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 9, 2008, at 6:16 AM, rudgr wrote:





  Hi,

  I have the code below to add a highlight class to the parent div if an
  input field gets focus

  -
  jQuery(this).parents(div:eq(0)).addClass('highlighted');
  --
  div class=formrow
   input type=text
  /div
  --

  This works fine, but I would like to further specify the filter
  expression in the parents() function to only include divs that have
  the attribute class=formrow:

  parents(div:eq(0))

  Is this possible?

  PS: Sorry, I'm relatively new to jQuery, so if there's a better way to
  do this I'd like to hear it!

  Thanks in advance,

  rudgr- Hide quoted text -

 - Show quoted text -


[jQuery] Re: removing a row dynamically...

2008-09-09 Thread [EMAIL PROTECTED]

Hi,
Thanks for the reply. But this doesn't seem to work for me. Here is
the code that i use to create a dynamic row. This works fine in
Mozilla but the remove function doesn't seem to get even called from
IE. Please take a look.
** Code to create a dynamic row where 'remove' is
appended as a hyperlink which calls removeSection()

newlink = document.createElement('a');
newlink.setAttribute('href', 'javascript:removeSection();');
newlink.setAttribute(class, remove);
tn = document.createTextNode('remove');
newlink.appendChild(tn);
td1.appendChild(newlink);

*

_ M

On Sep 9, 4:36 pm, Ca-Phun Ung [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
  Hi,
  I have the requirement to dynamically add and remove a row. Below is
  the code to dynamicaaly remove a row and it works fine in Mozilla but
  not in IE. Can anyone please advise me on this. Thanks.

  $('a.remove').click(function(){
$(this).parents(tr).remove();
  });

  - M

 Just tested this and it works in IE6  7. I'm using jQuery 1.2.6. Maybe
 try this:

 $('a.remove').click(function(e){
   $(this).parents(tr).remove();
   e.preventDefault();

 });

 e.preventDefault() stops the click from reloading the page.


[jQuery] Re: how to control a imageover making one image to fade in a menu and fade out when....

2008-09-09 Thread mbraybrook

As for a proper example i can't do that too well as i don't have any
original code to work with but something like this may work:

html:
div id=container
img src=path/to/img.ext/
div id=menu class=menu
!-- menu stuff here --
/div
/div

JScript:
script
//Add a listener to the #container div, rather than the img.
$('#container').mouseover(function(){ $('#menu').show()  });
$('#container').mouseout(function(){ $('#menu').hide()  });
/script

Without any example from you, this may well be useless unfortunately,
but the theory, at least to me, should work.

HTH
Mark


On Sep 9, 12:53 pm, Aaron [EMAIL PROTECTED] wrote:
 ok my problem is that I have the user upload a image file this image
 file on the page is a picture of them.

 What I want to do is when the mouse is over the image I want to fade
 in a menu this menu would contain buttons for editing the which photo
 to show and many other things about the image.

 the problem I run into is I seek a if statement. I want the mouse over
 the image to when going off meaning mouseout I want to fade out the
 menu only if the mouse is not on the menu.

 If I just put a mouseover and a mouseout on this image it would fade
 in the menu and when you try to put the mouse on the menu it would
 fade out.

 SO  I just made the mouseover and mouseout for both the menu and the
 persons image.
 This caused a bad effect. When you put the  mouse over the persons
 image it would fade in the menu and when you go off the image to go on
 the menu the menu would fade out and then fade back in.

 I want it in a way where when  my mouse leaves the persons image that
 if the mouse is on the menu it would fade out at all and only fade out
 only if the mouse is not on the persons image or the menu.

 How can I do this ??? can you give an example???


[jQuery] Re: jQuery and swapping name values

2008-09-09 Thread mbraybrook

You may have to replace slideToggle with a conditional .hide() .show()
and some other information.

Pseudo-code:
.: Check the state of the two divs seperately, perhaps by providing
unique ID's for each one?
.: If one is hidden, show it and set the name attribute to data01
.: if one is shown, hide it and set the name attribute to data02

Sorry, no code, writing this in a bit of a rush.  I can supply code
later if you would like?

Hope this helps, though i may have missed the point of the question!?

Regards
Mark

On Sep 8, 11:01 pm, Velcrobelly [EMAIL PROTECTED] wrote:
 I am using the following to do a Hide/Show feature, and it works
 exactly as I want...

 --snip-
 script type=text/javascript
 $(function(){
         $('#sender').click(function(){
                         $('#container div.toggleit').slideToggle('normal');
         });});

 /script

 style type=text/css
 table#container div.hidden { display: none; }
 /style

 table id=container
 tr
 tdinput type=checkbox id=sender /
 div class=toggleitinput name=data01 type=text value=show
 first/div
 div class=toggleit hiddeninput name=data02 type=text
 value=show second/div/td
 /tr
 tr
 /table
 -end snip-

 But now I need to be able to swap the name values of the text fields
 on the toggle as well, so that the visible text field always carries
 the name value of data01.

 I cannot figure out how to do this and hope someone can help out.

 I hope this makes sense, and thank you in advance for any help...


[jQuery] Re: javascript enabled

2008-09-09 Thread mbraybrook

Whether or not a user has javascript is not something you would use
javascript for (if you use javascript, detecting a user that has not
got javascript is, by definition, impossible.
Alternatively, do some research into the html noscript attribute,
this will allow you to provide for those who do not have javascript at
all.

As for versions of Javascript (settings etc), it is often not
necessary, JQuery performs a lot of cross-browser/platform
compatibility testing and function replacements/supplements
internally, often you need only to call a function and the rest is
handled by JQuery.

Does this answer your question or have i missed the point?

Regards
Mark

On Sep 9, 8:30 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hello again,
 howcan be detect whether or not the user has javascript enabled and
 then write certain if statements to account for that. How do I detect
 a user's javascript setting?

 thanks for ur help :)

 samrad


[jQuery] jdMenu problem in IE6 IE7

2008-09-09 Thread Jason Stanbery

I will preface with the statement that I'm not a javascript super
star.

My drop down menu isn't functioning for either IE6 or IE7. In FF2 on
Windows it works, acts a little funny sometimes, works fine on FF3 
Safari on Mac. If I was to guess, I would probably guess that the
issue is in my customization of the style sheet though it appears drop
down menus and IE aren't best friends.

Link to site:
http://flyartinc.com/newsite/

Link to menu style sheet:
http://flyartinc.com/newsite/styles/jquery.jdMenu.css

Any help would be appreciated.


[jQuery] Re: Using JQuery with other libraries (Lightbox)

2008-09-09 Thread mbraybrook


I must add at this point that if at all possible eradicate the
requirement for 2 javascript libraries.

Javascript libraries, though incredibly useful, are fairly large in
size, and using two can raise all sorts of performance issues.

As you stated you are a novice it think its more important that you
work to use just one library, 1) getting used to a single library is a
lot easier to handle, 2) it is very important to get into good
practices early.

If I had to choose between the two, I'd suggest you opt for JQuery,
it's served me better historically than Prototype, but that is
personal opinion.

Regards
Mark

On Sep 9, 7:50 am, adeking [EMAIL PROTECTED] wrote:
 Hi,

 I have read the documentation on using JQuery with other libraries by
 using the Noconflict call.  I have to admit to being a total novice at
 this.

 I want to use Jquery to do a text replace on my search box for my site
 - and I have lightbox working for my images.

 I cannot get the two libraries to work together.  If I try to
 implement both then only Lightbox will work.  If I comment out
 lightbox then JQuery works.

 The code from my head tag is below and here is the link 
 -http://www.macmillan-academy.org.uk/zeltha/index.php

 script type=text/javascript src=js/common.js/script
                 script language=JavaScript src=tabs/nav-h.js type=text/
 JavaScript/script

         script type=text/javascript src=?php print
 $root.lightbox2.04/js/prototype.js?/script
                 script type=text/javascript src=?php print 
 $root.lightbox2.04/
 js/scriptaculous.js?load=effects,builder?/script
         script type=text/javascript src=?php print
 $root.lightbox2.04/js/lightbox.js?/script
         script type=text/javascript src=?php print $root.js/
 jquery.js?/script
         script language=JavaScript src=?php print $root.js/
 jquery.hint.js? type=text/JavaScript/script

                 script type=text/javascript charset=utf-8
                 var $j =jQuery.noConflict();
                     $(function(){
                         // find all the input elements with title
 attributes
                         $('input[title!=]').hint();
                     });
                 /script

 Many thanks for your time.


[jQuery] Why doesn't my prev() work?

2008-09-09 Thread Keir

Hi,

I'm sure to a whizz this is going to be a bit of a noob question, but
why doesn't my prev() work here:

script type=text/javascript
$(document).ready(function() {
$('.child').hide();
$('name=selected').prev('.child').show();
});
/script


HTML:

ul class=parent
lia href=test 1/a/li
lia href=test 1/a
ul class=child
lia href= name=selectedtest 1/a/li
lia href=test 1/a/li
/ul
/li
lia href=test 1/a
ul class=child
lia href=test 1/a/li
lia href=test 1/a/li
/ul
/li
/ul

Cheers chaps,

Keir


[jQuery] Any Fortune 500 using the Google Ajax Hosting?

2008-09-09 Thread rcherny

Hey, I'm implementing jQuery for a fairly large company, and was asked
by their team if we knew if anyone in the Fortune 500 was using the
Google Ajax hosting:

http://code.google.com/apis/ajaxlibs/

They have some IT issues which are preventing proper server
configurations in the short term at least, so this was seen as a way
to help improve things.

However, they seem to be skeptical for some reason...

I know some fairly big names are using jQuery, but just wondered if
anyone knew of any off hand worth mentioning that were using Google.

Just curious. Thanks



[jQuery] Re: Selecting a checkbox by clicking anywhere on a row

2008-09-09 Thread Michael Smith

Except ... (sorry to come back on this one)

I'm trying to do something else ('growl' actually but that's not
important for the purposes of the issue) when the user checks/unchecks
the box

http://dev2.savingforchildren.co.uk/mjs/row_select_2.epl

As this demo now shows, when you check the box itself it does what
would be expected.  But when you click somewhere on the row, the
checked attribute doesn't actually get set (or at least not at this
point).

Thanks

Michael

On Tue, Sep 9, 2008 at 11:17 AM, Michael Smith [EMAIL PROTECTED] wrote:
 Thank you - this seemed the neatest solution and worked nicely for me.

 Michael

 On Tue, Sep 9, 2008 at 12:53 AM, Karl Swedberg [EMAIL PROTECTED] wrote:
 Hi Michael,
 You could do it a little differently. This should work:
 $('.myrow').click(function(event) {
   if (event.target.type != 'checkbox') {
 $('input:checkbox', this).trigger('click');
   }
 });
 so, when the user clicks somewhere in the row, if the click isn't directly
 on a checkbox, it triggers a click for that row's checkbox.
 --Karl
 
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com



 On Sep 8, 2008, at 4:18 PM, Michael Smith wrote:

 Thanks for the reply.

 I added a return false;

 http://dev.savingforchildren.co.uk/mjs/row_select_2.epl

 But it doesn't seem to make any difference.

 Am I missing something?

 Thanks again

 Michael


 On Mon, Sep 8, 2008 at 7:18 PM, Danny [EMAIL PROTECTED] wrote:

 add  return false;  to your click handler to keep the click from

 getting to the checkbox itself.

 Danny

 On Sep 8, 10:55 am, Michael Smith [EMAIL PROTECTED] wrote:

 Hi there,

 I'm trying to make a page which automatically toggles a checkbox when

 you click anywhere on the row.

 Here's a version I've cut down to the bare bones to illustrate

 http://dev.savingforchildren.co.uk/mjs/row_select.epl

 It seems to work fine unless the user actually clicks on the checkbox

 itself.  In this case it seems that it actually gets toggled twice and

 so reverts to its original state.

 Any suggestions on the cleanest / simples way to avoid this? (I can

 think of a few messy ways)

 Thanks

 Michael






[jQuery] Superfish with custom backgrounds

2008-09-09 Thread Nathan

I am looking to see if I can specify two images tiles.  One for the on
state and one for the hover state of the primary navigation.  All
other sub navs would just have a solid bgcolor for their background.

Anyone done this yet?

Nathan


[jQuery] Re: jQuery and swapping name values

2008-09-09 Thread Velcrobelly

I am doing this for a custom layout that I can only upload basic HTML/
JavaScript to.

When the page is rendered, the server unfortunately strips 'non-
allowed' ID settings from the tags.

Is it possible to do without setting ID values in the input tags?

- VB

On Sep 9, 8:14 am, mbraybrook [EMAIL PROTECTED] wrote:
 You may have to replace slideToggle with a conditional .hide() .show()
 and some other information.

 Pseudo-code:
 .: Check the state of the two divs seperately, perhaps by providing
 unique ID's for each one?
 .: If one is hidden, show it and set the name attribute to data01
 .: if one is shown, hide it and set the name attribute to data02

 Sorry, no code, writing this in a bit of a rush.  I can supply code
 later if you would like?

 Hope this helps, though i may have missed the point of the question!?

 Regards
 Mark

 On Sep 8, 11:01 pm, Velcrobelly [EMAIL PROTECTED] wrote:

  I am using the following to do a Hide/Show feature, and it works
  exactly as I want...

  --snip-
  script type=text/javascript
  $(function(){
          $('#sender').click(function(){
                          $('#container div.toggleit').slideToggle('normal');
          });});

  /script

  style type=text/css
  table#container div.hidden { display: none; }
  /style

  table id=container
  tr
  tdinput type=checkbox id=sender /
  div class=toggleitinput name=data01 type=text value=show
  first/div
  div class=toggleit hiddeninput name=data02 type=text
  value=show second/div/td
  /tr
  tr
  /table
  -end snip-

  But now I need to be able to swap the name values of the text fields
  on the toggle as well, so that the visible text field always carries
  the name value of data01.

  I cannot figure out how to do this and hope someone can help out.

  I hope this makes sense, and thank you in advance for any help...


[jQuery] Re: Problem with Tablesorter Pager plugin - there should be an option to turn off absolute positioning of pager container

2008-09-09 Thread Eric

Try adding the option positionFixed: false, like so:

tablesorterPager({container: $(#pager),positionFixed: false});

Here are the other defaults:
this.defaults = {
size: 10,
offset: 0,
page: 0,
totalRows: 0,
totalPages: 0,
container: null,
cssNext: '.next',
cssPrev: '.prev',
cssFirst: '.first',
cssLast: '.last',
cssPageDisplay: '.pagedisplay',
cssPageSize: '.pagesize',
seperator: /,
positionFixed: true,
appender: this.appender
};

On Aug 20, 7:05 pm, ptepper [EMAIL PROTECTED] wrote:
 In the Tablesorter Pager plugin, on line 25, the position of the pager
 UI container is always set to absolute. In some cases, you want it to
 be positioned differently -- I embedded a table in a page with a lot
 of other preexisting content, and the pager was placed on top of some
 other elements. I removed the absolute position part myself, but it
 shouldn't be set to absolute by default.

 On a related note, the documentation for the Pager is unclear. It's
 not obvious that you have to create all the Pager elements yourself.
 You have to look at the source code for the page to see how it's
 working, and it's not clear that you're supposed to create all the
 images and form elements yourself. There should be some instructions
 stating that you need to copy this code, or something like it, to make
 the pager work. Many jQuery plugins just require you to specify an Id
 for a container, and add code like this automatically, and there's no
 instructions telling you to download or create the images (the PNGs
 here) and set all this up:

 div id=pager class=pager
         form
                 img src=../addons/pager/icons/first.png
 class=first/
                 img src=../addons/pager/icons/prev.png class=prev/

                 input type=text class=pagedisplay/
                 img src=../addons/pager/icons/next.png class=next/

                 img src=../addons/pager/icons/last.png class=last/

                 select class=pagesize
                         option selected=selected  value=1010/
 option

                         option value=2020/option
                         option value=3030/option
                         option  value=4040/option
                 /select
         /form
 /div

 Otherwise, the plugin is great - works perfectly and is faster than
 any other similar things I've tried in other Javascript frameworks.


[jQuery] Re: javascript enabled

2008-09-09 Thread Sarmad AL-Saiegh
hi, thanks alot. ur answer was quit good :)
the tip about noscript helped me to much.

best wishes 2 u :)

sarmad

On Tue, Sep 9, 2008 at 3:24 PM, mbraybrook [EMAIL PROTECTED] wrote:


 Whether or not a user has javascript is not something you would use
 javascript for (if you use javascript, detecting a user that has not
 got javascript is, by definition, impossible.
 Alternatively, do some research into the html noscript attribute,
 this will allow you to provide for those who do not have javascript at
 all.

 As for versions of Javascript (settings etc), it is often not
 necessary, JQuery performs a lot of cross-browser/platform
 compatibility testing and function replacements/supplements
 internally, often you need only to call a function and the rest is
 handled by JQuery.

 Does this answer your question or have i missed the point?

 Regards
 Mark

 On Sep 9, 8:30 am, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
  Hello again,
  howcan be detect whether or not the user has javascript enabled and
  then write certain if statements to account for that. How do I detect
  a user's javascript setting?
 
  thanks for ur help :)
 
  samrad




-- 
Sarmad AL-Saiegh
http://live.cs.uni-magdeburg.de/~alsaiegh/


[jQuery] Re: jQuery and swapping name values

2008-09-09 Thread Velcrobelly

I will try to be clearer...

The checkbox controls the hide/show toggle of the two divs.

Initially, the first div is visible and the name value for the input
field in it is 'data01'. The second div is hidden and the name value
of the input field in it is 'data02'.

When the checkbox is clicked the first div is hidden and the second
becomes visible. This works as planned using the code above.

However I also need the name values of the two input fields to swap.
So...

The first div becomes hidden and the name value for the input field in
it changes from 'data01' to 'data02'. The second div becomes visible
and the name value for the input field in it changes from 'data02' to
'data01'.

If the checkbox is then unchecked, it needs to switch back to it's
original state.

I hope this makes more sense.

On Sep 9, 8:00 am, tlob [EMAIL PROTECTED] wrote:
 Can you be more specific? I dont get it
 Sorry

 You fill out the first Input, save the form via a submit button and
 then?

   But now I need to be able to swap the name values of the text fields
   on the toggle as well, so that the visible text field always carries
   the name value of data01.


[jQuery] Re: Fire events programmatically

2008-09-09 Thread Huub


I don't think that trigger() does the trick.

First of all i tested it.
second, more important, things like createEvent,
dispatchEvent,fireEvent do not appear in jQuery.js


Regards, Huub



On Sep 8, 11:11 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
 Isn't that the same as this:

 $(#ID1).trigger(change);

 -- Josh

 - Original Message -
 From: Huub [EMAIL PROTECTED]
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Monday, September 08, 2008 11:30 AM
 Subject: [jQuery]Fireevents programmatically

  Sometimes it's needed to create an event programmatically. (Which is
  different from running an event function (triggering)

  This can be done by the followingfirecode

  var el=document.getElementById(ID1)

 fire(el,'change')

    functionfire(evttype) {
        if (document.createEvent) {
          var evt = document.createEvent('HTMLEvents');
          evt.initEvent( evttype, false, false);
          el.dispatchEvent(evt);
        } else if (document.createEventObject) {
          el.fireEvent('on' + evttype);
        }
    }
  looks like this trick is not yet in jQuery, perhaps for a reason?

  Huub

  Regards


[jQuery] Re: jdMenu problem in IE6 IE7

2008-09-09 Thread Jason Stanbery

I commented out stuff and noticed that the menu is showing, it's
failing due to the z-index IE bug, staying behind page content in both
IE6  IE7.

On Sep 9, 8:58 am, Jason Stanbery [EMAIL PROTECTED] wrote:
 I will preface with the statement that I'm not a javascript super
 star.

 My drop down menu isn't functioning for either IE6 or IE7. In FF2 on
 Windows it works, acts a little funny sometimes, works fine on FF3 
 Safari on Mac. If I was to guess, I would probably guess that the
 issue is in my customization of the style sheet though it appears drop
 down menus and IE aren't best friends.

 Link to site:http://flyartinc.com/newsite/

 Link to menu style sheet:http://flyartinc.com/newsite/styles/jquery.jdMenu.css

 Any help would be appreciated.


[jQuery] SuperFish - always display some submenu items

2008-09-09 Thread Andrew Lysyuk

For some pages I want some menu-items to be always dropped-down. For
example, I have li elements with class=no. I need Superfish don't
react to events on the submenu inside this element.


[jQuery] Re: JQuery Form Plugin and json

2008-09-09 Thread Mike Alsup

  I'm using the jQuery Form PlugIn(http://www.malsup.com/jquery/form/)
  to handle my Forms. I like it, but I have a question about an
  improvment:
  At this time all form fields are send using post, but it wold be nice,
  to send all form fields json encoded as one post parameter.

  Is there a way to do this?

 I still searching for a solution for this...

 Hope, the developer is reading here :-)

 Greetings,
 Stefan Sturm


It's not supported by the plugin, but you can hook the beforeSubmit
event and change what is posted to the server.  beforeSubmit is passed
an array of objects with name and value properties.  You could iterate
over these, build your json string, and then replace the array
contents with a single object that has name and value properties,
where the value prop is the json string.

Mike






Mike


[jQuery] Re: Selecting a checkbox by clicking anywhere on a row

2008-09-09 Thread Wooty

Hi Michael,

Have you checked out the stopPropagation() method for events?

eg:
$(check_id).click(function(e){
   e.stopPropagation();
});

This may help - I have used this on a clickable image on a table row
to stop the click expanding / contracting the table row.

Cheers

P

On Sep 9, 2:59 pm, Michael Smith [EMAIL PROTECTED] wrote:
 Except ... (sorry to come back on this one)

 I'm trying to do something else ('growl' actually but that's not
 important for the purposes of the issue) when the user checks/unchecks
 the box

 http://dev2.savingforchildren.co.uk/mjs/row_select_2.epl

 As this demo now shows, when you check the box itself it does what
 would be expected.  But when you click somewhere on the row, the
 checked attribute doesn't actually get set (or at least not at this
 point).

 Thanks

 Michael

 On Tue, Sep 9, 2008 at 11:17 AM, Michael Smith [EMAIL PROTECTED] wrote:
  Thank you - this seemed the neatest solution and worked nicely for me.

  Michael

  On Tue, Sep 9, 2008 at 12:53 AM, Karl Swedberg [EMAIL PROTECTED] wrote:
  Hi Michael,
  You could do it a little differently. This should work:
  $('.myrow').click(function(event) {
    if (event.target.type != 'checkbox') {
      $('input:checkbox', this).trigger('click');
    }
  });
  so, when the user clicks somewhere in the row, if the click isn't directly
  on a checkbox, it triggers a click for that row's checkbox.
  --Karl
  
  Karl Swedberg
 www.englishrules.com
 www.learningjquery.com

  On Sep 8, 2008, at 4:18 PM, Michael Smith wrote:

  Thanks for the reply.

  I added a return false;

 http://dev.savingforchildren.co.uk/mjs/row_select_2.epl

  But it doesn't seem to make any difference.

  Am I missing something?

  Thanks again

  Michael

  On Mon, Sep 8, 2008 at 7:18 PM, Danny [EMAIL PROTECTED] wrote:

  add  return false;  to your click handler to keep the click from

  getting to the checkbox itself.

  Danny

  On Sep 8, 10:55 am, Michael Smith [EMAIL PROTECTED] wrote:

  Hi there,

  I'm trying to make a page which automatically toggles a checkbox when

  you click anywhere on the row.

  Here's a version I've cut down to the bare bones to illustrate

 http://dev.savingforchildren.co.uk/mjs/row_select.epl

  It seems to work fine unless the user actually clicks on the checkbox

  itself.  In this case it seems that it actually gets toggled twice and

  so reverts to its original state.

  Any suggestions on the cleanest / simples way to avoid this? (I can

  think of a few messy ways)

  Thanks

  Michael


[jQuery] Re: Fire events programmatically

2008-09-09 Thread Richard D. Worth
Sounds like you may be interested in jquery.simulate:

http://dev.jquery.com/view/tags/ui/latest/tests/simulate/jquery.simulate.js

It will create and fire/dispatch mouse and keyboard events. Here's an
example of use:

$(#myEl).simulate(mousedown, { clientX: 50, clientY: 100 });

Browser support for elements and events is quite mixed.

- Richard

On Tue, Sep 9, 2008 at 10:07 AM, Huub [EMAIL PROTECTED] wrote:



 I don't think that trigger() does the trick.

 First of all i tested it.
 second, more important, things like createEvent,
 dispatchEvent,fireEvent do not appear in jQuery.js


 Regards, Huub



 On Sep 8, 11:11 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
  Isn't that the same as this:
 
  $(#ID1).trigger(change);
 
  -- Josh
 
  - Original Message -
  From: Huub [EMAIL PROTECTED]
  To: jQuery (English) jquery-en@googlegroups.com
  Sent: Monday, September 08, 2008 11:30 AM
  Subject: [jQuery]Fireevents programmatically
 
   Sometimes it's needed to create an event programmatically. (Which is
   different from running an event function (triggering)
 
   This can be done by the followingfirecode
 
   var el=document.getElementById(ID1)
 
  fire(el,'change')
 
 functionfire(evttype) {
 if (document.createEvent) {
   var evt = document.createEvent('HTMLEvents');
   evt.initEvent( evttype, false, false);
   el.dispatchEvent(evt);
 } else if (document.createEventObject) {
   el.fireEvent('on' + evttype);
 }
 }
   looks like this trick is not yet in jQuery, perhaps for a reason?
 
   Huub
 
   Regards



[jQuery] File Exists

2008-09-09 Thread Pete
Hi all-

Looking for a way to determine if a file exists before uploading.  I'm
working in asp.net and jquery, essentially my idea was to capture the submit
of the form, and .get the file name to another page that would return
true/false if the file existed.  If exists, confirm file overwrite, if not
just post it.

Problem is currently, it doesn't always catch that the file exists, and if I
do get the confirm it seems to be ignored and just posts anyhow.

Here's some of the code:

asp:FileUpload ID=FileUpload1 runat=server /
asp:Button ID=Button1 runat=server Text=Submit /



$(function(){
$(#form1).submit(function() {
return fileexists();
});
});

function fileexists()
{
$.get(Exists.aspx, { file: $(#FileUpload1).val() },
function(data){
if(data.toLowerCase() == true)
{
return confirm(Overwrite);
}
else
{
return true;
}
});
}



Any help is appreciated,
Pete


[jQuery] How to validate multiple fields with AJAX simultaneously before submit

2008-09-09 Thread ryanstreet

Hello,

I am working with Jquery's validate script and form script as well for
Ajax submits.  I want to validate a credit card field against another
field with my ajax call, but the way the form is set up it only spits
one field per validation.

Any ideas or help?

Thanks in advance!

snippet:...
PrimaryCCType: {
required: #PrimaryCCRadio:checked
},
PrimaryCCNumber: {
required: #PrimaryCCRadio:checked,
remote: ../ajax/validateCreditCard.php
},


[jQuery] Re: autocomplete questions

2008-09-09 Thread Shelane

To no avail, I tried adding this line:

$('#topic1').trigger('keydown');

I also tried it as:

$('#topic1').trigger('keypress');

to make this function like this:

$('#topic1').focus(function(){
$('#topic1').search();
$('#topic1').trigger('keydown');
});

neither caused it to work.

As I did mention, the .search worked to cause the query to go to the
server and the server returned results, but the results weren't
displayed.

On Sep 8, 11:11 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Sorry I wasn't very clear, I don't mean to have your users do that, I
 mean it gave you a clue how that function worked.
 You need to add an on-focus event to the field that then bubbles a key-
 up event that will trigger the autocomplete for the user.

 http://docs.jquery.com/Release:jQuery_1.2/Events

 On Sep 8, 11:07 am, Shelane Enos [EMAIL PROTECTED] wrote:

  This worked.  Thanks.

  Now, if I can just get something for question 2 :-)

  On 9/8/08 10:45 AM, MorningZ [EMAIL PROTECTED] wrote:

   For

   Can you submit additional parameters based on the value of another
   input field?

  http://docs.jquery.com/Plugins/Autocomplete#Dependencies_between_fields


[jQuery] Re: selectors in $.post return with HTML context

2008-09-09 Thread Michael Geary

I assume that you can do the cross-domain Ajax call because this runs in the
browser chrome, is that right? If the Ajax call fails, then of course you
won't get very far.

Past that, I would take the code that is failing and break it down to see
what data you have at each step:

jQuery(textarea:first, ajdata).val()

What's in ajdata? Is it what you expect?

If it is, then what does jQuery('textarea:first',ajdata) return? A jQuery
object, no doubt, but how many elements? What's in that object's .length and
[0]?

BTW I would probably code it this way instead:

jQuery(ajdata).find('textarea:first').val()

I think that's a lot more clear than the (selector,context) notation. It
should do about the same thing internally, so if the original code didn't
work, I wouldn't expect this to work either - but you could try it and see.

If it didn't work, my debugging breakdown would be:

  typeof ajdata
  ajdata
  jQuery(ajdata)
  jQuery(ajdata).length
  jQuery(ajdata)[0]
  jQuery(ajdata).find('textarea:first')
  jQuery(ajdata).find('textarea:first').length
  jQuery(ajdata).find('textarea:first')[0]

-Mike

 From: [EMAIL PROTECTED]
 
 Sure thing.
 
 Here is the whole ubiquity (http://labs.mozilla.com/2008/08/
 introducing-ubiquity/) command in its current form.  The 
 relevant section is at the end.
 
 CmdUtils.CreateCommand({
   name: tag-cloud,
   takes: {body_of_text: noun_arb_text},
 
   description: Replaces selected text with a frequency-based 
 tag cloud.,
 
   preview: Creates a tag cloud out of selected text.,
   execute: function(statusText) {
 if(statusText.text.length  100) {
   displayMessage(You probably want to selecet more text 
 to make a decent cloud);
   return;
 };
 
 var updateUrl = http://tagcrowd.com/index.pl;;
 var updateParams = {
   name: tagcrowd,
   text: statusText.text,
   doStemming: yes
 };
 
 jQuery.post(updateUrl, updateParams, function(ajdata) {
   displayMessage(jQuery(textarea:first, ajdata).val());
   },
   html);
   }
 });
 
 The page I'm POST-ing to, and getting the contents of is:
 http://tagcrowd.com/index.pl
 Basically I just want to use a selector on that returned 
 page, but passing it in as the context doesn't seem to work . 
 . .or I'm doing it wrong.
 
 Thanks. :)
 
 On Sep 7, 6:13 pm, Michael Geary [EMAIL PROTECTED] wrote:
  Can you post a link to a test page that illustrates what 
 you're trying 
  to do and what isn't working? It's pretty hard to tell what 
 might be 
  wrong without seeing things like the HTML that the $.post() returns.
 
  -Mike
 
   From: [EMAIL PROTECTED]
 
   I'm having trouble using a subsequent selector on an HTML page 
   returned from $.post, while trying to write a Ubiquity command.
 
   If I log or display ajdata, as returned from the $.post, 
 it contains 
   the HTML page, as expected, and shows up as a jQuery object in 
   Firebug.
 
   What I want to do is use a jQuery selector to extract a named 
   textarea within the returned HTML, so I plug in the object as the 
   context and provide a selector, as below:
 
   jQuery.post(updateUrl, updateParams, function(ajdata) {
 
   CmdUtils.log(jQuery(textarea[name=cloudsource],
   ajdata).val()) },  html);
 
   Firebug just gives me unknown for the response.  If I 
 remove the 
   slector, and just pass ajdata to CmdUtils.log, then I 
 see a jQuery 
   object in Firebug.
 
   At first I thought my selector was in error, but even 
 changing it to 
   obvious things like body, div, etc produced the same 
 undefined
   in Firebug, so I guess I'm misunderstanding how context works for 
   jQuery.  Any insight would be appreciated.
 



[jQuery] Re: Any Fortune 500 using the Google Ajax Hosting?

2008-09-09 Thread Bil Corry


rcherny wrote on 9/9/2008 7:36 AM: 

Hey, I'm implementing jQuery for a fairly large company, and was asked
by their team if we knew if anyone in the Fortune 500 was using the
Google Ajax hosting:

http://code.google.com/apis/ajaxlibs/

They have some IT issues which are preventing proper server
configurations in the short term at least, so this was seen as a way
to help improve things.

However, they seem to be skeptical for some reason...


I don't recommend the Google AJAX hosting to my clients.  Here's why: the 
jQuery library is small to begin with, so we're not talking about saving oodles 
of bandwidth, and if you set the Expires header to expire in a year, then the 
browser will only download it once per year for your site (unless the user 
clears their browser cache):

http://developer.yahoo.com/performance/rules.html#expires

So assuming the browser's cache isn't cleared, the browser will just use the 
cached version without having to send a HTTP request.  That's as little 
overhead as you can possibly achieve resulting in the best performance.

Google, on the other hand, doesn't use the Expires header, they instead use the 
Last-Modified header.  This means that instead of the browser just outright 
using the cached jQuery library, it first has to ask Google if the file has 
been modified for *every* page on your site that uses the jQuery library.  All 
of those unnecessary HTTP requests (one per page) add overhead and degrade 
performance.  So the irony here is that you will get BETTER performance for 
your users by hosting the jQuery library yourself and using the Expires header.

So why doesn't Google use the Expires header given it would provide the best 
performance?  The only reason to do what Google is doing (using the 
Last-Modified header) would be if the resource could changed at any given 
moment.  But the AJAX libraries are all versioned and will never change (there 
would be a new version).  So that can't be it.  Which leaves us with only one 
other reason (that I can think of) which is the Last-Modified header allows 
Google to track the visitors using your site on every page that uses the jQuery 
library.


- Bil




[jQuery] Re: New jQuery Website...

2008-09-09 Thread Chris Jordan
I just looked at the site in IE7 and I'm not seeing any problems. I clicked
around in the documentation, and tutorials area, and just didn't notice a
problem. Jeremy, maybe you *should* provide some specifics... either that or
I'm blind! :o)

Chris

On Mon, Sep 8, 2008 at 12:26 PM, jeremyBass [EMAIL PROTECTED] wrote:


 I don't know if this is just me but the site is all kinds of broken...
 I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs...
 I'd give a url but ... well it's almost everywhere... cool idea
 though...

 On Sep 8, 10:03 am, Rick Faircloth [EMAIL PROTECTED] wrote:
  Yes, it does look great!
 
  Rick
 
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Chris Jordan
  Sent: Monday, September 08, 2008 12:58 PM
  To: jQuery Group
  Subject: [jQuery] New jQuery Website...
 
  I really like the look of the new jQuery website. When did it get
 launched? My hats off to the
  designers! It looks fantastic!! :o)
 
  Chris
 
  --http://cjordan.us
 
  No virus found in this incoming message.
  Checked by AVG -http://www.avg.com
  Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date: 9/8/2008
 7:01 AM




-- 
http://cjordan.us


[jQuery] Re: Any Fortune 500 using the Google Ajax Hosting?

2008-09-09 Thread rcherny

Hey Bill, thanks for the response.

 I don't recommend the Google AJAX hosting to my clients.  Here's why: the 
 jQuery library is small to begin with, so we're not talking about saving 
 oodles of bandwidth, and if you set the Expires header to expire in a year, 
 then the browser will only download it once per year for your site (unless 
 the user clears their browser cache):

As I'd indicated, they have some IT issues which are preventing server
configuration changes for the time being. That's the motivation, so
they can't actually set those expires headers, compress the files,
etc.

Best,

:rob


[jQuery] Expanded Div in which images change on mouseover

2008-09-09 Thread capnhud

I know that on a href=http://www.wilson.com/wilson/home/
index.jspthis/a site the navigation is flash based, but is it
possible to do this with plain old html, css and some form of jquery.
If so what plugin would I be looking for? The closest I seen was
jDrawer, but that does not appear to be the right one for the job.

I have looked at various accordion menus, but each one that I seen
involves basically a section that moves or slides rather than just the
div remaining in place while an image changes when mousing over the
links.


[jQuery] move object with all events.

2008-09-09 Thread Ami

Sorry about my grammar, English isn't my tango

$(#elment).click (  function () { alert('ok') } );

Now, when I move the element:

$(#element).insertAfter( otherElement);

The click event is automatically unbind. How Can I fix it?


[jQuery] Re: how to control a imageover making one image to fade in a menu and fade out when....

2008-09-09 Thread Aaron

ok this is what I have right now in javascript:

$(document).ready(function(){

$(document).pngFix();
$(#picmenu).hide();
  $(#userimage).mouseover(function(){
 $(#picmenu).fadeIn(slow);});$(#userimage).mouseout(function(){
 $(#picmenu).fadeOut(slow);});
$(#picmenu).mouseover(function(){  $(#picmenu).fadeIn(fast);});
$(#picmenu).mouseout(function(){ $(#picmenu).fadeOut(slow);});
});

userimage is the image of the user. The picmenu is the menu I want to
fade it.





[jQuery] Re: selectors in $.post return with HTML context

2008-09-09 Thread [EMAIL PROTECTED]

I believe I found the problem, but haven't tested the update yet.
According to the Learning jQuery book, I can't traverse AJAX'd HTML
content until I insert it into the current DOM.  I'll be testing
inserting it into a hidden DIV and then going to town.  Hopefully it
works. . .

On Sep 8, 8:18 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Sure thing.

 Here is the whole ubiquity (http://labs.mozilla.com/2008/08/
 introducing-ubiquity/) command in its current form.  The relevant
 section is at the end.

 CmdUtils.CreateCommand({
   name: tag-cloud,
   takes: {body_of_text: noun_arb_text},

   description: Replaces selected text with a frequency-based tag
 cloud.,

   preview: Creates a tag cloud out of selected text.,
   execute: function(statusText) {
     if(statusText.text.length  100) {
       displayMessage(You probably want to selecet more text to make a
 decent cloud);
       return;
     };

     var updateUrl = http://tagcrowd.com/index.pl;;
     var updateParams = {
                 name: tagcrowd,
                 text: statusText.text,
                 doStemming: yes
     };

     jQuery.post(updateUrl, updateParams, function(ajdata) {
                 displayMessage(jQuery(textarea:first, ajdata).val());
                 },
                 html);
                 }

 });

 The page I'm POST-ing to, and getting the contents of 
 is:http://tagcrowd.com/index.pl
 Basically I just want to use a selector on that returned page, but
 passing it in as the context doesn't seem to work . . .or I'm doing it
 wrong.

 Thanks. :)

 On Sep 7, 6:13 pm, Michael Geary [EMAIL PROTECTED] wrote:

  Can you post a link to a test page that illustrates what you're trying to do
  and what isn't working? It's pretty hard to tell what might be wrong without
  seeing things like the HTML that the $.post() returns.

  -Mike

   From: [EMAIL PROTECTED]

   I'm having trouble using a subsequent selector on an HTML
   page returned from $.post, while trying to write a Ubiquity command.

   If I log or display ajdata, as returned from the $.post, it
   contains the HTML page, as expected, and shows up as a jQuery
   object in Firebug.

   What I want to do is use a jQuery selector to extract a named
   textarea within the returned HTML, so I plug in the object as
   the context and provide a selector, as below:

   jQuery.post(updateUrl, updateParams, function(ajdata) {

   CmdUtils.log(jQuery(textarea[name=cloudsource],
   ajdata).val()) },  html);

   Firebug just gives me unknown for the response.  If I
   remove the slector, and just pass ajdata to CmdUtils.log,
   then I see a jQuery object in Firebug.

   At first I thought my selector was in error, but even
   changing it to obvious things like body, div, etc
   produced the same undefined
   in Firebug, so I guess I'm misunderstanding how context works
   for jQuery.  Any insight would be appreciated.


[jQuery] Re: New jQuery Website...

2008-09-09 Thread fairchild

I like the new site, but also kinda miss the cylinders logo.  I
thought that was such a great logo for jquery,
~michael

On Sep 9, 5:05 am, Rick Faircloth [EMAIL PROTECTED] wrote:
 It's relatively simple to make CSS-based layout work for IE6, IE7, and FF3,
 which are my target browsers for design.  I make sure all my sites work well
 on all three and it doesn't take much extra work at all.

 I use conditional stylesheets for all browser-specific tweaks, so that once
 a browser's use is pretty much over, all I have to do is delete the stylesheet
 rather than change a bunch of tweaked code.

 Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sam 
  Collett
  Sent: Tuesday, September 09, 2008 6:58 AM
  To: jQuery (English)
  Subject: [jQuery] Re: New jQuery Website...

  As much as we don't like it, sites still have to be designed to cater
  for IE 6+

  We are still on IE 6 at work, because some of the systems we use (not
  ones I have worked on of course!) only seem to work in IE 6. You would
  have thought when you pay for a system, it is updated as new browsers
  come out... should be in the Service Level Agreement.

  I'm sure there are still a lot of corporate intranet's still depending
  on IE 6 (developers not caring about standards or really understanding
  web development outside the GUI used...)

  -Sam

  PS While IE7 may have some annoyances (Firefox does too), it is still
  much better (standards wise) than IE6

  jeremyBass wrote:
   I don't know if this is just me but the site is all kinds of broken...
   I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs...
   I'd give a url but ... well it's almost everywhere... cool idea
   though...


[jQuery] bug in fix method?

2008-09-09 Thread [EMAIL PROTECTED]

Hi, All!

I can't submit bug into bug tracker - it says i have no rights.

I found out that fix(event) method in 1.2.6 doesn't copy property
altKey from original event.

I think the cause is the incorrect iteration over array:
var originalEvent = event;
event = { originalEvent: originalEvent };
var props = altKey attrChange attrName bubbles button 
cancelable
charCode clientX clientY ctrlKey currentTarget data detail eventPhase
fromElement handler keyCode metaKey newValue originalTarget pageX
pageY prevValue relatedNode relatedTarget screenX screenY shiftKey
srcElement target timeStamp toElement type view wheelDelta
which.split( );
for ( var i=props.length; i; i-- )
event[ props[i] ] = originalEvent[ props[i] ];

Correct code should looks like:
for ( var i=props.length; i; i-- )
event[ props[i-1] ] = originalEvent[ props[i-1] ];


// Vadim


[jQuery] superfish menu, Error: $(ul.sf-menu) is null

2008-09-09 Thread oconshaw

I'm using the superfish menu with a navigation module in dotnetnuke
that emits the page structure as an unordered list.  Most pages work
fine with the menu system and superfish.  However, some pages give me
the following error: Error: $(ul.sf-menu) is null, source
file:http://blahblahblah.com/default.aspx line: 4

The menu still works using the CSS, but the superfish features fail at
that point.  Any ideas on what is wrong and how to fix?  Thanks.


[jQuery] Re: File Upload

2008-09-09 Thread Jake

People keep claiming that but we haven't been able to reproduce an
Adblock issue internally.  What Adblock rule is blocking SWFUpload?
Maybe we can fix it.

On Aug 28, 4:16 pm, Fabian Alejandro [EMAIL PROTECTED] wrote:
  Hi,

  you can also trywww.swfupload.org, it is fully configurable.

 it isn't compatible with FF3 + Adblock


[jQuery] Validation Plugin Not Working in FF3 but okay in IE, Chrome and Opera 9.5?

2008-09-09 Thread Bill

I am using the great Validation plugin by Jörn Zaefferer (http://
bassistance.de/jquery-plugins/jquery-plugin-validation/). In my
project it is working fine except when the page is viewed with FF3. It
works fine with IE7, Chrome and Opera 9.5.

You can view my post on this project at
http://beckelman.net/post/2008/09/08/Client-Side-Validating-Bulk-Insert-With-jQuery-Validation-Plugin.aspx
and a demo at 
http://beckelman.net/Demos/jQueryValidateDDLAndTBCombo/Default.aspx.

Has anyone run across this problem?

I am using:
jQuery 1.2.6
jQuery validation plug-in 1.4

Thank you.


[jQuery] View a page in flash

2008-09-09 Thread guilhermelima77

www.gamesflash.zip.net


[jQuery] How to read a HTML file outside current directory using Jquery Load function?

2008-09-09 Thread Mulpuru

$(#abc).load(../one.html);

Doesn't work..


[jQuery] Re: Traversing table

2008-09-09 Thread Jayzon

Well, I just tried to get a starting point for the js file:

$(document).ready(function() {
var char_count = $(input).val;
var position = $(input:focus).parent().eq();
var price = 
$(input:focus).parent().parent().children(pricing).
(td).eq(position).(span.price).text();
var result = char_count*price;
});

First step: char_count is defined - it's the value of the input field.
Since all input fields are empty, this value is set as soon as someone
starts typing a number into one of the input fields, right?

Second step: Get the position of the input field in use - is this
possible at all with input:focus? ;)

Third step: Get the price - traversing up from input to td to tr
(missing a step here perhaps, traverse up to table?) then to
tr.pricing down to td with the exact position of the input field cell
down to the span.price in this cell to fetch the text inside it. This
should be transformed from text to a value for calculation, right?

Fourth step: Get the final result by calculating the input value with
the price.

Missing: Replace the 0,00 € in span.result with the calculated result.

Is this in any way right? Or at least a good starting point?

Thanks,

Markus


On 9 Sep., 15:46, Jayzon [EMAIL PROTECTED] wrote:
 Hi Karl,

 I'm not sure if you missed them, but I placed the input fields inside
 the table, they are in tr.calc (the second row in the html in my first
 post). It's just an input / tag. That input field would then be a
 nice starting point, because it's placed directly under the span
 including the price  in the same cell as the span to be modified.

 Greetings,

 Markus

 On Sep 9, 2:23 pm, Karl Swedberg [EMAIL PROTECTED] wrote:

  Hi Markus,

  Can you show us just a bit more of the HTML? It would help a great  
  deal if we could see where the input field is in relation to the spans  
  that you want to modify.

  --Karl

  
  Karl Swedbergwww.englishrules.comwww.learningjquery.com

  On Sep 8, 2008, at 4:38 PM, Jayzon wrote:

   Hi!

   I've got a table with multiple rows which I'd like to traverse in a
   special way - here's the html (for better reading, I just included two
   rows, these rows are duplicated with different values):

   tbody
   tr class=pricing
   tdExample A/td
   tdspan class=price1,20/span euro;/td
   tdspan class=price2,40/span euro;/td
   /tr
   tr class=calc
   tdCalculator/td
   tdinput /span class=result0,00/span euro;/td
   tdinput /span class=result0,00/span euro;/td
   /tr
   /tbody

   What I'd like to do: If an input filed is focussed, a price should be
   calculated. To keep the script as efficient as possible, I want to
   travel up from the input field to the cell above it (i.e. one row up,
   second or third cell in that row). My problem is: How can I traverse
   the DOM in this way?

   I imagine the following: The script should know where the starting
   point was (second or third cell in row) and then get the corresponding
   cell. I'm sure this is possible, but I have no idea how to achieve it.

   If I get the DOM traversing right, I want to get the value of
   span.price to calculate the input with it  update the result in -
   yes, span.result ;-)

   I'm sure this is a pretty easy thing to achieve for people how know
   jQuery well - I unfortunately don't (yet!). Could someone please
   explain this?

   Thanks for your effort!

   Markus- Hide quoted text -

  - Show quoted text -


[jQuery] Re: autocomplete on cloned inputs

2008-09-09 Thread Xinhao Zheng





hi all,

   is there anyone who knows why clone didn't work when input with
aucomplte plugin used.
  is there any walkround solution?

George
peCan wrote:

  I have the same question. Can I use jquery.autocomplete on cloned
inputs?

thx.

On 30 Čec, 13:56, rayfidelity [EMAIL PROTECTED] wrote:
  
  
Hi,

i'm using Jörn Zaefferers autocomplete plugin. Is there a way to make
it work on cloned input fields?

Thanks!

BR

  
  
  






[jQuery] Re: jQuery and swapping name values

2008-09-09 Thread mbraybrook

Hmm, a quandry, I'll do a little testing for you and get back when/if
I can, unless someone else can provide an answer in the mean time.

Regards
Mark

On Sep 9, 3:10 pm, Velcrobelly [EMAIL PROTECTED] wrote:
 I will try to be clearer...

 The checkbox controls the hide/show toggle of the two divs.

 Initially, the first div is visible and the name value for the input
 field in it is 'data01'. The second div is hidden and the name value
 of the input field in it is 'data02'.

 When the checkbox is clicked the first div is hidden and the second
 becomes visible. This works as planned using the code above.

 However I also need the name values of the two input fields to swap.
 So...

 The first div becomes hidden and the name value for the input field in
 it changes from 'data01' to 'data02'. The second div becomes visible
 and the name value for the input field in it changes from 'data02' to
 'data01'.

 If the checkbox is then unchecked, it needs to switch back to it's
 original state.

 I hope this makes more sense.

 On Sep 9, 8:00 am, tlob [EMAIL PROTECTED] wrote:

  Can you be more specific? I dont get it
  Sorry

  You fill out the first Input, save the form via a submit button and
  then?

But now I need to be able to swap the name values of the text fields
on the toggle as well, so that the visible text field always carries
the name value of data01.


[jQuery] Re: javascript enabled

2008-09-09 Thread mbraybrook

Not a problem, glad I could help.

M

On Sep 9, 3:07 pm, Sarmad AL-Saiegh [EMAIL PROTECTED]
wrote:
 hi, thanks alot. ur answer was quit good :)
 the tip about noscript helped me to much.

 best wishes 2 u :)

 sarmad



 On Tue, Sep 9, 2008 at 3:24 PM, mbraybrook [EMAIL PROTECTED] wrote:

  Whether or not a user has javascript is not something you would use
  javascript for (if you use javascript, detecting a user that has not
  got javascript is, by definition, impossible.
  Alternatively, do some research into the html noscript attribute,
  this will allow you to provide for those who do not have javascript at
  all.

  As for versions of Javascript (settings etc), it is often not
  necessary, JQuery performs a lot of cross-browser/platform
  compatibility testing and function replacements/supplements
  internally, often you need only to call a function and the rest is
  handled by JQuery.

  Does this answer your question or have i missed the point?

  Regards
  Mark

  On Sep 9, 8:30 am, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
   Hello again,
   howcan be detect whether or not the user has javascript enabled and
   then write certain if statements to account for that. How do I detect
   a user's javascript setting?

   thanks for ur help :)

   samrad

 --
 Sarmad AL-Saieghhttp://live.cs.uni-magdeburg.de/~alsaiegh/


[jQuery] clueTip plugin DOM manipulation clarification.

2008-09-09 Thread Alex

Hello all -

I downloaded and used Karl Swedberg's (of www.learningjquery.com)
excellent clueTip plugin.  The scenario under which I used it led me
to identify a small issue that I believe was a design decision by Karl
but that behaved differently than I expected it to and, as such, made
me spend a couple hours figuring it out.

I was listing a bunch of products on a page for the company I work for
and, when you clicked on a picture of the product, a tooltip was to
come up listing some of its information as well as containing some
links that allowed you to edit some of the content in there.  So in
the tooltip, which was local and sticky, there were some links with
onclick events that manipulated some of the DOM elements in that same
tooltip.  The onclick events were firing, and the DOM appeared to be
affected when I logged the objects using firebug's console.log API,
but no difference appeared on the screen.

After some frustration, thinking my JavaScript was the culprit, I
noticed that if I clicked a part of the tooltip that incited a change,
closed the tooltip, then clicked the picture of the product again, the
tooltip that came up on that second click would show the DOM
differences.  Upon further investigation and the suggestion of my
coworker, I searched in the source code and noticed that when a
tooltip is opened and has local content, that element is cloned
using .clone(true), which meant that when I selected the tooltip using
'#tooltip_id', it was actually selected the original, not the cloned
one.  I tried passing through a reference to the cloned element using
the 'this' keyword in the onclick attribute, which worked but failed
to redraw the dropshadows on the tooltip for some reason.

For this reason I edited the source code to read
[code]
var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('div/
div').children() : $localContent.html();
[/code]
rather than the original
[code]
var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('div/
div').children().clone(true) : $localContent.html();
[/code]

Many thanks to Karl for this plugin, which I will continue to use.


[jQuery] Re: New jQuery Website...

2008-09-09 Thread jeremyBass

Sure can... the page i was currently on...
http://plugins.jquery.com/project/Intercept
(but it's almost every page...)

and here is a pic for you

http://digitalbarn.tv/Proofs/NCITA/proofs/Untitled-1.jpg

and the browser version IE 7.0.5730.11

which there is a big diff between that and

 IE 7.0.5730.13

if i was to pin it down... i'd say it's a clearing issue.. but i
didn't look at the code... hope that helps
jeremyBass

On Sep 9, 9:54 am, Chris Jordan [EMAIL PROTECTED] wrote:
 I just looked at the site in IE7 and I'm not seeing any problems. I clicked
 around in the documentation, and tutorials area, and just didn't notice a
 problem. Jeremy, maybe you *should* provide some specifics... either that or
 I'm blind! :o)

 Chris





 On Mon, Sep 8, 2008 at 12:26 PM, jeremyBass [EMAIL PROTECTED] wrote:

  I don't know if this is just me but the site is all kinds of broken...
  I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs...
  I'd give a url but ... well it's almost everywhere... cool idea
  though...

  On Sep 8, 10:03 am, Rick Faircloth [EMAIL PROTECTED] wrote:
   Yes, it does look great!

   Rick

   From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of Chris Jordan
   Sent: Monday, September 08, 2008 12:58 PM
   To: jQuery Group
   Subject: [jQuery] New jQuery Website...

   I really like the look of the new jQuery website. When did it get
  launched? My hats off to the
   designers! It looks fantastic!! :o)

   Chris

   --http://cjordan.us

   No virus found in this incoming message.
   Checked by AVG -http://www.avg.com
   Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date: 9/8/2008
  7:01 AM

 --http://cjordan.us- Hide quoted text -

 - Show quoted text -


[jQuery] Re: New jQuery Website...

2008-09-09 Thread Chris Jordan
Hmm... still looks fine to me. I'm using IE 7.0.6001.18000

Yeah, I hope the designer can get this resolved too. Hope these version
numbers help out.

Chris

On Tue, Sep 9, 2008 at 12:05 PM, jeremyBass [EMAIL PROTECTED] wrote:


 Sure can... the page i was currently on...
 http://plugins.jquery.com/project/Intercept
 (but it's almost every page...)

 and here is a pic for you

 http://digitalbarn.tv/Proofs/NCITA/proofs/Untitled-1.jpg

 and the browser version IE 7.0.5730.11

 which there is a big diff between that and

  IE 7.0.5730.13

 if i was to pin it down... i'd say it's a clearing issue.. but i
 didn't look at the code... hope that helps
 jeremyBass

 On Sep 9, 9:54 am, Chris Jordan [EMAIL PROTECTED] wrote:
  I just looked at the site in IE7 and I'm not seeing any problems. I
 clicked
  around in the documentation, and tutorials area, and just didn't notice a
  problem. Jeremy, maybe you *should* provide some specifics... either that
 or
  I'm blind! :o)
 
  Chris
 
 
 
 
 
  On Mon, Sep 8, 2008 at 12:26 PM, jeremyBass [EMAIL PROTECTED]
 wrote:
 
   I don't know if this is just me but the site is all kinds of broken...
   I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs...
   I'd give a url but ... well it's almost everywhere... cool idea
   though...
 
   On Sep 8, 10:03 am, Rick Faircloth [EMAIL PROTECTED] wrote:
Yes, it does look great!
 
Rick
 
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
 On
   Behalf Of Chris Jordan
Sent: Monday, September 08, 2008 12:58 PM
To: jQuery Group
Subject: [jQuery] New jQuery Website...
 
I really like the look of the new jQuery website. When did it get
   launched? My hats off to the
designers! It looks fantastic!! :o)
 
Chris
 
--http://cjordan.us
 
No virus found in this incoming message.
Checked by AVG -http://www.avg.com
Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date:
 9/8/2008
   7:01 AM
 
  --http://cjordan.us- Hide quoted text -
 
  - Show quoted text -




-- 
http://cjordan.us


[jQuery] Re: scrollTo anchor or class in div

2008-09-09 Thread pedalpete

Hey Ariel,

I've kept playing with this, but just can't seem to get it to work.

I've launched my site now, so if you have a chance, can I ask you to
take a look?

The site is www.HearWhere.com - and the scroll I'm trying to get to is
after you select an artist, and the artists shows list appears from an
ajax request.

this is more common with 'Featured Artists' as it seems you have a
better chance that they have a long list of shows.

I can add the 'a' back to the beginning of the id's if that is really
needed, but means I need to change a few things in my code as I
regularly use the id as a number.

Thanks,
Pete

On Sep 7, 9:55 am, Ariel Flesler [EMAIL PROTECTED] wrote:
 ScrollTo doesn't bind, just scrolls, so no need to use LiveQuery to
 call it.
 Also, id's can't start with a number.

 Example:

 function scrollToID( id ) {
   $('#hold').scrollTo( '#'+id, 1000 );

 }

 $('#hold').load('someData.php', function(){
     scrollToID( 'foo' );

 });

 --
 Ariel Fleslerhttp://flesler.blogspot.com/

 On Sep 6, 11:57 pm,pedalpete[EMAIL PROTECTED] wrote:

  Thanks Ariel,

  I guess I should be using scrollTo rather than LocalScroll.

  Unfortunately I won't have a demo up for a few days.

  I started to wonder if part of the problem was that the scrollable
  list is returned via ajax, so I have tried using livequery, but still
  no scrolling.

  Here's the code I'm using now
  [code]
          function scrollToShow(trackid){
          $('#hold').livequery(function(){
          $('#hold').scrollTo($('.holdList #'+trackid));
          });
          }

  [/code]

  the id is a numeric value, so hopefully that won't be causing
  problems.

  Does the code look right to you?
  the  '#hold' is a non-scrolling div, and the '.holdList' is the
  scrolling div.
  I've also tried
  [code]
  $('.holdList').scrollTo($('.#'+trackid'));
  [/code]
  but that didn't work either.

  Thanks for your help,
  Pete
  On Sep 6, 6:16 pm, Ariel Flesler [EMAIL PROTECTED] wrote:

   That function is meant to start a scrolling animation ?

   LocalScroll is meant to be called to prepare the field, that is,
   bound events that will eventually trigger scrolling.
   ScrollTo is the one to call for an instant scroll.

   You either call LocalScroll at start, or ScrollTo manually if you want
   to do all that yourself.

   Note that the 'target' property needs to be the scrollable element.
   If you have a demo online, it'll be easier to pull this out.

   Cheers

   --
   Ariel Fleslerhttp://flesler.blogspot.com/

   On Sep 6, 7:59 pm,pedalpete[EMAIL PROTECTED] wrote:

Thanks Karl, I didn't realize I shouldn't start an id with numeric
characters, I've been doing it for a long time without issue.

I've tried the changes you recommended, but still no scrolling.

I added an 'a' to the beginning of the id, and now my code is

[code]
        function scrollToShow(trackid){
                $.localScroll({
                target: '.holdList li#a'+trackid, //could be a
selector or a jQuery
object too.
                queue:true,
                duration:1000,
                hash:true
        });
        }
[/code]

i've checked that I have the right class name for the list, and that
the id's are in the html properly.

On Sep 6, 2:03 am, Karl Rudd [EMAIL PROTECTED] wrote:

 Use something like id=number1 rather than name=number1. (Just a
 note, technically an id needs to start with a none numeric character).
 Then use target: '#'number' + trackid

 The name attribute is really only for form input elements.

 Karl Rudd

 On Sat, Sep 6, 2008 at 12:17 PM,pedalpete[EMAIL PROTECTED] wrote:

  I've got a div on my page with a scrollable list in it.
  When I load the page, I want the list to scroll to a specific item.
  Each item has a class and name, so I'm trying to address them with
  that.

  I've been toying with the flesler scroll plugins, but am not sure if
  they are what i should be using.

  .scrollTo kept throwing errors at me, but .localScroll doesn't error
  out, but doesn't scroll either.

  here's the code I'm using
  [code]
         function scrollToShow(showid){
                 $.localScroll({
                 target: '.holdList li.'+trackid, //could be a 
  selector or a jQuery
  object too.
                 queue:true,
                 duration:1000,
                 hash:true
         });
         }
  [/code]

  the code for the list is pretty simplelike this
  [code]
  ul class=holdList
         li class=1 name=1first in list/li
         li class=2 name=2second in list/li
  /ul
  [/code]

  Any idea on a simple way to do this? Or if the .localScroll
  or .scrollTo allow scrolling in a div?


[jQuery] Re: clueTip plugin DOM manipulation clarification.

2008-09-09 Thread Alex

Update: this only worked the first time the tooltip came up.  After I
closed it and opened it again, the body of the tooltip was empty.  I'm
still looking into another way around this.  I've seen other posts
referencing a quick .mouseout, .mouseover sequence.  Maybe this is the
solution?  Anyone have any thoughts?

On Sep 9, 2:06 pm, Alex [EMAIL PROTECTED] wrote:
 Hello all -

 I downloaded and used Karl Swedberg's (ofwww.learningjquery.com)
 excellent clueTip plugin.  The scenario under which I used it led me
 to identify a small issue that I believe was a design decision by Karl
 but that behaved differently than I expected it to and, as such, made
 me spend a couple hours figuring it out.

 I was listing a bunch of products on a page for the company I work for
 and, when you clicked on a picture of the product, a tooltip was to
 come up listing some of its information as well as containing some
 links that allowed you to edit some of the content in there.  So in
 the tooltip, which was local and sticky, there were some links with
 onclick events that manipulated some of the DOM elements in that same
 tooltip.  The onclick events were firing, and the DOM appeared to be
 affected when I logged the objects using firebug's console.log API,
 but no difference appeared on the screen.

 After some frustration, thinking my JavaScript was the culprit, I
 noticed that if I clicked a part of the tooltip that incited a change,
 closed the tooltip, then clicked the picture of the product again, the
 tooltip that came up on that second click would show the DOM
 differences.  Upon further investigation and the suggestion of my
 coworker, I searched in the source code and noticed that when a
 tooltip is opened and has local content, that element is cloned
 using .clone(true), which meant that when I selected the tooltip using
 '#tooltip_id', it was actually selected the original, not the cloned
 one.  I tried passing through a reference to the cloned element using
 the 'this' keyword in the onclick attribute, which worked but failed
 to redraw the dropshadows on the tooltip for some reason.

 For this reason I edited the source code to read
 [code]
 var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('div/
 div').children() : $localContent.html();
 [/code]
 rather than the original
 [code]
 var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('div/
 div').children().clone(true) : $localContent.html();
 [/code]

 Many thanks to Karl for this plugin, which I will continue to use.


[jQuery] Animation

2008-09-09 Thread Ronn Ross
Hello all,
I have two images on a page, one on top of the other. I'm using them to do a
rollover effect. One the top image I have a onmouseover event triggering a
jquery fadeOut(). On the bottom image I'm adding the onmouseout event
triggering the fadeIn() effect for the above image. The problem is that if
you rollover too fast the top image will fadeout, but the onmouseout event
won't fire for the bottom image. Is there a way to have the callback for the
fadeOut() check if the mouse is still over the image? I tried to explain as
best I could. Please email me if you need more info.

Thanks in advance,
Ronn


[jQuery] Re: superfish menu, Error: $(ul.sf-menu) is null

2008-09-09 Thread oconshaw

I should also point out that this happens in both IE7 and Firefox.

On Sep 9, 12:22 pm, oconshaw [EMAIL PROTECTED] wrote:
 I'm using the superfish menu with a navigation module in dotnetnuke
 that emits the page structure as an unordered list.  Most pages work
 fine with the menu system and superfish.  However, some pages give me
 the following error: Error: $(ul.sf-menu) is null, source
 file:http://blahblahblah.com/default.aspxline: 4

 The menu still works using the CSS, but the superfish features fail at
 that point.  Any ideas on what is wrong and how to fix?  Thanks.


[jQuery] Access a example hibrid java and action script

2008-09-09 Thread guilhermelima77

www.gamesflash.zip.net


[jQuery] jquery is breaking iWebSite.js

2008-09-09 Thread dittmer

I'm a looser. I use iWeb. Every time I add jquery to my iWeb page it
breaks all the functions made by this javascript file iWebSite.js. I
really know nothing about javascript (I'm a wanna be. That is why I
use iWeb.) Please help.


[jQuery] Superfish Issues

2008-09-09 Thread JasonHorizon


I cannot for the life of me get the Superfish menu to work
correctly.
Everything is fine in Firefox (except for the fact that the
hoverIntent animations don't work) but it just throws errors in IE and
the subnavs don't appear.

Here's an example site:
http://dev.ilrinc.com/index.php


[jQuery] Re: How to read a HTML file outside current directory using Jquery Load function?

2008-09-09 Thread [EMAIL PROTECTED]

If you mean a file outside the current server directory that the page
was served from, then it doesn't work because jQuery is executing on
the client, and needs a fully qualified path to the file:

$(#abc).load(http://full.domain.path/to/file/one.html;);

If you want to load a file from the browser's local machine, you
probably can't do that for security reasons.

On Sep 9, 8:24 am, Mulpuru [EMAIL PROTECTED] wrote:
 $(#abc).load(../one.html);

 Doesn't work..


[jQuery] Validate remote: passing multiple variables?

2008-09-09 Thread ryanstreet

Does anyone know of a way to pass multiple form fields into one remote
call in the validate script in Jquery?

Any help appreciated.

rules: {
Field1: {
  required: true,
 remote: /path/to/script.php
}...



[jQuery] slide down and up problem

2008-09-09 Thread evan

Hi.

i just want my headers to slide up and down but they seem to execute
twice.  could someone look over my code to see why things are sliding
up down then up down again? thanks


code:

$(document).ready(function(){
   $(#subNav1 a).css({backgroundColor: #fff, color: #222 ,
borderRight: 2px solid #ccc , borderLeft: 2px solid #ccc ,
borderBottom: 2px solid #999});
  $(#subNav2).click(function(){
  $(.subNavItem a).css({backgroundColor: transparent,
color: #fff , borderRight: none , borderLeft: none ,
borderBottom: none});

  $(.headers).slideUp(fast, function(){
  $(.headers).hide();
  $(#header2).slideDown(slow);
  });
  $(#subNav2 a).css({backgroundColor: #fff, color:
#222 , borderRight: 2px solid #ccc , borderLeft: 2px solid
#ccc , borderBottom: 2px solid #999});
  return false;
  });

  $(#subNav1).click(function(){
  $(.subNavItem a).css({backgroundColor: transparent,
color: #fff , borderRight: none , borderLeft: none ,
borderBottom: none});

  $(.headers).slideUp(fast, function(){
  $(.headers).hide();
  $(#header).slideDown(slow);
  });
  $(#subNav1 a).css({backgroundColor: #fff, color:
#222 , borderRight: 2px solid #ccc , borderLeft: 2px solid
#ccc , borderBottom: 2px solid #999});
  return false;
  });

  $(#subNav3).click(function(){
  $(.subNavItem a).css({backgroundColor: transparent,
color: #fff , borderRight: none , borderLeft: none ,
borderBottom: none});

  $(.headers).slideUp(fast, function(){
  $(.headers).hide();
  $(#header3).slideDown(slow);
  });
  $(#subNav3 a).css({backgroundColor: #fff, color:
#222 , borderRight: 2px solid #ccc , borderLeft: 2px solid
#ccc , borderBottom: 2px solid #999});
  return false;
  });


[jQuery] jquery cycle - advanced uses

2008-09-09 Thread bingaman

I'm using the jquery cycle plugin - it's fantastic, but I'm coming up
just short of how I want it to function.

The goal is to have a cycle that runs along with a pager.  The pager
is custom and works on hover.  Additionally, I want the cycle to pause
while you're hovering on a pager item, and resume once you've left.
This code appears to work correctly, but it occasionally says paused
or if you mouseover a second pager while the first is fading in it
stays paused on the first.

I'm a new convert to jquery - so if there is a better way to do any of
this let me know.

$(function() {
$('#caption a').mouseout(function() {
$('#slides').cycle('resume');
console.log('resumed');
});
$('#caption a').mouseover(function() {
$('#slides').cycle('pause');
console.log('paused')
});
$('#slides').cycle({
fx: 'fade',
timeout:5000,
speed:  300,
pager:  '#caption',
pagerEvent: 'mouseover',
pagerAnchorBuilder: function(idx, slide) {
// return selector string for existing anchor
return '#caption li:eq(' + idx + ') a';
}
});
});

(And as an aside, in some of the advanced samples, it uses a .before
or .after, eg http://malsup.com/jquery/cycle/pager2.html - I don't
quite get what's going on there.)  Thanks!


[jQuery] How to select all input elements but the button one?

2008-09-09 Thread aldomatic

I'm trying to select all input elements but the submit or button.

I appreciate the help.

Aldo


[jQuery] String passed by value or by reference

2008-09-09 Thread Ungebeten


Hi, I'm stuck with some code.

I want to create some part of my html document by javascript. Every line
contains some links, the links should trigger an action on that line. Here
is some minimal sample code to reproduce the problem: 

---8
html
head
script type=text/javascript src=jquery.js/script
script type=text/javascript
linecount = 1;
function makeTestLines(parent) {
linename = Row + linecount++;
// insert a paragrah with 2 links
parent.append(p id=' + linename + ' + linename +
  link1\/a  link2\/a\/p);
// on click tell me, which row you belong to
$(# + linename +  a).click(function() {
alert(This is  + linename);
});
}
$(document).ready(function(){
makeTestLines($(body));
makeTestLines($(body));
makeTestLines($(body));
});
/script
/head
body
pClick on the links to see, which line they belong to:/p
/body
/html
---8

When you click on a link, it is expected to tell you, which line it belongs
to. But every link seems to belong to Row3!?

It looks as if linename is passed to the function by reference instead of
by value.

Can anybody explain that? And - more important - does anybody know a
workaround?

Thanks in advance, Ungebeten
-- 
View this message in context: 
http://www.nabble.com/String-passed-by-value-or-by-reference-tp19401126s27240p19401126.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Drag screws with my mouseup event

2008-09-09 Thread Jeremy

I am trying to reproduce a calendar selector. Basically, I want the
boxes to turn red when I have the mouse depressed only. Works great so
far except that the drag event seems to be hiding the mouse up event
(try it out, you'll see it happen), and then the logic is backwards
until the mouse is depressed again.

Any suggestion on how to fix this?  Would be great if I could check to
see if the mouse is depressed.

Example:

http://173.8.140.234/admin_available_times_edit.php

Here's my code:

 $(document).ready(function() {
depressed=0;
$('.selectgrid').mousedown(function(){
if(depressed==0){
depressed=1;
$(this).addClass('red').removeClass('green');
}
else{
depressed=0;
}
});

$('.selectgrid').mouseup(function(){
depressed=0;
});

$('.selectgrid').mouseover(function(){
if(depressed==1){
$(this).addClass('red').removeClass('green');
}
});
 });


[jQuery] Superfish Sub menu position

2008-09-09 Thread matt

I am using superfish on a page and the top level menu spans across the
entire page. The problem is that some of the dropdowns on the right
have side of the page open their sub menus to the right so the user
wont see them unless their browser window is wide enough. Has anyone
attempted to get the sub levels to open up on the left side of the
dropdown if the top level dropdown is near the right side of the
browser window?

I am using the basic layout:
http://users.tpg.com.au/j_birch/plugins/superfish/#sample1


[jQuery] put image on top of another image

2008-09-09 Thread cc96ai

I m new on jquery,
I am not can jquery can do or not
I want to put a image on top of other image,
e.g. we have a product image, we want to put a sign of sold or hot
buy image on top ,
any idea how could I do it in jquery ?


[jQuery] Re: superfish menu, Error: $(ul.sf-menu) is null

2008-09-09 Thread oconshaw

Another comment -- the issue seems to be related to certain modules
that are also included on the page.  For example, there is a feedback
form on one of the pages that fails.  When I take it off the page and
superfish menu load fine.  Add it back and we have a problem once
again.

On Sep 9, 12:22 pm, oconshaw [EMAIL PROTECTED] wrote:
 I'm using the superfish menu with a navigation module in dotnetnuke
 that emits the page structure as an unordered list.  Most pages work
 fine with the menu system and superfish.  However, some pages give me
 the following error: Error: $(ul.sf-menu) is null, source
 file:http://blahblahblah.com/default.aspxline: 4

 The menu still works using the CSS, but the superfish features fail at
 that point.  Any ideas on what is wrong and how to fix?  Thanks.


[jQuery] Re: New jQuery Website...

2008-09-09 Thread jeremyBass

I figured that if we are trying to help I'd point out a few other
flaws I'm sure was not meant to be there... look to here for FF and
Safari very minor issue
http://digitalbarn.tv/Proofs/NCITA/proofs/Untitled-2.jpg

the version I'm running is on xp sp2... I'll get the version numbers
on the vista pc later today but i think is IE 7.0.5730.13

there are a few more but I post there later (little time at the
moment), and I'm not sure if they are real flaws... anyways... the
idea is great and can't wait... :-)



On Sep 9, 11:30 am, Chris Jordan [EMAIL PROTECTED] wrote:
 Hmm... still looks fine to me. I'm using IE 7.0.6001.18000

 Yeah, I hope the designer can get this resolved too. Hope these version
 numbers help out.

 Chris





 On Tue, Sep 9, 2008 at 12:05 PM, jeremyBass [EMAIL PROTECTED] wrote:

  Sure can... the page i was currently on...
 http://plugins.jquery.com/project/Intercept
  (but it's almost every page...)

  and here is a pic for you

 http://digitalbarn.tv/Proofs/NCITA/proofs/Untitled-1.jpg

  and the browser version IE 7.0.5730.11

  which there is a big diff between that and

   IE 7.0.5730.13

  if i was to pin it down... i'd say it's a clearing issue.. but i
  didn't look at the code... hope that helps
  jeremyBass

  On Sep 9, 9:54 am, Chris Jordan [EMAIL PROTECTED] wrote:
   I just looked at the site in IE7 and I'm not seeing any problems. I
  clicked
   around in the documentation, and tutorials area, and just didn't notice a
   problem. Jeremy, maybe you *should* provide some specifics... either that
  or
   I'm blind! :o)

   Chris

   On Mon, Sep 8, 2008 at 12:26 PM, jeremyBass [EMAIL PROTECTED]
  wrote:

I don't know if this is just me but the site is all kinds of broken...
I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs...
I'd give a url but ... well it's almost everywhere... cool idea
though...

On Sep 8, 10:03 am, Rick Faircloth [EMAIL PROTECTED] wrote:
 Yes, it does look great!

 Rick

 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
  On
Behalf Of Chris Jordan
 Sent: Monday, September 08, 2008 12:58 PM
 To: jQuery Group
 Subject: [jQuery] New jQuery Website...

 I really like the look of the new jQuery website. When did it get
launched? My hats off to the
 designers! It looks fantastic!! :o)

 Chris

 --http://cjordan.us

 No virus found in this incoming message.
 Checked by AVG -http://www.avg.com
 Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date:
  9/8/2008
7:01 AM

   --http://cjordan.us-Hide quoted text -

   - Show quoted text -

 --http://cjordan.us- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Determine if a Javascript has loaded?

2008-09-09 Thread bcbounders

@Mike:  Update - it's all up and running!  You can see it here:
http://tinyurl.com/5n8mco

Thanks so much for your help (OK... for DOING it!).  I really
appreciate it!

 - John

On Sep 8, 12:52 pm, bcbounders [EMAIL PROTECTED] wrote:
 Mike,

 WOW!  Thanks so much! This is TOTALLY the kind of thing I was looking
 for.  Thanks for taking the time to do such a thorough mock-up!  You
 ROCK, dude!

 Thanks... can't wait to go try this out!

  - John

 On Sep 8, 10:18 am, Michael Geary [EMAIL PROTECTED] wrote:

  Brad has a great idea there.

  To really protect your page, you need to take one more step. (I assume you
  have other content on the page, right?)

  If ibegin.com is down in a way that results in a slow timeout instead of an
  immediate unavailable response, it will delay loading the rest of your
  page until the browser times out.

  To fix this, move the weather gadget out of your page and into an IFRAME.
  That way, no matter what goes wrong at ibegin.com, it will never affect the
  rest of your page.

  Inside the IFRAME, you can use code similar to Brad's.

  Here's a working test page:

   http://mg.to/test/ibegin/ibegin.htmlhttp://mg.to/test/ibegin/ibegin.html

  The iframe for this page is in:

   http://mg.to/test/ibegin/weatherframe.htmlhttp://mg.to/test/ibegin/weatherframe.html

  And here's a broken test page. It's the same code with a deliberate error
  in the ibegin URL:

   http://mg.to/test/ibegin/wunder.htmlhttp://mg.to/test/ibegin/wunder.html

  That deliberate error is actually in the iframe code, so it uses a different
  copy of the iframe just for testing:

   http://mg.to/test/ibegin/weatherframe1.htmlhttp://mg.to/test/ibegin/weatherframe1.html

  You'll notice it loads a Weather Underground gadget instead of just a static
  image. That seems more useful than a static image, and the chances of both
  weather services being down seems pretty low. (And in that case the rest of
  your page would still load fine because of the iframe.)

  For reference, here's the iframe tag in ibegin.html:

      iframe frameborder=0 style=width:220px; height:320px;
  overflow:hidden; src=weatherframe.html
      /iframe

  And here's the complete HTML for the iframe (weatherframe.html):

  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN
  html lang=en
  head
      title/title
  /head
  body scroll=no style=margin:0; padding:0;

      script type=text/javascript
  src=http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/custom.js
  http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/custom.jsback...
  _color=transparentcolor=093384width=200padding=0border_width=0border_c 
  o
  lor=transparentfont_size=18font_family=inheritshowicons=1
  background_color=transparentcolor=093384width=200padding=0border_width 
  =
  0border_color=transparentfont_size=18font_family=inheritshowicons=1
      /script

      script type=text/javascript
          if( ! document.getElementsByTagName('div').length )
              document.write(
                  'div style=text-align:center;',
                      'a
  href=http://www.wunderground.com/US/AK/Ninilchik.html?bannertypeclick=infob
  ox
  http://www.wunderground.com/US/AK/Ninilchik.html?bannertypeclick=infobox',

                          'img
  src=http://banners.wunderground.com/weathersticker/infobox/language/www/US/
  AK/Ninilchik.gif border=0 alt=Click for Ninilchik, Alaska Forecast
  height=108 width=144',
                      '/a',
                  '/div'
              );
      /script

  /body
  /html

  As you can see, the code doesn't use jQuery, and it doesn't use a 2 second
  timeout either. There's no need for any of that, and you wouldn't want the
  overhead of loading jQuery in this little iframe anyway.

  Script tags are executed in the order in which they appear in the source.
  When the second script tag is run, the first one (loaded from ibegin.com)
  has already completed execution and created its DIV elements - or failed to
  execute, whichever the case may be.

  So the second script tag can immediately test for the div that the first
  one creates, and if it's not there it does a document.write to add the
  Weather Undergound gadget instead.

  -Mike

   From: bcbounders

   Brad,

   Interesting approach... I like it!  Now I'll see if I can get
   this to work on the site... like replacing the missing widget
   with a static image or something... so the page doesn't have
   a gaping hole where the weather's supposed to be (which is
   what was happening when iBegin was down and the widget
   wouldn't load, on-and-off all day a few days ago).

   Thanks a lot!!!

    - John

   On Sep 7, 6:22 pm, Brad [EMAIL PROTECTED] wrote:
Here is a different approach. Include the javascript source for the
weather.ibegin.com in the body of your page. On load run a delayed
function to see if it has written its forecast to your page. I ran
this on a test page and it worked. I could never get the
   ibegin source
to fail, 

[jQuery] Re: SuperFish - always display some submenu items

2008-09-09 Thread Mike Henke

kinda like this?
Superfish - display2 deep and have mouseover for anything deeper
Options
http://groups.google.com/group/jquery-en/browse_thread/thread/a1ea1b8efa9d60d1/3f1a6ff2d1a2fdb2?lnk=gstq=superfish#3f1a6ff2d1a2fdb2

It isn't solved yet but we maybe can combine our discussion if it is
what you are looking for.

On Sep 9, 9:15 am, Andrew Lysyuk [EMAIL PROTECTED] wrote:
 For some pages I want some menu-items to be always dropped-down. For
 example, I have li elements with class=no. I needSuperfishdon't
 react to events on the submenu inside this element.


[jQuery] Cancel .toggle() when a link is clicked

2008-09-09 Thread jtibbetts

How do you stop .toggle() from toggling an object when a link (or any
object) inside the object is clicked.

Here's a quick contrived example:

div id=toggle
 Click here for more info
 a onClick=DoSomething();do something/a
/div
div id=infoblah blah blah.../div

script
$(#toggle).toggle(
 function () {
  $(#info).show();
 },
 function () {
  $(#info).hide();
 }
);
/script

Clicking on the toggle div toggles the info div. If the do
something link is clicked, the toggle div will toggle *and*
DoSomething() will be called. I want to be able to click the do
something link and only have DoSomething() trigger but not cause the
div to toggle. Is this possible?

(Forgive the code if it's wrong, but I just whipped it up on the fly)


[jQuery] Re: SuperFish - always display some submenu items

2008-09-09 Thread Mike Henke

We might be trying to solve the same issue...

http://groups.google.com/group/jquery-en/browse_thread/thread/a1ea1b8efa9d60d1/3f1a6ff2d1a2fdb2?lnk=gstq=superfish#3f1a6ff2d1a2fdb2


[jQuery] Re: jquery is breaking iWebSite.js

2008-09-09 Thread Andy Matthews

Can you post a link to your site, with jQuery and the iWeb javascript code? 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dittmer
Sent: Tuesday, September 09, 2008 3:28 PM
To: jQuery (English)
Subject: [jQuery] jquery is breaking iWebSite.js


I'm a looser. I use iWeb. Every time I add jquery to my iWeb page it breaks
all the functions made by this javascript file iWebSite.js. I really know
nothing about javascript (I'm a wanna be. That is why I use iWeb.) Please
help.




[jQuery] Re: String passed by value or by reference

2008-09-09 Thread MorningZ

SUPER easy fix, and just a slight oversight

linename = Row + linecount++;

to

var linename = Row + linecount++;


this keeps linename *local* inside the function the way you had
it, it was technically window.linename that was getting used, hence
always showing the last (and last saved) line name


[jQuery] Need AJAX Developers - Remote work

2008-09-09 Thread Chiru, Agile Enterprise Solutions, Inc.
Hi,

 

We need 2 AJAX developers. This is a Remote project and the interview is
telephonic. If you are interested please send your resume with contact
details and rate per hour as soon as possible. 
  
Position: AJAX Developer

Location: Can work remotely

Duration: 2-3 months
Positions: 2

Required skills

Cascading, HTML and AJAX. 

MUST have HTML, CSS, JavaScript, YUI 

(Prefers experience working at Dow Jones, Merrill Lynch or similar
companies)

 

 

Regards,

Chiru

 

Chiranjeevi Musham

(630)-242-8896 *313

[EMAIL PROTECTED]

Agile Enterprise Solutions, Inc.

 















[jQuery] Re: put image on top of another image

2008-09-09 Thread Andy Matthews

You don't need jQuery for this. It can be done with CSS. Here's a link that
you can inspect to see what I'm talking about:

http://www.commadelimited.com/code/overlapimages/


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cc96ai
Sent: Tuesday, September 09, 2008 3:34 PM
To: jQuery (English)
Subject: [jQuery] put image on top of another image


I m new on jquery,
I am not can jquery can do or not
I want to put a image on top of other image, e.g. we have a product image,
we want to put a sign of sold or hot buy image on top , any idea how
could I do it in jquery ?




[jQuery] Re: How to select all input elements but the button one?

2008-09-09 Thread pedalpete

Are you trying to put them all into an object? or a variable?
I would normally say use something like
[code]
$('input').each(function(){


On Sep 9, 12:00 pm, aldomatic [EMAIL PROTECTED] wrote:
 I'm trying to select all input elements but the submit or button.

 I appreciate the help.

 Aldo


  1   2   >