[jQuery] Re: Bind event to tab selection in 1.1

2008-10-02 Thread Klaus Hartl

It's called onClick in the old tabs... here's an example:
http://stilbuero.de/jquery/tabs/

--Klaus


On 1 Okt., 22:50, Dan Baughman [EMAIL PROTECTED] wrote:
 Ok so I had something really cool setup in 1.3, then I saw Klaus' history
 object doesnt' integrate with tabs 3!

 Does anyone know how to bind events to the tab selection action in JQuery
 1.1?  I'm just trying to focus on one the fields in the tab content area.  I
 have tried the tabs().bind() and the new select: function syntax.


[jQuery] Re: Fire bug error : too much recursion

2008-10-02 Thread Amardeep
sorry for my mistake .. yes its JSON
i was using this :
$('#div_id').show('animate', {opacity:1.9}, 1200);

i am not at all sure about the real cause .. i did some search and found
that it could be a possible reason

On Thu, Oct 2, 2008 at 8:50 AM, Karl Rudd [EMAIL PROTECTED] wrote:

 Will need a bit more information before anyone can help. An example
 page would be helpful. How did you find out that it may be because of
 the jason library used ..

 Karl Rudd

 (PS On a site note, it's JSON (JavaScript Object Notation), not JASON.)

 On Wed, Oct 1, 2008 at 5:28 PM, Amardeep [EMAIL PROTECTED]
 wrote:
  i am using jQuery in drupal .. can u tell me how do i know if i am using
  JASON library.
  i am pretty new in jquery and do apologize if my question sounds stupid
 
  On Wed, Oct 1, 2008 at 6:36 AM, Karl Rudd [EMAIL PROTECTED] wrote:
 
  Are you using the JSON library from json.org? If so, make sure it's
  the json2.js one, rather than the earlier, and slightly broken, one.
 
  http://www.json.org/js.html
 
  Karl Rudd
 
  On Wed, Oct 1, 2008 at 1:46 AM, ♫ cheskonov [EMAIL PROTECTED]
  wrote:
  
   hi ,
  
   I am getting this error in Firefox 3.0.2 fire bug console :
  
   too much recursion  /misc/jquery.js  Line 2
  
   after some searching i found that it may be because of the jason
   library used ..
   can any one tell me how do i fix it ..
  
   In IE i got an alert saying that Stack Overflow at line [line 1]
  
 
 
 
  --
  Amardeep Sarkar
 




-- 
Amardeep Sarkar


[jQuery] Re: Valdiation plugin request

2008-10-02 Thread Wokkel

Yes i have been deciphering your stated example and im fairly new with
jquery and i really never could understand the
$.validator.addMethod(pageRequired, function(value, element))
function. Awesome you are looking into subforms cant wait for the
next release :) .Thank you.

On Oct 1, 3:23 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 So far the recommended approach can be seen in this 
 demo:http://jquery.bassistance.de/validate/demo/multipart/

 I'm working on a different solution, which should be easier to use,
 where you specify rules for all elements like you're used to, but also
 specify which subform should be validated, ignoring everything else.

 Jörn

 On Mon, Sep 29, 2008 at 9:40 PM, Wokkel [EMAIL PROTECTED] wrote:

  Yes i know what you mean with add you can add a validation element and
  the manual states Adds to an element which is already required.. So
  you can add validation rules to an existing element. But I want a new
  set of validation rules. For instance you have DIV1 with name, e-mail
  and DIV2 with zipcode country and adress. I want to continue to step
  2 button to validate only name and e-mail and the step 2 button to
  validate zipcode country and adress. So you have a var checkPage1 with
  the first validation rules and checkPage2 with the second validation
  rules and validate them accordingly. Would that be possible?

  On Sep 29, 11:01 am, Gordon [EMAIL PROTECTED] wrote:
  lookup the .rules method in the documentation :)

  On Sep 28, 8:52 pm, Wokkel [EMAIL PROTECTED] wrote:

   Hi all,

   I am successfully using the validation plug in and i would like a
   request to make it more easier to have a form in several different
   divs for a multi step layout.

   I solved a multi page form by filling in already the values of the
   step2 and 3 inputs and then validating it and then when the user goes
   to step 2 or 3, clearing the fields. Would it be nice if there can be
   like a ValidationAdd function where you can add validation rules
   dynamically, so you can make a multipage form easier.

   Thank you very much

   Wokkel


[jQuery] Re: Fire bug error : too much recursion

2008-10-02 Thread Amardeep
thanx it works for me .. i am such a stupid

