[jQuery] image cycle, fade on click

2010-01-12 Thread Simon
Hi I'm trying with no luck to fade on click the image cycle, can
anyone offer any assistance to a novice.
Fading is ok but I'm not sure where to add the onClick.

Thanks

Simon


[jQuery] Need An Example On Parsing My XML

2010-01-05 Thread Simon
Hi there.

I need an example in parsing the following XML using jQuery:

?xml version=1.0 encoding=UTF-8 standalone=yes?
ns3:Account xmlns:ns2=http://oec.api.opsource.net/schemas/
organization .. 
ns3:userNamerdyer/ns3:userName
ns3:fullNameJoe Public/ns3:fullName
ns3:firstNameJoe/ns3:firstName
ns3:lastNamePublic/ns3:lastName
ns3:emailAddressjpublic24...@pop.net/ns3:emailAddress
ns3:orgId1831c1a9-9c03-44df-a5a4-f2a4662d6bde/ns3:orgId
ns3:roles
ns3:role
ns3:nameprimary administrator/ns3:name
/ns3:role
/ns3:roles
/ns3:Account

Essentially, I want to print out the contents of what's in
ns3:userName.


[jQuery] Accessing REST API via JQUERY?

2010-01-04 Thread Simon
Hi there.

I'd like to use jQuery to access a remote website that has a REST API
which returns XML data.

Should I be able to use the jQuery.getJSON request to do it or is
there another command since it's returning XML.

Example Request Details (HTTP GET):

https://{username}:{passwo...@api.opsourcecloud.net/oec/0.9/myaccount

Example Response Details:

?xml version=1.0 encoding=UTF-8 standalone=yes?
ns3:Account xmlns:ns2=http://oec.api.opsource.net/schemas/
organization .. 
ns3:userNamerdyer/ns3:userName
ns3:fullNameJoe Public/ns3:fullName
ns3:firstNameJoe/ns3:firstName
ns3:lastNamePublic/ns3:lastName
ns3:emailAddressjpublic24...@pop.net/ns3:emailAddress
ns3:orgId1831c1a9-9c03-44df-a5a4-f2a4662d6bde/ns3:orgId
ns3:roles
ns3:role
ns3:nameprimary administrator/ns3:name
/ns3:role
/ns3:roles
/ns3:Account


[jQuery] autocomplete: extra fields

2009-12-18 Thread Simon Matthews
I have a number of fields in a grid which are all using auto
complete.  I want the extraParams function to be able to work out
which field I am in so that I can return a differently filtered list.
I don't seem to have access to the input variable?  Any clues?

Thanks

Simon


[jQuery] Email validation

2009-12-07 Thread Simon Brown
I have been trying to get an email on a form validated.  If I use -

