[jQuery] show/hide with embed

2009-10-16 Thread ngreenwood6

Ok so I found an issue with using embed code and jquery's show()/hide
() method. I am using embed code inside of a div. so it looks
something like this:

div id=test
embed
whatever here
/embed
/div

now on that I want a user to be able to click a button to show/hide
the content. so i create a function like this:

script type=text/javascript
function showEmbed(){
 if($(#test).show()){
  $(#test).hide();
 } else {
  $(#test).show();
}
}
/script

I then binded that to just a basic text link:

a href=javascript:void(0); onclick=showEmbed();show/hide/a

Now that works fine as far as showing/hiding the embed code. However,
there is one issue with this. When I click the link it reloads the
data. I do not want it to reload the data. Say for instance there is a
video playing in there. If you click the link it will stop the video
and when you click it again to show it will start again. Any ideas on
how to get it not to reload the data. Am I missing something?


[jQuery] Re: show/hide with embed

2009-10-16 Thread Evgeny Bobovik

Try to use this method:
script type=text/javascript
function showEmbed(){
if($(#test).css('display') == 'block'){
 $(#test).css('display','none');
} else {
 $(#test).css('display', 'block');
   }
}
/script
   Gk___




2009/10/16 ngreenwood6 ngreenwo...@gmail.com:




[jQuery] Re: HELP!!! css content filters

2009-10-16 Thread Evgeny Bobovik

try to use this function
script
function test(){
  var ind = 0;
  $('ul').find('li').each(function(){
if (ind == 2){
  $(this).css('test_css');
  ind = 0;
}else{
  ind++;
}
  });


}


/script



   Gk___
Sent from Minsk, Belarus



2009/10/16 huntspointer2009 huntspoin...@gmail.com:

 - Can someone please help me solve the following issue?
 - How can I select and apply a 'background-color' to the following
 li/li tags using JQuery?

 ul class=item_list
 li/li
 li/li
 li/li!-- I want to select this one --
 li/li!-- I want to select this one --
 li/li
 li/li
 li/li!-- I want to select this one --
 li/li!-- I want to select this one --
 li/li
 li/li
 li/li!-- I want to select this one --
 li/li!-- I want to select this one --
 li/li
 li/li
 li/li!-- I want to select this one --
 li/li!-- I want to select this one --
 li/li
 li/li
 /ul


 I've tried the following code, but it does NOT work:
 var test_css = {'background':'#000'};
 $(ul li:nth-child(3n)).css(test_css);


 (Thank you, in advance)




[jQuery] Re: Finding previous next input siblings encapsulated in other li ?

2009-10-16 Thread Julien

Thanks a lot, Karl. Your code dit it.

Now are several events (like key strokes and checkbox changes) for
which the same code must be run.
So, I would like to retrieve the siblings from within a function.

The problem I encounter with the code below is how to retrieve in
jQuery the caller argument passed to the function ?  Is there some
general syntax to read variables ?

 $(':text')
 .focus( function { UpdateFooter(this) } )
 .change( function { UpdateFooter(this) } )

$(':checkbox')
 .change( function { UpdateFooter(this) } );

function UpdateFooter (caller) {
$(caller).parent().nextAll().find('input:text').each(doSomething
());   // Which syntax to read the parameter ?
}


On 15 oct, 19:31, Karl Swedberg k...@englishrules.com wrote:
 Provided that all the text inputs located after it are within the same  
 ul, this should do it:

 $('input:text').change(function() {
    $(this).parent().nextAll().find('input:text').doSomething();

 });
(skipped)


[jQuery] Re: jquery preload images

2009-10-16 Thread kknaru

nobody? :(


[jQuery] When mouse over then Fade transition Pause, Please help

2009-10-16 Thread Tan

Hi, I have see a plugin : Fade transition plugin for jQuery
Please see demo:
http://www.robpoyntz.com/blog/?m=200905
I want when i mouse over then Fade transition stop and when i mouse
out then it start.

I create a code:
$(.container).mouseover (function() {
$(this).stop();
});
but it's not work. Please help me.


[jQuery] Re: jquery preload images

2009-10-16 Thread Leonardo K
the callback of load function is called when the ajax request is complete
(this not include waiting images to load). You have to use some plugin to
preload images.

On Fri, Oct 16, 2009 at 08:26, kknaru isai...@gmail.com wrote:


 nobody? :(


[jQuery] Re: calculating value based on two sliders

2009-10-16 Thread Richard D. Worth
Something like this perhaps:

http://jsbin.com/enuxu
source code: http://jsbin.com/enuxu/edit

- Richard

On Wed, Oct 14, 2009 at 2:28 PM, DekiR roncevic.de...@gmail.com wrote:


 HI,

 I am new to jquery and I am trying to calculate a value based on two
 sliders.

 Can somebody help me or point me into the right direction.

 Thanks,

 DekiR



 This is the code that I am using:


var value1;
var value2;

$(function() {
$(#slider).slider({
value:0,
min: -100,
max: 100,
step: 1,
slide: function(event, ui) {

$(#amount_t).val(ui.value);

var sl1 = parseFloat(ui.value / 100) *
 parseFloat($(#rate).attr
 (value));

$(#amount1_t).val(sl1);

value1 = sl1;

}

});


$(#slider1).slider({
value:0,
min: -100,
max: 100,
step: 1,
slide: function(event, ui) {

$(#amount_b).val(ui.value);

var sl2 = parseFloat(ui.value / 100) *
 parseFloat($(#rate).attr
 (value));

$(#amount1_b).val(sl2);

value2 = sl2;

}

});


var calc = parseFloat(value1) + parseFloat(value2);

$(#total).val(calc);

});



[jQuery] Re: calculating value based on two sliders

2009-10-16 Thread Richard D. Worth
Oh, and if you have any future questions about jQuery UI plugins, note
there's a separate list for those:
http://groups.google.com/group/jquery-ui

http://groups.google.com/group/jquery-ui- Richard

On Fri, Oct 16, 2009 at 8:28 AM, Richard D. Worth rdwo...@gmail.com wrote:

 Something like this perhaps:

 http://jsbin.com/enuxu
 source code: http://jsbin.com/enuxu/edit

 - Richard


 On Wed, Oct 14, 2009 at 2:28 PM, DekiR roncevic.de...@gmail.com wrote:


 HI,

 I am new to jquery and I am trying to calculate a value based on two
 sliders.

 Can somebody help me or point me into the right direction.

 Thanks,

 DekiR



 This is the code that I am using:


var value1;
var value2;

$(function() {
$(#slider).slider({
value:0,
min: -100,
max: 100,
step: 1,
slide: function(event, ui) {

$(#amount_t).val(ui.value);

var sl1 = parseFloat(ui.value / 100) *
 parseFloat($(#rate).attr
 (value));

$(#amount1_t).val(sl1);

value1 = sl1;

}

});


$(#slider1).slider({
value:0,
min: -100,
max: 100,
step: 1,
slide: function(event, ui) {

$(#amount_b).val(ui.value);

var sl2 = parseFloat(ui.value / 100) *
 parseFloat($(#rate).attr
 (value));

$(#amount1_b).val(sl2);

value2 = sl2;

}

});


var calc = parseFloat(value1) + parseFloat(value2);

$(#total).val(calc);

});





[jQuery] Re: show/hide with embed

2009-10-16 Thread ngreenwood6

I tried doing that as well and it still does the same thing. It must
be changing the display that makes it reload. To test all you have to
do is create a div with embed code and call show/hide on it and you
will see.

On Oct 16, 3:02 am, Evgeny Bobovik bobo...@gmail.com wrote:
 Try to use this method:
 script type=text/javascript
 function showEmbed(){
     if($(#test).css('display') == 'block'){
          $(#test).css('display','none');
     } else {
          $(#test).css('display', 'block');
    }}

 /script
    Gk___

 2009/10/16 ngreenwood6 ngreenwo...@gmail.com:




[jQuery] Re: HELP!!! css content filters

2009-10-16 Thread Liam Byrne


You have an unnecessary n in your code.

var test_css = {'background':'#000'};
$(ul li:nth-child(3n)).css(test_css);

should be 


$(ul li:nth-child(3)).css(test_css);

Liam


huntspointer2009 wrote:

- Can someone please help me solve the following issue?
- How can I select and apply a 'background-color' to the following
li/li tags using JQuery?

ul class=item_list
li/li
li/li
li/li!-- I want to select this one --
li/li!-- I want to select this one --
li/li
li/li
li/li!-- I want to select this one --
li/li!-- I want to select this one --
li/li
li/li
li/li!-- I want to select this one --
li/li!-- I want to select this one --
li/li
li/li
li/li!-- I want to select this one --
li/li!-- I want to select this one --
li/li
li/li
/ul


I've tried the following code, but it does NOT work:
var test_css = {'background':'#000'};
$(ul li:nth-child(3n)).css(test_css);


(Thank you, in advance)



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.421 / Virus Database: 270.14.20/2440 - Release Date: 10/16/09 06:32:00


  




[jQuery] Re: show/hide with embed

2009-10-16 Thread rupak mandal
if the problem is reload then add return false at the end or the function

On Fri, Oct 16, 2009 at 6:02 PM, ngreenwood6 ngreenwo...@gmail.com wrote:


 I tried doing that as well and it still does the same thing. It must
 be changing the display that makes it reload. To test all you have to
 do is create a div with embed code and call show/hide on it and you
 will see.

 On Oct 16, 3:02 am, Evgeny Bobovik bobo...@gmail.com wrote:
  Try to use this method:
  script type=text/javascript
  function showEmbed(){
  if($(#test).css('display') == 'block'){
   $(#test).css('display','none');
  } else {
   $(#test).css('display', 'block');
 }}
 
  /script
 Gk___
 
  2009/10/16 ngreenwood6 ngreenwo...@gmail.com:
 
 


[jQuery] Vlidation

2009-10-16 Thread Nagella

How to validate the form fields written in php file(for this file i
applied php templet)


[jQuery] superfish xml again

2009-10-16 Thread n0yes

I'm having install superfish problems, says the xml is missing. I
found this post:

I'm a newbie and can't install the zipfile superfish 1.4.8 using the
joomla install function.  I keep getting an error message stating that
the xml.is missing.  Do you have any suggestions how I might be
able to install this file?

But not the reply.
...
So, please, where can I get the xml file?


[jQuery] Re: HELP!!! css content filters

2009-10-16 Thread Bi Jing
Please try this

$(ul
li).each(function(i){this.addClass(['','','test_css','test_css'][i%4])})

OR..you can try to use another one:

$(li:even:odd, li:odd:odd).addClass(test_css);

On Fri, Oct 16, 2009 at 3:07 PM, Evgeny Bobovik bobo...@gmail.com wrote:


 try to use this function
 script
 function test(){
  var ind = 0;
  $('ul').find('li').each(function(){
if (ind == 2){
  $(this).css('test_css');
  ind = 0;
}else{
  ind++;
}
  });


 }


 /script



   Gk___
 Sent from Minsk, Belarus



 2009/10/16 huntspointer2009 huntspoin...@gmail.com:
 
  - Can someone please help me solve the following issue?
  - How can I select and apply a 'background-color' to the following
  li/li tags using JQuery?
 
  ul class=item_list
  li/li
  li/li
  li/li!-- I want to select this one --
  li/li!-- I want to select this one --
  li/li
  li/li
  li/li!-- I want to select this one --
  li/li!-- I want to select this one --
  li/li
  li/li
  li/li!-- I want to select this one --
  li/li!-- I want to select this one --
  li/li
  li/li
  li/li!-- I want to select this one --
  li/li!-- I want to select this one --
  li/li
  li/li
  /ul
 
 
  I've tried the following code, but it does NOT work:
  var test_css = {'background':'#000'};
  $(ul li:nth-child(3n)).css(test_css);
 
 
  (Thank you, in advance)
 
 



[jQuery] Re: slideUp(), XHTML IE8 - margin-top breaking, known issue?

2009-10-16 Thread bvdp

Hi,

I'm experiencing somewhat the same issues (http://groups.google.com/
group/jquery-dev/browse_thread/thread/14fd5703aeb8653d)
Did you already make progression on this?
Could you let me know please?

Thanks a lot!!

On 19 aug, 11:49, ryan.j ryan.joyce...@googlemail.com wrote:
 Apologies for the awful title. I've googled around a bit and although
 there are issues with IE and the various slide functions, i couldn't
 find anything that fixed the issue or offered any advice beyond lol
 IE.

 The easiest way to illustrate the problem is with the code snippet
 below; click 'section one' and mouseout before the transition
 completes, and IE will ignore !important and break the following h2's
 margin-top

 taking the doctype out fixes the problem, but defeats the point.
 anybody run into (and better yet, found a way around) this?

 ...

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 script type=text/javascript src=http://ajax.googleapis.com/ajax/
 libs/jquery/1.3.1/jquery.min.js/script
 script type=text/javascript
 function menuToggle(e) {
         $(e).each(function(){
                 $(this).next().toggle('fast')
         });}

 /script
 style type=text/css
 #menu-left { display:block; width:10%; }
 #menu-left h2 { margin-top:50px !important; }
 #menu-left ul { list-style-type:none; }
 #menu-left a, #menu-left ul li a { display:block; }
  { display:block;}
 /style
 /head
 body
 div id=menu-left
         h2 onclick=menuToggle(this)section one/h2
         ul
                 lia href=#dummy content/a/li
                 lia href=#dummy content/a/li
         /ul
         h2 onclick=menuToggle(this)section two/h2
         ul
                 lia href=#dummy content/a/li
                 lia href=#dummy content/a/li
                 lia href=#dummy content/a/li
         /ul
 /div
 /body
 /html


[jQuery] Re: show/hide with embed

2009-10-16 Thread Bi Jing
You should use

*$(#test).is(:visible)*

to confirm whether the div is shown or hidden.

Best,
BeCoDeR.
On Fri, Oct 16, 2009 at 3:02 PM, Evgeny Bobovik bobo...@gmail.com wrote:


 Try to use this method:
 script type=text/javascript
 function showEmbed(){
 if($(#test).css('display') == 'block'){
 $(#test).css('display','none');
} else {
 $(#test).css('display', 'block');
   }
 }
 /script
   Gk___




 2009/10/16 ngreenwood6 ngreenwo...@gmail.com:
 
 



[jQuery] Re: Show images with delay...

2009-10-16 Thread 立伟 马



On 10月16日, 上午5时29分, James james.gp@gmail.com wrote:
 You use setInterval in Javascript to execute a callback function every
 so milliseconds:

 window.setInterval(doSomething, 1000); // 1000ms = 1sec

 function doSomething() {
   // code to change images

 }

 On Oct 15, 11:25 am, -e-train etrai...@gmail.com wrote:



  All -

  How would i get the following effect.

  load the page and and image appears, then after 1 second, another
  image appears next to the previous one, then after one second, another
  image apears next to the previous one, etc...

  so each second a new image is placed in the line of images, eventually
  filling the screen with a bunch of images...

  I assume it is a for loop and something.
  or do i have to do it in php.

  in php this is the equivalent:
  for ($i = 0; $i  5; $i++) {
   print 'img src=image.png /';
   ob_flush();
   flush();
   sleep(1);

  }

  but this isn't really a good way to do this.

  any ideas?

  cheers,
  -e-train- 隐藏被引用文字 -

 - 显示引用的文字 -


[jQuery] Re: Script for tabs?

2009-10-16 Thread Bi Jing
Firstly, define a new css class , selected_tab , as following:

//Style code
.selected_tab{
background-color:#ccc;
color:#000;
}

//Script code
//$(.tab) indicate all of your tab elements.
$(.tab).click(function(){
$(.selected_tab).removeClass(selected_tab); // clear current select
tab style
$(this).addClass(selected_tab);
}
)

Hope that helps.

Becoder.

On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote:


 Can anybody direct me to a lightweight jquery script controlling tabs?
 I just want the activated tab to appear differently than the rest of
 the tabs. Thank you!


[jQuery] Simple Modal Close Event

2009-10-16 Thread biggerandbetterkah...@googlemail.com

I'm using the simpleModal plugin to display dialog windows. I have a
callback on the onclose event which fires another event.

Is it correct that the $.modal.close() does not fire the onclose
callback. If this is correct is there a way i could workaround this?


[jQuery] Re: Finding previous next input siblings encapsulated in other li ?

2009-10-16 Thread Karl Swedberg

Hi Julien,

May I propose a different way?

$('input:checkbox, input:text').bind('change focus', function(event) {
  if (event.type == 'change' || this.type == 'text') {
$(this).parent().nextAll().find('input:text').doSomething();
  }
});

This selects all checkboxes and text inputs and binds both a change  
and a focus handler to them. The doSomething() method will fire on  
change regardless of the input type (event.type == 'change') and on  
focus for text inputs only (this.type == 'text')


--Karl


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




On Oct 16, 2009, at 6:02 AM, Julien wrote:



Thanks a lot, Karl. Your code dit it.

Now are several events (like key strokes and checkbox changes) for
which the same code must be run.
So, I would like to retrieve the siblings from within a function.

The problem I encounter with the code below is how to retrieve in
jQuery the caller argument passed to the function ?  Is there some
general syntax to read variables ?

$(':text')
.focus( function { UpdateFooter(this) } )
.change( function { UpdateFooter(this) } )

$(':checkbox')
.change( function { UpdateFooter(this) } );

function UpdateFooter (caller) {
   $(caller).parent().nextAll().find('input:text').each(doSomething
());   // Which syntax to read the parameter ?
}


On 15 oct, 19:31, Karl Swedberg k...@englishrules.com wrote:
Provided that all the text inputs located after it are within the  
same

ul, this should do it:

$('input:text').change(function() {
   $(this).parent().nextAll().find('input:text').doSomething();

});

(skipped)




[jQuery] Re: jquery preload images

2009-10-16 Thread kknaru

can you give me some good references? i'm trying to understand the
process so i don;t want to use a plugin


[jQuery] Re: Jquery for show / hide item in list

2009-10-16 Thread Charlie





the code that you used will take UL's with more than 10 list
items(li's) and hide items greater than 10

it seems from your html you are wanting to do something different since
you are hiding complete lists(UL's) already

here's an example of the exact same code working fine BUT with minor
changes to your html ( without display:none, and combining 2 UL's
within "main" into a single UL)
http://jsbin.com/odire

clcik on 'more" and compare the source to yours

The question then becomeswhat exactly is the effect you are looking
for

dEwA nich wrote:
I've tried that script, but why the jquery doesn't work??
I'm newbie in jquery. I write like these :
script type="text/_javascript_"
$(document).ready(function(){
 $('.main ul').each(function(){
  var $this = $(this), lis = $this.find('li:gt(9)').hide();
   if(lis.length0){
   $this.append($('li').text('More').click(function(){
 lis.toggle();
 $(this).text($(this).text() === 'More' ? 'Less' :
'More');
 }));
 }
});
});
  
/script
  
body
ul id="narrow-search"
 li class="main"
 Category
 ul
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 /ul
 ul style="display:none;"
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 liCategory Name/li
 /ul
 a href=""more/a
 /li
 li class="main"
 Brand
 /ul
 ul style="display:none;"
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 liBrand Name/li
 /ul
 a href=""more/a
 /li
 li class="main"etc.../li
/ul
  
/body
...
  
Can you help me,Charlie??? thanks before..
  
  On Thu, Oct 15, 2009 at 10:48 AM, Charlie charlie...@gmail.com
wrote:
  
there was some very
interesting code on this list a few months ago that
should help you out

couldn't get the thread from google group search but can see whole
thread here

http://www.mail-archive.com/jquery-en@googlegroups.com/msg77035.html

look toward end of thread for mkmanning solution, short and sweet





dEwA nich wrote:
Dear friends,
  
I'm looking for jquery scripts to show/hide element in unordered list
like http://bbc.co.uk
with +, - button. I've got some script from here : http://paste.pocoo.org/show/86584/
and http://www.killersites.com/forums/topic/780/jquery-add-remove-list-item/.
But I little confused to use them. They just can be used if I have one
unordered list. If I have two or more unordered list, the script won't
work.
  
Can somebody help me??
  
thanks before..





  
  
  






[jQuery] Re: When mouse over then Fade transition Pause, Please help

2009-10-16 Thread Tan


Anybody ?Please
On Oct 16, 5:32 pm, Tan it_qn2...@yahoo.com wrote:
 Hi, I have see a plugin : Fade transition plugin for jQuery
 Please see demo:http://www.robpoyntz.com/blog/?m=200905
 I want when i mouse over then Fade transition stop and when i mouse
 out then it start.

 I create a code:
 $(.container).mouseover (function() {
 $(this).stop();});

 but it's not work. Please help me.


[jQuery] Re: superfish xml again

2009-10-16 Thread Charlie





superfish is jQuery( _javascript_) and CSS that performs on html markup.
Any xml related to it would be part of Joomla and have nothing to do
with superfish script or the superfish css.

Suggest researching this on joomla forums as it's totally non related
to anything jQuery or to do with superfish functionality

n0yes wrote:

  I'm having install superfish problems, says the xml is missing. I
found this post:

"I'm a newbie and can't install the zipfile superfish 1.4.8 using the
joomla install function.  I keep getting an error message stating that
the xml.is missing.  Do you have any suggestions how I might be
able to install this file?"

But not the reply.
...
So, please, where can I get the xml file?

  






[jQuery] Re: jquery preload images

2009-10-16 Thread Leonardo K
http://jqueryfordesigners.com/image-loading/

On Fri, Oct 16, 2009 at 10:48, kknaru isai...@gmail.com wrote:


 can you give me some good references? i'm trying to understand the
 process so i don;t want to use a plugin


[jQuery] Re: Finding previous next input siblings encapsulated in other li ?

2009-10-16 Thread Julien

Hi Karl,

Thanks for your interesting alternative approach.

On my side I was trying to set a jQuery variable using the argument
that was passed to the function.
But something seems broken if we don't use jQuery from the very
beginning for the selection.

$.tmp = caller;
alert($.tmp);// displays object HTMLInputElement
alert($.tmp.parent());  // Does not work.
alert($.tmp.parentElement);   //  displays object HTMLLIElement, but
impossible to go further with find(), a.s.o.


[jQuery] Validation: Server side generated errorLabelContainer

2009-10-16 Thread Bjorn

Hi,

to double check the user input I also do a server side validation. The
result of that validation is represented as an errorLabelContainer
that is generated by the validation plugin: an ul-container with li-
label children.

My problem is that when the inputs are updated by the user the
errorLabelContainer disappears, it gets a display:none rule. Is there
a possibility that when the errorLabelContainer is already shown it
does not get hidden when inputs are updated?

Best regards,
Bjorn


[jQuery] Re: jeditable - setting a different url

2009-10-16 Thread brian ally

On Thu, Oct 15, 2009 at 4:44 PM, pixeline aplennev...@gmail.com wrote:

 Hi!

 I'm trying to use the jeditable plugin to update a lot of different
 strings coming from various part of the database.

 I would like to set it like this:

 $(span.editInPlace).editable($(this).attr('rel'), {
        indicator : 'Un instant, sauvegarde en cours...',
        tooltip   : 'Cliquez sur le nom pour le modifier.'
    });


 But Firebug throws me an error :

 Erreur : uncaught exception: [Exception... Component returned failure
 code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]
 nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)  location: JS
 frame :: http://youplaboum.dev/_js/jquery-1.3.2.min.js :: anonymous ::
 line 19  data: no]


 If i hardcode the url instead of using the rel attribute, it works.
 But i would really like to have just one javascript call for all my
 editable zones, and be able to specify the url via an attribute.

The span element cannot have a rel attribute. Also, I'm pretty sure a
URL has characters that cannot be used in rel. Try putting the URL in
the span's title attribute instead.


[jQuery] Re: When mouse over then Fade transition Pause, Please help

2009-10-16 Thread Evgeny Bobovik

Try to use this code for mouse events processing

$(.container).bind(mouseenter,function(){
  Trans.pause();
}).bind(mouseleave,function(){
  Trans.pause();
});

... and replace your plugin code on this code:


(function ($) {
$.fn.fadeTransition = function(options) {
 var options = $.extend({pauseTime: 5000, transitionTime: 2000}, options);

Trans = function(obj) {
  var timer = null;
  var current = 0;
  var pause = 1;
  var els = $( *, obj).css(display, none).css(left,
0).css(top, 0).css(position, absolute);
  $(obj).css(position, relative);
  $(els[current]).css(display, block);

  function transition() {
var next = (current + 1) % els.length | 0;
$(els[current]).fadeOut(options.transitionTime);
   $(els[next]).fadeIn(options.transitionTime);
current = next;
cue();
  };

  function cue() {
if ($( *, obj).length  2) return false;
if (timer) clearTimeout(timer);

if(pause == 0){
   timer = setTimeout(cue, options.pauseTime);
}else{
  timer = setTimeout(transition, options.pauseTime);
}
  };

  pause: function(){
 if (pause == 1) pause = 0;
  else pause = 1;
  }

  cue();
};

return this.each(function() {
  var t = new Trans(this);
});
  }
})(jQuery);



code needs to be replaced because the original plug-in that you use
does not allow to stop the show, I added a feature to stop the show,
but I have not been able to verify how it works, if there are any
problems - write to me at the email bobo...@gmail.com
   Gk___




2009/10/16 Tan it_qn2...@yahoo.com:


 Anybody ?Please
 On Oct 16, 5:32 pm, Tan it_qn2...@yahoo.com wrote:
 Hi, I have see a plugin : Fade transition plugin for jQuery
 Please see demo:http://www.robpoyntz.com/blog/?m=200905
 I want when i mouse over then Fade transition stop and when i mouse
 out then it start.

 I create a code:
 $(.container).mouseover (function() {
 $(this).stop();});

 but it's not work. Please help me.


[jQuery] Re: Script for tabs?

2009-10-16 Thread lukas

Thank you for your quick response! In the meantime I tried something
similar, I thought there is a solution which doesn't require that much
code. (Imagine you have 10 tabs!)

On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote:
 Firstly, define a new css class , selected_tab , as following:

 //Style code
 .selected_tab{
 background-color:#ccc;
 color:#000;

 }

 //Script code
 //$(.tab) indicate all of your tab elements.
 $(.tab).click(function(){
     $(.selected_tab).removeClass(selected_tab); // clear current select
 tab style
     $(this).addClass(selected_tab);}

 )

 Hope that helps.

 Becoder.

 On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote:

  Can anybody direct me to a lightweight jquery script controlling tabs?
  I just want the activated tab to appear differently than the rest of
  the tabs. Thank you!


[jQuery] new autosuggestion plug-in. need comments/feedback

2009-10-16 Thread George

I have developed the autosuggestion plug-in.
Looks pretty cool (for me). I actually made is like it's done on
Facebook. (code is 100% mine).

Please take a look and leave me comments/feedback.
Only list of names are working as autosuggestion. Other fields on the
form are just for example.
Also you can have more that one name in the input box.

http://www.tersaakov.com/default.htm


[jQuery] Re: Script for tabs?

2009-10-16 Thread Richard D. Worth
I imagine you wouldn't need any more code than Bi Jing has given you to
handle even 100 tabs, since it uses classes, not IDs.
- Richard

On Fri, Oct 16, 2009 at 10:53 AM, lukas animod...@gmail.com wrote:


 Thank you for your quick response! In the meantime I tried something
 similar, I thought there is a solution which doesn't require that much
 code. (Imagine you have 10 tabs!)

 On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote:
  Firstly, define a new css class , selected_tab , as following:
 
  //Style code
  .selected_tab{
  background-color:#ccc;
  color:#000;
 
  }
 
  //Script code
  //$(.tab) indicate all of your tab elements.
  $(.tab).click(function(){
  $(.selected_tab).removeClass(selected_tab); // clear current
 select
  tab style
  $(this).addClass(selected_tab);}
 
  )
 
  Hope that helps.
 
  Becoder.
 
  On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote:
 
   Can anybody direct me to a lightweight jquery script controlling tabs?
   I just want the activated tab to appear differently than the rest of
   the tabs. Thank you!



[jQuery] Re: Finding previous next input siblings encapsulated in other li ?

2009-10-16 Thread Julien

Karl,
I choose to keep my original approach as it was better for code
clarity in my case.

From within my function, I could select the text input passed as
argument with variable $currentField.
I could also get the list of other text inputs located after it.
$afterFields.length correctly counts the number of those fields.

Now, for each of those text fields I must access the status of the
checkbox located just after.

Instead of .each(), I would like to use a for loop since the loop
must be exited as soon as a checked checkbox is found.

I've been unable to access the checkbox.

function UpdateFooter(caller) {
(skip)

var $currentField = :text[name= + caller.name + ];
var $afterFields = $($currentField).parent().nextAll().find(:text);

// Use a for loop instead of a .each() handler.
var n = $afterFields.length;
if ( n  0) {  // If there are text fields located after the current
text field.
for (var i=0; in; i++) {
alert($('$afterFields[i]~:checkbox').checked);  // Does not
work.
}
}

(skip)
}  // end of function


[jQuery] Re: When mouse over then Fade transition Pause, Please help

2009-10-16 Thread Tan

Hi, Evgeny Bobovik.
Thanks you .
I have modify files js to:

(function ($) {
$.fn.fadeTransition = function(options) {
 var options = $.extend({pauseTime: 5000, transitionTime: 2000},
options);

Trans = function(obj) {
  var timer = null;
  var current = 0;
  var pause = 1;
  var els = $( *, obj).css(display, none).css(left,
0).css(top, 0).css(position, absolute);
  $(obj).css(position, relative);
  $(els[current]).css(display, block);

  function transition() {
var next = (current + 1) % els.length | 0;
$(els[current]).fadeOut(options.transitionTime);
   $(els[next]).fadeIn(options.transitionTime);
current = next;
cue();
  };

  function cue() {
if ($( *, obj).length  2) return false;
if (timer) clearTimeout(timer);

if(pause == 0){
   timer = setTimeout(cue, options.pauseTime);
}else{
  timer = setTimeout(transition, options.pauseTime);
}
  };

  pause: function(){
 if (pause == 1) pause = 0;
  else pause = 1;
  }

  cue();
};

return this.each(function() {
  var t = new Trans(this);
});
  }
})(jQuery);

I create files html on host: http://cfd.net.au/learjqurery.html

But it's not work, Please help.



On Oct 16, 9:25 pm, Evgeny Bobovik bobo...@gmail.com wrote:
 Try to use this code for mouse events processing

     $(.container).bind(mouseenter,function(){
       Trans.pause();
     }).bind(mouseleave,function(){
       Trans.pause();
     });

 ... and replace your plugin code on this code:

 (function ($) {
 $.fn.fadeTransition = function(options) {
  var options = $.extend({pauseTime: 5000, transitionTime: 2000}, options);

     Trans = function(obj) {
       var timer = null;
       var current = 0;
           var pause = 1;
       var els = $( *, obj).css(display, none).css(left,
 0).css(top, 0).css(position, absolute);
       $(obj).css(position, relative);
       $(els[current]).css(display, block);

       function transition() {
         var next = (current + 1) % els.length | 0;
         $(els[current]).fadeOut(options.transitionTime);
        $(els[next]).fadeIn(options.transitionTime);
         current = next;
         cue();
       };

       function cue() {
         if ($( *, obj).length  2) return false;
         if (timer) clearTimeout(timer);

             if(pause == 0){
                timer = setTimeout(cue, options.pauseTime);
             }else{
           timer = setTimeout(transition, options.pauseTime);
             }
       };

           pause: function(){
              if (pause == 1) pause = 0;
               else pause = 1;
           }

       cue();
     };

     return this.each(function() {
       var t = new Trans(this);
     });
   }

 })(jQuery);

 code needs to be replaced because the original plug-in that you use
 does not allow to stop the show, I added a feature to stop the show,
 but I have not been able to verify how it works, if there are any
 problems - write to me at the email bobo...@gmail.com
    Gk___

 2009/10/16 Tan it_qn2...@yahoo.com:



  Anybody ?Please
  On Oct 16, 5:32 pm, Tan it_qn2...@yahoo.com wrote:
  Hi, I have see a plugin : Fade transition plugin for jQuery
  Please see demo:http://www.robpoyntz.com/blog/?m=200905
  I want when i mouse over then Fade transition stop and when i mouse
  out then it start.

  I create a code:
  $(.container).mouseover (function() {
  $(this).stop();});

  but it's not work. Please help me.


[jQuery] Re: Script for tabs?

2009-10-16 Thread lukas

Thank you! But how do you memorize the state of the tabs? When you
click a tab it will work until the refresh of the page is finished and
the original mark-up is effective again.

On Oct 16, 11:15 am, Richard D. Worth rdwo...@gmail.com wrote:
 I imagine you wouldn't need any more code than Bi Jing has given you to
 handle even 100 tabs, since it uses classes, not IDs.
 - Richard

 On Fri, Oct 16, 2009 at 10:53 AM, lukas animod...@gmail.com wrote:

  Thank you for your quick response! In the meantime I tried something
  similar, I thought there is a solution which doesn't require that much
  code. (Imagine you have 10 tabs!)

  On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote:
   Firstly, define a new css class , selected_tab , as following:

   //Style code
   .selected_tab{
   background-color:#ccc;
   color:#000;

   }

   //Script code
   //$(.tab) indicate all of your tab elements.
   $(.tab).click(function(){
       $(.selected_tab).removeClass(selected_tab); // clear current
  select
   tab style
       $(this).addClass(selected_tab);}

   )

   Hope that helps.

   Becoder.

   On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote:

Can anybody direct me to a lightweight jquery script controlling tabs?
I just want the activated tab to appear differently than the rest of
the tabs. Thank you!


[jQuery] Re: Script for tabs?

2009-10-16 Thread lukas

Thank you! But how do you memorize the state of the tabs? When you
click a tab it will work until the refresh of the page is finished and
the original mark-up is effective again.

On Oct 16, 11:15 am, Richard D. Worth rdwo...@gmail.com wrote:
 I imagine you wouldn't need any more code than Bi Jing has given you to
 handle even 100 tabs, since it uses classes, not IDs.
 - Richard

 On Fri, Oct 16, 2009 at 10:53 AM, lukas animod...@gmail.com wrote:

  Thank you for your quick response! In the meantime I tried something
  similar, I thought there is a solution which doesn't require that much
  code. (Imagine you have 10 tabs!)

  On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote:
   Firstly, define a new css class , selected_tab , as following:

   //Style code
   .selected_tab{
   background-color:#ccc;
   color:#000;

   }

   //Script code
   //$(.tab) indicate all of your tab elements.
   $(.tab).click(function(){
       $(.selected_tab).removeClass(selected_tab); // clear current
  select
   tab style
       $(this).addClass(selected_tab);}

   )

   Hope that helps.

   Becoder.

   On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote:

Can anybody direct me to a lightweight jquery script controlling tabs?
I just want the activated tab to appear differently than the rest of
the tabs. Thank you!


[jQuery] Re: show/hide with embed

2009-10-16 Thread ngreenwood6

So if I add return false it won't reload the data?

On Oct 16, 8:37 am, rupak mandal rupakn...@gmail.com wrote:
 if the problem is reload then add return false at the end or the function



 On Fri, Oct 16, 2009 at 6:02 PM, ngreenwood6 ngreenwo...@gmail.com wrote:

  I tried doing that as well and it still does the same thing. It must
  be changing the display that makes it reload. To test all you have to
  do is create a div with embed code and call show/hide on it and you
  will see.

  On Oct 16, 3:02 am, Evgeny Bobovik bobo...@gmail.com wrote:
   Try to use this method:
   script type=text/javascript
   function showEmbed(){
       if($(#test).css('display') == 'block'){
            $(#test).css('display','none');
       } else {
            $(#test).css('display', 'block');
      }}

   /script
      Gk___

   2009/10/16 ngreenwood6 ngreenwo...@gmail.com:


[jQuery] Re: Script for tabs?

2009-10-16 Thread lukas

Thank you! But how do you memorize the state of the tabs? When you
click a tab it will work until the refresh of the page is finished and
the original mark-up is effective again.

On Oct 16, 11:15 am, Richard D. Worth rdwo...@gmail.com wrote:
 I imagine you wouldn't need any more code than Bi Jing has given you to
 handle even 100 tabs, since it uses classes, not IDs.
 - Richard

 On Fri, Oct 16, 2009 at 10:53 AM, lukas animod...@gmail.com wrote:

  Thank you for your quick response! In the meantime I tried something
  similar, I thought there is a solution which doesn't require that much
  code. (Imagine you have 10 tabs!)

  On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote:
   Firstly, define a new css class , selected_tab , as following:

   //Style code
   .selected_tab{
   background-color:#ccc;
   color:#000;

   }

   //Script code
   //$(.tab) indicate all of your tab elements.
   $(.tab).click(function(){
       $(.selected_tab).removeClass(selected_tab); // clear current
  select
   tab style
       $(this).addClass(selected_tab);}

   )

   Hope that helps.

   Becoder.

   On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote:

Can anybody direct me to a lightweight jquery script controlling tabs?
I just want the activated tab to appear differently than the rest of
the tabs. Thank you!


[jQuery] Re: Script for tabs?

2009-10-16 Thread Richard D. Worth
Sounds like you may want to look into using a tabs plugin, if you don't want
to implement this all yourself. For example:
http://jqueryui.com/demos/tabs/

http://jqueryui.com/demos/tabs/- Richard

On Fri, Oct 16, 2009 at 12:58 PM, lukas animod...@gmail.com wrote:


 Thank you! But how do you memorize the state of the tabs? When you
 click a tab it will work until the refresh of the page is finished and
 the original mark-up is effective again.

 On Oct 16, 11:15 am, Richard D. Worth rdwo...@gmail.com wrote:
  I imagine you wouldn't need any more code than Bi Jing has given you to
  handle even 100 tabs, since it uses classes, not IDs.
  - Richard
 
  On Fri, Oct 16, 2009 at 10:53 AM, lukas animod...@gmail.com wrote:
 
   Thank you for your quick response! In the meantime I tried something
   similar, I thought there is a solution which doesn't require that much
   code. (Imagine you have 10 tabs!)
 
   On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote:
Firstly, define a new css class , selected_tab , as following:
 
//Style code
.selected_tab{
background-color:#ccc;
color:#000;
 
}
 
//Script code
//$(.tab) indicate all of your tab elements.
$(.tab).click(function(){
$(.selected_tab).removeClass(selected_tab); // clear current
   select
tab style
$(this).addClass(selected_tab);}
 
)
 
Hope that helps.
 
Becoder.
 
On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote:
 
 Can anybody direct me to a lightweight jquery script controlling
 tabs?
 I just want the activated tab to appear differently than the rest
 of
 the tabs. Thank you!



[jQuery] Re: Script for tabs?

2009-10-16 Thread lukas

I wanted to avoid loading another plug-in. I helped myself with
setting cookies but this makes the code a bit long. I hoped there was
a simple trick memorizing the state of the tabs. Thanks again!

On Oct 16, 1:10 pm, Richard D. Worth rdwo...@gmail.com wrote:
 Sounds like you may want to look into using a tabs plugin, if you don't want
 to implement this all yourself. For example:http://jqueryui.com/demos/tabs/

 http://jqueryui.com/demos/tabs/- Richard

 On Fri, Oct 16, 2009 at 12:58 PM, lukas animod...@gmail.com wrote:

  Thank you! But how do you memorize the state of the tabs? When you
  click a tab it will work until the refresh of the page is finished and
  the original mark-up is effective again.

  On Oct 16, 11:15 am, Richard D. Worth rdwo...@gmail.com wrote:
   I imagine you wouldn't need any more code than Bi Jing has given you to
   handle even 100 tabs, since it uses classes, not IDs.
   - Richard

   On Fri, Oct 16, 2009 at 10:53 AM, lukas animod...@gmail.com wrote:

Thank you for your quick response! In the meantime I tried something
similar, I thought there is a solution which doesn't require that much
code. (Imagine you have 10 tabs!)

On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote:
 Firstly, define a new css class , selected_tab , as following:

 //Style code
 .selected_tab{
 background-color:#ccc;
 color:#000;

 }

 //Script code
 //$(.tab) indicate all of your tab elements.
 $(.tab).click(function(){
     $(.selected_tab).removeClass(selected_tab); // clear current
select
 tab style
     $(this).addClass(selected_tab);}

 )

 Hope that helps.

 Becoder.

 On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote:

  Can anybody direct me to a lightweight jquery script controlling
  tabs?
  I just want the activated tab to appear differently than the rest
  of
  the tabs. Thank you!


[jQuery] Why no color animation built in?

2009-10-16 Thread Sam

I was just wondering, why doesn't jQuery have color animations built-
in to the library? JavaScript has hexadecimal number literals
(0xaabbcc), so it could be the way to define colors in the params
argument object. An array literal could also be used to set colors.

Why is it that jQuery hasn't implemented this by default?


[jQuery] Re: Why no color animation built in?

2009-10-16 Thread Charlie





jQueryUi has color animations

http://jqueryui.com/demos/animate/

Sam wrote:

  I was just wondering, why doesn't jQuery have color animations built-
in to the library? _javascript_ has hexadecimal number literals
(0xaabbcc), so it could be the way to define colors in the params
argument object. An array literal could also be used to set colors.

Why is it that jQuery hasn't implemented this by default?

  






[jQuery] jQuery and Ajax conflicting only on macintosh?

2009-10-16 Thread wogahnct

I have a very simple script that fails on macintosh only (works on PC
browsers) when I include the ajax.js file.  I am not even using it
(not in my simple script anyway, shown below).  When I include that
file, the drag and drop no longer works on a mac.

Any help is greatly appreciated

You can see my two examples here:

WORKS:  http://cmi2.yale.edu/test/cjohns/working_example.html
DOES NOT WORK ON MAC:  http://cmi2.yale.edu/test/cjohns/nonworking_example.html

The code is as follows:
HTML
BODY

!-- THIS NEXT LINE IS THE ONE THAT STOPS THE SCRIPT FROM WORKING ON
MACINTOSH --
!-- script type=text/javascript src=scripts/ajax.js
charset=utf-8/script  --

script type=text/javascript src=scripts/jquery-1.3.2.min.js/
script
script type=text/javascript src=scripts/jquery-
ui-1.7.2.custom.min.js/script

UL id=listA class=connectedSortable
LI id=Aitem1A - Item One/LI
LI id=Aitem2A - Item Two/LI
LI id=Aitem3A - Item Three/LI
/UL

UL id=listB class=connectedSortable 
LI id=Bitem1AB - Item One/LI
LI id=Bitem2AB - Item Two/LI
LI id=Bitem3AB - Item Three/LI
/UL

script type=text/javascript charset=utf-8

$(#listA).sortable({
connectWith: ['.connectedSortable']
});
$(#listB).sortable({
connectWith: ['.connectedSortable']
});

/script
/BODY
/HTML

Cheryl Johns
Yale University


[jQuery] treeview

2009-10-16 Thread Indraneel

I have a xml file which has the data to be loaded in the treeview.
First of all, I would be really glad if treeview can read any xml.
Then I can convert my xml to that sort. Secondly, if I have to provide
an unordered list, which I can generate from the xml; what will be the
way of dynamically adding a node ?

Lastly, my tree view will reside in a tab of jquery ui. And it will
not be populated when the document becomes ready. Rather it will grow
with the activities the user perform. Here I am lost where will I make
the div a treeview ? Like what will I bind with the initialization
function treeview()?

$(document).click(function(){
$('#job_proc').treeview();
});

While I do with click function, it gets executed with the + and - sign
click as well.

Any sort of clue will be appreciated.


[jQuery] Re: new autosuggestion plug-in. need comments/feedback

2009-10-16 Thread Rick Faircloth

Very responsive, George!
I'll definitely take a look at this.  I have been wanting to implement
autocomplete, but just haven't gotten around to it.

Thanks for sharing!

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of George
Sent: Friday, October 16, 2009 11:11 AM
To: jQuery (English)
Subject: [jQuery] new autosuggestion plug-in. need comments/feedback


I have developed the autosuggestion plug-in.
Looks pretty cool (for me). I actually made is like it's done on
Facebook. (code is 100% mine).

Please take a look and leave me comments/feedback.
Only list of names are working as autosuggestion. Other fields on the
form are just for example.
Also you can have more that one name in the input box.

http://www.tersaakov.com/default.htm




[jQuery] Re: Why no color animation built in?

2009-10-16 Thread Sam

Well why don't they bundle this in with the jQuery standard library?

On Oct 16, 11:21 am, Charlie charlie...@gmail.com wrote:
 jQueryUi has color animationshttp://jqueryui.com/demos/animate/
 Sam wrote:I was just wondering, why doesn't jQuery have color animations 
 built- in to the library? JavaScript has hexadecimal number literals 
 (0xaabbcc), so it could be the way to define colors in the params argument 
 object. An array literal could also be used to set colors. Why is it that 
 jQuery hasn't implemented this by default?


[jQuery] Re: new autosuggestion plug-in. need comments/feedback

2009-10-16 Thread George

Well, it does not support AJAX yet. the list comes from Javascript
array already in the page.
So responsiveness probably has something to do with it.

I just like the way how it looks. I would actually call it tokenizer
and not the autosuggestion.


George.

On Oct 16, 2:53 pm, Rick Faircloth r...@whitestonemedia.com wrote:
 Very responsive, George!
 I'll definitely take a look at this.  I have been wanting to implement
 autocomplete, but just haven't gotten around to it.

 Thanks for sharing!

 Rick



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

 Behalf Of George
 Sent: Friday, October 16, 2009 11:11 AM
 To: jQuery (English)
 Subject: [jQuery] new autosuggestion plug-in. need comments/feedback

 I have developed the autosuggestion plug-in.
 Looks pretty cool (for me). I actually made is like it's done on
 Facebook. (code is 100% mine).

 Please take a look and leave me comments/feedback.
 Only list of names are working as autosuggestion. Other fields on the
 form are just for example.
 Also you can have more that one name in the input box.

 http://www.tersaakov.com/default.htm- Hide quoted text -

 - Show quoted text -


[jQuery] Re: new autosuggestion plug-in. need comments/feedback

2009-10-16 Thread George

It's fairly easy to add. I will do that later this week.
I just wanted to iron out all visual/appearance bugs.

So you can check this link next week.

George.


On Oct 16, 3:23 pm, Rick Faircloth r...@whitestonemedia.com wrote:
 Thanks for letting me know.  I would definitely need ajax support.

 Rick



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

 Behalf Of George
 Sent: Friday, October 16, 2009 3:09 PM
 To: jQuery (English)
 Subject: [jQuery] Re: new autosuggestion plug-in. need comments/feedback

 Well, it does not support AJAX yet. the list comes from Javascript
 array already in the page.
 So responsiveness probably has something to do with it.

 I just like the way how it looks. I would actually call it tokenizer
 and not the autosuggestion.

 George.

 On Oct 16, 2:53 pm, Rick Faircloth r...@whitestonemedia.com wrote:
  Very responsive, George!
  I'll definitely take a look at this.  I have been wanting to implement
  autocomplete, but just haven't gotten around to it.

  Thanks for sharing!

  Rick

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

  Behalf Of George
  Sent: Friday, October 16, 2009 11:11 AM
  To: jQuery (English)
  Subject: [jQuery] new autosuggestion plug-in. need comments/feedback

  I have developed the autosuggestion plug-in.
  Looks pretty cool (for me). I actually made is like it's done on
  Facebook. (code is 100% mine).

  Please take a look and leave me comments/feedback.
  Only list of names are working as autosuggestion. Other fields on the
  form are just for example.
  Also you can have more that one name in the input box.

 http://www.tersaakov.com/default.htm-Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Why no color animation built in?

2009-10-16 Thread Richard D. Worth
Because filesize is at a premium, and not enough people (80-95%) need this
feature almost every time they use jQuery (80-95%). That's the point of
plugins. I wrote something on the subject some time ago, and I think it sums
it up well. See

http://groups.google.com/group/jquery-en/msg/0ca254effd0acd00


 Also, I agree this should be in the core of jQuery.

I have found the jQuery project to be quite consistent in adding plugins to
the core when they are so widely used, that nearly everyone is including
them along with jquery.js, so that the addition is natural and welcome.
This
means lots and lots of people, over a long time, and puts the onus where it
should be, on the plugin author.

Look at the recent addition of the dimensions plugin (most in v1.2, the
rest
in v1.2.5). For over a year, this has been one of the most requested plugin
additions to the core. So many sites and other plugins use it, it no longer
made sense for it to not be in the core. It's a model that keeps the core
lean, and gives users as much a vote as to what goes into jQuery as any
member of the dev team. Beautiful.


In this specific instance you can either include effects.core.js from jQuery
UI, which as Charlie pointed out, contains this feature, or the standalone
color plugin:

http://plugins.jquery.com/project/color

Easy enough for anyone that needs this, and doesn't burden all the people
that don't. This is just one example. There are many others, such as:

(not exhaustive and in no particular order)
* history
* cookie
* metadata
* bgiframe
* blockUI

- Richard

On Fri, Oct 16, 2009 at 2:53 PM, Sam figaro1...@gmail.com wrote:


 Well why don't they bundle this in with the jQuery standard library?

 On Oct 16, 11:21 am, Charlie charlie...@gmail.com wrote:
  jQueryUi has color animationshttp://jqueryui.com/demos/animate/
  Sam wrote:I was just wondering, why doesn't jQuery have color animations
 built- in to the library? JavaScript has hexadecimal number literals
 (0xaabbcc), so it could be the way to define colors in the params argument
 object. An array literal could also be used to set colors. Why is it that
 jQuery hasn't implemented this by default?



[jQuery] Re: jQuery and Ajax conflicting only on macintosh?

2009-10-16 Thread George

Looks like you have an extra  there
see this line: UL id=listB class=connectedSortable 


Might be a problem

On Oct 16, 10:10 am, wogahnct cheryl.jo...@yale.edu wrote:
 I have a very simple script that fails on macintosh only (works on PC
 browsers) when I include the ajax.js file.  I am not even using it
 (not in my simple script anyway, shown below).  When I include that
 file, the drag and drop no longer works on a mac.

 Any help is greatly appreciated

 You can see my two examples here:

 WORKS:  http://cmi2.yale.edu/test/cjohns/working_example.html
 DOES NOT WORK ON MAC:  
 http://cmi2.yale.edu/test/cjohns/nonworking_example.html

 The code is as follows:
 HTML
 BODY

 !-- THIS NEXT LINE IS THE ONE THAT STOPS THE SCRIPT FROM WORKING ON
 MACINTOSH --
 !-- script type=text/javascript src=scripts/ajax.js
 charset=utf-8/script  --

 script type=text/javascript src=scripts/jquery-1.3.2.min.js/
 script
 script type=text/javascript src=scripts/jquery-
 ui-1.7.2.custom.min.js/script

 UL id=listA class=connectedSortable
         LI id=Aitem1A - Item One/LI
         LI id=Aitem2A - Item Two/LI
         LI id=Aitem3A - Item Three/LI
 /UL

 UL id=listB class=connectedSortable 
         LI id=Bitem1AB - Item One/LI
         LI id=Bitem2AB - Item Two/LI
         LI id=Bitem3AB - Item Three/LI
 /UL

 script type=text/javascript charset=utf-8

         $(#listA).sortable({
                 connectWith: ['.connectedSortable']
     });
         $(#listB).sortable({
                 connectWith: ['.connectedSortable']
     });

 /script
 /BODY
 /HTML

 Cheryl Johns
 Yale University


[jQuery] Re: jQuery UI Tabs - Select Tab?

2009-10-16 Thread Collectonian

We tried that as well, and still no go.

On Oct 15, 1:01 pm, MorningZ morni...@gmail.com wrote:
 $(#tabs).tabs(select, idx);

 where idx is the numeric index of the tab to select

 On Oct 15, 11:53 am, Collectonian collecton...@eclectic-world.com
 wrote:



  We are using the jQuery UI's tabs functions to do a tab on a web
  application. The tabs are loading fine and work perfectly when
  clicking them. In some instances, though, we want to default the page
  to have a specific tab selected on load. How do we do this? We tried
  looking through the docs, but nothing we tried worked. In our main JS
  file, we load the tabs with:

  $(document).ready(function(){
          $(#tabs).tabs();

  });

  Then in the page itself, when we want it to switch to a specific tab,
  we have:

  script type=text/javascript
          $('#tabs').tabs({ 'option', 'selected', 1 });
  /script

  We also tried:

  $('.selector').tabs('option', 'selected', 1);

  and

  var $tabs = $('#tabs').tabs({
      add: function(event, ui) {
          $tabs.tabs('select', '#securityTab');
      }

  });

  Summer S. Wilson
  Collectonian on Yahoo! Messenger
  An Eclectic World  (http://eclectic-world.com)
  LiveJournal (http://collectonian.livejournal.com)- Hide quoted text -

 - Show quoted text -


[jQuery] Using values.jquery to switch values of fields

2009-10-16 Thread johnHoysa

Looking at the example for the values.jquery plugin I would think that
I would not only be able to copy values from one id to an other but
that I would also be able to switch the values as well.

Here is the working example - 
http://jquery-values.googlecode.com/svn/trunk/jquery.values.htm

Looking at the above example what I would like to do is take the value
from id:left and switch it with the value from id:right.
So that would give me this ordering id:right   id:middle   id:left.

Is this possible? And if so how!

appreciate your help!

John


[jQuery] Re: jQuery and Ajax conflicting only on macintosh?

2009-10-16 Thread Johns, Cheryl

Thanks, good catch.

I actually found that I also needed to update the file I was using for ajax.js. 
 Once I updated to version 1.6.1 from www. Prototypejs.org, the problem went 
away!  Go figure!

Thanks George!

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of George
Sent: Friday, October 16, 2009 3:11 PM
To: jQuery (English)
Subject: [jQuery] Re: jQuery and Ajax conflicting only on macintosh?


Looks like you have an extra  there
see this line: UL id=listB class=connectedSortable 


Might be a problem

On Oct 16, 10:10 am, wogahnct cheryl.jo...@yale.edu wrote:
 I have a very simple script that fails on macintosh only (works on PC
 browsers) when I include the ajax.js file.  I am not even using it
 (not in my simple script anyway, shown below).  When I include that
 file, the drag and drop no longer works on a mac.

 Any help is greatly appreciated

 You can see my two examples here:

 WORKS:  http://cmi2.yale.edu/test/cjohns/working_example.html
 DOES NOT WORK ON MAC:  
 http://cmi2.yale.edu/test/cjohns/nonworking_example.html

 The code is as follows:
 HTML
 BODY

 !-- THIS NEXT LINE IS THE ONE THAT STOPS THE SCRIPT FROM WORKING ON
 MACINTOSH --
 !-- script type=text/javascript src=scripts/ajax.js
 charset=utf-8/script  --

 script type=text/javascript src=scripts/jquery-1.3.2.min.js/
 script
 script type=text/javascript src=scripts/jquery-
 ui-1.7.2.custom.min.js/script

 UL id=listA class=connectedSortable
         LI id=Aitem1A - Item One/LI
         LI id=Aitem2A - Item Two/LI
         LI id=Aitem3A - Item Three/LI
 /UL

 UL id=listB class=connectedSortable 
         LI id=Bitem1AB - Item One/LI
         LI id=Bitem2AB - Item Two/LI
         LI id=Bitem3AB - Item Three/LI
 /UL

 script type=text/javascript charset=utf-8

         $(#listA).sortable({
                 connectWith: ['.connectedSortable']
     });
         $(#listB).sortable({
                 connectWith: ['.connectedSortable']
     });

 /script
 /BODY
 /HTML

 Cheryl Johns
 Yale University


[jQuery] Re: new autosuggestion plug-in. need comments/feedback

2009-10-16 Thread Rick Faircloth

Thanks for letting me know.  I would definitely need ajax support.

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of George
Sent: Friday, October 16, 2009 3:09 PM
To: jQuery (English)
Subject: [jQuery] Re: new autosuggestion plug-in. need comments/feedback


Well, it does not support AJAX yet. the list comes from Javascript
array already in the page.
So responsiveness probably has something to do with it.

I just like the way how it looks. I would actually call it tokenizer
and not the autosuggestion.


George.

On Oct 16, 2:53 pm, Rick Faircloth r...@whitestonemedia.com wrote:
 Very responsive, George!
 I'll definitely take a look at this.  I have been wanting to implement
 autocomplete, but just haven't gotten around to it.

 Thanks for sharing!

 Rick



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

 Behalf Of George
 Sent: Friday, October 16, 2009 11:11 AM
 To: jQuery (English)
 Subject: [jQuery] new autosuggestion plug-in. need comments/feedback

 I have developed the autosuggestion plug-in.
 Looks pretty cool (for me). I actually made is like it's done on
 Facebook. (code is 100% mine).

 Please take a look and leave me comments/feedback.
 Only list of names are working as autosuggestion. Other fields on the
 form are just for example.
 Also you can have more that one name in the input box.

 http://www.tersaakov.com/default.htm- Hide quoted text -

 - Show quoted text -




[jQuery] Re: new autosuggestion plug-in. need comments/feedback

2009-10-16 Thread Rick Faircloth

Thanks...let us know on the list when the ajax is done!

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of George
Sent: Friday, October 16, 2009 3:26 PM
To: jQuery (English)
Subject: [jQuery] Re: new autosuggestion plug-in. need comments/feedback


It's fairly easy to add. I will do that later this week.
I just wanted to iron out all visual/appearance bugs.

So you can check this link next week.

George.


On Oct 16, 3:23 pm, Rick Faircloth r...@whitestonemedia.com wrote:
 Thanks for letting me know.  I would definitely need ajax support.

 Rick



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

 Behalf Of George
 Sent: Friday, October 16, 2009 3:09 PM
 To: jQuery (English)
 Subject: [jQuery] Re: new autosuggestion plug-in. need comments/feedback

 Well, it does not support AJAX yet. the list comes from Javascript
 array already in the page.
 So responsiveness probably has something to do with it.

 I just like the way how it looks. I would actually call it tokenizer
 and not the autosuggestion.

 George.

 On Oct 16, 2:53 pm, Rick Faircloth r...@whitestonemedia.com wrote:
  Very responsive, George!
  I'll definitely take a look at this.  I have been wanting to implement
  autocomplete, but just haven't gotten around to it.

  Thanks for sharing!

  Rick

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

  Behalf Of George
  Sent: Friday, October 16, 2009 11:11 AM
  To: jQuery (English)
  Subject: [jQuery] new autosuggestion plug-in. need comments/feedback

  I have developed the autosuggestion plug-in.
  Looks pretty cool (for me). I actually made is like it's done on
  Facebook. (code is 100% mine).

  Please take a look and leave me comments/feedback.
  Only list of names are working as autosuggestion. Other fields on the
  form are just for example.
  Also you can have more that one name in the input box.

 http://www.tersaakov.com/default.htm-Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -




[jQuery] Re: jQuery UI Tabs - Select Tab?

2009-10-16 Thread Collectonian

Found it! It needs to be:

$('#tabs').tabs().tabs('select', 1); // = 0 with the extra tabs(). :-
D Got it working now! Thanks,

Summer S. Wilson
Collectonian on Yahoo! Messenger ~ Facebook (http://www.facebook.com/
Collectonian)
An Eclectic World  (http://eclectic-world.com) ~ LiveJournal (http://
collectonian.livejournal.com)

On Oct 16, 2:13 pm, Collectonian collecton...@eclectic-world.com
wrote:
 We tried that as well, and still no go.

 On Oct 15, 1:01 pm, MorningZ morni...@gmail.com wrote:

  $(#tabs).tabs(select, idx);



[jQuery] Re: password strength meter

2009-10-16 Thread factoringcompare.com
Anybody got an idea with this one .


On Oct 15, 10:44 am, factoringcompare.com
firstfacto...@googlemail.com wrote:
 Hi,

 I’m using jQuery: form wizard plugin (http://home.aland.net/sundman/)
 with a password strength meter plugin  
 byhttp://www.rvdevsign.net/ressources/javascript/jpassword-plugin-jquer

 The form wizard breakes up a long form into smaller chuncks. Last page
 the user can create an account.

 Both plugins work fine except the password strength which apears in a
 tooltip when the password text box has focus. The tool tip appears at
 the top left of the screen rather than next to the text box. If I
 refresh the page with the segement of the form displaying the password
 text box, then give focus to the text box the tooltip appears and the
 positioning is fine.

 Can you point me in the right direction to fix the issue.

 Code for the password strength meter:

 (function($){
         $.fn.jpassword = function(settings){
                 var jElements                   = this;
                 var settings                    = $.extend({}, 
 $.fn.jpassword.defaults, settings);
                 var template                    = 'div 
 class=jpassworddivp class=jpassword-
 meternbsp;/pp class=jpassword-infonbsp;/p/div/div';

                 return jElements.each(function(){
                         // Manage all inputs type password
                         if($(jElements).is(input)){ jPassword( $(jElements) 
 ); }
                 });

                 // Construct password meter
                 function jPassword(jInput){
                         // Create tooltip
                         var unikId                      = jpassword_ + 
 parseInt(Math.random()*1000);
                         var jTooltip            = $(template).attr(id, 
 unikId);
                         if(settings.flat == false){
                                 // Define position of the tooltip
                                 var pos                 = jInput.offset();
                                 var win                 = getWindow();
                                 var dir                 = right;
                                 var top                 = pos.top;
                                 var left                = (pos.left + 
 jInput.width());
                                 jTooltip.appendTo(document.body);
                                 if((left + jTooltip.width())  (win.left + 
 win.width)){ left -=
 (jTooltip.width() + jInput.width()); dir = left; }
                                 if((top + jTooltip.height())  (win.top + 
 win.height)){ top -=
 (jTooltip.height() - (jInput.height()*1.5)); dir += bottom; }else
 { dir += top; }
                                 jTooltip.css({ left: left + px, top: top + 
 px, display:
 none });
                                 jTooltip.addClass(jpassword- + dir);
                         }else{
                                 // Insert after the input
                                 jTooltip.insertAfter(jInput);
                                 jTooltip.css({ position: relative, display: 
 block });
                                 jTooltip.addClass(jpassword-flat);
                         }
                         // Event handler
                         jInput.bind(keyup, function(e){ verifPsw(jInput, 
 jTooltip); });
                         jInput.bind(focus, function(e){
                                 verifPsw(jInput, jTooltip);
                                 // Show tooltip
                                 if(settings.flat == false){ tooltip(jTooltip, 
 show); }
                                 // Function called when the tooltip is shown
                                 if($.isFunction(settings.onShow)){ 
 settings.onShow(jInput,
 jTooltip); }
                         });
                         jInput.bind(blur, function(e){
                                 // Hide tooltip
                                 if(settings.flat == false){ tooltip(jTooltip, 
 hide); }
                                 // Function called when the tooltip is hided
                                 if($.isFunction(settings.onHide)){ 
 settings.onHide(jInput,
 jTooltip); }
                         });
                         // Generate a new password
                         var jGenerate           = $(# + settings.generate);
                         if(jGenerate){ jGenerate.bind(click, function(e){ 
 jInput.val
 (newPsw()); verifPsw(jInput, jTooltip); return false; }); }
                         // Function called when process is completed
                         if($.isFunction(settings.onComplete)){ 
 settings.onComplete(jInput,
 jTooltip); }
                 }

                 // Verified password and update the tolerance meter
                 function verifPsw(jInput, jTooltip){
                         var val                         = jInput.val();
                         var meter                       = 
 jTooltip.find(.jpassword-meter);
                

[jQuery] [validate] How to skip validation on fields which are hidden

2009-10-16 Thread buntu

Hi,

I've an input field in the form which is displayed based on the user
selection. Initially it is set to 'display:none' and I do have a
validation rule for that field.

How do I skip validation on this hidden input field and only validate
when its displayed on the page.

Thanks for the help!


[jQuery] Re: How to skip validation on fields which are hidden

2009-10-16 Thread James

I would think something similar to this (untested):

myFieldName: {
required: function() {
return !$(this).is(':hidden');
}
}

Not sure if $(this) actually references the field. Might want to test
that out.

On Oct 16, 10:18 am, buntu buntu.w...@gmail.com wrote:
 Hi,

 I've an input field in the form which is displayed based on the user
 selection. Initially it is set to 'display:none' and I do have a
 validation rule for that field.

 How do I skip validation on this hidden input field and only validate
 when its displayed on the page.

 Thanks for the help!


[jQuery] Re: $(document).ready firing before Google Maps scripts are fully loaded

2009-10-16 Thread George V. Reilly

Over in http://groups.google.com/group/google-maps-api/, I got a
suggestion that seems to work consistently: use Google's Ajax loader
to load the Maps API code asynchronously.

script type=text/javascript src=http://www.google.com/jsapi?
key=MY_API_KEY/script
script type=text/javascript
google.load('maps', 2.x, {other_params:sensor=false});
google.setOnLoadCallback(function() { /* My initialization
code */ });
/script

/George


[jQuery] Re: jquery preload images

2009-10-16 Thread kknaru

thanks for your help, that is a very good article


[jQuery] Re: Problems with load() in IIS?

2009-10-16 Thread Scogle

To be honest, I'm not entirely sure what's going on here.  I'm trying
to figure out someone else's code, so I'm just going on a hunch about
what the problem might be.  I have some data stored in an html file
that represents locations on a map.  When the script tries to load the
file, I get a 405 method not alowed message for the POST, but the GET
is allowed.

-
Scott

On Oct 15, 3:23 pm, James james.gp@gmail.com wrote:
 I think that by default inIIS, .html filetypes will not accept POSTs.
 load() in jQuery is GET by default but if you put something in the
 data parameter, it will a be converted to a POST. Do you think that's
 what's happening?
 Unless your .html file has be configured to do server-side processing,
 I don't think it's necessary to POST data to a .html file.

 On Oct 15, 10:55 am, Scogle scotto...@gmail.com wrote:

  Thanks, I'll look into that.  I had a feeling that it was a setup
  issue, but I wasn't really sure yet.  I'm just trying to load() an
  html file, which is why this issue seems so strange.

  On Oct 12, 7:45 pm, James james.gp@gmail.com wrote:

   Sorry, I meant VERB, not VERY:

   GET (and maybe POST) VERB

   On Oct 12, 3:42 pm, James james.gp@gmail.com wrote:

It sounds like a server setup issue. What is the file type/extension
of the file that you're trying to load()? You have to set up the
server so that the GET (and maybe POST) VERY is allowed for that file
type.

On Oct 12, 12:53 pm, Scogle scotto...@gmail.com wrote:

 I'm working on a project that uses the load() function to grab data
 from external files, but I keep getting a 405 Method Not Allowed
 error and the data won't load.  I'm wondering if this is a problem
 with the server or if it's a sloppy mistake on my part.  Any help
 would be greatly appreciated.

 Thanks,
 Scott


[jQuery] Add value to Link. How can I do this?

2009-10-16 Thread shapper

Hello,

I have the following anchor:
a href=http://www.example.com/files/map.pdf; onClick=javascript:
pageTracker._trackPageview('/downloads/map'); 

How can I add

onClick=javascript: pageTracker._trackPageview('/downloads/
map');

To all anchors of CSS class Download using JQuery?

Thanks,
Miguel



[jQuery] Re: Add value to Link. How can I do this?

2009-10-16 Thread James

$(.Download).click(function() {
pageTracker._trackPageview('/downloads/map');
});

On Oct 16, 11:51 am, shapper mdmo...@gmail.com wrote:
 Hello,

 I have the following anchor:
 a href=http://www.example.com/files/map.pdf; onClick=javascript:
 pageTracker._trackPageview('/downloads/map'); 

 How can I add

     onClick=javascript: pageTracker._trackPageview('/downloads/
 map');

 To all anchors of CSS class Download using JQuery?

 Thanks,
 Miguel


[jQuery] Re: show/hide with embed

2009-10-16 Thread ngreenwood6

I tried adding in return false at the end of my function, however that
did not fix the issue. Any other suggestions?

On Oct 16, 8:37 am, rupak mandal rupakn...@gmail.com wrote:
 if the problem is reload then add return false at the end or the function

 On Fri, Oct 16, 2009 at 6:02 PM, ngreenwood6 ngreenwo...@gmail.com wrote:

  I tried doing  that as well and it still does the same thing. It must
  be changing the display that makes it reload. To test all you have to
  do is create a div with embed code and call show/hide on it and you
  will see.

  On Oct 16, 3:02 am, Evgeny Bobovik bobo...@gmail.com wrote:
   Try to use this method:
   script type=text/javascript
   function showEmbed(){
       if($(#test).css('display') == 'block'){
            $(#test).css('display','none');
       } else {
            $(#test).css('display', 'block');
      }}

   /script
      Gk___

   2009/10/16 ngreenwood6 ngreenwo...@gmail.com:


[jQuery] Re: Best way to construct DOM objects

2009-10-16 Thread Frederic Laruelle
Tks Dave and Karl, it helped!

Fred~


On Thu, Oct 15, 2009 at 7:05 PM, Dave Methvin dave.meth...@gmail.comwrote:


 There are a lot of ways to accomplish this. Karl's post demonstrated
 one way to create larger fragments directly with jQuery. In addition
 to .append() you can look at using the .wrap() methods.

 Mike Geary may come by and give you a pointer to his DOM creation
 methods, which I used on several projects:
 http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype

 Lately I have been putting template fragments in the original html
 file (with display:none of course) then cloning/modifying them and
 putting them back into the document.
 



[jQuery] How to obtain Object (key) names?

2009-10-16 Thread Frederic Laruelle

Hi,

I;m looking for a way to obtain key names from a JSON object:
eg
options: [
{Option1 : [Value1, Value2]},
{Option2 : [Value3, Value4]},
{Option3 : [Value5, Value6]}
]

so, i'd like to consume this JSON in a way similar to this:
$.each(JSON.options., function(i, option) {
if (option.name == Option1) {
   // do something
   }
});

Prototype seems to have a keys method which would achieve what i'm
looking for.
There are also a few pages which attempt to address the issue with
JQuery, such as: http://snipplr.com/view/10430/jquery-object-keys/
However i was only able to retrieve the numerical index of the array
elements using these methods (vs their name).

Any help appreciated.

Tks!

Fred~


[jQuery] Re: Add value to Link. How can I do this?

2009-10-16 Thread Jason

$(.Download).each(function(){
$(this).attr('onClick', javascript: pageTracker._trackPageview('/
downloads/map'););
});

On Oct 16, 5:51 pm, shapper mdmo...@gmail.com wrote:
 Hello,

 I have the following anchor:
 a href=http://www.example.com/files/map.pdf; onClick=javascript:
 pageTracker._trackPageview('/downloads/map'); 

 How can I add

     onClick=javascript: pageTracker._trackPageview('/downloads/
 map');

 To all anchors of CSS class Download using JQuery?

 Thanks,
 Miguel


[jQuery] Index, .load issues

2009-10-16 Thread Jason

Hi Gang,

I've been wasting time trying to figure this out to no avail.  Here's
my function:

//Toggle
$(#type_new).hide();
toggle = function(){
$(a.toggle).unbind('click').click(function(){
var aIndex = $(a#type).index(this);
if($(#type_new:eq(+aIndex+)).is(':visible')==true) $(a#type
small:eq(+aIndex+)).html(Add New Type); else $(a#type small:eq
(+aIndex+)).html(Choose From Exisiting Types);
$(#type:input:eq(+aIndex+)).toggle();
$(#type_new:eq(+aIndex+)).toggle().val();
});
}; toggle();

//Add Contact
$(.addItem).click(function(){
$(#addContact).load(ajax/addContact.php, '', function(){
$.thisIndex = $(tbody).index(this);
$(this).find(#type_new).hide();
$(this).attr(id, newContact + 
$(tbody).index(this)).addClass
(highlight).after('tbody id=addContact/tbody');
$(tbody:not('#newContact+$.thisIndex+')).removeClass
(highlight);
toggle();
})
});

It's a toggle between a select box and a text input for users to
select from the list or create a new type. When I load a new section
into the table it then has another (new) type select and input.  On
the newly created set the index comes up at 1 (rather than zero) but
that's when I get stuck.  The Text changes in the small tag to
Choose from existing types but the inputs don't toggle.

Here's what my HTML looks like. Imagine two of these after the load
event:

tr
thType of Organization/th
td
select name=type id=type
optionChurch/option
optionCollege/option
optionTheatre/option
/select
input name=type_new id=type_new type=text /

/td
/tr
tr
thnbsp;/th
tda class=toggle id=typesmallAdd New Type/small/a/
td
/tr

Any thoughts or suggestions would help immensely.


[jQuery] How to change method of revealing div content when using slide?

2009-10-16 Thread sharq

Hi.
I have hidden div, that i want to show by sliding it in from top
border.
The problem is that i don't know how to make it slide in instead of
wipe in.
I want it all to move with it's content instead of showing more and
more of it.
Regards


[jQuery] Re: Block access to the page but unblock certains divs

2009-10-16 Thread rtelep

Expose:

http://flowplayer.org/tools/demos/expose/index.html


[jQuery] safari flashes hidden text from hide()

2009-10-16 Thread derek allard

Hello.  I'm relatively new to jQuery and wrote a simple script that
hides a block of text and displays a read more link that when clicked
shows the hidden text.  Everything works fine except in Safari where
the hidden text is initially displayed for a second or so before being
hidden.  I did some research and I did run into a few posts about
similar Safari bugs but no resolution has worked for me yet.

Here is the page:
https://216.25.8.35/

And here is the js code:
https://216.25.8.35/gsuniverse/templates/javascripts/readmore.js

Is there a quick fix I can add in to resolve this?  Any advice greatly
appreciated.

Thank you.

derek


[jQuery] Re: How to change method of revealing div content when using slide?

2009-10-16 Thread Charlie





give the div absolute position that is above the page ( something like
.top:-1000px), then use 
var pixelsFromTop= 100;
var displayTime=1000;
$("#yourdiv").animate({"top": pixelsFromTop},displayTime)

if you are using jQueryUI already in page can also do this with
$switchClass which can use a time to act just like animation and all
your settings are then in css file

sharq wrote:

  Hi.
I have hidden div, that i want to show by sliding it in from top
border.
The problem is that i don't know how to make it "slide in" instead of
"wipe in".
I want it all to move with it's content instead of showing more and
more of it.
Regards

  






[jQuery] Re: Index, .load issues

2009-10-16 Thread Charlie





this line threw me for a loop. var aIndex =
$("a#type").index(this);

reason: ID's have to be unique so indexing $("a#type") can only
return 0 as there can only be one of them

therein lies a big part of your problem, your select and a tag use same
ID

didn't look a lot further but is always good practice to use var for
something like var toggle= function (){.

would also take the "" out of the eq() as it requires an integer
..eq(aIndex) will work fine assuming all other issues correct
Jason wrote:

  Hi Gang,

I've been wasting time trying to figure this out to no avail.  Here's
my function:

//Toggle
$("#type_new").hide();
toggle = function(){
	$("a.toggle").unbind('click').click(function(){
		var aIndex = $("a#type").index(this);
		if($("#type_new:eq("+aIndex+")").is(':visible')==true) $("a#type
small:eq("+aIndex+")").html("Add New Type"); else $("a#type small:eq
("+aIndex+")").html("Choose From Exisiting Types");
		$("#type:input:eq("+aIndex+")").toggle();
		$("#type_new:eq("+aIndex+")").toggle().val("");
	});
}; toggle();

//Add Contact
$(".addItem").click(function(){
$("#addContact").load("ajax/addContact.php", '', function(){
		$.thisIndex = $("tbody").index(this);
		$(this).find("#type_new").hide();
		$(this).attr("id", "newContact" + $("tbody").index(this)).addClass
("highlight").after('tbody id="addContact"/tbody');
		$("tbody:not('#newContact"+$.thisIndex+"')").removeClass
("highlight");
		toggle();
	})
});

It's a toggle between a select box and a text input for users to
select from the list or create a new type. When I load a new section
into the table it then has another (new) type select and input.  On
the newly created set the index comes up at 1 (rather than zero) but
that's when I get stuck.  The Text changes in the small tag to
"Choose from existing types" but the inputs don't toggle.

Here's what my HTML looks like. Imagine two of these after the load
event:

tr
thType of Organization/th
td
select name="type" id="type"
optionChurch/option
optionCollege/option
optionTheatre/option
/select
input name="type_new" id="type_new" type="text" /
  
  /td
/tr
tr
thnbsp;/th
tda class="toggle" id="type"smallAdd New Type/small/a/
td
/tr

Any thoughts or suggestions would help immensely.

  






[jQuery] Re: Using values.jquery to switch values of fields

2009-10-16 Thread Nathan Bubna

you could even make it a mini-plugin:

;(function($) {
   $.fn.valueswap = function(selection, opts) {
var hold = $(selection).values(opts),


On Fri, Oct 16, 2009 at 2:16 PM, johnHoysa johnho...@gmail.com wrote:

 Figured it out, only tested on FF.

 $('.toleft').click(function() {
                var values2 = $('.left').values(values2);
                var values = $(this).parents('div.box').values();
        var $right = $('.right').values(values2);
        var $left = $('.left').values(values);
        return false;
    });

        $('.toright').click(function() {
                var values2 = $('.right').values(values2);
                var values = $(this).parents('div.box').values();
        var $left = $('.left').values(values2);
        var $right = $('.right').values(values);
    });


 On Oct 16, 2:30 pm, johnHoysa johnho...@gmail.com wrote:
 Looking at the example for the values.jquery plugin I would think that
 I would not only be able to copy values from one id to an other but
 that I would also be able to switch the values as well.

 Here is the working example 
 -http://jquery-values.googlecode.com/svn/trunk/jquery.values.htm

 Looking at the above example what I would like to do is take the value
 from id:left and switch it with the value from id:right.
 So that would give me this ordering id:right   id:middle   id:left.

 Is this possible? And if so how!

 appreciate your help!

 John


[jQuery] Re: Using values.jquery to switch values of fields

2009-10-16 Thread Nathan Bubna

oops.  hit send too early:

;(function($) {
$.fn.valueswap = function(selection, opts) {
var $right = $(selection)
r = $right.values(opts),
l = this.values(opts);
$right.values(l, opts);
this.values(r, opts);
return this;
};
})(jQuery);

FYI, i haven't tested this code.

On Fri, Oct 16, 2009 at 7:04 PM, Nathan Bubna nbu...@gmail.com wrote:
 you could even make it a mini-plugin:

 ;(function($) {
   $.fn.valueswap = function(selection, opts) {
        var hold = $(selection).values(opts),


 On Fri, Oct 16, 2009 at 2:16 PM, johnHoysa johnho...@gmail.com wrote:

 Figured it out, only tested on FF.

 $('.toleft').click(function() {
                var values2 = $('.left').values(values2);
                var values = $(this).parents('div.box').values();
        var $right = $('.right').values(values2);
        var $left = $('.left').values(values);
        return false;
    });

        $('.toright').click(function() {
                var values2 = $('.right').values(values2);
                var values = $(this).parents('div.box').values();
        var $left = $('.left').values(values2);
        var $right = $('.right').values(values);
    });


 On Oct 16, 2:30 pm, johnHoysa johnho...@gmail.com wrote:
 Looking at the example for the values.jquery plugin I would think that
 I would not only be able to copy values from one id to an other but
 that I would also be able to switch the values as well.

 Here is the working example 
 -http://jquery-values.googlecode.com/svn/trunk/jquery.values.htm

 Looking at the above example what I would like to do is take the value
 from id:left and switch it with the value from id:right.
 So that would give me this ordering id:right   id:middle   id:left.

 Is this possible? And if so how!

 appreciate your help!

 John



[jQuery] Re: safari flashes hidden text from hide()

2009-10-16 Thread Karl Swedberg

This has served me well:

http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content



--Karl


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




On Oct 16, 2009, at 4:53 PM, derek allard wrote:



Hello.  I'm relatively new to jQuery and wrote a simple script that
hides a block of text and displays a read more link that when clicked
shows the hidden text.  Everything works fine except in Safari where
the hidden text is initially displayed for a second or so before being
hidden.  I did some research and I did run into a few posts about
similar Safari bugs but no resolution has worked for me yet.

Here is the page:
https://216.25.8.35/

And here is the js code:
https://216.25.8.35/gsuniverse/templates/javascripts/readmore.js

Is there a quick fix I can add in to resolve this?  Any advice greatly
appreciated.

Thank you.

derek