On Thu, Oct 2, 2008 at 12:27 PM, BB [EMAIL PROTECTED] wrote:


 The syntax of this function is wrong!

 $(#div_id).animate({ opacity:1.9 }, 1200);

 http://docs.jquery.com/Effects/animate#paramsdurationeasingcallback

 On 2 Okt., 08:51, Amardeep [EMAIL PROTECTED] wrote:
  sorry for my mistake .. yes its JSON
  i was using this :
  $('#div_id').show('animate', {opacity:1.9}, 1200);
 
  i am not at all sure about the real cause .. i did some search and found
  that it could be a possible reason
 
 
 
  On Thu, Oct 2, 2008 at 8:50 AM, Karl Rudd [EMAIL PROTECTED] wrote:
   Will need a bit more information before anyone can help. An example
   page would be helpful. How did you find out that it may be because of
   the jason library used ..
 
   Karl Rudd
 
   (PS On a site note, it's JSON (JavaScript Object Notation), not JASON.)
 
   On Wed, Oct 1, 2008 at 5:28 PM, Amardeep [EMAIL PROTECTED]
   wrote:
i am using jQuery in drupal .. can u tell me how do i know if i am
 using
JASON library.
i am pretty new in jquery and do apologize if my question sounds
 stupid
 
On Wed, Oct 1, 2008 at 6:36 AM, Karl Rudd [EMAIL PROTECTED]
 wrote:
 
Are you using the JSON library from json.org? If so, make sure it's
the json2.js one, rather than the earlier, and slightly broken,
 one.
 
   http://www.json.org/js.html
 
Karl Rudd
 
On Wed, Oct 1, 2008 at 1:46 AM, ♫ cheskonov 
 [EMAIL PROTECTED]
wrote:
 
 hi ,
 
 I am getting this error in Firefox 3.0.2 fire bug console :
 
 too much recursion  /misc/jquery.js  Line 2
 
 after some searching i found that it may be because of the jason
 library used ..
 can any one tell me how do i fix it ..
 
 In IE i got an alert saying that Stack Overflow at line [line 1]
 
--
Amardeep Sarkar
 
  --
  Amardeep Sarkar




-- 
Amardeep Sarkar


[jQuery] Choose the best Selector

2008-10-02 Thread Pedram

Dear folk
consider the Below HTML Code

div id=a
  p id=b
input type=text id=c /
  /p
/div

I would like to have Input selecter
there are some ways which one has more speed and it is efficient

1- $(div#a p#b :text#c).val();
2- $(#a #b #c).val();
3.$(#c).val();
4-$(:text#c).val();
5-$(#a).children().children().val();
and .

Regards Pedram


[jQuery] Re: Choose the best Selector

2008-10-02 Thread BB

$(#c).val(); would be the best and fastest!

On 2 Okt., 10:38, Pedram [EMAIL PROTECTED] wrote:
 Dear folk
 consider the Below HTML Code

 div id=a
   p id=b
     input type=text id=c /
   /p
 /div

 I would like to have Input selecter
 there are some ways which one has more speed and it is efficient

 1- $(div#a p#b :text#c).val();
 2- $(#a #b #c).val();
 3.$(#c).val();
 4-$(:text#c).val();
 5-$(#a).children().children().val();
 and .

 Regards Pedram


[jQuery] Re: Choose the best Selector

2008-10-02 Thread Pedram

how could we say this cause the Engine must search all the Document to
Find the #C 

On Oct 2, 12:24 pm, BB [EMAIL PROTECTED] wrote:
 $(#c).val(); would be the best and fastest!

 On 2 Okt., 10:38, Pedram [EMAIL PROTECTED] wrote:

  Dear folk
  consider the Below HTML Code

  div id=a
    p id=b
      input type=text id=c /
    /p
  /div

  I would like to have Input selecter
  there are some ways which one has more speed and it is efficient

  1- $(div#a p#b :text#c).val();
  2- $(#a #b #c).val();
  3.$(#c).val();
  4-$(:text#c).val();
  5-$(#a).children().children().val();
  and .

  Regards Pedram


[jQuery] Re: Choose the best Selector

2008-10-02 Thread BB

If you search after ids it is allways document.getElementById()
because the id must be uniq!
So it is the fastest!!! way to find an element!

jQuery code:
// HANDLE: $(#id)
else {
  var elem = document.getElementById( match[3] );

  // Make sure an element was located
  if ( elem ){
// Handle the case where IE and Opera return items
// by name instead of ID
if ( elem.id != match[3] )
  return jQuery().find( selector );
// Otherwise, we inject the element directly into the jQuery
object
return jQuery( elem );
}



On 2 Okt., 11:33, Pedram [EMAIL PROTECTED] wrote:
 how could we say this cause the Engine must search all the Document to
 Find the #C 

 On Oct 2, 12:24 pm, BB [EMAIL PROTECTED] wrote:

  $(#c).val(); would be the best and fastest!

  On 2 Okt., 10:38, Pedram [EMAIL PROTECTED] wrote:

   Dear folk
   consider the Below HTML Code

   div id=a
     p id=b
       input type=text id=c /
     /p
   /div

   I would like to have Input selecter
   there are some ways which one has more speed and it is efficient

   1- $(div#a p#b :text#c).val();
   2- $(#a #b #c).val();
   3.$(#c).val();
   4-$(:text#c).val();
   5-$(#a).children().children().val();
   and .

   Regards Pedram


[jQuery] sequential animation

2008-10-02 Thread [EMAIL PROTECTED]

Hi,

I have the following :

$(div, this.parent).animate({ height: 400 });
$(.rightColumn, this.parent).children().fadeOut();
$(.rightColumn, this.parent).append($(#dd-EditCutting));

Now I would like the last line to be executed only after the two
animations have completed. Is there a way to do that ?


[jQuery] testing

2008-10-02 Thread andrewsquidge


tstin123
-- 
View this message in context: 
http://www.nabble.com/testing-tp19776226s27240p19776226.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Alert message in jquery

2008-10-02 Thread surya

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.


[jQuery] Re: Jeditable plugin

2008-10-02 Thread Mika Tuupola



On Oct 2, 2008, at 1:33 AM, Dr3adl0ck wrote:


I'd like to activate/deactivate making an edit in place field editable
depending on if a user selects something.

Is there a way in jQuery remove events associated with a class or
something to that effect?


$.unbind()

It is probably a good idea to namespace your events. So instead of  
binding to click bind to click.editable. Then you can later  
$.unbind('click.editable) to remove click events related to inline  
editing. Otherwise it will unbind all click events.


--
Mika Tuupola
http://www.appelsiini.net/



[jQuery] java class clashes with jquery

2008-10-02 Thread Rene Veerman


I this jquery-related error when i run a java applet (that uploads files 
through FTP)


I'm wondering how this error occurs, firebug doesn't show a call-stack 
trace... :(


Java class com.javauploader.hermes.U has no public field or method named 
jQuery1222913664275

var id = elem[ expando ];

it occurs in this piece of source:

data: function( elem, name, data ) {
 elem = elem == window ?
 windowData :
 elem;

 var id = elem[ expando ];

 // Compute a unique ID for the element
 if ( !id )
 id = elem[ expando ] = ++uuid;

 // Only generate the data cache if we're
 // trying to access or manipulate it
 if ( name  !jQuery.cache[ id ] )
 jQuery.cache[ id ] = {};

 // Prevent overriding the named cache with undefined values
 if ( data !== undefined )
 jQuery.cache[ id ][ name ] = data;

 // Return the named cache data, or the ID for the element
 return name ?
 jQuery.cache[ id ][ name ] :
 id;
 },




[jQuery] Re: looking for a slider

2008-10-02 Thread BB

Look at this:
http://ui.jquery.com/repository/latest/demos/functional/#ui.slider

this demo is really simple. here are the docs:
http://docs.jquery.com/UI/Slider

On 2 Okt., 11:48, hcvitto [EMAIL PROTECTED] wrote:
 hi
 i've searched around fot a while but couldn't find any slider that
 suits my need. This is what i'm looking for (jquery style!)

 http://www.phatfusion.net/slider/

 plus i a '+' and a '-' buttons.

 Does anyone know about a plugin which does this?

 Thanks vitto


[jQuery] Re: Alert message in jquery

2008-10-02 Thread BB

I'm sure that:
alert();
should work! Maybe the error is before the alert() and so it maybe
won't be executed.

Another way to debug is to use Firefox, download firebug-extension
(https://addons.mozilla.org/de/firefox/addon/1843) an then wirte some
console.log() functions in your code. Now you will see the results in
the Firebug-Konsole-Panel.
Here is some more information about firebug:
http://getfirebug.com/

On 2 Okt., 12:05, surya [EMAIL PROTECTED] wrote:
 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.


[jQuery] Re: selecting all element with a given class but not another one.

2008-10-02 Thread BB

$(.RepeatedItem:not(.RepeatedItemSelected))

On 2 Okt., 11:57, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 I can't figure out what the syntax is to select all the elements which
 have a given class but not another given class.
 Example : I want all the elements with class .RepeatedItem but which
 don't have the class .RepeatedItemSelected.

 I've tried this with no luck :

 $(.RepeatedItem + not:(.RepeatedItemSelected))

 Does anyone know the syntax ?
 Thanks


[jQuery] Blur effect with jQuery ?

2008-10-02 Thread [EMAIL PROTECTED]

Hi,

I can't find this effect in the API or in the plugins repository. Does
anyone know if it's possible at all to blur a DIV using jQuery, or
would I have to code this myself ?

Thanks


[jQuery] Re: jQuery validation plugin in Drupal

2008-10-02 Thread Jeroen Coumans

Aah! *Slaps forehead* I found the problem! I was creating the
validation rules and messages by referring to the id's of the form
fields, while I should just reference their names! Everything's
working now, thanks for your time.

Jeroen


On 2 okt, 03:24, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Could you reduce your non-working testpage to just one non-working
 element? I still can't see the issue. The validation seems to work
 just fine.

 Jörn

 On Wed, Oct 1, 2008 at 11:57 PM,JeroenCoumans[EMAIL PROTECTED] wrote:

  Ok, I've further debugged this, trying to find the exact circumstances
  in which the validator doesn't work. Now I noticed that the values of
  the name and id attributes of input fields aren't the same. I've
  created a fixed version:

 http://lab.jeroencoumans.nl/register/index-fixed-name.html

  And now the validator works! So it seems that the name and id
  attributes ought to be the same in order for the validator plugin to
  work. But Drupal automatically creates the name attribute without the
  edit- part which it prepends in the id attribute. Is there any way I
  can get the validator plugin to work without having to hack the way
  Drupal spits out its forms?

  Regards,
 Jeroen

  On 1 okt, 15:16, Jörn Zaefferer [EMAIL PROTECTED]
  wrote:
  Could you summarize the problem again? I looked at the testpage and
  couldn't see anything wrong with it.

  Jörn

  On Tue, Sep 30, 2008 at 6:16 PM,JeroenCoumans[EMAIL PROTECTED] wrote:

   Could it have something to do with the fact that each id starts with
   edit-? When I try it with manually created markup, changing or
   removing the dashes doesn't help, but removing the edit- part does.
   Is there a workaround possible?

   Thanks,
  Jeroen

   On 29 sep, 00:06,Jeroen Coumans[EMAIL PROTECTED] wrote:
   Hi, I've uploaded the form with the generated HTML markup at:

  http://lab.jeroencoumans.nl/register/

   Thanks a lot,
  Jeroen

   On 27 sep, 13:26, Jörn Zaefferer [EMAIL PROTECTED]
   wrote:

Yes, an example would help a lot.

Jörn

On Sat, Sep 27, 2008 at 12:45 PM,JeroenCoumans

[EMAIL PROTECTED] wrote:

 Thanks, I tried that but it doesn't seem to work. Drupal applies the
 classes required to required form fields, and they're picked up
 correctly. But any rule I add doesn't work at all. Even a single 
 rule
 to make an extra field required doesn't get picked up.

 Would it help if I setup an example of what I'm trying to achieve?

 Thanks,
Jeroen

 On 27 sep, 02:57, Jörn Zaefferer [EMAIL PROTECTED]
 wrote:
 Yes, details can be found 
 here:http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_compl...

 Jörn

 On Sat, Sep 27, 2008 at 2:34 AM,JeroenCoumans[EMAIL PROTECTED] 
 wrote:

  Hi,

  When trying to use the validator plugin, I get the following 
  error:

  missing : after property id
  edit-name: required,

  It seems like it has problems with the - that Drupal puts in 
  the
  id's of each form field. Is there a workaround possible?

  Thanks,
 JeroenCoumans


[jQuery] Re: Blur effect with jQuery ?

2008-10-02 Thread Rene Veerman


you can $(element).fadeOut, but is that what you are looking for?

blur means many things. do you mean 'disable' with it?

or just a visual blur?

IE can do a visual, guassian blur on a div, but it's not supported in 
other browsers.


[EMAIL PROTECTED] wrote:

Hi,

I can't find this effect in the API or in the plugins repository. Does
anyone know if it's possible at all to blur a DIV using jQuery, or
would I have to code this myself ?

Thanks

  




[jQuery] Re: Blur effect with jQuery ?

2008-10-02 Thread Martin Möller

graphicsxp wrote:
 I can't find this effect in the API or in the plugins repository. Does
 anyone know if it's possible at all to blur a DIV using jQuery, or
 would I have to code this myself ?

Nothing i know of.
Only IE supports a BLUR Filter, but i advise against it.

Except this Blur CSS Concept:

CSS Blur Menu Example:
http://www.3point7designs.com/web-design2.html

CSS Blur Menu Tutorial:
http://www.3point7designs.com/blog/2007/12/22/advanced-css-menu-trick/

So all you can do is Pseudo-Blur Divs when you overlay a Blurred Image.


[jQuery] Menu Problem with IE6

2008-10-02 Thread tom2008

Hi All,

Can anyone help me to find the problem with menu on IE6, it works
perfect with any other browse except IE6, i don't know whether its css
or javascript problem. Link to site is
http://chaos.com/home/4002.html
if you rollover on menu drop down box should appear which with IE 6
dosn't


[jQuery] Unhandled exception in jquery-1.2.6.min.js

2008-10-02 Thread itatai

Hi

I'm attempting to use the jQuery library within VS 2008 with no luck.


Here is what I did:


1. Created a new MVC app having a View linked to an  MVC Master Page


2. Copied the  jQuery lib to the content folder


3.  Dragged  jquery-1.2.6.min.js to the HEAD section of the Master
Pager


src=../../Content/jquery-1.2.6.min.js type=text/javascript
(excluding script tag intentionally)


4.  Dragged jquery-ui-1.6rc2.min.js to the HEAD section of the Master
Pager


src=../../Content/jquery-ui-1.6rc2.min.js type=text/javascript
(excluding script tag intentionally)


After several seconds the debugger pops-up saying: An unhandled
exception (''child nodes is null or not an object) occurred in
typelib
builder ..  in /jquery-1.2.6.min.js.


I'm running IE 7 Build 7.0.5730.11 on an XP SP3


The code fails on line 1021:


elem = jQuery.makeArray( div.childNodes );


Can anyone help?


Thanks,


-Itai




[jQuery] how do I fix the position of an element?

2008-10-02 Thread Flavio333


Hello,
I am a first time JQuery user, and was wondering how would I go about
getting an element, say a php page that I loaded into a small block on my
html page... now when I scroll up, down, left or right I would like this
element(the loaded php page in the small block) to be fixed to the position
on the screen, that is it moves up, down, left or right to compensate for
the users scrolling.  I hope that makes sense.  In advance Thanks for Your
Help!!! 
-- 
View this message in context: 
http://www.nabble.com/how-do-I-fix-the-position-of-an-element--tp19774250s27240p19774250.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] [autocomplete] Using Autocomplete plugin in position:fixed popups

2008-10-02 Thread Taimar

Hi!

Jörn Zaefferer's Autocomplete plugin:
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

I'm using the plugin in modern modal-popups, they have position:fixed
property attached. Scrolling the window does not affect my popups (due
to position:fixed), but the already opened autocomplete layer doesn't
stay in place and moves up and down on my screen while scolling.

Could anyone or especially the author of this plugin fix this issue?

It's solved in jQuery UI Datepicker component by isFixed variable and
fuctions.

Thanks!


[jQuery] jquery hoverMenue and Click

2008-10-02 Thread maro

Hi,

i am testing jquery.
I am use the Hover Menue from http://docs.jquery.com/Cookbook/Navigation.
I change the hover with hoverIntent an it works fine.
Now i would like build a click-event.
if the User move the mouse over, the Submenue slide out after 300
miliseconds, if the User klick then the submenue should slide out
immediately.
Can someone help?

Maro




[jQuery] could someone Please Help...

2008-10-02 Thread steph33333

Hello,
I am a first time JQuery user, and was wondering how would I go about
getting an element, say a php page that I loaded into a small block on
my html page... now when I scroll up, down, left or right I would like
this element(the loaded php page in the small block) to be fixed to
the position on the screen, that is it moves up, down, left or right
to compensate for the users scrolling.  I hope that makes sense.  In
advance Thanks for Your Help!!!


[jQuery] Re: performance questions

2008-10-02 Thread Diego

What browser did this happen with? (IE I'd guess).
The star rating plugin only uses 2 separate (and very small) images
which should load almost instantaneously. Once the image is loaded for
one control, it should be immediately displayed for all other controls
using the same image - not downloaded again.

You could try pre-loading the image via javascript (Google it)

On Sep 29, 5:06 pm, chadmichael [EMAIL PROTECTED] wrote:
 First of all, thestarratingplugin is great.  I think I need some
 help with my use of it perhaps.  I've got some performance issues
 regarding the rendering of the page.

 The problem is that when the page is waiting on some images to finish
 loading, thejQueryhas already run and converted thestarrated
 fields into checkboxes.  In my case, I'm using a split set so there
 are 20 checkboxes, and the user sees these for several seconds while
 the images of the page are loading.

 Is there something I could do to help this?  I was thinking about
 trying to hide the checkboxes until the images were done.


[jQuery] image highlighter?

2008-10-02 Thread christianslater

hi there,
I`m really new to Javascript and looking for a solution to highlight
images. So there are small thumbs on the page with an black overlay
with maybe 60% opacity. If You rollover the image the opacity fades to
0...


Can anyone help me?

thanks in advance!


[jQuery] Re: Passing a variable to a function

2008-10-02 Thread [EMAIL PROTECTED]

HI,

Thanks for your response, it's a good answer and works in the case you
describe.

Unfortunately I've got 2 more li's in between the clicked li and the
toggled li. The full code looks like this:

ul
li class=evdatedate/li
ll class=evnamea href=#name/a/li
li class=evregionRegion/li
li class=evlocLocation/li
li class=evsumEvent summary to be hidden and displayed/li

li class=evdatedate/li
ll class=evnamea href=#name/a/li
li class=evregionRegion/li
li class=evlocLocation/li
li class=evsumEvent summary to be hidden and displayed/li

/ul

Is there a way to say toggle next+2?

Andy

On Oct 1, 7:45 pm, MorningZ [EMAIL PROTECTED] wrote:
 So, and if am understanding correctly...  you have this html an are
 after some sort of accordion like behavior

 ul

     li class=evnameEvent 1 Name/li
     li class=evsumSummary of Event 1/li

     li class=evnameEvent 2 Name/li
     li class=evsumSummary of Event 2/li

     li class=evnameEvent 3 Name/li
     li class=evsumSummary of Event 3/li

     li class=evnameEvent 4 Name/li
     li class=evsumSummary of Event 4/li

     etc etc..
 /ul

 and you have evsum hidden by say:

 .evsum { display: none; }

 and you want to click on the evname and show the related evsum

 if thats the case, the jQuery could be like:

 $(document).ready(function() {
      $(.evname).click(function() {
           $(this).next().toggle();
      });

 });

 that would show (or hide, hence the use of toggle) the respective
 summary

 On Oct 1, 1:16 pm, andrewsquidge [EMAIL PROTECTED] wrote:

  Hi guys,

  I've been trying to get this literally all day! I just can't work it out.

  I've got this HTML:
  ul
  li class=evname 1 This is the event name /li
  li class=evsumsome text here/li
  /ul

  On click of li class=evname the li beneath should reveal. But because
  there are many of these ona page and they will be dynamic I need to set it
  to reveal only the relevant one.

  So my plan was to reveal the relevant li class=evsum in order. Here's
  the jquery:

          $(document).ready(function() {

                  $(li.evname).click(function() {
                          var id = this.id.replace('show_', );
                          $(#eventlist li.evsum:eq(+id+)).slideToggle();
                  });

          });

  But I'm getting nothing. Even when I replace the action (slideToggle) with
  an alert(id) I just get an alert saying This website says: and no id! I'm
  stumped!

  PLEASE, please please can someone help me out!

  Thanks in advance.
  Andy
  --
  View this message in 
  context:http://www.nabble.com/Passing-a-variable-to-a-function-tp19765153s272...
  Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: jQuery method's don't work when adding HTML to page

2008-10-02 Thread blugrasmaniac

Thanks, Mike.  Turns out you were correct.  I am new at this and have
been using both MooTools and Scripaculous prior to this, trying to get
a feel for which I like the best.

I'm currently putting some effort into jQuery, and I believe it will
have to be the winner, once I get it figured out - especially with the
news that Microsoft is going to start providing native support,
including extensive intellisense, for jQuery in Visual Studio.

Thanks again

On Oct 1, 9:52 pm, Mike Alsup [EMAIL PROTECTED] wrote:
 Hard to say without seeing the code.  It could be something as simple
 as a bad selector.  Can you post a link?

 On Oct 1, 5:11 pm, blugrasmaniac [EMAIL PROTECTED] wrote:

  I have a lightbox variation (boxy to be specific) that I am using to
  load some remote HTML via AJAX.  Inside of the remote HTML, which is
  basically a login panel, I have some javascript to process the login.

  However, the normal jQuery methods don't have any affect on the
  elements inside of the HTML that was loaded via AJAX.  If, inside my
  remote HTML javascript, I add an element to the remote HTML using
  document.createElement, then the jQuery methods work fine.

  The methods I am trying to get to work are things like hide(),
  focus(), basically anything.

  If I use document.getElementById(''), the focus() method does work.
  It's just that getting the jQuery object (wrapper? - I don't quite
  understand how the elements are extended) using $('') shortcut or
  jQuery('') doesn't return an object that will respond to methods
  executed on it.

  If I alert the hide function off of the element, I see the code, and I
  am not getting any errors when it executes - just nothing happens.

  Any ideas?  Is there a way that I can register the elements with
  jQuery?


[jQuery] Re: Passing a variable to a function

2008-10-02 Thread andrewsquidge


Hi guys, this is the answer to how to pass a variable to a jquery function
and perform an action on a dynamic list.

http://www.learningjquery.com/2006/09/slicker-show-and-hide#comment-60792
http://www.learningjquery.com/2006/09/slicker-show-and-hide#comment-60792 



[EMAIL PROTECTED] wrote:
 
 
 HI,
 
 Thanks for your response, it's a good answer and works in the case you
 describe.
 
 Unfortunately I've got 2 more li's in between the clicked li and the
 toggled li. The full code looks like this:
 
 ul
 li class=evdatedate/li
 ll class=evname # name /li
 li class=evregionRegion/li
 li class=evlocLocation/li
 li class=evsumEvent summary to be hidden and displayed/li
 
 li class=evdatedate/li
 ll class=evname # name /li
 li class=evregionRegion/li
 li class=evlocLocation/li
 li class=evsumEvent summary to be hidden and displayed/li
 
 /ul
 
 Is there a way to say toggle next+2?
 
 Andy
 
 On Oct 1, 7:45 pm, MorningZ [EMAIL PROTECTED] wrote:
 So, and if am understanding correctly...  you have this html an are
 after some sort of accordion like behavior

 ul

     li class=evnameEvent 1 Name/li
     li class=evsumSummary of Event 1/li

     li class=evnameEvent 2 Name/li
     li class=evsumSummary of Event 2/li

     li class=evnameEvent 3 Name/li
     li class=evsumSummary of Event 3/li

     li class=evnameEvent 4 Name/li
     li class=evsumSummary of Event 4/li

     etc etc..
 /ul

 and you have evsum hidden by say:

 .evsum { display: none; }

 and you want to click on the evname and show the related evsum

 if thats the case, the jQuery could be like:

 $(document).ready(function() {
      $(.evname).click(function() {
           $(this).next().toggle();
      });

 });

 that would show (or hide, hence the use of toggle) the respective
 summary

 On Oct 1, 1:16 pm, andrewsquidge [EMAIL PROTECTED] wrote:

  Hi guys,

  I've been trying to get this literally all day! I just can't work it
 out.

  I've got this HTML:
  ul
  li class=evname 1 This is the event name /li
  li class=evsumsome text here/li
  /ul

  On click of li class=evname the li beneath should reveal. But
 because
  there are many of these ona page and they will be dynamic I need to set
 it
  to reveal only the relevant one.

  So my plan was to reveal the relevant li class=evsum in order.
 Here's
  the jquery:

          $(document).ready(function() {

                  $(li.evname).click(function() {
                          var id = this.id.replace('show_', );
                          $(#eventlist
 li.evsum:eq(+id+)).slideToggle();
                  });

          });

  But I'm getting nothing. Even when I replace the action (slideToggle)
 with
  an alert(id) I just get an alert saying This website says: and no id!
 I'm
  stumped!

  PLEASE, please please can someone help me out!

  Thanks in advance.
  Andy
  --
  View this message in
 context:http://www.nabble.com/Passing-a-variable-to-a-function-tp19765153s272...
  Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.
 
 

-- 
View this message in context: 
http://www.nabble.com/Passing-a-variable-to-a-function-tp19765153s27240p19778198.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jquery image highlighter?

2008-10-02 Thread BB

Try this:
$(.overlay-div).hover(function() {
  $(this).fadeTo(fast, 0);
}, function() {
  $(this).fadeTo(fast, 0.6);
});

On 2 Okt., 09:13, christianslater [EMAIL PROTECTED]
wrote:
 hi there,
 I`m really new to Javascript and looking for a solution to highlight
 images. So there are small thumbs on the page with an black overlay
 with maybe 60% opacity. If You rollover the image the opacity fades to
 0...

 Can anyone help me?

 thanks in advance!


[jQuery] Re: image highlighter?

2008-10-02 Thread BB

Dublicate:
http://groups.google.com/group/jquery-en/browse_thread/thread/59f9004ca99cab3b

On 2 Okt., 11:33, christianslater [EMAIL PROTECTED]
wrote:
 hi there,
 I`m really new to Javascript and looking for a solution to highlight
 images. So there are small thumbs on the page with an black overlay
 with maybe 60% opacity. If You rollover the image the opacity fades to
 0...

 Can anyone help me?

 thanks in advance!


[jQuery] Re: how do I fix the position of an element?

2008-10-02 Thread BB

Why not use CSS?
position:absolute;

On 2 Okt., 10:16, Flavio333 [EMAIL PROTECTED] wrote:
 Hello,
 I am a first time JQuery user, and was wondering how would I go about
 getting an element, say a php page that I loaded into a small block on my
 html page... now when I scroll up, down, left or right I would like this
 element(the loaded php page in the small block) to be fixed to the position
 on the screen, that is it moves up, down, left or right to compensate for
 the users scrolling.  I hope that makes sense.  In advance Thanks for Your
 Help!!!
 --
 View this message in 
 context:http://www.nabble.com/how-do-I-fix-the-position-of-an-element--tp1977...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Bug with JQuery is?

2008-10-02 Thread ProggerPete

If it's not a bug it is at least violates the principle of least
surprise.

The .is function returns true for things I don't think it should.  See
the example below.

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html
head
titlebug?/title
script type=text/javascript 
src=http://ajax.googleapis.com/ajax/
libs/jquery/1.2.6/jquery.js/script
script type=text/javascript
function bodgyIs(el, selector)
{
var el1 = el[0], candidates = $(selector);
for (var i=0, el2; el2 = candidates[i]; i++)
{
if (el1 == el2) return true;
}
return false;
}

$(document).ready(function ()
{
var selector = #test .test;
var el = $(#dontFindMe)
alert(el.is(selector));
alert(bodgyIs(el, selector));
});
/script
/head
body
div id=dontFindMe/div
/body
/html


[jQuery] append mailto link to orphan plain text email address

2008-10-02 Thread skankster

Hi,

I have a div that contains simple text data with line breaks. I want
to append a mailto link to the email address but so far I have not
been able to select the email.

The container looks something like this:

div id=myId
Username: Johnnybr /
Email: [EMAIL PROTECTED]
/div

With the help of jQuery it should look like this:

div id=myId
Username: Johnnybr /
Email: a href=mailto:;[EMAIL PROTECTED]/a
/div

My first intention was to use a filter like:

$('#myId').contents().filter(':contains(@)');

but I found out that I couldn't apply it since the container had no
children. So I used a function first to wrap the elements into span
tags and then applied 'find':

  $.fn.orphans = function(){
var ret = [];
this.each(function(){$.each(this.childNodes, function() {if
(this.nodeType == 3 ! $.nodeName(this, br) ) 
ret.push(this)})});
return $(ret);
   }

 $(document).ready(function() {
$('#myId').orphans().wrap('span/');
$('#myId').find(':contains(@)').wrap('a href=mailto:/
');
 });

I'm still at a loss as to how to select just the email address without
the preceeding 'Email:' and am wondering if I'm not heading in a
totally wrong direction with the orphan wrapping function.

I gladly appreciate any assistance offered concerning this issue!


[jQuery] jQuery Form Plugin

2008-10-02 Thread André Cassal

Hey Folks,

Can I cancel a connection during an upload?

I'm using this form plugin http://www.malsup.com/jquery/form/ and a
dialog showing the process, but the dialog needs to have a cancel
button to trigger a client-side cancel.

As this plugin uses an iframe to target a form, I need just change the
iframe src to 'about:blank'. But it seems not to have an open way to
control the iframe.

any thoughts?


[jQuery] Re: could someone Please Help...

2008-10-02 Thread Alexandre Plennevaux
hi,

1/ set up your html:

div id=myFixedContainer...this content will be replaced by the php
script/div

2/ fix the css properties that will make it stay at the same screen
position:


div id=myFixedContainer
style=position:fixed;top:20px;left:20px;width:200px;height:200px;border:1px
solid black;padding:20px...this content will be replaced by the php
script/div


3/ that's it. now use javascript to load content inside your div:

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

$('#myFixedcontainer').load('path/to/phpPage.php');

});



that's the basic idea if the world was really round and browsers obeyed the
standards.
you will have to google for a fix to make position:fixed work across older
browsers...




LAb[au] _ *lab*oratory for *a*rchitecture and *u*rbanism

Alexandre Plennevaux

Lakensestraat 104 Rue de Laeken
Brussel 1000 Bruxelles
België _ Belgique _ Belgium

tel: +32 (0)2 2196555
fax: +32 (0)2 4266986

mail: [EMAIL PROTECTED] [EMAIL PROTECTED]
http://www.lab-au.com
VAT: BE0475.210.720


On Thu, Oct 2, 2008 at 9:36 AM, steph3 [EMAIL PROTECTED] wrote:


 Hello,
 I am a first time JQuery user, and was wondering how would I go about
 getting an element, say a php page that I loaded into a small block on
 my html page... now when I scroll up, down, left or right I would like
 this element(the loaded php page in the small block) to be fixed to
 the position on the screen, that is it moves up, down, left or right
 to compensate for the users scrolling.  I hope that makes sense.  In
 advance Thanks for Your Help!!!



[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: how do I fix the position of an element?

2008-10-02 Thread Klaus Hartl

On 2 Okt., 15:06, BB [EMAIL PROTECTED] wrote:
 Why not use CSS?
 position:absolute;

position: fixed; would be even better ;-)

Not supported in IE 6 though (workarounds available).


--Klaus


[jQuery] Re: selecting all element with a given class but not another one.

2008-10-02 Thread Klaus Hartl

Try:

$('[class=RepeatedItem]')

--Klaus



On 2 Okt., 11:57, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 I can't figure out what the syntax is to select all the elements which
 have a given class but not another given class.
 Example : I want all the elements with class .RepeatedItem but which
 don't have the class .RepeatedItemSelected.

 I've tried this with no luck :

 $(.RepeatedItem + not:(.RepeatedItemSelected))

 Does anyone know the syntax ?
 Thanks


[jQuery] Re: invalid object initializer

2008-10-02 Thread Dave Methvin

                 \$(#query).load(/mysite/thepage.pl, {thequery}, 
 function(){

In this case the error is right. {thequery} is not a valid initializer
for an object.

Maybe you meant {data: thequery} or something like that? What is the
name of the parameter that your Perl page expects to get from the URL
querystring?


[jQuery] Re: Menu Problem with IE6

2008-10-02 Thread David Meiser
Looking briefly at the code I don't see the necessary suckerfish
javascript.  The superfish js file only contains the code to extend the
suckerfish script - you'll still need to include the original suckerfish
javascript.

On Thu, Oct 2, 2008 at 1:18 AM, tom2008 [EMAIL PROTECTED] wrote:


 Hi All,

 Can anyone help me to find the problem with menu on IE6, it works
 perfect with any other browse except IE6, i don't know whether its css
 or javascript problem. Link to site is
 http://chaos.com/home/4002.html
 if you rollover on menu drop down box should appear which with IE 6
 dosn't



[jQuery] Re: jQuery Form Plugin

2008-10-02 Thread Mike Alsup

Hmm, haven't tried it but I suppose you could do this:

$('iframe[id^=jqFormIO']).attr('src','about:blank');

Mike


On Oct 2, 8:56 am, André Cassal [EMAIL PROTECTED] wrote:
 Hey Folks,

 Can I cancel a connection during an upload?

 I'm using this form pluginhttp://www.malsup.com/jquery/form/and a
 dialog showing the process, but the dialog needs to have a cancel
 button to trigger a client-side cancel.

 As this plugin uses an iframe to target a form, I need just change the
 iframe src to 'about:blank'. But it seems not to have an open way to
 control the iframe.

 any thoughts?


[jQuery] Re: could someone Please Help...

2008-10-02 Thread steph33333

thank you your HELP!!!

On Oct 2, 9:17 am, Alexandre Plennevaux [EMAIL PROTECTED]
wrote:
 hi,

 1/ set up your html:

 div id=myFixedContainer...this content will be replaced by the php
 script/div

 2/ fix the css properties that will make it stay at the same screen
 position:

 div id=myFixedContainer
 style=position:fixed;top:20px;left:20px;width:200px;height:200px;border:1p­x
 solid black;padding:20px...this content will be replaced by the php
 script/div

 3/ that's it. now use javascript to load content inside your div:

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

 $('#myFixedcontainer').load('path/to/phpPage.php');

 });

 that's the basic idea if the world was really round and browsers obeyed the
 standards.
 you will have to google for a fix to make position:fixed work across older
 browsers...

 LAb[au] _ *lab*oratory for *a*rchitecture and *u*rbanism

 Alexandre Plennevaux

 Lakensestraat 104 Rue de Laeken
 Brussel 1000 Bruxelles
 België _ Belgique _ Belgium

 tel: +32 (0)2 2196555
 fax: +32 (0)2 4266986

 mail: [EMAIL PROTECTED] [EMAIL PROTECTED]http://www.lab-au.com
 VAT: BE0475.210.720



 On Thu, Oct 2, 2008 at 9:36 AM, steph3 [EMAIL PROTECTED] wrote:

  Hello,
  I am a first time JQuery user, and was wondering how would I go about
  getting an element, say a php page that I loaded into a small block on
  my html page... now when I scroll up, down, left or right I would like
  this element(the loaded php page in the small block) to be fixed to
  the position on the screen, that is it moves up, down, left or right
  to compensate for the users scrolling.  I hope that makes sense.  In
  advance Thanks for Your Help!!!- Hide quoted text -

 - Show quoted text -


[jQuery] Best Practices: Separating HTML from JavaScript

2008-10-02 Thread 703designs

I'm always looking for as loosely coupled a system as practical, and I
have a question about separating HTML from JavaScript (using jQuery).
What's the best way to apply a template, so to speak, to some JS
method? I'm trying to create a button bar for a plugin, and it has to
be loaded in dynamically (can't be on the page already, mostly for
modularity, etc.). What practice is advocated by the jQuery community
when it comes to adding DOM elements?

One thing I definitely don't want to do is what you'll see on line 104
at http://batiste.dosimple.ch/blog/posts/2007-09-11-1/jquery.rte.js (a
ton of HTML is assigned to $.fn.rte.toolbar.tb).


[jQuery] [Validate][simpleModal]Validation not working in simpleModal

2008-10-02 Thread Azam

Hello,

First of all, thank you for reading my post. I have been trying to
resolve this issue for the past 2 weeks trying different things. Let
me get right into my problem, but before explaining the problem, let
me share my objective and then go on from there.

Test Link: http://thedailysavings.com/beta/test11.php

Objective: Display a lightbox style box containing a registration
form. This form must validate all fields in real time using AJAX.
There will be other forms on the page as well such as login form or
contact us form.

What am I using: PHP, Jquery, Jquery form validation plugin (http://
bassistance.de/jquery-plugins/jquery-plugin-validation/), simpleModal
lightbox (http://www.ericmmartin.com/projects/simplemodal/).

Issue: After many hours of pulling my hair out, I have been able to
pinpoint the cause of my problems with this registration form. Here
goes: I am able to display the registration form inside the
simpleModal lightbox but there are still this issue left. See below
some test scenarios:

Scenario 1: Validation should happen at all times when using the
registration form.
a. Open the registration form by clicking on Register Now link. It
does validation the first time. TRY entering a wrong email address and
you will see proper validation. Now CLOSE the modalBox by clicking on
X.
b. Open the registration form again by clicking on Register Now Link.
Try entering a wrong email address and you will notice that it does
NOT perform validation.

Scenario 2: Login form (Username  Password inputs) placement impacts
the validation of registration form such as:
a. If I move the login form above the registration form in the code,
the validation stops happening.
b. If I move the login form below the registration form (as it is
now), the validation works but only the first time.
c. If I remove the login form that has Username and Password as
inputs, validation works fine.

Like I mentioned earlier that I have spent way too much time on this
with not enough progress. Maybe because I am new to Jquery and
learning it the hard way. Also, please note that this is a stripped
down version to show only the registration form in action. I would
appreciate so much if you could PLEASE help me get out of this
situation and show me the light. Thank you so much

Best regards,
Azam


[jQuery] TUTORIAL: How to create a stunning popup from scratch step by step

2008-10-02 Thread AdrianMG

Hi mates, i finished a new tutorial called How to create a stunning
and smooth popup in jQuery from scratch on
http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/

I hope you can use it for your personal projects and comment in the
blog entry requesting new jQuery tutorials. See you soon!


[jQuery] Slide left

2008-10-02 Thread Hal Diggs

help... company wants to find a replacement for Infragistics
WebSplitter component. I'm kinda new to jQuery and I see many demos if
divs sliding up and down but nothing sliding left or roght. Is there a
place in this huge project that I can find this functionality?

Sorry, running short on time.


[jQuery] animate problem when using ems and ie

2008-10-02 Thread ThatSteveGuy

Has anyone had a problem animating the left position of an element
when using em units in IE? It works fine in Firefox, but in IE it
seems to reset my container to either it's original position or zero,
not sure which, before running the animation. I would like to leave
the units in ems if at all possible. My javascript is a little rusty,
but here it is:

$(document).ready(function(){

$(.btnScreen).click(function()
{
// force ems
if($(.sectioncontainer).css(left) == '0px')
{
$(.sectioncontainer).css(left,.01em);
}

var elementid = this.id;
var distance = 0;
var objLeft = $(.sectioncontainer).css(left);
var position = objLeft.substr(0,objLeft.length - 2);

// numeric position of section container
position = position - 0;

switch (elementid)
{
case 'art':
distance = (0 + position);
break;
case 'photo':
distance = (60 + position);
break;
case 'ria':
distance = (120 + position);
break;
default:
distance = 0;
break;
}

var d = distance + '';

if(distance  0)
{
d = '-=' + d;
}
else
{
d = '+=' + d.substr(1,d.length);
}

$(.sectioncontainer).animate({left: d+'em'}, slow);

return false;
});

});


TIA for any help.


[jQuery] Inserting new row in a table

2008-10-02 Thread TrailBlazer

Hi All I've very simple structure of page like

div
Word: input type=text id=txtWord value=/
Replacement: input type=text id=txtReplacement value= /
input type=button text=Add id=btnAdd/
/div
table id=#tblWords
   tr id=tr_1tdabcd/tdtdxyz/tdtda href=#Edit/a/
td/tr
   tr id=tr_2tdabcd/tdtdxyz/tdtda href=#Edit/a/
td/tr
   tr id=tr_3tdabcd/tdtdxyz/tdtda href=#Edit/a/
td/tr
   tr id=tr_4tdabcd/tdtdxyz/tdtda href=#Edit/a/
td/tr
   tr id=tr_5tdabcd/tdtdxyz/tdtda href=#Edit/a/
td/tr
/table
script
function addWord()
{
   var a = $(#txtWord).html();
var b = $(#txtReplacement).html();
var c = $(#tblWords tr:last).attr(id);
c = c.substring(c.indexOf(_)+1);
c = parseInt(c) + 1;
var _html = tr id=\tr_ + c + \td align=\center
\ + a +
/tdtd + b + /tdtda href='#'Edit/a/td/
tr;

$(#tblWrods tr:last).insertAfter(_html);
}
/script
script
$(document).ready(function(){
$(#btnAdd).click(function(){addWord();}),
$(#tblWords tr td a).click(function(){editWord();})
});
/script

all i want is to append new row at end of the existing rows. but the
code
$(#tblWrods tr:last).insertAfter(_html);
does not works.

Please help!!


[jQuery] Re: jQuery Leaderboard?

2008-10-02 Thread Brit Mansell

Anyone?

On Sep 30, 6:01 am, bmzero [EMAIL PROTECTED] wrote:
 I'm trying to find a javascriptleaderboardscript. I've seen this done many
 times in Flash, but I would prefer to do it in Javascript/jQuery if
 possible.

 Here is an example of what I'm talking 
 about:http://www.nabble.com/file/p19739832/leaderboard.gif

 Do you guys have any suggestions?

 Thanks in advance.
 --
 View this message in 
 context:http://www.nabble.com/jQuery-Leaderboard--tp19739832s27240p19739832.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] div um zwei img erstellen

2008-10-02 Thread [EMAIL PROTECTED]

Hallo,
ich habe ein array aus Bilder, das lese ich aus und zeige immer 2
davon aus.
Jetzt möchte ich, dass immer um zwei img tags ein div tag steht, also
divimg.../img...//div

Dazu habe ich folgendes gemacht

Schleife des arrays durchgehen:
wenn i%2
$('#container').append('div style=height: 95px; display:
inline;');
dann
$('#container').append('img src=./images/' + imagesArray[i] + '
id=image' + i + ' width=150 heigth=95 /');
und wieder wenn i%2
$('#container').append('/div')

Geht aber nicht, da append wohl ein vollständiges Element erwartet...
'
Wie kann ich das denn machen, also div2 img tags, schließendes div?


[jQuery] Re: looking for a slider

2008-10-02 Thread hcvitto

That's good but i need a couple features more. I looked at the options
and i didn't find
1 - a step by step increment of the slider
2 - a way to move the slider with +/- buttons.

I hope i'm not picky but i'm no javascript developer..
Any idea?
Vitto

On 2 Ott, 12:48, BB [EMAIL PROTECTED] wrote:
 Look at 
 this:http://ui.jquery.com/repository/latest/demos/functional/#ui.slider

 this demo is really simple. here are the docs:http://docs.jquery.com/UI/Slider

 On 2 Okt., 11:48, hcvitto [EMAIL PROTECTED] wrote:

  hi
  i've searched around fot a while but couldn't find any slider that
  suits my need. This is what i'm looking for (jquery style!)

 http://www.phatfusion.net/slider/

  plus i a '+' and a '-' buttons.

  Does anyone know about a plugin which does this?

  Thanks vitto


[jQuery] Re: jQuery Leaderboard?

2008-10-02 Thread David Meiser
I'm not quite sure what it is you're looking for, here.  Are you looking for
a rotating image like the one found here:  *http://crosier.org/*?

On Thu, Oct 2, 2008 at 10:46 AM, Brit Mansell [EMAIL PROTECTED] wrote:


 Anyone?

 On Sep 30, 6:01 am, bmzero [EMAIL PROTECTED] wrote:
  I'm trying to find a javascriptleaderboardscript. I've seen this done
 many
  times in Flash, but I would prefer to do it in Javascript/jQuery if
  possible.
 
  Here is an example of what I'm talking about:
 http://www.nabble.com/file/p19739832/leaderboard.gif
 
  Do you guys have any suggestions?
 
  Thanks in advance.
  --
  View this message in context:
 http://www.nabble.com/jQuery-Leaderboard--tp19739832s27240p19739832.html
  Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.



[jQuery] Re: jQuery Leaderboard?

2008-10-02 Thread Joe

yeah what are you trying to accomplish?  Not clear from the static
image you posted.

Cheers.

Joe

www.subprint.com

On Oct 2, 9:53 am, David Meiser [EMAIL PROTECTED] wrote:
 I'm not quite sure what it is you're looking for, here.  Are you looking for
 a rotating image like the one found here:  *http://crosier.org/*?

 On Thu, Oct 2, 2008 at 10:46 AM, Brit Mansell [EMAIL PROTECTED] wrote:

  Anyone?

  On Sep 30, 6:01 am, bmzero [EMAIL PROTECTED] wrote:
   I'm trying to find a javascriptleaderboardscript. I've seen this done
  many
   times in Flash, but I would prefer to do it in Javascript/jQuery if
   possible.

   Here is an example of what I'm talking about:
 http://www.nabble.com/file/p19739832/leaderboard.gif

   Do you guys have any suggestions?

   Thanks in advance.
   --
   View this message in context:
 http://www.nabble.com/jQuery-Leaderboard--tp19739832s27240p19739832.html
   Sent from the jQuery General Discussion mailing list archive at
  Nabble.com.


[jQuery] 'next' button to open next accordion panel

2008-10-02 Thread Slushbunny


I'm trying to include a next button in my accordion panels, but I'm not
sure how to make it function. I have the panels sliding up and adding an
active class fine when you click the panel headers, but I want to
replicate  this functionality on a next button also. Here's my page:
http://dev.emsix.com/phd/default.asp

Here's my accordion code:
$(#floor-widget h3:first).addClass(active);
$(#floor-widget div.options:not(:first)).hide();

$(#floor-widget h3).click(function(){
$(this).next(div.options).slideToggle(normal)
.siblings(div.options:visible).slideUp(normal);
$(this).toggleClass(active);
$(this).siblings(h3).removeClass(active);
});


Any help would be appreciated!
-- 
View this message in context: 
http://www.nabble.com/%27next%27-button-to-open-next-accordion-panel-tp19781950s27240p19781950.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Need div collapser

2008-10-02 Thread Hal Diggs

help... company wants to find a replacement for Infragistics
component. I'm kinda new to jQuery and I see many demos of divs
collapsing up and down but nothing collapsing left or right.

Is there a place in this huge project that I can find this
functionality?


[jQuery] Browser interaction research

2008-10-02 Thread David D.

Hi everyone,

I'm conducting research on behalf of the University of Toronto. We're
trying to determine how developers and more advanced users interact
with their browsers. Note that this is not paid research so I'm not
gaining from it (other than a mark :-p). If you can spare 7-10 minutes
of your time it would be great.

Please visit: http://tinyurl.com/dynaminds-survey

I decided to post this here because of the strong developer community
jQuery has. Where better else to post this than here?

Thanks guys!

David
PS. I'd love comments back on the usability or the questions
themselves if you can spare the extra time.


[jQuery] Re: animate problem when using ems and ie

2008-10-02 Thread 703designs

Could you please post this page in full, or better, upload it and post
the URL? Then we can test what's going on easily. I will say that
animate seems a little buggy to me, so I wouldn't be surprised if
you're right.

On Oct 2, 10:42 am, ThatSteveGuy [EMAIL PROTECTED] wrote:
 Has anyone had a problem animating the left position of an element
 when using em units in IE? It works fine in Firefox, but in IE it
 seems to reset my container to either it's original position or zero,
 not sure which, before running the animation. I would like to leave
 the units in ems if at all possible. My javascript is a little rusty,
 but here it is:

 $(document).ready(function(){

         $(.btnScreen).click(function()
         {
                 // force ems
                 if($(.sectioncontainer).css(left) == '0px')
                 {
                                 $(.sectioncontainer).css(left,.01em);
                 }

                 var elementid = this.id;
                 var distance = 0;
                 var objLeft = $(.sectioncontainer).css(left);
                 var position = objLeft.substr(0,objLeft.length - 2);

                 // numeric position of section container
                 position = position - 0;

                 switch (elementid)
                 {
                         case 'art':
                                 distance = (0 + position);
                                 break;
                         case 'photo':
                                 distance = (60 + position);
                                 break;
                         case 'ria':
                                 distance = (120 + position);
                                 break;
                         default:
                                 distance = 0;
                                 break;
                 }

                 var d = distance + '';

                 if(distance  0)
                 {
                         d = '-=' + d;
                 }
                 else
                 {
                         d = '+=' + d.substr(1,d.length);
                 }

                 $(.sectioncontainer).animate({left: d+'em'}, slow);

                 return false;
         });

 });

 TIA for any help.


[jQuery] Re: search and replace TD innards

2008-10-02 Thread matchoo

Thanks!

Yes, I get confused sometimes on what $(this) really is sometimes.

Here's the final code.  Works great...

PS this is for the TableSorter plugin, which hates commas:

$(document).ready(function() {

$(table).tablesorter({headers: {  3: { sorter: digit  },4:
{ sorter: digit  },5: { sorter: digit  },6: { sorter: digit  } ,
7: { sorter: digit  },8: { sorter: digit  },9: { sorter:
digit  },10: { sorter: digit  },11: { sorter: digit  },12:
{ sorter: digit  }} , widgets: ['zebra'] });
$(.commas).addCommas();
}
);

jQuery.fn.addCommas = function() {
  this.each(function(){
  nStr = $(this).html() + '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length  1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
$(this).html(x1 + x2);
  });
  }


[jQuery] Re: performance questions

2008-10-02 Thread chadmichael

The problem is that other images on the page are slowing the page.  Is
there some way to get the stars to precede the other images in
rendering?

On Oct 2, 5:56 am, Diego [EMAIL PROTECTED] wrote:
 What browser did this happen with? (IE I'd guess).
 The star rating plugin only uses 2 separate (and very small) images
 which should load almost instantaneously. Once the image is loaded for
 one control, it should be immediately displayed for all other controls
 using the same image - not downloaded again.

 You could try pre-loading the image via javascript (Google it)

 On Sep 29, 5:06 pm, chadmichael [EMAIL PROTECTED] wrote:

  First of all, thestarratingplugin is great.  I think I need some
  help with my use of it perhaps.  I've got some performance issues
  regarding the rendering of the page.

  The problem is that when the page is waiting on some images to finish
  loading, thejQueryhas already run and converted thestarrated
  fields into checkboxes.  In my case, I'm using a split set so there
  are 20 checkboxes, and the user sees these for several seconds while
  the images of the page are loading.

  Is there something I could do to help this?  I was thinking about
  trying to hide the checkboxes until the images were done.


[jQuery] Re: looking for a slider

2008-10-02 Thread ricardobeat

You could actually read the docs and try to implement what you need,
those are simple modifications.

cheers
- ricardo

On Oct 2, 11:50 am, hcvitto [EMAIL PROTECTED] wrote:
 That's good but i need a couple features more. I looked at the options
 and i didn't find
 1 - a step by step increment of the slider
 2 - a way to move the slider with +/- buttons.

 I hope i'm not picky but i'm no javascript developer..
 Any idea?
 Vitto

 On 2 Ott, 12:48, BB [EMAIL PROTECTED] wrote:

  Look at 
  this:http://ui.jquery.com/repository/latest/demos/functional/#ui.slider

  this demo is really simple. here are the 
  docs:http://docs.jquery.com/UI/Slider

  On 2 Okt., 11:48, hcvitto [EMAIL PROTECTED] wrote:

   hi
   i've searched around fot a while but couldn't find any slider that
   suits my need. This is what i'm looking for (jquery style!)

  http://www.phatfusion.net/slider/

   plus i a '+' and a '-' buttons.

   Does anyone know about a plugin which does this?

   Thanks vitto


[jQuery] [validate] Missing more accurate e-mail validation

2008-10-02 Thread alexanmtz

Hello,

We develop a system with the validate plugin for all client side
validation and I see that the email validation in the core of the
plugin accept special characters like ç and /. I make a
alternative validation for e-mail using the specification RFC 2822
strict - http://www.rfc-editor.org/rfc/rfc2822.txt

We called in the company restrictEmail:

/* Email validation that follows the restrict RFC 2822 pattern*/
jQuery.validator.addMethod(restrictEmail, function(value, element) {
return this.optional(element) || /^[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-
Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])
$/.test(value);
}, Invalid E-mail);

I thought this should be considered in next versions of validate or
even the main email validation be more accurate for special
characters.

I hope it helps,

Alexandre Magno
Web Developer
http://blog.alexandremagno.net


[jQuery] Re: Bug with JQuery is?

2008-10-02 Thread Dave Methvin


http://docs.jquery.com/Traversing/is#expr

If no element fits, or the expression is not valid, then the response
will be 'false'. Note: Only simple expressions are supported. Complex
expressions, such as those containing hierarchy selectors (such as +,
~, and ) will always return 'true'. filter is used internally,
therefore all rules that apply there apply here, as well.


[jQuery] escape character problem

2008-10-02 Thread chadmichael

I use the following code to set a css background image style.  Note,
the last slash before the file name is a different kind of slash.
This url works fine like this, but the problem is that this slash is
dropped by the time it get's to the

$('.clientBrowserThumb').slice(6,7).click( function(event)
{ showEntity0(1379); } );
$('.imageHolder').slice(7,8).css( background-image,
 url(/file_depot/
0-1000/0-1/1/conman/thumbs\LeBaronTokyo1.jpg) );

When this runs, the background-image of the element becomes:

url(/file_depot/0-1000/0-1/1/conman/thumbsLeBaronTokyo1.jpg);

Notice the slash is gone.  I know this is an escape character, but I
kind of confused about what level the issue occurs at.

Is jQuery processing the escape characters?  Is the browser chucking
them out after they've been assigned to the css properties?


[jQuery] Re: chained select - IE mobile/iphone/Opera Mobile

2008-10-02 Thread ricardobeat

Opera Mini, as it's name says, is not as complete as desktop browsers,
it lacks support for a lot of javascript. Read this:

http://dev.opera.com/articles/view/javascript-support-in-opera-mini-4/

- ricardo

On Oct 1, 10:48 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi All,

 I've been using the jquery based chained select 
 (http://www.codeassembly.com/Simple-chained-combobox-plugin-for-jQuery/
 ) for a site im working on

 all works in a normal desktop based browser (even IE :) )

 but when i tested on the mini/mobile browser it didnt work - they have
 a custom select box thing (like the iphone) and once you select an
 item in your select box it doesn't seem to register as been changed or
 clicked (ie. onclick/onchange didn't seem to do anything)

 you can test the demo 
 pagehttp://www.codeassembly.com/examples/jquerycombo/test.html
 in the online opera mini demo athttp://www.operamini.com/demo/to see
 what i mean

 anyone know a solution to this??

 any help would be greatly appreciated as i need to get my chained
 select working on these mobile browsers

 Cheers

 Justin

 refer:http://www.codeassembly.com/Simple-chained-combobox-plugin-for-jQuery/


[jQuery] Re: escape character problem

2008-10-02 Thread Dave Methvin

A single backslash in a Javascript string will be processed by the
Javascript interpreter before jQuery ever sees it. Try doubling up the
backslash.


[jQuery] Re: sequential animation

2008-10-02 Thread ricardobeat

Use a callback function (executes after the animation is complete).
Something like this ('this.parent' might not work inside the
function):

$(div, this.parent).animate({ height: 400 },function(){
   $(.rightColumn, this.parent).children().fadeOut();
   $(.rightColumn, this.parent).append($(#dd-EditCutting));
});

- ricardo

On Oct 2, 6:34 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 I have the following :

     $(div, this.parent).animate({ height: 400 });
     $(.rightColumn, this.parent).children().fadeOut();
     $(.rightColumn, this.parent).append($(#dd-EditCutting));

 Now I would like the last line to be executed only after the two
 animations have completed. Is there a way to do that ?


[jQuery] Re: can someone help?

2008-10-02 Thread ricardobeat

Firefox, IE7 and other nice browsers support this in CSS:

#el {
   position:fixed;
   top: 100px;
   left: 100px;
}

- ricardo

On Oct 2, 5:53 am, Flavio333 [EMAIL PROTECTED] wrote:
 Hello,
 I am a first time JQuery user, and was wondering how would I go about
 getting an element, say a php page that I loaded into a small block on my
 html page... now when I scroll up, down, left or right I would like this
 element(the loaded php page in the small block) to be fixed to the position
 on the screen, that is it moves up, down, left or right to compensate for
 the users scrolling.  I hope that makes sense.  In advance Thanks for Your
 Help!!!
 --
 View this message in 
 context:http://www.nabble.com/can-someone-help--tp19775616s27240p19775616.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: jQuery Form Plugin

2008-10-02 Thread André Cassal

Hey Mike, thanks, it works.

Don't you think we can have this feature built-in ?
Something like $('form').ajaxForm('cancel')
I don't know exactly where I can post this request

Best,
André


On Oct 2, 10:20 am, Mike Alsup [EMAIL PROTECTED] wrote:
 Hmm, haven't tried it but I suppose you could do this:

 $('iframe[id^=jqFormIO']).attr('src','about:blank');

 Mike

 On Oct 2, 8:56 am, André Cassal [EMAIL PROTECTED] wrote:

  Hey Folks,

  Can I cancel a connection during an upload?

  I'm using this form pluginhttp://www.malsup.com/jquery/form/anda
  dialog showing the process, but the dialog needs to have a cancel
  button to trigger a client-side cancel.

  As this plugin uses an iframe to target a form, I need just change the
  iframe src to 'about:blank'. But it seems not to have an open way to
  control the iframe.

  any thoughts?


[jQuery] random image load problem with cycle

2008-10-02 Thread erica g

I'm loving Cycle, but am experiencing some little blips that I'm not
sure how to fix.  I have 15-20 images in my slideshow, which I want to
both load and cycle randomly.  The slideshow is random, but the
initial load is not.  The same image always shows up first, then
either a) almost immediately switches to another random image without
any transition or b) sits around there for a significant length of
time before fading into another random image.  (I'm guessing in the
case of b it's actually still making the immediate jump, it's just not
noticeable because the next random image in the queue happens to be
the same as the first image- so it's really just jumping into itself.)

Any ideas about what's going on, or how to fix it?  I would love for
this to work!

Alternatively, if anyone knows how to get the Innerfade plugin to
initially load a random first image (instead of always starting with
the first one) I would use that.  Tried to muck around with the
javascript myself, to no avail.  I don't actually need all of the
bells and whistles of Cycle- I just need a random first image followed
by a random slideshow.

It doesn't seem like too much to ask, but it's been giving me a
headache for a while now...

You can see what I mean at http://www.gcc.mass.edu

Thanks!

Erica


[jQuery] Re: There must be a better way to write this

2008-10-02 Thread Pappa Bear

You could try something like this without the timers. It's a script I
wrote for a sidebar, but it handles the fade no matter which direction
you travel (was meant for an automated fade-to-next sidebar).
I will have to check the nth-child to see if it would fit my own
scenario if you feel it operates quicker.

/*
** Written by Steven K. Melendez.
** If any bugs are exhibited, please email:
** [EMAIL PROTECTED]
*/
var nHeadArray = new Array() //Headline of informative side article.
Size of nHeadArray must match nBodyArray
nHeadArray[0] = xxx;
nHeadArray[1] = xxx;

var nBodyArray = new Array() //Body of informative side article. Size
of nBodyArray must match nHeadArray
nBodyArray[0] = xxx;
nBodyArray[1] = xxx

var q = nBodyArray.length
var x = 0

var prev = (q-1)
var next = (x+1)
var dTime = 15000 //Delay between array change in milliseconds
var fTime = 250 //Fade in/out time in milliseconds

var prevTime = setTimeout('nextFadeOut(' + next + ')', dTime)
var nextTime = setTimeout('nextFadeOut(' + next + ')', dTime)

$(document).ready(function(){  // Initial function after the page is
loaded and ready to go.
document.getElementById('sb_cHead').innerHTML = nHeadArray[x]
document.getElementById('sb_cBody').innerHTML = nBodyArray[x]

document.getElementById('prev').href = Javascript:previous( +
prev + )
document.getElementById('next').href = Javascript:nextious( +
next + )

$('#sideBar_content').fadeIn(fTime);
});

function previous(mynum){
clearTimeout(nextTime)
clearTimeout(prevTime)

document.getElementById('sb_cHead').innerHTML = nHeadArray[mynum];
document.getElementById('sb_cBody').innerHTML = nBodyArray[mynum];

$('#sideBar_content').fadeIn(fTime);

if (mynum == 0){
prev = (q-1)
document.getElementById('prev').href =
Javascript:prevFadeOut( + prev + )
}
else{
prev = (mynum-1)
document.getElementById('prev').href =
Javascript:prevFadeOut( + prev + )
}

if (next == 0){
next = (q-1)
document.getElementById('next').href =
Javascript:nextFadeOut( + next + )
}
else{
next = (next-1)
document.getElementById('next').href =
Javascript:nextFadeOut( + next + )
}

prevTime = setTimeout('prevFadeOut(' + prev + ')', dTime)

}

function nextious(mynum){
clearTimeout(nextTime)
clearTimeout(prevTime)

document.getElementById('sb_cHead').innerHTML = nHeadArray[mynum];
document.getElementById('sb_cBody').innerHTML = nBodyArray[mynum];

$('#sideBar_content').fadeIn(fTime);

if (next == (q-1)){
next = x
document.getElementById('next').href =
Javascript:nextFadeOut( + next + )
}
else{
next++
document.getElementById('next').href =
Javascript:nextFadeOut( + next + )
}

if (mynum == 0){
prev = (q-1)
document.getElementById('prev').href =
Javascript:prevFadeOut( + prev + )
}
else{
prev = (mynum-1)
document.getElementById('prev').href =
Javascript:prevFadeOut( + prev + )
}

nextTime = setTimeout('nextFadeOut(' + next + ')', dTime)

}

function nextFadeOut(mynum){
clearTimeout(nextTime)
clearTimeout(prevTime)
$('#sideBar_content').fadeOut(fTime);
nextTime = setTimeout('nextious(' + mynum + ')', fTime)
}

function prevFadeOut(mynum){
clearTimeout(nextTime)
clearTimeout(prevTime)
$('#sideBar_content').fadeOut(fTime);
prevTime = setTimeout('previous(' + mynum + ')', fTime)
}

function pauseSideBar(){
clearTimeout(nextTime)
clearTimeout(prevTime)
}


[jQuery] Ajax Form submit.

2008-10-02 Thread null

Hi all,

I´m using jquery to post some Form with Ajax, but it doesn´t send the
name of the 'submit' button that was clicked.

WIth normal form submission without AJAX, the browser always send the
name and value of the submit button.

My web framework, needs this parameters, to find out if the button was
clicked, in order to call its listener method...

It seens that the ${form}.serialize() doesn´t append the submit name/
value in tue query String.

I tested the Form.serialize() from protype and it works.

But I prefer use Jquery, since it´s easier and has more web 2.0
functionalities.

any idea?

regards,


[jQuery] Ajax form submit.

2008-10-02 Thread null

Hi all,

I´m using jquery to post some Form with Ajax, but it doesn´t send the
name of the 'submit' button that was clicked.

WIth normal form submission without AJAX, the browser always send the
name and value of the submit button.

My web framework, needs this parameters, to find out if the button was
clicked, in order to call its listener method...

It seens that the ${form}.serialize() doesn´t append the submit name/
value in tue query String.

I tested the Form.serialize() from protype and it works.

But I prefer use Jquery, since it´s easier and has more web 2.0
functionalities.

any idea?

regards,


[jQuery] Re: Inserting new row in a table

2008-10-02 Thread Dave Methvin


 $(#tblWrods tr:last).insertAfter(_html);

1) You spelled tblWords wrong.
2) The order is backwards. Try

  $(_html).insertAfter(#tblWords tr:last);

or

   $(#tblWords tr:last).after(_html);

instead.


[jQuery] if ($(event.target).is('a.edit')) with img

2008-10-02 Thread light-blue

Hopefully simple problem. I click an img link, html like this

a class=edit-building href=/edit-building/145
img src=icons/edit.png/
/a

jquery like this

if ($(event.target).is('a.edit-building')) {
  var building = function (data) {
  ..do stuff
  }
  $.get(event.target, null, building);
  return false;
}

but the binding doesn't work, probably because the target is my img
not my link. How can I click the image and fire the code for my a.edit-
building?

Thanks!



[jQuery] hover question

2008-10-02 Thread Brad

This isn't so much about hover, but about the selectors I've had to
use within its 'over' and 'out' functions.

Consider the following. I'm working on a project where I'll have to
repeat this pattern often.
I'll hover over a table's tbody, but will need to affect rows or even
specific row cells within that tbody.

// This will highlight a tbody's rows on mouseEnter.
// The original row coloring will be restored on mouseLeave.
// A tbody may have numerous rows.

  tbody.hover(function () {
$(this).children('tr').addClass('hovered');
  }, function () {
$(this).children('tr').removeClass('hovered');
  });

In the above I had to repeatedly specify

$(this).children('tr')

Is there a shorthand way to only specify it once in the over function
and refer to that in the out?

Similar patterns would apply to toggle, etc.

Thanks!



[jQuery] Re: Ajax Form submit.

2008-10-02 Thread Mike Alsup

 WIth normal form submission without AJAX, the browser always send the
 name and value of the submit button.

 My web framework, needs this parameters, to find out if the button was
 clicked, in order to call its listener method...

 It seens that the ${form}.serialize() doesn´t append the submit name/
 value in tue query String.

 I tested the Form.serialize() from protype and it works.

 But I prefer use Jquery, since it´s easier and has more web 2.0
 functionalities.

 any idea?


The Form Plugin's ajaxForm method will do this for you.  Info
available here:

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




[jQuery] Re: hover question

2008-10-02 Thread Leonardo K
$('tbody tr').hover(function () {
   $(this).addClass('hovered');
 }, function () {
   $(this).removeClass('hovered');
 });


On Thu, Oct 2, 2008 at 14:46, Brad [EMAIL PROTECTED] wrote:


 This isn't so much about hover, but about the selectors I've had to
 use within its 'over' and 'out' functions.

 Consider the following. I'm working on a project where I'll have to
 repeat this pattern often.
 I'll hover over a table's tbody, but will need to affect rows or even
 specific row cells within that tbody.

 // This will highlight a tbody's rows on mouseEnter.
 // The original row coloring will be restored on mouseLeave.
 // A tbody may have numerous rows.

  tbody.hover(function () {
$(this).children('tr').addClass('hovered');
  }, function () {
$(this).children('tr').removeClass('hovered');
  });

 In the above I had to repeatedly specify

$(this).children('tr')

 Is there a shorthand way to only specify it once in the over function
 and refer to that in the out?

 Similar patterns would apply to toggle, etc.

 Thanks!




[jQuery] Re: if ($(event.target).is('a.edit')) with img

2008-10-02 Thread Leonardo K
Why don't use the simple click function?

$('a.edit-building').click(function(){
//do stuff
 return false;
});

On Thu, Oct 2, 2008 at 14:43, light-blue [EMAIL PROTECTED] wrote:


 Hopefully simple problem. I click an img link, html like this

 a class=edit-building href=/edit-building/145
 img src=icons/edit.png/
 /a

 jquery like this

 if ($(event.target).is('a.edit-building')) {
  var building = function (data) {
  ..do stuff
  }
  $.get(event.target, null, building);
  return false;
 }

 but the binding doesn't work, probably because the target is my img
 not my link. How can I click the image and fire the code for my a.edit-
 building?

 Thanks!




[jQuery] Trigger Dom Event

2008-10-02 Thread greenteam003


I'm having problems with jQuery events and event delegation.  I've got a
table with multiple rows and a click event registered on the tbody of that
table.  I'm trying to programmatically click a cell so that the event will
bubble up to the tbody click event with the correct target.  

I've tried both the click() and trigger('click') and neither seem to fire
off a dom event due to the fact that I don't have a jquery registered click
event on the cell.

I then tried registering a one time click event on the target cell, then
fire off the click() and trigger('click') methods and neither seem to bubble
up either?

Please help.

Cheers,
greenteam
-- 
View this message in context: 
http://www.nabble.com/Trigger-Dom-Event-tp19784821s27240p19784821.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: if ($(event.target).is('a.edit')) with img

2008-10-02 Thread light-blue

Hi Leonardo,

I was thinking about that too, but I need to rebind that event handler
after an Ajax call. The following works, but seems ugly. Any pointers?

$(document).ready(function() {
function bindBuilding() {
   $('a.edit-building').click(function(){
var building = function (data) {
  //do stuff
  }
 $.get(this, null, building);
  return false;
});
}

bindBuilding();

function doAjaxStuff() {
//perform ajax stuff

bindBuilding();
}


});






On Oct 2, 11:03 am, Leonardo K [EMAIL PROTECTED] wrote:
 Why don't use the simple click function?

 $('a.edit-building').click(function(){
     //do stuff
      return false;

 });
 On Thu, Oct 2, 2008 at 14:43, light-blue [EMAIL PROTECTED] wrote:

  Hopefully simple problem. I click an img link, html like this

  a class=edit-building href=/edit-building/145
  img src=icons/edit.png/
  /a

  jquery like this

  if ($(event.target).is('a.edit-building')) {
   var building = function (data) {
   ..do stuff
   }
   $.get(event.target, null, building);
   return false;
  }

  but the binding doesn't work, probably because the target is my img
  not my link. How can I click the image and fire the code for my a.edit-
  building?

  Thanks!


[jQuery] jquery plugins demos?

2008-10-02 Thread JCQ

on the old jquery site, when one browsed plugins there was often a
link to a page with a demo/example/docs.  Now on the new jquery
site, it seems like the plugins are just listed and when you click on
them, you can pretty much only download the plugin.  Whatever happened
to all the demos and the like?

thanks,


[jQuery] Slider within Tabs not working

2008-10-02 Thread Sara

I am trying to get a jquery slider (such as example #2 here
http://dev.jquery.com/view/tags/ui/1.5b2/demos/ui.slider.html) to work
within jquery tabs that I have created. I have 3 tabs, and the slider
goes within the third tab. However, I cannot get the slider to work
within the tab, since the tab is set to hide. But if I set the third
tab to show then it shows up on all of the pages. Someone please
help!


[jQuery] How can I to traverse a html doc starting at a form element to get an input element inside a div?

2008-10-02 Thread VictorM

Hello,

I am new to JQuery and I am having problems to traverse a HTML
document. What I want to accomplish is to get an input element with
id = h that is inside a div. This input element is part of a FORM
element.   So far I have tried the following jqueries without
success:

1. - $(form#frmSceneData 
div.frmRowOuter).children(div.frmRowField)
.show().html()

2.- $(form#frmSceneData).find (div.frmRowField)
.show().html()

Applying the following jquery I am getting part of what I want. The
problem is traversing the rest of the form element  from this point
down to get INPUT class=forminput id=h
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=110 name=h/INPUT

Here is what I am getting so far with the following jquery  $
(form#frmSceneData)
.show().html() :


DIV class=frmRowOuter
DIV class=frmRowCaption
DIV class=frmCaptionScene Name/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=scenename disabled
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=1234new_SavedAsTest name=scenename/INPUT/DIV/DIV
DIV class=frmRowOuterHidden
DIV class=frmRowCaption
DIV class=frmCaptionsceneid/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=sceneid
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=13715 name=sceneid/INPUT/DIV/DIV
DIV class=frmRowOuterHidden
DIV class=frmRowCaption
DIV class=frmCaptionbasesceneid/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=basesceneid
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=13387 name=basesceneid/INPUT/DIV/DIV
DIV class=frmRowOuterHidden
DIV class=frmRowCaption
DIV class=frmCaptionadvid/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=advid
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=16176 name=advid/INPUT/DIV/DIV
DIV class=frmRowOuterHidden
DIV class=frmRowCaption
DIV class=frmCaptiontemplateid/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=templateid
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
name=templateid/INPUT/DIV/DIV
DIV class=frmRowOuterHidden
DIV class=frmRowCaption
DIV class=frmCaptionh/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=h
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=110 name=h/INPUT/DIV/DIV
DIV class=frmRowOuterHidden
DIV class=frmRowCaption
DIV class=frmCaptionw/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=w
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=172 name=w/INPUT/DIV/DIV
DIV class=frmRowOuter
DIV class=frmRowCaption
DIV class=frmCaptionimage1/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=image1file type=file
onchange='javascript:document.getElementsByName(image1)[0].value =
this.value;
window.myPlaylistSceneEditorSection.onAttributeChanged(this);'
name=image1file/DIV/DIV
DIV class=frmRowOuterHidden
DIV class=frmRowCaption
DIV class=frmCaptionimage1/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=image1
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
name=image1/INPUT/DIV/DIV
DIV class=frmRowOuter
DIV class=frmRowCaption
DIV class=frmCaptiontextbox1/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=textbox1
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=' text' name=textbox1/INPUT/DIV/DIV
DIV class=frmRowOuter
DIV class=frmRowCaption
DIV class=frmCaptiontextbox2/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=textbox2
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=sadasd name=textbox2/INPUT/DIV/DIV
DIV class=frmRowOuter
DIV class=frmRowCaption
DIV class=frmCaptiontextbox3/DIV/DIV
DIV class=frmRowFieldINPUT class=forminput id=textbox3
onchange=javascript:window.myPlaylistSceneEditorSection.onAttributeChanged(this);
value=sadsad name=textbox3/INPUT/DIV/DIV


Any help will be appreciated

Thanks

VictorM


[jQuery] Re: div um zwei img erstellen

2008-10-02 Thread Neto Marin
Hey, what's the name of this list? jQuery English??? ...

thanks
Neto
--
Antonio Marin Neto
Sun Certified Programmer for Java 2 Platform 1.4

Blog: http://netomarin.blogspot.com
Blog: http://weblogs.java.net/blog/netomarin/
GTalk: [EMAIL PROTECTED]
Skype: netomarin


On Fri, Oct 3, 2008 at 2:37 PM, BB [EMAIL PROTECTED] wrote:


 Du hast das schon richtig erkannt: Geht aber nicht, da append wohl
 ein vollständiges Element erwartet...

 also musst du alles in einem string schreiben:

 $(#container).append('div style=height: 95px; display:
 inline;img src=./images/' + imagesArray[i] + '
 id=image' + i + ' width=150 heigth=95 //div');

 wenn du aber immer 2 unterschiedliche bilder haben willst und die
 neuen nicht einfach untendrunter gehängt werden sollen dann benutze
 statt .append(); .html();.

 On 2 Okt., 16:03, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Hallo,
  ich habe ein array aus Bilder, das lese ich aus und zeige immer 2
  davon aus.
  Jetzt möchte ich, dass immer um zwei img tags ein div tag steht, also
  divimg.../img...//div
 
  Dazu habe ich folgendes gemacht
 
  Schleife des arrays durchgehen:
  wenn i%2
  $('#container').append('div style=height: 95px; display:
  inline;');
  dann
  $('#container').append('img src=./images/' + imagesArray[i] + '
  id=image' + i + ' width=150 heigth=95 /');
  und wieder wenn i%2
  $('#container').append('/div')
 
  Geht aber nicht, da append wohl ein vollständiges Element erwartet...
  '
  Wie kann ich das denn machen, also div2 img tags, schließendes div?



[jQuery] Re: jQuery Cycle Lite Plugin

2008-10-02 Thread Mike Alsup

 Thanks for helping me out. I've added:
 script type=text/javascript src=jquery-1.2.6.min.js/script

 Still not working, can you please check?

 Regards,
 Sultan Arefin

Hi Sultan,

You need to change this line:

$('#slideshow1').cycle();

to this:

$(document).ready(function() {
$('#slideshow1').cycle();
});

Here's an explanation:

http://docs.jquery.com/Tutorials:Introducing_$(document).ready()

Mike




[jQuery] Re: hover question

2008-10-02 Thread Brad

Leonardo,

I should have shown some more code. In my original example, tbody is a
reference to an jQuery object.
I'm working with a page that has many tables. Each table can have many
tbody elements. The number of rows in each tbody can vary, but in
all case there is more than 1.  Unfortunately the site is behind a
firewall or I'd give a page.

// Insert HTML row into table
  var tbody = $('tbody').appendTo('#' + target_id + ' table');
  tbody.attr('id','id-' + row.shipment_id);

// This will highlight a tbody's rows on mouseEnter.
// The original row coloring will be restored on mouseLeave.
// A tbody may have numerous rows.

  tbody.hover(function () {  // -- tbody is a jQuery function
$(this).children('tr').addClass('hovered');
  }, function () {
$(this).children('tr').removeClass('hovered');
  });

What I was curious about is if I could do something like the
following, which doesn't work.

tbody.hover(function () {
  // over
  // wish rows will be exposed on 'out' (it won't)
  var rows = $(this).children('tr');
  tr.addClass('hovered');
}, function () {
  // out
  rows.removeClass('hovered'); // this doesn't work
});

Your example inspired me to try

$(tbody).children('tr').hover(function () {
  $(this).addClass('hovered');
}, function () {
  $(this).removeClass('hovered');
});

but that doesn't work either.

Thanks

On Oct 2, 11:56 am, Leonardo K [EMAIL PROTECTED] wrote:
 $('tbody tr').hover(function () {
    $(this).addClass('hovered');
  }, function () {
    $(this).removeClass('hovered');
  });


[jQuery] ANNOUNCE: jQuery listnav plugin

2008-10-02 Thread Jack Killpatrick





Hi All,

Today we released our first jQuery plugin, which provides an easy way
to add alphabet-based navigation to any UL or OL list. Here's a link to
our announcement blog entry:

http://blogs.ihwy.com/dev/post/jQuery-listnav-plugin-version-10-released.aspx

And below is the info from the blog entry to save you the click. Thanks
to Mike Alsup for his docs about creating jquery plugins, and a shout
out to Liam Byrne, who helped me (via this list) a few months ago with
some jQuery for isolating text inside of list items.

- Jack


blogged

Today we're releasing a jQuery plugin that we created for the business
directory section of a pet project site of ours,
http://www.hwy9.com/Directory/boulder-creek.aspx.
We'd always wanted to have a _javascript_-based control that we could
easily apply to long lists of items to allow quickly navigating around
the list. Since most lists are alphabetically sorted, we came up with a
plugin that allowed us to have a long list and then, by binding the
list to our jQuery listnav plugin, an alphabet-based navigation bar
would magically appear above the list, showing all of the letters from
A to Z. Clicking on a letter dynamically filters the list, so you can,
for example, click on C and the list changes on-the-fly to show you
only items beginning with C.

There are lots of neat little features to the control. We've posted
full information and demos here:

http://www.ihwy.com/labs/jquery-listnav-plugin.aspx .

A couple of the interesting features worth calling out are 1) that
when you hover over a letter in the list navigation bar, a count
appears above the letter, telling you how many items will appear if you
click that letter 2) letters that don't have any items under them
appear looking "disabled", as a visual clue that there aren't any items
starting with that letter (so that the user doesn't have to find out by
clicking the letter).


One of the demos (demo 4) also shows using the listnav plugin on a list
that has floated
items in it. In the demo, each list item looks like a box and they are
arranged left-to-right, row by row. Clicking on a letter shows only the
boxes that have wording that starts with that letter. This could be
handy for making an address-book like layout on a web site: click the
letter in the navigation to see the contacts that start with Y, for
example. Each box can contain anything you want it to: the listnav
control pays attention only to the first letter of the first text in
the list item.

The control has been optimized for speed. It's able to handle
binding to lists with hundreds of items in them very quickly. Any
jQuery selector can be used to bind to your lists, so you can bind it
to multiple lists on a single page using just a CSS class name, if you
want to. It works with UL and OL (numbered) lists. If you use an OL,
the numbers restart themselves for each set of list items that appear
(ie, if you click on 'C' and that has 5 items, they will appear
numbered from 1-5).


We hope you enjoy the jQuery listnav plugin. We enjoyed creating it.








[jQuery] Advanced JS/jQuery Question: RTEs

2008-10-02 Thread 703designs

Fundamentally, how do the editors like TinyMCE work? Every RTE
implementation I've seen uses an iframe, and I have no idea what goes
on after that. Anyone here know the answer to this?


[jQuery] List overload

2008-10-02 Thread Trans

I just want to point out that this list is so active that I simply
can't keep up. I wonder if splitting the list into two or more lists
based on some criteria would be advisable.

Just a thought,
trans.


[jQuery] Re: hover question

2008-10-02 Thread Leonardo K
Try this:

$(tbody).find('tr').hover(function () {
  $(this).addClass('hovered');
   }, function () {
 $(this).removeClass('hovered');
   });

On Thu, Oct 2, 2008 at 16:39, Brad [EMAIL PROTECTED] wrote:


 Leonardo,

 I should have shown some more code. In my original example, tbody is a
 reference to an jQuery object.
 I'm working with a page that has many tables. Each table can have many
 tbody elements. The number of rows in each tbody can vary, but in
 all case there is more than 1.  Unfortunately the site is behind a
 firewall or I'd give a page.

 // Insert HTML row into table
  var tbody = $('tbody').appendTo('#' + target_id + ' table');
  tbody.attr('id','id-' + row.shipment_id);

 // This will highlight a tbody's rows on mouseEnter.
 // The original row coloring will be restored on mouseLeave.
 // A tbody may have numerous rows.

   tbody.hover(function () {  // -- tbody is a jQuery function
 $(this).children('tr').addClass('hovered');
  }, function () {
$(this).children('tr').removeClass('hovered');
  });

 What I was curious about is if I could do something like the
 following, which doesn't work.

tbody.hover(function () {
  // over
  // wish rows will be exposed on 'out' (it won't)
  var rows = $(this).children('tr');
  tr.addClass('hovered');
}, function () {
  // out
  rows.removeClass('hovered'); // this doesn't work
});

 Your example inspired me to try

$(tbody).children('tr').hover(function () {
   $(this).addClass('hovered');
}, function () {
  $(this).removeClass('hovered');
});

 but that doesn't work either.

 Thanks

 On Oct 2, 11:56 am, Leonardo K [EMAIL PROTECTED] wrote:
  $('tbody tr').hover(function () {
 $(this).addClass('hovered');
   }, function () {
 $(this).removeClass('hovered');
   });



[jQuery] Re: Advanced JS/jQuery Question: RTEs

2008-10-02 Thread Sam Sherlock
tiny mce makes an iframe (and other interface bits) to display content
(sometimes from textareas) and makes it editable.

in the dom there is contentEditable, which has all mannor of different
quirks between browser due to implementation
http://www.quirksmode.org/dom/execCommand/

tiny mce (other editors are available jquery has one coming -
http://code.google.com/p/jwysiwyg/ [maybe others UI?]) level out the
differences to resolve any incompatibilities

- S

2008/10/2 703designs [EMAIL PROTECTED]


 Fundamentally, how do the editors like TinyMCE work? Every RTE
 implementation I've seen uses an iframe, and I have no idea what goes
 on after that. Anyone here know the answer to this?



[jQuery] Re: Bug with JQuery is?

2008-10-02 Thread Matt Kruse

On Oct 2, 11:42 am, Dave Methvin [EMAIL PROTECTED] wrote:
 http://docs.jquery.com/Traversing/is#expr
 If no element fits, or the expression is not valid, then the response
 will be 'false'. Note: Only simple expressions are supported. Complex
 expressions, such as those containing hierarchy selectors (such as +,
 ~, and ) will always return 'true'.

Is there a reason, internally, why it would always return true instead
of false? It would seem to make much more sense to return false for
complex selectors.

Or, preferably, if it's a complex selector evaluate it globally, then
check to see if the item to be matched is contained within the
results. This would be slow in some cases, for sure, but would
probably behave as many people expect. It seems like the behavior
of .is() confuses a lot of people when they first use it (myself
included).

Matt Kruse


[jQuery] hover demo, with puppy

2008-10-02 Thread Jack Killpatrick


Hi All,

I just tossed this up on our site. I created this for someone on this 
list a month or so ago (and for my own edification, to see how I'd do it):


http://www.ihwy.com/labs/demos/Current/image-hover-menu.aspx

We're building out the demo area of our site... will be tossing more 
things into there as time goes by:


http://www.ihwy.com/labs/demos/

- Jack

(I hope the word puppy gets past the spam blocker g)



[jQuery] strange resize error with $(body).height()

2008-10-02 Thread Robert Koberg


Hi,

I have the following:


  var winH = $(body).height();
  console.log(winH: , winH);
  console.log(css height: , $(body).css(height));

If I resize the browser, the values for both remain the same as the  
time the page was hit by the browser. No matter what resizing I do,  
the height values do not change.


Have you seen this before? I know I saw this working earlier today.

thanks,
-Rob



[jQuery] Re: hover question

2008-10-02 Thread Brad

Leonardo,

I looked at my actual code again and wondered what would happen if I
bound the hover at the end of the loop. Your recommendations partially
work if I do that. Since each tbody can have a variable number of
rows, my intent is to highlight all rows when hovered. Your examples
only highlight the first row, which isn't the desired affect. I could
simply style the whole tbody, but the results when doing that are
undesirable.

I'm most likely dealing with a special case here with some unusual
requirements. In most cases I would expect your recommendations to
work.

Thanks Again

On Oct 2, 2:25 pm, Brad [EMAIL PROTECTED] wrote:
 That doesn't work in my case, but thanks again for the
 recommendation.  I should note that the code

 // Insert HTML row into table
   var tbody = $('tbody').appendTo('#' + target_id + ' table');
   tbody.attr('id','id-' + row.shipment_id);

 // This will highlight a tbody's rows on mouseEnter.
 // The original row coloring will be restored on mouseLeave.
 // A tbody may have numerous rows.

   tbody.hover(function () {  // -- tbody is a jQuery function
     $(this).children('tr').addClass('hovered');
   }, function () {
     $(this).children('tr').removeClass('hovered');
   });

 is part of a larger loop. I'm binding the hover to each tbody as it is
 dynamically inserted into the table.

 My original example, does work. I was just looking for a way to make
 the code smaller.

 Thanks

 On Oct 2, 2:01 pm, Leonardo K [EMAIL PROTECTED] wrote:

  Try this:

  $(tbody).find('tr').hover(function () {
        $(this).addClass('hovered');
     }, function () {
       $(this).removeClass('hovered');
     });

  On Thu, Oct 2, 2008 at 16:39, Brad [EMAIL PROTECTED] wrote:

   Leonardo,

   I should have shown some more code. In my original example, tbody is a
   reference to an jQuery object.
   I'm working with a page that has many tables. Each table can have many
   tbody elements. The number of rows in each tbody can vary, but in
   all case there is more than 1.  Unfortunately the site is behind a
   firewall or I'd give a page.

   // Insert HTML row into table
    var tbody = $('tbody').appendTo('#' + target_id + ' table');
    tbody.attr('id','id-' + row.shipment_id);

   // This will highlight a tbody's rows on mouseEnter.
   // The original row coloring will be restored on mouseLeave.
   // A tbody may have numerous rows.

     tbody.hover(function () {  // -- tbody is a jQuery function
       $(this).children('tr').addClass('hovered');
    }, function () {
      $(this).children('tr').removeClass('hovered');
    });

   What I was curious about is if I could do something like the
   following, which doesn't work.

      tbody.hover(function () {
            // over
            // wish rows will be exposed on 'out' (it won't)
            var rows = $(this).children('tr');
        tr.addClass('hovered');
      }, function () {
            // out
            rows.removeClass('hovered'); // this doesn't work
      });

   Your example inspired me to try

      $(tbody).children('tr').hover(function () {
         $(this).addClass('hovered');
      }, function () {
        $(this).removeClass('hovered');
      });

   but that doesn't work either.

   Thanks

   On Oct 2, 11:56 am, Leonardo K [EMAIL PROTECTED] wrote:
$('tbody tr').hover(function () {
   $(this).addClass('hovered');
 }, function () {
   $(this).removeClass('hovered');
 });


[jQuery] Link elements in IE

2008-10-02 Thread shortStormTrooper

Creating new link elements and appending them to existing elements on
the page does not seem to work in IE6 or 7. Suspect it may be any
inline elements but haven't tested.

Anyone see this behaviour?


[jQuery] jQuery Docs update - CSS methods

2008-10-02 Thread Karl Swedberg

Hi folks,

Just wanted to let you all know that the docs have been updated to  
show methods added to core from the Dimensions plugin, including  
innerWidth, outerWidth (and height), position, scrollTop, and  
scrollLeft. You can find them listed at:

http://docs.jquery.com/CSS

Cheers,

--Karl


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






  1   2   >