var email = $(input#email).val();
if (email == ) {
$(label#email_error).slideToggle(slow);
$(input#email).focus();
return false;
}

Everything works fine.  But I cannot seem to get it to work with an
email expression like this

var regex = new RegExp(/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+
([a-zA-Z0-9]{2,4})+$/);
var email = $(input#email).val();
if (email == ) || {
$(label#email_error).slideToggle(slow);
} else { if(!(email == regex)) {
$(label#email_error).slideToggle(slow);
$(input#email).focus();
return false;
}

i have tried it all kinds of ways but keep getting errors.

Any help with my syntax is appreciated.


[jQuery] Basic help with selectors

2009-10-27 Thread Simon Morris

Hello,

I'm new to jQuery and would appreciate some help with Selectors.

At the moment I know enough to write some clunky repetitive code that
violates the DRY (Don't Repeat Yourself) principle

// Toggle Divs
$(a#toggle_effect_button).click(function(){
$(#toggle_effect).toggle('blind',500);
return false;
});

$(a#toggle_effect_button2).click(function(){

$(#toggle_effect2).toggle('blind',500);
return false;
});

$(a#toggle_effect_button3).click(function(){

$(#toggle_effect3).toggle('blind',500);
return false;
});

$(a#toggle_effect_button4).click(function(){

$(#toggle_effect4).toggle('blind',500);
return false;
});

$(a#toggle_effect_button5).click(function(){

$(#toggle_effect5).toggle('blind',500);
return false;
});

$(a#toggle_effect_button6).click(function(){

$(#toggle_effect6).toggle('blind',500);
return false;
});

$(a#toggle_effect_button7).click(function(){

$(#toggle_effect7).toggle('blind',500);
return false;
});

$(a#toggle_effect_button8).click(function(){

$(#toggle_effect8).toggle('blind',500);
return false;
});

How can I boilerplate code like this? They all refer to similar links that 
controller the jQueryUI toggle action on DIV containers.

If I assign a class to the toggle_effect_button hyperlinks is there a way to 
locate the correct DIV and toggle it?

Or am I already doing this in the most concise way?

Thanks for your help

~sm




[jQuery] Re: Basic help with selectors

2009-10-27 Thread Simon Morris

On Tue, 2009-10-27 at 09:11 -0700, MorningZ wrote:
 $(a[id=^='toggle_effect_button']).click(function() {
 var id = this.id.replace(toggle_effect_button, );
 $(#toggle_effect + id).toggle('blind',500);
 return false;
 });

Thanks MorningZ,

A small correction is..

$(a[id^='toggle_effect_button']).click(function() {

It works perfectly.

I appreciate all the replies

~sm





[jQuery] append()

2009-10-13 Thread Simon Morris

Hello,

I'm having some problems understanding the append() function.

What I'd like to do is select an element using it's ID and add a row to
the table with a HTML form element.

The table is dynamically generated using a Django template
( form.as_table() ) so I'm not able to alter the original HTML markup
too much.

If I had a table like this...

trthlabel for=id_task_nameTask Name:/label/thtdinput
type=text name=task_name id=id_task_name //td/tr
trthlabel for=id_percent_completePercent
complete:/label/thtdinput type=text name=percent_complete
id=id_percent_complete //td/tr
trthlabel for=id_start_dateStart Date:/label/thtdinput 
type=text name=start_date id=id_start_date //td/tr
trthlabel for=id_finish_dateFinish Date:/label/thtdinput 
type=text name=finish_date id=id_finish_date //td/tr
trthlabel for=id_costCost:/label/thtdinput type=text 
name=cost id=id_cost //td/tr
trthlabel for=id_historyTask History:/label/thtdtextarea 
id=id_history readonly=True rows=10 cols=40 
name=history/textarea/td/tr

... I could select the right part of the markup with

$(#id_percent_complete).append(trthNew Label/thtdNew Form 
Element/td/tr)

But as the documentation says it appends to the inside of the matched element, 
rather than adding it to the end. Because the element 
I have selected is a input it attaches my new content inside a /input which 
isn't the result I am after.

Apologies if the above is confusing - can anyone help?

Thanks

~sm





[OFFLIST] [jQuery] Re: append()

2009-10-13 Thread Simon Morris

On Tue, 2009-10-13 at 16:46 +0300, Evgeny Bobovik wrote:
 use function insertAfter(); or insertBefore();
Gk___
 

That's perfect, thanks very much.

~sm



[jQuery] Passing variables to jQuery?

2009-10-08 Thread Simon

Hi,

I'm using this code:

jQuery('#sendemail').click(function() {
// update the block message
jQuery.blockUI({ message: h1Remote call in progress.../
h1 });

jQuery.ajax({
type: 'POST',
url: 'emaildocument.php',
data: 'user=testfile=horse.jpg',
cache: false,
complete: function() {
// unblock when remote call returns
jQuery.unblockUI();
}
});
});

But can't understand how I can pass the data variables 'user' and
'file' from within my PHP page to the jQuery post.

Any ideas?

Cheers

Simon


[jQuery] [jcarousel] Can't make it scroll

2009-09-22 Thread Simon Justesen

Hi!

I'm having some troubles with the jCarousel by Jan Sorgalla. I'm
loading the carousel dynamically and the images display. But I'm
unable to make them scroll. There are no errors according to Firefox.
The code I'm using is a replica of the one used for the vertical
scroller with minor adjustments

jQuery(document).ready(function() {
jQuery(#productcontroller).jcarousel({
vertical: true,
buttonNextHTML: null,
buttonPrevHTML: null,
size: productcontroller_itemList.length,
itemLoadCallback: {onBeforeAnimation:
productcontroller_itemLoadCallback},
initCallback: productcontroller_initCallback
})
});

The scrollers next prev buttons are bound correctly I guess because I
can get them to display an alertbox.
I did some customisations in the CSS file, which may be why it fails
to scroll? However I'm not sure where the error could possibly be, so
I hope someone will help

Thanks,
Simon


[jQuery] Script not recognizing class

2009-08-13 Thread Simon

Hey, I am absolutely puzzled and am hoping some of you may be able to
help me:

I have the following HTML:

ul id=imagenav
li  a href=image_01.jpg title=1 class=current
class=notloaded1/a/li
li  a href=image_02.jpg title=2 class=other
class=notloaded2/a/li
li  a href=image_03.jpg title=3 class=other
class=notloaded3/a/li
li  a href=image_04.jpg title=4 class=other
class=notloaded4/a/li
li  a href=image_05.jpg title=5 class=other
class=notloaded5/a/li
/ul

and the following script:

$(#imagenav a).click(function(){
if($(this).hasClass(notloaded)){
alert('class here');
} else {
alert('class not there');
}
});

for some reason, whenever I click on the relevant link the alert
'class not there' pops up, even though I think it's fairly clear it
is.

What am I doing wrong?

Thanks,

Simon


[jQuery] Re: Script not recognizing class

2009-08-13 Thread Simon

That fixed it, thanks!

I didn't realize that was how you declared multiple classes. Logical
if you think about it (what with it being an attribute and all). Now I
know.

Simon

On Aug 13, 1:20 pm, Brett Ritter swift...@swiftone.org wrote:
 On Thu, Aug 13, 2009 at 1:18 PM, Simonsvansint...@gmail.com wrote:
         li  a href=image_01.jpg title=1 class=current
  class=notloaded1/a/li
 ...
  What am I doing wrong?

 You are using multiple class= declarations in your tags.

 You want instead:
 a href... class=current notloaded

 --
 Brett Ritter / SwiftOne
 swift...@swiftone.org


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-07 Thread Simon Vansintjan
That's a pretty neat plugin. Thanks Cesar.

On Fri, Aug 7, 2009 at 10:48 AM, Cesar Sanz the.email.tr...@gmail.comwrote:


 check this out http://plugins.jquery.com/project/timers

 - Original Message -
 From: James james.gp@gmail.com
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Thursday, August 06, 2009 4:19 PM
 Subject: [jQuery] Re: Make event happen after a certain amount of time has
 passed.



 Then you can do something like this:

 Have a setTimeout (say, executes in 20 seconds) with a callback
 function, say moveToLocation.

 Then you need a way to find out whether the div has been scrolled to
 the certain location or not. That can be done by checking either for
 the user's top/left coordinate of their screen, or you can set a
 variable when the user clicks on that button.

 After the 20 seconds comes by and the moveToLocation function is
 called, it checks for that location (or some variable you set). If
 it's true (meaning, the user has scrolled to the certain location),
 then do nothing. Otherwise, do the auto-scroll.

 The idea is that the moveToLocation is called no matter what. It's
 just that whether you do the actual action or not depends on the state
 of things.


 On Aug 6, 12:09 pm, Simon Vansintjan svansint...@gmail.com wrote:
  Well, it's pretty theoretical at the moment, so there's no code down, but
  the idea would be that a div appears, and that the user can click on a
  button that would scroll the div to a certain location. However, if the
  user
  doesn't click, I would still want the div to move to that location (in
  case
  he/she doesn't get it that it would move, dunno).
 
 
 
  On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote:
 
   Use the setTimeout/setInterval functions with some kind of global
   counter. If some kind of action/event occurs, the counter would be
   refreshed and the function would not execute.
   Would you like to specify in more detail what you would like to
   achieve?
 
   On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
Hey,
 
After a user hasn't triggered an event for a given amount of purple,
would it be possible to trigger that event anyway?
 
I have no idea how to even start looking for this.
 
Thanks for any hints/ideas/whatever you can throw my way.
 
Simon
 
  --
  simon.vansintjan.org


 



-- 
simon.vansintjan.org


[jQuery] Make event happen after a certain amount of time has passed.

2009-08-06 Thread Simon

Hey,

After a user hasn't triggered an event for a given amount of purple,
would it be possible to trigger that event anyway?

I have no idea how to even start looking for this.

Thanks for any hints/ideas/whatever you can throw my way.

Simon


[jQuery] Re: Click event to load a new page

2009-08-06 Thread Simon

This is something that was bothering me too, and I came to the same
conclusion. How is this for SEO though? Redirecting with Javascript
that is? Does it recognize the link?

Cheers,
Simon

On Aug 6, 3:52 pm, paul.mac paul.mcma...@uuconstruct.co.uk wrote:
 Thanks guys - came to the same conclusion shortly after posting the
 question.

 Thanks

 Paul

 On Aug 6, 7:52 pm, Richard D. Worth rdwo...@gmail.com wrote:

  Use
  window.location
  = index.php?whichPage=sliderwhichAct=0subPage=mixnmingle;
  - Richard

  On Thu, Aug 6, 2009 at 2:35 PM, paul.mac 
  paul.mcma...@uuconstruct.co.ukwrote:

   I want to add a click function to an image to laod a new page

   Tried this but it doesn't work

   $(#i4).click(function(){
      $(document).attr(href,index.php?
   whichPage=sliderwhichAct=0subPage=mixnmingle);
      });

   The whichAct variable in the query string gets changed, which is why
   it isn't just a static a hef=../a

   Any suggestions?

   Thanks

   Paul


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread Simon Vansintjan
Well, it's pretty theoretical at the moment, so there's no code down, but
the idea would be that a div appears, and that the user can click on a
button that would scroll the div to a certain location. However, if the user
doesn't click, I would still want the div to move to that location (in case
he/she doesn't get it that it would move, dunno).

On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote:


 Use the setTimeout/setInterval functions with some kind of global
 counter. If some kind of action/event occurs, the counter would be
 refreshed and the function would not execute.
 Would you like to specify in more detail what you would like to
 achieve?

 On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
  Hey,
 
  After a user hasn't triggered an event for a given amount of purple,
  would it be possible to trigger that event anyway?
 
  I have no idea how to even start looking for this.
 
  Thanks for any hints/ideas/whatever you can throw my way.
 
  Simon
 



-- 
simon.vansintjan.org


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread Simon Vansintjan
Alright, that's pretty much exactly what I had in mind, thanks a bunch.

On Thu, Aug 6, 2009 at 6:19 PM, James james.gp@gmail.com wrote:


 Then you can do something like this:

 Have a setTimeout (say, executes in 20 seconds) with a callback
 function, say moveToLocation.

 Then you need a way to find out whether the div has been scrolled to
 the certain location or not. That can be done by checking either for
 the user's top/left coordinate of their screen, or you can set a
 variable when the user clicks on that button.

 After the 20 seconds comes by and the moveToLocation function is
 called, it checks for that location (or some variable you set). If
 it's true (meaning, the user has scrolled to the certain location),
 then do nothing. Otherwise, do the auto-scroll.

 The idea is that the moveToLocation is called no matter what. It's
 just that whether you do the actual action or not depends on the state
 of things.


 On Aug 6, 12:09 pm, Simon Vansintjan svansint...@gmail.com wrote:
  Well, it's pretty theoretical at the moment, so there's no code down, but
  the idea would be that a div appears, and that the user can click on a
  button that would scroll the div to a certain location. However, if the
 user
  doesn't click, I would still want the div to move to that location (in
 case
  he/she doesn't get it that it would move, dunno).
 
 
 
  On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote:
 
   Use the setTimeout/setInterval functions with some kind of global
   counter. If some kind of action/event occurs, the counter would be
   refreshed and the function would not execute.
   Would you like to specify in more detail what you would like to
   achieve?
 
   On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
Hey,
 
After a user hasn't triggered an event for a given amount of purple,
would it be possible to trigger that event anyway?
 
I have no idea how to even start looking for this.
 
Thanks for any hints/ideas/whatever you can throw my way.
 
Simon
 
  --
  simon.vansintjan.org
 



-- 
simon.vansintjan.org


[jQuery] Internet Explorer 7 doesn't .animate() correctly.

2009-08-03 Thread Simon

Hey, so I'm having a very curious problem with IE and the animate
effect.

I have a page which shifts left and right when you click on a certain
part of it. When you hover over this section of the page it become
opaque, and the image that was visible behind it should no longer be
visible.

This is the basic HTML:

div id=focusedpage

   div id=backgroundblue/div

   div id=image
   /div!--end image--

   div id=centerpiece
   /div!--end centerpiece--

   div id=blurb
   /div!--end blurb--
/div!--focused page--

So when you click on #image the entire #focusedpage shifts left x
amount of pixels. At the moment, #image is overlaying #backgroundblue,
both are the same size, but I shifted #image left -256 pixels to make
it align with #backgroundblue, so that they were exactly overlapping.
This is so that #image gets a blue tint when you hover over it (the
reason I can't do this with just a background color is because #image
has rounded corners).

the CSS is like this:

#image{
  z-index:1;
  opacity:0.6;
  filter:alpha(opacity=60);
  height:410px;
  display:inline;
  margin-left:-256px;
  position:relative;
  width:256px;
  float:left;
  background-image:url('../images/image.png');
}


#backgroundblue{
  margin-left:-112px;
  background-image:url('../images/blue.png');
  z-index:0;
  height:410px;
  display:inline;
  position:relative;
  width:256px;
  float:left;
}

The relevant javascript code that I'm using is:

window.focus = $(#focusedpage).css('marginLeft');
$(#image).click(function(){

if ((window.focus == '0px') || (window.focus == 
'-112px')){
$(#image).animate( { opacity: '1.0', 
marginLeft: '-256px' },
'slow');
$(#focusedpage).animate( {marginLeft: '112px' 
}, 'slow');
window.focus = '112px';

} else {
$(#image).animate( { opacity: '0.6' }, 
'slow');
$(#focusedpage).animate( {marginLeft: '0px' 
}, 'slow');
window.focus = '0px';

}

});

what the Javascript does is it checks whether the window is focused in
a certain position, and then depending on the position it animates the
#focusedpage to a relevant position.

The problem is, this works perfectly fine in Firefox and Safari, and
the code technically does what I want it to do in Internet Explorer 7,
however, during the animation, it apparently sets the position of the
#image (by ignoring the margin-left I think) shifts everything left,
and then jumps the image back into place. Sometimes it doesn't do the
last bit. I was wondering whether anyone could tell me why this
happened, and what I could do to augment this.

Thanks,

Simon


[jQuery] Re: set certain items in a select list to selected.

2009-08-03 Thread Simon

If I understand correctly what you're asking, would a simple if
statement (using OR operators to select 1, 3, or 5) and then using
jQuery's .addClass do the trick?

http://docs.jquery.com/Attributes/addClass#class

complete speculation, but you may also be interested in:
http://docs.jquery.com/Selectors/odd

Hope that helps,
Simon

On Aug 3, 12:26 pm, shaded dar...@eztransition.com wrote:
 Ok lets say i have a multiple select list

 select id=mylist name=mylist[]
   option id=1first/option
   option id=2second/option
   option id=3third/option
   option id=4fourth/option
   option id=5fifth/option
 /select

 then i have a string of id's that i want to set to selected like so.

 var selectedIds = '1,3,5';

 is it possible to use jquery (preferably in a one liner) to set first,
 third and fifth to selected.?


[jQuery] Re: shifting a box sideways and making it gradually dissapear

2009-07-22 Thread Simon

Thanks!

I had no idea the overflow property even existed. You've saved me a
lot of head scratching.

Cheers,
Simon

On Jul 22, 4:49 am, Paul Mills paul.f.mi...@gmail.com wrote:
 Hi,
 Try this.
 Add overflow:hidden to #box and then animate the left of #innerbox:

 #box{
   width:800px;
   height:400px;
   border:1px solid #444;
   overflow:hidden;

 }

 $(#toggle).toggle(function(){
 $(#innerbox).animate({ left: '180px' }, 'slow');

 },function(){

 $(#innerbox).animate({ left: '0px' }, 'slow');

 });

 Paul

 On Jul 21, 10:38 pm, Simon svansint...@gmail.com wrote:

  Hey, so there might be a simple solution to my problem, but here is my
  question:

  I have a box:

  html

  div id=box
  div id=innerbox
  a href= id=toggle/a
  There is some text inside this box. It spans the entire width blah
  blah blah.
  /div
  /div

  styles===

  #box{
    width:800px;
    height:400px;
    border:1px solid #444;

  }

  #innerbox{
    position:relative;

    width:200px;
    float:right;

  }

  #toggle{
    width:20px;
    background-color:grey;
    height:400px;
    float:left;

  }

  

  Now this innerbox needs to move to the side to reveal whatever is
  below it when the toggle is clicked. As the the innerbox moves out of
  the main box the parts of it that leave main box should become
  invisible.

  Now there is a simple solution in which I make the background of the
  innerbox an image and decrease the width using jQuery's .animate().
  This isn't ideal however, since I kinda need there to be text users
  can interact with in the innerbox.

  javascript
          $(document).ready(function(){

                  $(#toggle).toggle(function(){
                  $(#innerbox).animate({ width: '75px' }, 'slow');

                  },function(){
                  $(#innerbox).animate({ width: '200px' }, 'slow');
                  });

          });
  ==

  On the other hand, shifting the innerbox to the right (instead of
  decreasing the width of the image) means that it extends the reach of
  the encompassing box.

  javascript

          $(document).ready(function(){

                  $(#toggle).toggle(function(){
                  $(#innerbox).animate({ right: -=125 }, 'slow');

                  },function(){
                  $(#innerbox).animate({ right: '-=125' }, 'slow');
                  });

          });
  

  Does anyone have any ideas how I can solve this? I've thought of
  placing divs with a higher z-index next the main box but this isn't
  really an option, since it would make the website too large.

  Any help would be much appreciated.

  Thanks,

  Simon


[jQuery] shifting a box sideways and making it gradually dissapear

2009-07-21 Thread Simon

Hey, so there might be a simple solution to my problem, but here is my
question:

I have a box:

html

div id=box
div id=innerbox
a href= id=toggle/a
There is some text inside this box. It spans the entire width blah
blah blah.
/div
/div

styles===

#box{
  width:800px;
  height:400px;
  border:1px solid #444;
}

#innerbox{
  position:relative;

  width:200px;
  float:right;
}

#toggle{
  width:20px;
  background-color:grey;
  height:400px;
  float:left;
}



Now this innerbox needs to move to the side to reveal whatever is
below it when the toggle is clicked. As the the innerbox moves out of
the main box the parts of it that leave main box should become
invisible.

Now there is a simple solution in which I make the background of the
innerbox an image and decrease the width using jQuery's .animate().
This isn't ideal however, since I kinda need there to be text users
can interact with in the innerbox.

javascript
$(document).ready(function(){

$(#toggle).toggle(function(){
$(#innerbox).animate({ width: '75px' }, 'slow');

},function(){
$(#innerbox).animate({ width: '200px' }, 'slow');
});

});
==

On the other hand, shifting the innerbox to the right (instead of
decreasing the width of the image) means that it extends the reach of
the encompassing box.

javascript

$(document).ready(function(){

$(#toggle).toggle(function(){
$(#innerbox).animate({ right: -=125 }, 'slow');

},function(){
$(#innerbox).animate({ right: '-=125' }, 'slow');
});

});


Does anyone have any ideas how I can solve this? I've thought of
placing divs with a higher z-index next the main box but this isn't
really an option, since it would make the website too large.

Any help would be much appreciated.

Thanks,

Simon


[jQuery] hover stoppropagation?

2009-07-15 Thread Simon Xiao

im sorry if im posting duplicate, but iv searched for a long while..

I have nested dom and have script:

function startVisualAid(){
$(.holder  *).hover(
function(){

$(this).parents(.hover_this).trigger('mouseleave').removeClass
(hover_this);
$(this).addClass(hover_this);
},
function(){
$(this).removeClass(hover_this);
$(this).parents().trigger('mouseenter');
}
);
}

this basically works like what i want - add class to a single hovered
item only, not its parents. but things are just getting very slow when
i have a deeply nested doms. I think there must be more simple and
fast way to do this, but i dont know how the stopPropagation thing
work on the hover event. thanks a lot!

Simon


[jQuery] Variables in IE ahhh!

2009-06-26 Thread simon

I have this hover function and outside this i am setting all the
variables etc everything works but when I test on IE yes that old one,
is gives me the wrong reading and hence does not function, so to get
over this I have to put in the variable within the hover function.

any ideas how to combat this.

main function:

var heigthOful = $container.find('div.listContainer ul').css
('height');

$('THEBUTTON').hover(function(){
   //for eg if i alert the variable  see below
alert(heigthOful);
});

for eg if i alert the variable on all other browsers I get say 1100
while on IE i get auto

now if i set the variable within that function as

$('THEBUTTON').hover(function(){
   var heigthOful = $container.find('div.listContainer ul').css
('height');
alert(heigthOful);
});

Now i get the output on the alert from all others 1100 and IE i get
the same now 1100


whay I want to set it once is that I have several hovers that will use
the same code so rather than clutter up the code and have loads of un-
needed code thought I woud set it once and that would be it.

Any help would be apprciated



[jQuery] Re: Variables in IE ahhh!

2009-06-26 Thread simon

thanks for tthe reply for got to say, before this I was finding the
height out of my UL by going through all th eli heights then adding it
to the ul

// find the height of each li and add it to the total
 $listItems.each(function (i){ ulHeight += parseInt($(this).css
('height'));});
// once total is found add the final  height to the ul
$list.css({height:ulHeight});

will give yours a try in the mean time thanks
Si


[jQuery] Re: Variables in IE ahhh!

2009-06-26 Thread simon

Thanks did that and seems to be fine many thanks

Si

On Jun 26, 2:38 pm, simon si...@uvfx.tv wrote:
 thanks for tthe reply for got to say, before this I was finding the
 height out of my UL by going through all th eli heights then adding it
 to the ul

 // find the height of each li and add it to the total
  $listItems.each(function (i){ ulHeight += parseInt($(this).css
 ('height'));});
 // once total is found add the final  height to the ul
 $list.css({height:ulHeight});

 will give yours a try in the mean time thanks
 Si


[jQuery] Plug in variables getting to grips

2009-06-26 Thread simon

I have the following within a plug in that i am trying to create.

Now all works well but i thought that th enext stage to take my plug
in would be to let me set the varaibels when I call the plug in.

i have th efollowing say:

   var $listContainer = $
('div.listContainer'),
$container = $('div.calendarContainer'),
Speed =5,
mouseWheel=true,
heigthOful = $container.find('div.listContainer ul').height(),
Time = parseInt(heigthOful)*Speed;

No wi have tried to put these in a casing to be able to change etc but
no luck as below:

 var settings = {
   $listContainer : $
('div.listContainer'),
$container :  $('div.calendarContainer'),
Speed : 5,
mouseWheel : true,
heigthOful : $container.find('div.listContainer ul').height(),
Time : parseInt(heigthOful)*Speed
}

but then when i run my plugin it fails and start to give me error
messag its say tha the

heigthOful : $container.find('div.listContainer ul').height(),

$container is undefined

if you could help withthis or give me a good tut on thsi would be
great

cheers si


[jQuery] Functions

2009-06-09 Thread simon

I have soem code that is seperated.

$(document).ready(function(){

});


[jQuery] Functions

2009-06-09 Thread simon

I have some code seperated by  script:

$(document).ready(function(){
  code in here

  function thisismyfunction(){

}

});

then later on i have

$(document).ready(function(){

thisismyfunction()

});

code in here with a call to the function above, but because its
seperated it will not call the above function is there a way I can
reference the a function outside in another declaration etc

many thanks si



[jQuery] same effect on multiple objects with same id

2009-06-09 Thread simon

I basically have several buttons that are created dynamically via a
db, so I can have 1 to 40 etc.
now at the moment I give each one a unique id and a hover code in the
loops. see below:

loops goes here..

img src=button.jpg alt=button  border=0 id=myButton?=
$newCode ? /
$(document).ready(function(){

$(#myButton?=$newCode ?).hover(
  function () {
$(this).fadeTo('fast', .50);
  },
  function () {
$(this).fadeTo('fast', 1.0);
  }
);
});

end loop

this works fine but gives me a lot of jquery code as well for each as
i also have a click action after it, but thats another matter, what i
am after is if i just give it the same id as below  then i would like
only to have one hover code that would do the effect to all, but at mo
it will only do the effect to the first, any ideas?

loops goes here..
img src=button.jpg alt=button  border=0 id=myButton/
end loop

So only this loops and i only need the code below once.

$(document).ready(function(){
$(#myButton).hover(
  function () {
$(this).fadeTo('fast', .50);
  },
  function () {
$(this).fadeTo('fast', 1.0);
  }
);
});


Many thanks Si


[jQuery] Re: same effect on multiple objects with same id

2009-06-09 Thread simon

thanks everyone, thats great to here from all the suggestions will
give it a go.

Much appreciated
Si


[jQuery] Re: Functions

2009-06-09 Thread simon

so I would put my function outside of the $(document).ready(function()
{ }?

Many thanks
Si


[jQuery] variable manipulation

2009-06-09 Thread simon

I have some simple variables

$.myvariable1
$.myvariable3
$.myvariable2


now I would like to add the number part of the variable to it
dynamically.

var i=1

$.myvariable+i

and so on, whats the way I could do this, i have tried several  like
$.myvariable[i] etc but nothing

Si


[jQuery] Re: Functions

2009-06-09 Thread simon

thanks for that, the only thing i did not try, I am learning now  :-)
many thanks
Si


[jQuery] Re: variable manipulation

2009-06-09 Thread simon

thanks for all the options guys, I did think of arrays but I got a lot
of updating to do if so and just to see if that could be done.

luckly I only have three variables so not too much of an issue.
I also was going to use asp scripting but again if others take on my
work here it gets more visually too much.

Hey thanks guys

Si


[jQuery] Re: variable manipulation

2009-06-09 Thread simon

what i havev done is constructe my page and all things working etc etc
but long winded, then what I do is then begin to reduce the code down
that is on that page whether it be asp, php of js, this way I learn
more about the script and in future do that method instead and then my
coding gets reduced on the fly etc,any way  i set three variables up
like $.myVariable1 the 2 then 3 stupid of me, in my mind thought i
should do an array from the start but nevermind.  Anyway what I mean
updating I mean going through each variable and changing it to an
array through out my page to $.myVariable(1) etc but thats not a
problem just pain :-)

Many thanks
Si


[jQuery] Re: variable manipulation

2009-06-09 Thread simon

thanks mark, I knew there was a way as  its similar to flash as
coding , just I was putting the sqr brackets in wrong place

thanks again


[jQuery] Text Scroller vertical

2009-06-05 Thread simon

I am after a simple div scroller that scrolls text up/down within a
fix sized div, with two scroll buttons that can be set to hover/click,
i have found a load that use it for li tags or images and scrolls
only up by set ammount, but i wouo d like this for text etc

thanks si


[jQuery] Re: Text Scroller vertical

2009-06-05 Thread simon

thanks, I have tried and am continuing to experiment with things like
carosel, simpleScroll ect, but nothing yet

again thanks
Si


[jQuery] Re: Text Scroller vertical

2009-06-05 Thread simon

Yeah! dont really require a scroll bar just the up and down arrows, I
can use scrollPane for the wholw thing but its with just buttons thats
hard to find.

thanks

On Jun 5, 3:52 pm, waseem sabjee waseemsab...@gmail.com wrote:
 cool. yeah...its not easy to get right. would you mind it without the scroll
 bar for now ? you would have arrows for scroll up and scroll down. but not a
 scroll bar.

 email me on : waseemsab...@gmail.com



 On Fri, Jun 5, 2009 at 4:48 PM, simon si...@uvfx.tv wrote:

  thanks, I have tried and am continuing to experiment with things like
  carosel, simpleScroll ect, but nothing yet

  again thanks
  Si- Hide quoted text -

 - Show quoted text -


[jQuery] Re: jQuery in Firefox extension is broken in v1.3.2

2009-05-16 Thread Simon Chiang

Oh, as an FYI I just noticed someone has filed a ticket for this
issue:

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



[jQuery] Re: jQuery in Firefox extension is broken in v1.3.2

2009-05-16 Thread Simon Chiang

Hi, I've run into this issue as well.  I made an example extension to
illustrate what happens:

  http://gist.github.com/112562

The gist has instructions for how to set everything up... basically
you download the extension and add a file to your firefox profile with
the path to the extension directory.  In my experience jquery 1.2.6 is
ok and doesn't cause the toolbar issue, while 1.3 and greater cause
toolbar extensions to disappear.  As mentioned this occurs without
actually doing anything with jquery beyond loading it as a script.

Any ideas?


On Apr 5, 11:52 am, Jeff Jones pixelst...@gmail.com wrote:
 What add-ons do you have installed inFirefox? And do you have a
 public page we can test with ourFirefoxclients?

 On Apr 4, 9:07 am, bjorn.frant...@gmail.com

 bjorn.frant...@gmail.com wrote:
  I've seen this post now, but I can's see my problem mentioned there.

  Myextensionbreaks the toolbar inFirefoxif I have remove all other
  scripts in the XUL and only leaves jQuery there, no other code at all:

  ?xml version=1.0?
  overlay id=NBU-overlay xmlns=http://www.mozilla.org/keymaster/
  gatekeeper/there.is.only.xul
  script src=chrome://myextension/content/code/jquery.js
  type=application/x-javascript/script
  /overlay

  So this is not caused by any code written bye me, but the inclusion of
  jQuery.

  Bjørn

  On Apr 3, 4:38 pm, MorningZ morni...@gmail.com wrote:

   I would suggest to take a look at this great blog post

  http://www.learningjquery.com/2009/03/3-quick-steps-for-a-painless-up...

   see if any of those breaking changes applies to your code..   the
   :visible change really is a big one... the @ in the selector is
   more an annoyance but anyways, maybe one of those 3 tips will help
   you fix your issue

   On Apr 3, 7:59 am, bjorn.frant...@gmail.com

   bjorn.frant...@gmail.com wrote:
I am developing aFirefoxextensionand after upgrading from jQuery
v1.2.6 to v1.3.2 I found that including jQuery in the XUL-file will
break other extensions that displays buttons on the toolbar, among
those is Adblock Plus.

I have not tried any versions between those mentioned so I do not know
in what version this happened.  If i revert to v1.2.6 everything is
OK.


[jQuery] Re: [autocomplete] disable submit until valid selection is made

2009-05-07 Thread simon

I used the following on a submit button, based on two input items, to
ensure that both had to be completed(not empty) before the button was
enabled, it also fades it out to 50%

$(#inputIDone,#inputIDtwo).keyup(function(){
if($(#inputIDone).val()!=  $(#inputIDtwo).val()!=){
  $(#theSubmitID).fadeTo('fast', 1.0).attr(disabled, );
} else {
  $(#theSubmitID).fadeTo('fast', .50).attr(disabled, true);
}
});


[jQuery] POSTing JSON cross domain

2009-05-01 Thread Simon

Hi all,

I've been pulling my hair out today trying to get this to work. I have
a large form of data that needs to be sent back to it's home server
when a user triggers an action. Using getJSON, I am able to post the
data successfully back to the home server. However, when I try and
replace this with POST instead (in order to get around data size
limitations) nothing at all happens. I can see no activity at all in
my log files or console. If I move the client page on to the same
server as the home server, then an XHR request is fired and data once
again flows.

Anyone know what jQuery treats GETs different to POSTs in this sense,
and how to work around it?

Thanks
Simon


[jQuery] [tablesorter] sortEnd never trigerred for sortDisabled columns

2009-04-16 Thread Simon GAUDILLET

Hi,

using tablesorter 2.0.3, when you click on the header of a column that has
been disabled with the headers options the sortStart event is triggered
but not the sortEnd. If you show a message on sortStart and hide it in
sortEnd, the message is not hidden.
Is it normal behaviour (as no sorting append)? should sortEnd be
triggered? should sortStart not be triggered in this case?

For the moment I added the following lines after line 581 :
} else {
   // trigger sortend
   $this.trigger(sortEnd);

Regards,
Simon


[jQuery] Re: text not right with fade

2009-03-31 Thread simon

Thanks James, I pressed submit before I could then write Only in
IE :-)

Si

On Mar 27, 8:52 pm, James james.gp@gmail.com wrote:
 I believe this only happens in Internet Explorer. Most of the time
 setting a CSS background-color to the element your text sits on will
 solve the issue.

 On Mar 27, 2:29 am,simonsi...@uvfx.tv wrote:



  I have noticed that when i fade my text in to 100% its not just right
  at all it looks pixelated any suggestions.

  I am using the following:

  ???.fadeIn('slow'); method

  many thanks Si- Hide quoted text -

 - Show quoted text -


[jQuery] text not right with fade

2009-03-27 Thread simon

I have noticed that when i fade my text in to 100% its not just right
at all it looks pixelated any suggestions.

I am using the following:

???.fadeIn('slow'); method

many thanks Si


[jQuery] Help with Multiple File uploading

2009-02-19 Thread Simon

Hello,

I am desperately trying to implement the Multiple File Upload Plugin
into a script. However, I seem to be having no end of problems simply
getting it to pass the files through.

I have set up a simple two-page script. The front-end is simply a form
with the jQuery plugin, and the receiving script all I try to do is
print_r the files array, yet it is empty. Nothing is being passed.

Any ideas on why this is the case? If it works, this is the code I use
on the form page (yes I do have the jQuery and the plugin files also
linked in the head of the document):

form id=requestform action=uploadres.php method=post
label for=filesAttach files:/label

input id=fileattach name=files[] class=multi maxlength=5
type=filespan id=files_wrap_list/span

br /input type=submit id=submitrequest class=submit
value=Submit /
/form

And on the receiving page I try this:

?php print_r($_FILES['file']); ?

Which results in an empty array. Am I overlooking something very
simple here? Its often the case!

Many thanks in advance for any help you can provide with this!

Kind regards,
Simon


[jQuery] Re: Help with Multiple File uploading

2009-02-19 Thread Simon
The receiving script actually reads:

?php print_r($_FILES['files']); ?

I have checked for spelling errors ;-)

2009/2/19 Simon sib...@gmail.com

 Hello,

 I am desperately trying to implement the Multiple File Upload Plugin
 into a script. However, I seem to be having no end of problems simply
 getting it to pass the files through.

 I have set up a simple two-page script. The front-end is simply a form
 with the jQuery plugin, and the receiving script all I try to do is
 print_r the files array, yet it is empty. Nothing is being passed.

 Any ideas on why this is the case? If it works, this is the code I use
 on the form page (yes I do have the jQuery and the plugin files also
 linked in the head of the document):

 form id=requestform action=uploadres.php method=post
 label for=filesAttach files:/label

 input id=fileattach name=files[] class=multi maxlength=5
 type=filespan id=files_wrap_list/span

 br /input type=submit id=submitrequest class=submit
 value=Submit /
 /form

 And on the receiving page I try this:

 ?php print_r($_FILES['file']); ?

 Which results in an empty array. Am I overlooking something very
 simple here? Its often the case!

 Many thanks in advance for any help you can provide with this!

 Kind regards,
 Simon


[jQuery] Superfish - problem with supersubs plugin

2009-01-14 Thread simon

Hi all,

When I have a lot of nodes in the superfish menu it loads very slow
(even from the harddrive). Anyone having the same problem? To me it
seems that it is the first each() loop in the supersubs.js file which
executes slow.

Any tips on maybe another plugin I can use, since I dont want to lose
the functionality?

The code I'm using is from the following site:
http://users.tpg.com.au/j_birch/plugins/superfish/

Thanks,
Simon


[jQuery] Re: Coda Slider

2008-12-30 Thread Simon Teufel


thank you sir
Am 30.12.2008 um 20:31 schrieb Kean:


Yes, just add the class jFlowPrev to your previous button
and class jFlowNext to your next button.

View the demo source to get the rest.




[jQuery] Re: Alert message in jquery

2008-10-02 Thread Simon Elliott
I like using the console in the firebug plugin under firefox.

To write to the console from your javascript code:

var value = bar;

console.log(foo,value);

https://addons.mozilla.org/en-US/firefox/addon/1843



2008/10/2 surya [EMAIL PROTECTED]


 Hi everyone,

 Can any one help please?

I am new to jquery. I am unable to debug my jquery as I am
 unable to fix my issue. So I want  to know the flow using alert
 messages but alert is not working in jquery. How to display an alert
 in jquery?

 Thanks,
 Surya.




-- 

Simon


[jQuery] Re: [validate] Validation Rules based on IDs rather than Names

2008-06-26 Thread Simon Whatley

Hi Jörn

Firstly, the form I have to work with is not of my creation and is
somewhat flawed!

I agree, your first example would be invalid if the forms were on the
same page. If they were on separate pages the IDs are not invalid.

However my example is a form that collects a number of instances of
the same type of data. When the instance limit is reached, the user
progresses to the next stage. Take registering multiple delegates to a
conference as an example; you need to register the same type of detail
for each delegate. (Ideally a delegate number would be saved to the
database therefore negating this whole issue, but this is not the case
here and it does serve to illustrate a problematic area).

Example:
!-- page 1 --
form id=frm
input id=e1 name=e1_1 /
input id=e2 name=e2_1 /
/form

!-- page 2 --
form id=frm
input id=e1 name=e1_2 /
input id=e2 name=e2_2 /
/form

!-- page n --
form id=frm
input id=e1 name=e1_n /
input id=e2 name=e2_n /
/form

Where e1_1, e1_2 and e1_n refer to the same type of content, which can
be referenced with the ID, and likewise for e2 etc.

By refering to the name of the field for validation you are tightly
coupling your script to the name therefore a script would have to be
created for each iteration.

Your second example would pose a problem if you wanted to show
validation errors based on, for example, an individual checkbox chosen
within a given group (unless I am very much mistaken).

Furthermore, whether using a JavaScript framework or not, it is more
robust refering to an element by it's ID (i.e. getElementById or $
(#ID)). Infact, you do in certain cases use the ID as reference
(e.g. when refering to dependencies, for example #fieldID:checked).

If you could build in a solution that also allows a developer to
decide whether to refer to name or ID when creating rules/messages,
you will be able to serve everyones needs. I hope it isn't to
complicated to achieve :-/

Thanks,
Simon


On Jun 25, 7:53 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Let just get this straight, I consider this invalid and useless html:

 form
 input id=e1 name=e1_1 /
 input id=e2 name=e1_2 /
 /form
 form
 input id=e1 name=e2_1 /
 input id=e2 name=e2_2 /
 /form

 While this is valid and useful, and works fine with the validation plugin:

 form
 input id=e1_1 name=e1 /
 input id=e1_2 name=e2 /
 /form
 form
 input id=e2_1 name=e1 /
 input id=e2_2 name=e2 /
 /form

 So either of us is missing something, which we need to clear up at first.

 Let me know what you think, I sure hope to find a solution to this
 that works for both of us.

 Jörn

 On Wed, Jun 25, 2008 at 12:58 PM,SimonWhatley[EMAIL PROTECTED] wrote:

  Hi Jörn,

  IDs are unique to the page rather than across forms, names do not have
  to be. The forms I refer to are not on the same page, but on a new
  instance of the page when a user clicks the submit button. The rule
  should/could therefore apply to the ID and not the name, since the
  name can be dynamic.

  There are two ways I can get around this. Use a server-side scripting
  language to dynamically output the correct JavaScript and therefore
  rules and messages or hack the validation plugin. It's not great doing
  either.

  I will try looking at the plugin option since it is a more sensible
  approach. I would suggest that the plugin support element IDs as this
  is the only way you can guarantee a rule be applied to a specific
  element (assuming people adhere to the uniqueness of an ID). If you
  can somehow allow the plugin to be based on either name or ID, to be
  specified by the developer and defaulting to name, it will allow for
  backwards compatibility.

  If I get something working with element.id, I'll send the code over to
  you.

  Thanks,
 Simon

  On Jun 25, 11:24 am, Jörn Zaefferer [EMAIL PROTECTED]
  wrote:
  Repeating the same IDs across forms won't work, IDs have to be unique.
  That is why the plugin relies on names, as those have to be unique
  (from the plugin point of view) only within their form.

  You can try to hack the plugin, replacing all element.name snippets
  with element.id, but I won't support that.

  Jörn

  On Wed, Jun 25, 2008 at 12:10 PM,SimonWhatley[EMAIL PROTECTED] wrote:

   Hi Joern,

   I have come across an interesting problem regarding your jQuery
   Validation script that I am sure you already have a solution to, but I
   can't find it!

   I need the validation rules to look at the form input IDs rather than
   the form input names. I have a form that iterates 10 times (when you
   click next), so the the names of the inputs increment by 1 each time,
   whilst the IDs stay the same. (This is not my doing, so I have to live
   with the naming convention!)

   For example:

   Form1 has input names field1_1, field2_1, field3_1 and input ids
   field1, field2, field3
   Form2 has input names field1_2, field2_2, field3_2 and input ids
   field1, field2, field3

   I originally thought your jQuery Validation script looked at the IDs

[jQuery] [Validate] Validation Rules based on IDs rather than Names

2008-06-25 Thread Simon Whatley

Hi Joern,

I have come across an interesting problem regarding your jQuery
Validation script that I am sure you already have a solution to, but I
can't find it!

I need the validation rules to look at the form input IDs rather than
the form input names. I have a form that iterates 10 times, so the the
names of the inputs increment by 1 each time, whilst the IDs stay the
same. (This is not my doing, so I have to live with the naming
convention!)

For example:

Form1 has input names field1_1, field2_1, field3_1 and input ids
field1, field2, field3
Form2 has input names field1_2, field2_2, field3_2 and input ids
field1, field2, field3

I originally thought your jQuery Validation script looked at the IDs
on the page, so the same validation rules would apply for field1
whether on form1 or form2. However this is not the case.

How do I change your script to look at the ID?

Thanks,
Simon


[jQuery] [validate] Validation Rules based on IDs rather than Names

2008-06-25 Thread Simon Whatley

Hi Joern,

I have come across an interesting problem regarding your jQuery
Validation script that I am sure you already have a solution to, but I
can't find it!

I need the validation rules to look at the form input IDs rather than
the form input names. I have a form that iterates 10 times (when you
click next), so the the names of the inputs increment by 1 each time,
whilst the IDs stay the same. (This is not my doing, so I have to live
with the naming convention!)

For example:

Form1 has input names field1_1, field2_1, field3_1 and input ids
field1, field2, field3
Form2 has input names field1_2, field2_2, field3_2 and input ids
field1, field2, field3

I originally thought your jQuery Validation script looked at the IDs
on the page, so the same validation rules would apply for field1
whether on form1 or form2. However this is not the case.

How do I change your script to look at the ID?

Many thanks in advance for your help.

Simon


[jQuery] Re: [validate] Validation Rules based on IDs rather than Names

2008-06-25 Thread Simon Whatley

Hi Jörn,

Element IDs are unique to a page, whereas names are not. By this very
fact, it is problematic applying validation rules to a specific
element if that element's name exists multiple times (as will often be
the case, especially with checkboxes, radio buttons and mutliple-
selects).

The problem I have encountered doesn't refer to multiple forms on a
page, but rather multiple iterations of the form across pages, i.e.
when a user submits the form. The validation rules and messages are
the same for each form so the form's input IDs should be used as the
reference.

E.g. This is valid for two distinct pages with identical forms
Form1 has input IDs field1, field2, field3
Form2 has input IDs field1, field2, field3

Where field1, field..n IDs could be referenced by your validation
script and re-used for each form.

However, since my form has dynamic names, I would need to create
multiple iterations of the validation script, since after the first
iteration of the form, the names of the form fields are changed (with
a numeric increment).

There are two solutions to this problem, both of which are far from
ideal:

1. Dynamically create the JavaScript used to validate a page using a
server-side script
2. As you suggest, hack your plugin to use element IDs rather than
names.

I've decided the latter is out of the question since it is your plugin
and as soon as an upgrade is available, I will not be able to use it.
The former will have to be used for the time-being.

I would kindly suggest that you consider implementing IDs as
references in your plugin. This could be an attribute a developer has
to implement in their script, the default being name, the ideal
scenario being ID.

Since IDs by their nature are unique this will allow users of your
plugin to clearly identify which element the rule is acting upon.

Many thanks,
Simon.


On Jun 25, 11:24 am, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Repeating the same IDs across forms won't work, IDs have to be unique.
 That is why the plugin relies on names, as those have to be unique
 (from the plugin point of view) only within their form.

 You can try to hack the plugin, replacing all element.name snippets
 with element.id, but I won't support that.

 Jörn

 On Wed, Jun 25, 2008 at 12:10 PM, Simon Whatley [EMAIL PROTECTED] wrote:

  Hi Joern,

  I have come across an interesting problem regarding your jQuery
  Validation script that I am sure you already have a solution to, but I
  can't find it!

  I need the validation rules to look at the form input IDs rather than
  the form input names. I have a form that iterates 10 times (when you
  click next), so the the names of the inputs increment by 1 each time,
  whilst the IDs stay the same. (This is not my doing, so I have to live
  with the naming convention!)

  For example:

  Form1 has input names field1_1, field2_1, field3_1 and input ids
  field1, field2, field3
  Form2 has input names field1_2, field2_2, field3_2 and input ids
  field1, field2, field3

  I originally thought your jQuery Validation script looked at the IDs
  on the page, so the same validation rules would apply for field1
  whether on form1 or form2. However this is not the case.

  How do I change your script to look at the ID?

  Many thanks in advance for your help.

  Simon


[jQuery] Re: [validate] Validation Rules based on IDs rather than Names

2008-06-25 Thread Simon Whatley

Hi Jörn,

IDs are unique to the page rather than across forms, names do not have
to be. The forms I refer to are not on the same page, but on a new
instance of the page when a user clicks the submit button. The rule
should/could therefore apply to the ID and not the name, since the
name can be dynamic.

There are two ways I can get around this. Use a server-side scripting
language to dynamically output the correct JavaScript and therefore
rules and messages or hack the validation plugin. It's not great doing
either.

I will try looking at the plugin option since it is a more sensible
approach. I would suggest that the plugin support element IDs as this
is the only way you can guarantee a rule be applied to a specific
element (assuming people adhere to the uniqueness of an ID). If you
can somehow allow the plugin to be based on either name or ID, to be
specified by the developer and defaulting to name, it will allow for
backwards compatibility.

If I get something working with element.id, I'll send the code over to
you.

Thanks,
Simon

On Jun 25, 11:24 am, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Repeating the same IDs across forms won't work, IDs have to be unique.
 That is why the plugin relies on names, as those have to be unique
 (from the plugin point of view) only within their form.

 You can try to hack the plugin, replacing all element.name snippets
 with element.id, but I won't support that.

 Jörn

 On Wed, Jun 25, 2008 at 12:10 PM, Simon Whatley [EMAIL PROTECTED] wrote:

  Hi Joern,

  I have come across an interesting problem regarding your jQuery
  Validation script that I am sure you already have a solution to, but I
  can't find it!

  I need the validation rules to look at the form input IDs rather than
  the form input names. I have a form that iterates 10 times (when you
  click next), so the the names of the inputs increment by 1 each time,
  whilst the IDs stay the same. (This is not my doing, so I have to live
  with the naming convention!)

  For example:

  Form1 has input names field1_1, field2_1, field3_1 and input ids
  field1, field2, field3
  Form2 has input names field1_2, field2_2, field3_2 and input ids
  field1, field2, field3

  I originally thought your jQuery Validation script looked at the IDs
  on the page, so the same validation rules would apply for field1
  whether on form1 or form2. However this is not the case.

  How do I change your script to look at the ID?

  Many thanks in advance for your help.

  Simon


[jQuery] Contributors to jQuery and GPL license

2008-05-06 Thread Simon

The company I work for is interested in using jQuery in a software
project. However in order to do so we have to perform due dilergence
checks that the code in jQuery meets the terms of its license. I
realise that jQuery is offered under dual MIT and GPL licenses which
is great.

However, is any review performed of contributions made to the code to
understand whether the contributor has the right to redistribute the
code or does the maintainer accept contributions without asking these
types of questions?

Also, are contributors required to accept/sign any kind of
contributor’s statement?  If yes could someone provide a copy?


[jQuery] Re: Superfish - CSS questions ?

2008-02-04 Thread Simon

Hi Joel,

Thanks you VERY much for your answer (Much faster than mine, I'm
reading a lot of JS stuff for the moment ;-))

Superfish is really great, I've been looking a lot around, and it's
the best for me!

BUT, I still don't get some few things :-)

You can have a look here = http://ugo.celeonet.fr/testsimon/

And my CSS file is here = http://ugo.celeonet.fr/testsimon/css/nav2.css

By default, I highlight the main tab called item 4, no problem here,
it's easy, but when you try the submenu (item C, item D, etc.) you can
see one of my problems, the drop-down menu don't fade out after the
delay (default setting)...

Do you know what's I'm doing wrong ?

Also, I don't know why, but I would like to put the subnav item (item
C, item D, etc.) in bold (strong) when the drop-down menu is
activated, but then, all the drop-down menu is in bold as well, I've
tried everything, I don't know what I missing, again...

Tons of thanks in advance !!!

Simon


[jQuery] Superfish - CSS questions ?

2008-01-31 Thread Simon

Hello,

I'm using for a personal project the SUPER superfish menu ;-)

Everything is working great, you can have a look here

http://ugo.celeonet.fr/a/menu.html

and my css is here :

http://ugo.celeonet.fr/a/css/nav2.css

My version of the superfish menu :)

But I've got a question, I would like to know if it's possible, to
have the text color of my current main tab (first item, black
background color) in white whatever happen ? (The same style as in
hover state)

I hope I'm clear enough... My english is basic...

You can have a look at my css here

I'm sure it's pretty simple, but I don't get it :(

TIA

Simon


[jQuery] Display all records using tablesorter pagination plugin

2007-12-17 Thread simon g

All,

I'll looking to add a default option to the drop down list for the
jQuery paging plugin for the jquery tablersorter. I want to be able to
select an option all that will display all the records returned to
the page. Any examples or pointers to examples of this would be good
would be great.

Cheers

Simon


[jQuery] Re: ScrollTo with Easing

2007-07-27 Thread Simon Huntley

When can we expect to see jQuery 1.2?

By the way, I love this framework.

-Simon Huntley
Lead Developer, http://www.smallfarmcentral.com

On Jul 27, 11:48 am, John Resig [EMAIL PROTECTED] wrote:
 jQuery 1.2 is going to have animatable scrolling, you can find a quick
 demo here (using easing):http://dev.jquery.com/~john/ticket/step/test2.html

 --John

 On 7/27/07, Glen Lipka [EMAIL PROTECTED] wrote:



  There is a feature of EXT 2.0 that needs a ScrollTo function.

  I saw this one:
 http://kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html

   The feature is better if it has access to easing functions.
  I know Interface has this, but I wanted to suggest to the ScrollTo author to
  possibly synergize with the easing plugin.  It's a nice feature when
  scrolling to be able to control the motion.

  I like the plugin already, especially with the wheel support!

   Glen- Hide quoted text -

 - Show quoted text -