[jQuery] Re: jQuery .ready() being treated as both Filo/Fifo in IE/FF

2008-12-12 Thread evan

When you use more than one libraries with jquery which use $ sign for
selection of code block,
 use following scripts.
   jQuery.noConflict();
   // instead of $ use jQuery as
  jQuery(document).ready(
  function(){
   });

 This will remove the conflict between different libraries.

  I think, no need to set the order for libraries to load.


[jQuery] Re: problem using jquery and prototype together

2008-12-12 Thread evan

// here i selected two same ids using jquery and prototype
respectively.
script type=javascript
  jQuery.noConflict();
 // for jqury selectors use jQuery instead of '$ like
 jQuery(document).ready( function(){
 jQuery(id).css('color:red');
 ...
} );'
   // then here you can write the prototype script using '$' as
selector.
function myFun(){
 $('id').setStyle({color:red;})
 }
/script

You can replace $ with any other variable by indicating such before
starting the script as
var $v =jQuery.noConflict();

$v(document).ready( fun );


[jQuery] Re: SWF chart problem

2008-12-12 Thread ggerri

Hi Sumpa

dont really get your coding, but maybe I got your problem right ;-)
this one would work for me:


!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
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleUntitled Document/title
script type=text/javascript src=jquery.js/script
script type=text/javascript
  $(function() {
 test('#abc');
  });
  function test(myID) {
alert($(myID).text());

  }

/script
/head

body
div id=abcbla bla bla/div
/body
/html


Hope that helps.
ggerri


On Dec 10, 11:08 pm, sumpa w.kel...@krenstetten.com wrote:
 please someone can help me about that ?

 On 10 Dez., 15:26, sumpa w.kel...@krenstetten.com wrote:



   function updateChart(xml,oid){
        //var chart=document.my_chart;   is working
        var chart1=$(oid);    / is not wokring . how to get the
  object properly
                                     /// document.all[oid] istt working
  also in ff3 

        spinning_wheel = true;
        mode = reset;
        chart1.Update_XML( xml, spinning_wheel, mode );
     }

  need help plz :-)- Hide quoted text -

 - Show quoted text -


[jQuery] Move items between lists

2008-12-12 Thread frits1607

Hello,

I am looking for a UI element to move elements between lists, e.g. one
list with all options, and a second list with options selected. An
example of what I mean can be seen here:
http://www.devx.com/getHelpOn/10MinuteSolution/16372/1954

Does jQuery provide functionality like this? If not, does someone know
a good starting point?

Thank you!


[jQuery] Re: problem using jquery and prototype together

2008-12-12 Thread Amardeep
thanks .. this is very helpful indeed

On Fri, Dec 12, 2008 at 2:10 PM, evan umeshpati...@gmail.com wrote:


 // here i selected two same ids using jquery and prototype
 respectively.
 script type=javascript
  jQuery.noConflict();
 // for jqury selectors use jQuery instead of '$ like
 jQuery(document).ready( function(){
 jQuery(id).css('color:red');
 ...
} );'
   // then here you can write the prototype script using '$' as
 selector.
function myFun(){
 $('id').setStyle({color:red;})
 }
 /script

 You can replace $ with any other variable by indicating such before
 starting the script as
var $v =jQuery.noConflict();

$v(document).ready( fun );




-- 
Amardeep Sarkar


[jQuery] Re: Problems with Validate's errorPlacement

2008-12-12 Thread knal

Don't know how, but apparently somehow the system got kind of excited
posting my message...

Anyway Jörn, thanks, i'm getting the message in the right place now,
*but* for some reason it also
adds a break ( br / )  or something before the text, and that breaks
my layout. Is there any way to fix this?

Thanks, Knal

On Dec 11, 11:06 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Try this:

      errorPlacement: function(error, element) {
            error.appendTo(element.prev());
        }

 Jörn

 On Thu, Dec 11, 2008 at 3:30 PM, knal knalp...@gmail.com wrote:

  Hi there,

  I'm using Validate on my website, but i'm having difficulties with the
  errorPlacement.

  In simple a part of my form looks like this:

         label for=emailE-mail/labeldiv class=warn*/div
         input type=text name=email id=email /

  Validation works fine, but i can't get the message to display inside
  'div class=warn*/div'.

  The following places the text immediatly before the element:

         errorPlacement: function(error, element) {
             error.insertBefore(element);
         }

  Any help would be greatly appreciated.

  Greetings Knal.


[jQuery] Re: Problems with Validate's errorPlacement

2008-12-12 Thread Jörn Zaefferer
The label is probably set to display:block. You could overrid that
with display:inline !important

Jörn

On Fri, Dec 12, 2008 at 10:23 AM, knal knalp...@gmail.com wrote:

 Don't know how, but apparently somehow the system got kind of excited
 posting my message...

 Anyway Jörn, thanks, i'm getting the message in the right place now,
 *but* for some reason it also
 adds a break ( br / )  or something before the text, and that breaks
 my layout. Is there any way to fix this?

 Thanks, Knal

 On Dec 11, 11:06 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:
 Try this:

  errorPlacement: function(error, element) {
error.appendTo(element.prev());
}

 Jörn

 On Thu, Dec 11, 2008 at 3:30 PM, knal knalp...@gmail.com wrote:

  Hi there,

  I'm using Validate on my website, but i'm having difficulties with the
  errorPlacement.

  In simple a part of my form looks like this:

 label for=emailE-mail/labeldiv class=warn*/div
 input type=text name=email id=email /

  Validation works fine, but i can't get the message to display inside
  'div class=warn*/div'.

  The following places the text immediatly before the element:

 errorPlacement: function(error, element) {
 error.insertBefore(element);
 }

  Any help would be greatly appreciated.

  Greetings Knal.


[jQuery] Re: Problems with Validate's errorPlacement

2008-12-12 Thread knal

That's not the case, could it have something to do with the
errorElement ?

On Dec 12, 10:46 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 The label is probably set to display:block. You could overrid that
 with display:inline !important

 Jörn

 On Fri, Dec 12, 2008 at 10:23 AM, knal knalp...@gmail.com wrote:

  Don't know how, but apparently somehow the system got kind of excited
  posting my message...

  Anyway Jörn, thanks, i'm getting the message in the right place now,
  *but* for some reason it also
  adds a break ( br / )  or something before the text, and that breaks
  my layout. Is there any way to fix this?

  Thanks, Knal

  On Dec 11, 11:06 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
  wrote:
  Try this:

       errorPlacement: function(error, element) {
             error.appendTo(element.prev());
         }

  Jörn

  On Thu, Dec 11, 2008 at 3:30 PM, knal knalp...@gmail.com wrote:

   Hi there,

   I'm using Validate on my website, but i'm having difficulties with the
   errorPlacement.

   In simple a part of my form looks like this:

          label for=emailE-mail/labeldiv class=warn*/div
          input type=text name=email id=email /

   Validation works fine, but i can't get the message to display inside
   'div class=warn*/div'.

   The following places the text immediatly before the element:

          errorPlacement: function(error, element) {
              error.insertBefore(element);
          }

   Any help would be greatly appreciated.

   Greetings Knal.


[jQuery] Intercept and Append Param to All Ajax Requests

2008-12-12 Thread James Hughes

Hi,
 
This has me confused.  I want to intercept ALL ajax requests on a page and 
before sending the request append another parameter to the request.  So far 
this is what I have 
 
$.ajaxSetup({
beforeSend : function(xhr, opts){
this.data = $.extend({_kdfrequest:action}, this.data );
}
});  
 
$.ajax({
type:GET,
data:initial.params,
url:initial.url
}); 
 
This does everything except actually append the extra parameter.  Am I doing 
something wrong?
 
James


This e-mail is intended solely for the addressee and is strictly confidential; 
if you are not the addressee please destroy the message and all copies. Any 
opinion or information contained in this email or its attachments that does not 
relate to the business of Kainos 
is personal to the sender and is not given by or endorsed by Kainos. Kainos is 
the trading name of Kainos Software Limited, registered in Northern Ireland 
under company number: NI19370, having its registered offices at: Kainos House, 
4-6 Upper Crescent, Belfast, BT7 1NT, 
Northern Ireland. Registered in the UK for VAT under number: 454598802 and 
registered in Ireland for VAT under number: 9950340E. This email has been 
scanned for all known viruses by MessageLabs but is not guaranteed to be virus 
free; further terms and conditions may be 
found on our website - www.kainos.com 




[jQuery] Re: Intercept and Append Param to All Ajax Requests

2008-12-12 Thread knal

Not completely sure why the thread is merged with James', but anyway,
adding

 errorElement: span,

seemed to solve the problem!

Thanks for the help,
Knal.

On Dec 12, 11:11 am, James Hughes j.hug...@kainos.com wrote:
 Hi,

 This has me confused.  I want to intercept ALL ajax requests on a page and 
 before sending the request append another parameter to the request.  So far 
 this is what I have

     $.ajaxSetup({
         beforeSend : function(xhr, opts){
             this.data = $.extend({_kdfrequest:action}, this.data );
         }
     });  

             $.ajax({
                 type:GET,
                 data:initial.params,
                 url:initial.url
             });

 This does everything except actually append the extra parameter.  Am I doing 
 something wrong?

 James

 
 This e-mail is intended solely for the addressee and is strictly 
 confidential; if you are not the addressee please destroy the message and all 
 copies. Any opinion or information contained in this email or its attachments 
 that does not relate to the business of Kainos
 is personal to the sender and is not given by or endorsed by Kainos. Kainos 
 is the trading name of Kainos Software Limited, registered in Northern 
 Ireland under company number: NI19370, having its registered offices at: 
 Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT,
 Northern Ireland. Registered in the UK for VAT under number: 454598802 and 
 registered in Ireland for VAT under number: 9950340E. This email has been 
 scanned for all known viruses by MessageLabs but is not guaranteed to be 
 virus free; further terms and conditions may be
 found on our website -www.kainos.com


[jQuery] How to avoid the required on a credit card field using validate extension? [validate]

2008-12-12 Thread ekilater

Hi all,

I've a form that validates using jQuery.

In that form we use a small credit card validation with an extension
that you can find here: 
http://www.ihwy.com/Labs/jquery-validate-credit-card-extension.aspx
// Is only a small tweek of creditcard method.

We want only some fields required, and that's no problem, adding the
rules properly in the JS or with the class.. but, we DON'T want the
field creditcard required.. and it's not possible to avoid this. We
haven't put the required rule, but we think that's an innherit
property of the class?

That's the form:

http://hotelantibes.net/en/reservas/

If you hit the send button, required fields will be marked.. and de
creditcard wouldnt be marked as well we don't want it required.

Some idea to avoid this?

Thanks in advance,

Iván


[jQuery] Selectors

2008-12-12 Thread mangaru

Hi all,

I was using jQuery as usual, but i found someting unusual...

Is there any bug with selector :last?

For me the selector #div_id div:last div:last or #div_id div:last
div:last div:last isn't getting the div... but if i do a while and
get the .children( 'div:last' ) it works perfectly!

Some wild guesses?


[jQuery] serializeArray() problem

2008-12-12 Thread bdaniel7

Hello,

I quote from docs.jquery.com:

serializeArray(): Serializes all forms and form elements
 (like the .serialize() method) but returns a JSON data structure for
you to work with.

I'm trying to use this method to serialize a form to a JSON string,
however is not working.
Instead of: {'Name':'yuiy','hdnValue':'ringo'}
 it creates a querystring: txtName=yuiyhdnValue=ringo

If i set processData : false, then i get an error on line 27 of
jquery.min.js:
s.data.match is not a function
jQuery.readyList.push(function()
{return url,s.async,s.username,s.password);else

I'm using jQuery 1.2.6.



[jQuery] Opacity for a menu background, but not for the element inside

2008-12-12 Thread Cyril G

Hye,

I would like to create a menu, with a 80% opacity background, but I
want to keep the link element at 100% opacity.

For example :
lia href=link.htmllorem ipsum/a/li
I would like to have the li element at 80%, but the a element at
100% (or 120%).

I know that I could use PNG, but it would be great if I could do this
with just a CSS Color and jQuery. Is there any solution ?


[jQuery] [jCarousel] resizing slow with a fluid height

2008-12-12 Thread Jonathan

Hey,
I'm using the jCarousel to fill a page vertically, while the remains
fixed. In order to do this I wrote a function that gets the height of
the browser window and then sets the height of the carousel to the
browser.

var getHeight;
function setCarouselHeight() {
getHeight = 0;
if ($.browser.opera){
getHeight = window.innerHeight;
}else{
getHeight = $(window).height();
}
getHeight = getHeight - 37; //extra padding for carousel buttons/
chrome
$(.jcarousel-container-vertical).height(getHeight);
$(.jcarousel-clip-vertical).height(getHeight);
}

I then call this function on init and reload:

$(document).ready(function() {
$(#smartbar).jcarousel({
vertical: true,
scroll: 1,
initCallback: setCarouselHeight,
reloadCallback: setCarouselHeight
});
});

The problem I'm facing is that when loading or resizing the smartbar
takes 3-4 seconds to load.

I've got an example set up here: http://resourceserver.org/jcarousel/

I've narrowed it down to a height:auto issue with .jcarousel-item but
I'm not sure. Would really appreciate any help.


[jQuery] Re: change input[type=button] value

2008-12-12 Thread Richard D. Worth
1) At least you included some information in your follow-up post instead of
just Nevermind. It's working :)

2) Don't forget you can use .val(newValue) instead of .attr(value,
newValue)

- Richard

On Fri, Dec 12, 2008 at 12:43 AM, brian bally.z...@gmail.com wrote:


 On Fri, Dec 12, 2008 at 12:36 AM, brian bally.z...@gmail.com wrote:
  Lots of false-positives googling this.
 
  input type=button id=a_button value=foo /
 
  $('#a_button').attr('value', 'bar');
 
  Doesn't work? Or, am i losing my mind?
 

 2 rules of programers' email lists (in no particular order):

 1) the longer you futz about trying to make something work, the sooner
 you'll realise your dumb error just after posting a cry for help.

 2) Always, Always, ALWAYS try your own simplified code before posting.

 Sorry, I was using variables inside of a terniary block and I just
 realised I had them backward, so the text was being changed to ... the
 same thing.

 No wonder google wasn't giving me anything.



[jQuery] Re: Selector difficulty/removeClass

2008-12-12 Thread Richard D. Worth
One more

$('#quiz label').removeClass('qyes');

- Richard

On Fri, Dec 12, 2008 at 6:55 AM, Richard D. Worth rdwo...@gmail.com wrote:

 I like the syntax Brian suggested a lot. Here's another one, that is handy
 if you already have done a $('#quiz'):

 $('#quiz').find('label').removeClass('qyes');

 - Richard


 On Thu, Dec 11, 2008 at 11:32 PM, brian bally.z...@gmail.com wrote:


 ~ahem~ sorry 'bout that.

 $('label', '#quiz').removeClass('qyes');

 On Thu, Dec 11, 2008 at 11:31 PM, brian bally.z...@gmail.com wrote:
  $('#quiz')
 
  On Thu, Dec 11, 2008 at 11:25 PM, Bruce MacKay b.mac...@massey.ac.nz
 wrote:
 
  Hello folks,
 
  I want to remove a css class (.qyes) from every label element inside a
  single div (id=quiz).
 
  Each label element has an ID of the form fb*** where *** represents a
  unique identifier (that is not in numerical sequence and is not related
 to
  the label element's position or order in the div in any way).
 
  Can someone help me with the necessary selectors to identify the label
  elements in the div (so as to invoke a .removeClass) - I'm completely
  stumped.
 
 
  Thanks,
 
  Bruce
 
 
 
 





[jQuery] Re: Move items between lists

2008-12-12 Thread Richard D. Worth
Take a look at

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

- Richard

On Fri, Dec 12, 2008 at 4:03 AM, frits1607 v...@vulkor.net wrote:


 Hello,

 I am looking for a UI element to move elements between lists, e.g. one
 list with all options, and a second list with options selected. An
 example of what I mean can be seen here:
 http://www.devx.com/getHelpOn/10MinuteSolution/16372/1954

 Does jQuery provide functionality like this? If not, does someone know
 a good starting point?

 Thank you!


[jQuery] Re: jQuery.uploader released: Flash based jQuery uploader

2008-12-12 Thread Gilles (Webunity)

Hi Guys,

Sorry for the late update. Although everybody is using it (since i got
20mb of uploaded files) almost nobody is telling thanx, but that's
oke, i expected that.

I got some time to fix some issues and answer some questions:


 1.  multiple: false through settings while building
 the uploader does not work. setMultiple(false) does the job.

You should pass multiple as a string. 1 turns it on, the rest
should turn it off, can you recheck?


 2. I can't get the plugin to properly talk to my webserver. The
 backend script gets invoked but the plugin immediately returns upload
 cancelled state without waiting for the backend script to end. I have
 tested with a very simple backend script that does nothing but
 returning some data. (might be related to my kind of server 4DWeb
 server with Active4D ?)

Can't help you on that one, are you behind a proxy? Flash still
doesn't like that..


 3. when sending data to the server with the object what format does
 the object use ? Is it a serialization of the data in the form of
 [{field: fieldName, value: fieldData}, ...] or in the form of
 {fieldName: fieldData, ...}. Having not got to that stage yet, I
 have not figured out so I am asking.

Actualy i can't help you on that one, as far as i know it are all
basic objects. Also the request is constructed using basic Flash
methods, so it should not pose any problems. I have put up the php
source file so you can see how i handle the files.


 Move to Flash Player 10 just to see if it would change something.
 No changes.
 Firefox 3 crashes.
 It seems that the plugin does not handle properly the 404 return code
 from the server.
 Will try on Windows with firefox and IE7 and 8.

Here on windows with Firefox 2 and 3.04 all works fine. Also IE6 and 7
work flaweless... Maybe a proxy? Also, make sure you use the logging
functions, it could help you.


[jQuery] Re: Cannot remove element that was added via .load()

2008-12-12 Thread Richard D. Worth
Your .load('drawer.html') call is asynchronous, meaning while it's off
fetching the page, your chain keeps right on going. It doesn't find an
a#close inside #drawer (since the page hasn't come back/loaded yet).
Fortunately, you can provide a callback function to .load() that will be
executed as soon as the page comes in. Something like this (untested):

$('#drawer').load('drawer.html', function() {
  var drawer = $(this);
  $('a#close', drawer).click(function() {
drawer.hide();
  });
});

- Richard

On Thu, Dec 11, 2008 at 11:33 PM, RayBaker raymondbake...@yahoo.com wrote:


 I can't seem to get this snippet I loaded with .load to go away once
 loaded.  Any ideas?


 Here's the function
  $('a.drawer').click(function() {
 $('#drawer').show();
 $('#drawer').load('drawer.html').find('a#close').click(function(){
$('#drawer').hide();
 });
  });


 Drawer.html has an anchor with an ID of close.

 Its nested in a div called #outter.

  div id=outtera id=closeimg src=images/close.gif width=55
 height=17 border=0 //a/div



[jQuery] Re: How to avoid the required on a credit card field using validate extension? [validate]

2008-12-12 Thread Jörn Zaefferer
Take a look at the original creditcard method, or any other. They all
start with a call to this.optional, and return true when that call
returns true.

Jörn

On Fri, Dec 12, 2008 at 10:03 AM, ekilater ivan.tho...@gmail.com wrote:

 Hi all,

 I've a form that validates using jQuery.

 In that form we use a small credit card validation with an extension
 that you can find here: 
 http://www.ihwy.com/Labs/jquery-validate-credit-card-extension.aspx
 // Is only a small tweek of creditcard method.

 We want only some fields required, and that's no problem, adding the
 rules properly in the JS or with the class.. but, we DON'T want the
 field creditcard required.. and it's not possible to avoid this. We
 haven't put the required rule, but we think that's an innherit
 property of the class?

 That's the form:

 http://hotelantibes.net/en/reservas/

 If you hit the send button, required fields will be marked.. and de
 creditcard wouldnt be marked as well we don't want it required.

 Some idea to avoid this?

 Thanks in advance,

 Iván



[jQuery] Re: jQuery.uploader released: Flash based jQuery uploader

2008-12-12 Thread Gilles (Webunity)

Sample backend:
http://jQuery.webunity.nl/jQuery.uploader/js/sample_backend.phps


[jQuery] Re: Styling the 2nd table tag above a row

2008-12-12 Thread Paul Mills

Guy,

A - I understand.

I think you can make your code a bit simpler and not use the .each
(function(). It depends on rest of the HTML whether it works or not.
Something like this:

$('tr.myclass').parents('table').parents('table').css(border, 4px
black solid);

Rgds Paul

On Dec 11, 9:04 pm, Guy g...@epicsky.com wrote:
 OK,

 Figured it out and am posting this for anyone who may have this
 question later on.

 Here's what I used:

 $(tr.myClass).each(function() {
   $(this).parents(table).slice(1,2).css(border, 4px black
 solid);

 });

 Hope that is helpful to others.

 Guy

 On Dec 11, 12:13 pm, Guy g...@epicsky.com wrote:

  Hi,

  I'm having a dilemma where I need to style the table which encloses a
  table with a row which has a style attached to it.

  The source looks like this.

  table
  tbody
  tr
  td
  table
  tbody
  tr class=myClass
  etc.

  I want to be able to directly access the first table tag to style the
  entire table with a border. Is there an easy way to do this in jQuery?

  Thanks,

  Guy Davis


[jQuery] serialScroll Plugin - Problems with lazy loading of items (dynamically updating item list)

2008-12-12 Thread vanstee

Please take a look at my code. http://pastie.org/337379 or if you want
to look at a functioning copy go to 
http://vansteedesign.com/flashcards/test.php.
Even when setting the 'lazy' attribute to true in the parameters, when
you delete one of the cards (items) from the list it still exists as
empty space in the list. To view what I am explaining go to the
webpage and click the x on one of the cards. Then cycle through the
list. When scrolling to the item after the one we deleted there will
be an intermediate scroll to a blank area between the two cards. This
is the first time I've used this plugin so it may be a simple problem
with how I've set it up. Any guidance would be greatly apprecated.
Thanks in advance.


[jQuery] jquery.noConflict, $j is not a function in some case(Not always) on the same page

2008-12-12 Thread Nguyễn Quốc Vinh
This is my site Mychico.com!

I intergate an Ajax IM into site, this IM use prototype! So, i must use
jquery.noConflict

I don't know why sometimes, FF notice that $j is not a function!

it is not always happen! just in some cases!
Referesh about 10 times then 2 times hapen $j is not a function! And since
it report $j is not a function! We only need clear cache then refresh page
then this is not happen! But refresh more times, it report $j is not a
function again!
It's so strange?
Does anyone have problem like me?


-- 
/
* Người ta thưởng chỉ chú ý đến những kẻ lên như diều gặp gió! Nhưng hỡi ôi,
chỉ có cát, bụi và lông hồng mới là những thứ lên nhanh nhất
*/


[jQuery] Re: Selector difficulty/removeClass

2008-12-12 Thread Richard D. Worth
I like the syntax Brian suggested a lot. Here's another one, that is handy
if you already have done a $('#quiz'):

$('#quiz').find('label').removeClass('qyes');

- Richard

On Thu, Dec 11, 2008 at 11:32 PM, brian bally.z...@gmail.com wrote:


 ~ahem~ sorry 'bout that.

 $('label', '#quiz').removeClass('qyes');

 On Thu, Dec 11, 2008 at 11:31 PM, brian bally.z...@gmail.com wrote:
  $('#quiz')
 
  On Thu, Dec 11, 2008 at 11:25 PM, Bruce MacKay b.mac...@massey.ac.nz
 wrote:
 
  Hello folks,
 
  I want to remove a css class (.qyes) from every label element inside a
  single div (id=quiz).
 
  Each label element has an ID of the form fb*** where *** represents a
  unique identifier (that is not in numerical sequence and is not related
 to
  the label element's position or order in the div in any way).
 
  Can someone help me with the necessary selectors to identify the label
  elements in the div (so as to invoke a .removeClass) - I'm completely
  stumped.
 
 
  Thanks,
 
  Bruce
 
 
 
 



[jQuery] Cannot remove element that was added via .load()

2008-12-12 Thread RayBaker

I can't seem to get this snippet I loaded with .load to go away once
loaded.  Any ideas?


Here's the function
 $('a.drawer').click(function() {
 $('#drawer').show();
 $('#drawer').load('drawer.html').find('a#close').click(function(){
$('#drawer').hide();
 });
  });


Drawer.html has an anchor with an ID of close.

Its nested in a div called #outter.

 div id=outtera id=closeimg src=images/close.gif width=55
height=17 border=0 //a/div


[jQuery] Re: has anyone come across a plugin like this ?

2008-12-12 Thread CliffordSean


hi jason

just looking at your plugin now

http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html

why does the last child category show on the 1st and 2nd examples but not on
the third

tnx
sean
-- 
View this message in context: 
http://www.nabble.com/Please-REPLY-if-you-want-to-see-Jason-develop-this-Plugin-for-us-%21-tp20406388s27240p20975048.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] [jqmodal] issue in IE

2008-12-12 Thread Duncan
Hi

I have jqmodal working in FireFox  chrome on this page
http://myhomeshow.red5.com.au/expo/cyberstand-listing/

click the green, purple, or blue boxes.

however IE loads the jqModal, but the content isnt populated properly.

Could someone have a look and see if you can tell me why?

For your trouble, click the yellow box and select deathstar canteen, its a
good laugh.

Thanks!

-- 
Duncan I Loxton
duncan.lox...@gmail.com


[jQuery] nextAll Chaining when nextAll is Empty

2008-12-12 Thread Reepsy

This might sound naive, but I expected this to work:

$(this).nextAll('a').andSelf().removeClass
('star_selected').triggerHandler('mouseout');

It's from a star rating I wrote, where I have 5 a tags in a row. If
you click on one it removes a class from it and all that follow it,
and then fires the mouseout event. This works perfectly for stars 1-4,
but fails on #5, because there is no next. But I did not expect it to
ignore the rest of the chain. Everything after .nextAll is ignored. If
I break this into two lines, it works fine:

$(this).nextAll('a').removeClass('star_selected');
$(this).removeClass('star_selected').triggerHandler('mouseout');

But  I am repeating myself with the removeClass. Can anyone see a way
to combine these back into one statement? The mouseout has to go last.

Michael


[jQuery] getJSON not triggering success callback

2008-12-12 Thread Javier Martinez
I'm making some calls with getJSON on another domain, and the callback is
not firing.
My code is the next:

var url = '
http://localhost:8080/cometd/cometd?message=%7B%22version%22%3A%221.0%22%2C%22minimumVersion%22%3A%220.9%22%2C%22channel%22%3A%22%2Fmeta%2Fhandshake%22%2C%22id%22%3A0%2C%22connectionType%22%3A%22callback-polling%22%7D
'

$.getJSON(url + 'jsoncallback=?', function() {
console.log(arguments)
})

And this is the response I get in the added script tag

[{id:0,minimumVersion:0.9,supportedConnectionTypes:[long-polling,callback-polling],successful:true,channel:/meta/handshake,advice:{reconnect:retry,interval:0,timeout:12},clientId:fzmfrqm3f99vdrhow,version:1.0}]

Somebody can help me with this?

Thanks.


[jQuery] Re: cluetip and sortable

2008-12-12 Thread Karl Swedberg

Hi,

It sort of depends on where the content for the cluetip is coming from.

If it's local content already on the page, then the cluetip should be  
cloning the events along with the content, so something might be going  
wrong that I don't have enough information to troubleshoot.


If it's content from another file, then you'll have to attach the  
sortable method to the content (or re-attach it) using the onShow  
option. Something like this:


$('myelement').cluetip({
  onShow: function(ct, cti) {
  ct.find('mylist').sortable();
}
});

need to replace selectors with your own, of course.

--Karl


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




On Dec 11, 2008, at 6:53 PM, v.ventura wrote:



Hi,

quick question -- i am using cluetip and I'm trying to place on it a
listbox that uses the sortable() plugin to provide a way to order
elements. However I am unable to get the sortable behavior when I use
cluetip. If I take the same html and put it directly on the page, it
works correctly.

I am not discounting the possibility I'm doing something wrong, I am
pretty new at jquery. I like the look of the cluetip plus the
sortable, and I would like to keep it, otherwise I'd like to
understand which of the plugins has a limitation that breaks this
approach?





[jQuery] Re: Cycle plugin: some images not loading

2008-12-12 Thread Mike Alsup

 Thanks for responding, Mike.  I noticed today that setting the height
 and width explicitly with CSS did not actually make all the images
 show.  It did cause the area where the image should be to be the
 correct size, but the image was still not displayed.  Please take a
 look and see if you have any suggestions.  Hopefully I am just doing
 something stupid and obvious.

TNTitan,

I think this is just a result of some of your images not yet being
downloaded to the browser when Cycle transitions them in.   You can
either add images dynamically (see the 'add' demos on the Cycle page)
or wait until the window 'load' event fires (instead of using the
'ready' event) to start Cycle.

Mike


[jQuery] Re: hover event going to infinite loop

2008-12-12 Thread Sridhar

I do not have a domain to post this sample page? Are there any free
sites that I can use?

On Dec 11, 2:26 pm, Eric Garside gars...@gmail.com wrote:
 Do you have an example page up somewhere of what the issue is?



 On Thu, Dec 11, 2008 at 2:12 PM, brian bally.z...@gmail.com wrote:

  I'm sorry, I don't understand your problem. If you cannot set a width
  on the div then you should probably look at the hoverIntent plugin,
  which will keep your hover events from firing when the cursor passes
  over quickly (that is, accidentally). The plugin allows for setting a
  delay after which the hover event will be activated.

 http://cherne.net/brian/resources/jquery.hoverIntent.html
 http://plugins.jquery.com/project/hoverIntent

  On Thu, Dec 11, 2008 at 1:21 PM, Sridhar dsridha...@gmail.com wrote:

   Hi brian,

             I cannot set the width on the div tag unless the image is
   separated from the div tag. In my case, the image will be smaller
   compared to the width. The reason I included both of them in the same
   div tag is so that when I can hover over the details div. If it is
   outside the main div (#EmpDetails) tag, then as soon as the mouse
   leaves the image, the content will be hidden. Is there any other way
   to accomplish this?

   Thanks,
   sridhar.

   On Dec 11, 12:00 pm, brian bally.z...@gmail.com wrote:
   It's not an infinite loop. Your cursor is passing over the div and
   back several times, causing the hover states to toggle. Try this:

   div id=divEmpDetails style=border:1px solid #000;

   Now, run your cursor in and out of the div several times. The toggling
   should run for a bit, then stop.

   The fix is to either set a width on the div so that it doesn't go the
   entire width of the page or check out the hoverIntent plugin.

   On Thu, Dec 11, 2008 at 11:00 AM, Sridhar dsridha...@gmail.com wrote:

that didn't work.

On Dec 11, 1:00 am, sad1sm0 john.fan...@gmail.com wrote:
try unbinding before attaching the hover event

$('#divEmpDetails').unbind().hover();//fill in the gaps

Now that I look at your post I realize that's what fixed my gallery
issue.  Looks like a similar problem.  Maybe it'll help you too

 --
 Eric Garside
 Front End Developer
 LabPrints


[jQuery] Re: serializeArray() problem

2008-12-12 Thread Mike Alsup

 serializeArray(): Serializes all forms and form elements
  (like the .serialize() method) but returns a JSON data structure for
 you to work with.

 I'm trying to use this method to serialize a form to a JSON string,
 however is not working.
 Instead of: {'Name':'yuiy','hdnValue':'ringo'}
  it creates a querystring: txtName=yuiyhdnValue=ringo

serializeArray returns an array.  It's up to you to convert that to a
JSON string if that's what you need.  I recommend Doug Crockford's
json2.js script:

http://www.json.org/json2.js



[jQuery] Retrieve webmethod from webservice

2008-12-12 Thread Sara

hi every body

I want to call a webmethod of my webservice and to do this I try the 3
follwing methods but none of them show me the result and nothing
happen
It also has no error
please help me

Method 1:

jQuery.getJSON(WebService.asmx/HelloWorld , function(json){
 jQuery(#result).html(json);
});
Method 2:

jQuery.ajax({
type: POST,
url: WebService.asmx/HelloWorld,
data: {},
contentType: application/json; charset=utf-8,
dataType: json,
success: function(msg) {
  jQuery(#result).html(msg);
}
  });

Method 3:

jQuery.ajaxDotNet(WebService.asmx/HelloWorld , {
verb: GET,
success: function(obj) {
jQuery(#result).html(obj);
}
});


Webmethod Code:

 WebMethod() _
Public Function HelloWorld() As String
Return Hello World
End Function


[jQuery] Ajax failure call back

2008-12-12 Thread Balaji A
Hi All,
 I would like to know how the ajax failure call back works.

 I am throwing an exception from the server side code through struts,
however on specific cases like when a user name already exists or invalid
password I would be throwing an exception with a specific message.

 I would like this exception message to be shown as javascript alert, I have
the following ajax function for the save action,

 jQuery(#save).click(function(){
if(jQuery('#userform').jVal()){
jQuery.ajax({
type: POST,
url: saveOrUpdateUser.do,
dataType:html,
data:userId=+encodeURIComponent(document.forms[0].userId.value),
success:function(response){
clear();
alert(Admin user details saved successfully!!!);
},
error:function(event, request, settings){
alert(Save failed!+event);
}
});
}
}
);

I also tried using error:function(response), and ended up no where.

Could any one please let me know how to do this? Also, I would like to know
some pointers to ajax related examples.

Thank you,
A.Balaji


[jQuery] Re: newbie: unfold form on checkbutton

2008-12-12 Thread Karl Swedberg


On Dec 11, 2008, at 3:42 PM, ksun wrote:

I tend to rewrite stuff a lot with Jquery, I guess thats part of the
learning.


me too. it's both educational and fun! :)


script
$(document).ready(function()
{
 $(':checkbox').click(function(){
if(this.checked)
$('#showtime').show();
else
$('#showtime').hide();
 });
});



Here's another way to write this:

$(document).ready(function() {
  $(':checkbox').click(function() {
$('#showtime')[this.checked ? 'show' : 'hide']();
  });
});

not necessarily better. but more compact.


--Karl

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



[jQuery] What's the correct way to write this code?

2008-12-12 Thread Rick Faircloth

How should this be written?  I can't figure it out.
I keep getting syntax error: else

success: function(response){

 if (response.login = Login Successful);
 {top.location.href = site_manager.cfm}


 else

 if (response.login == Login Unsuccessful);
 {$('#contentdiv').empty().fadeIn(1000).append(response.login)};



}



[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Liam Potter


success: function(response){

if (response.login = Login Successful);
{top.location.href = site_manager.cfm}


else (response.login == Login Unsuccessful);
{$('#contentdiv').empty().fadeIn(1000).append(response.login)};



}



Rick Faircloth wrote:

How should this be written?  I can't figure it out.
I keep getting syntax error: else

success: function(response){

 if (response.login = Login Successful);
 {top.location.href = site_manager.cfm}


 else

 if (response.login == Login Unsuccessful);
 {$('#contentdiv').empty().fadeIn(1000).append(response.login)};



}

  




[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread MorningZ

Wow, this is just basic JavaScript syntax

if (conditon) {
}
else {
}


you have

 if (response.login = Login Successful);

drop the semi-colon after both your (conditions)



On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:
 How should this be written?  I can't figure it out.
 I keep getting syntax error: else

 success: function(response){

      if (response.login = Login Successful);
      {top.location.href = site_manager.cfm}

      else

      if (response.login == Login Unsuccessful);
      {$('#contentdiv').empty().fadeIn(1000).append(response.login)};

 }


[jQuery] Re: Retrieve webmethod from webservice

2008-12-12 Thread MorningZ

I'm not sure where you got your code examples from, but there's lots
of blog posts showing valid and working examples

http://www.google.com/search?q=asp.net+web+service+jquery



On Dec 12, 8:07 am, Sara sararaminp...@gmail.com wrote:
 hi every body

 I want to call a webmethod of my webservice and to do this I try the 3
 follwing methods but none of them show me the result and nothing
 happen
 It also has no error
 please help me

 Method 1:

 jQuery.getJSON(WebService.asmx/HelloWorld , function(json){
      jQuery(#result).html(json);
         });
 Method 2:

 jQuery.ajax({
     type: POST,
     url: WebService.asmx/HelloWorld,
     data: {},
     contentType: application/json; charset=utf-8,
     dataType: json,
     success: function(msg) {
       jQuery(#result).html(msg);
     }
   });

 Method 3:

 jQuery.ajaxDotNet(WebService.asmx/HelloWorld , {
                 verb: GET,
                 success: function(obj) {
                         jQuery(#result).html(obj);
                 }
         });

 Webmethod Code:

  WebMethod() _
     Public Function HelloWorld() As String
         Return Hello World
     End Function


[jQuery] Re: Selectors

2008-12-12 Thread MorningZ

Some HTML that replects your div's layout would be a huge help for
others to help you




On Dec 12, 4:01 am, mangaru dafne...@gmail.com wrote:
 Hi all,

 I was using jQuery as usual, but i found someting unusual...

 Is there any bug with selector :last?

 For me the selector #div_id div:last div:last or #div_id div:last
 div:last div:last isn't getting the div... but if i do a while and
 get the .children( 'div:last' ) it works perfectly!

 Some wild guesses?


[jQuery] Re: Styling the 2nd table tag above a row

2008-12-12 Thread Karl Swedberg

On Dec 12, 2008, at 7:20 AM, Paul Mills wrote:



Guy,

A - I understand.

I think you can make your code a bit simpler and not use the .each
(function(). It depends on rest of the HTML whether it works or not.
Something like this:

$('tr.myclass').parents('table').parents('table').css(border, 4px
black solid);

Rgds Paul



That's a nice improvement over the .each! It could probably be a bit  
simpler still by identifying the second table within the  
first .parents() filter:


$('tr.myclass').parents('table:eq(1)').css(border, 4px black solid);



--Karl

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



[jQuery] Re: Move items between lists

2008-12-12 Thread frits1607

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

Thank you Richard.

This looks like a good starting point.
Is there a similar plugin for re-ordering (not a sort, but using
arrows)?

Frits


[jQuery] Re: Trouble with extending Object prototype

2008-12-12 Thread Eric Garside
Haha, no worries Mike. I didn't actually test out the solution till later,
and it wasn't until later still that the fact other Objects would have to
filter it occurred to me. S'what I get for doing lunch break snippets. :P

Anyway, I have updated the function to no longer use the Object.prototype
method, but to add it as a jQuery utility.

$.extend({
keys:function(obj){
var a = [];
$.each(obj, function(k){ a.push(k) });
return a;
}
})

// Useage:
var obj = {a: 1, b: 2, c: 3, d: 4, kitty: 'cat'}
alert($.keys(obj));// a,b,c,d,kitty

On Thu, Dec 11, 2008 at 8:27 PM, Michael Geary m...@mg.to wrote:

  p.s. Don't get me wrong, Eric, I'm not criticizing you for offering that
 possible solution! It's great that you were willing to take the time to give
 it a shot.

 I just wish that there were a clean way to add Object methods without
 breaking existing code. Ah well, we must play the hand we're dealt... :-)

 -Mike

  --
 *From:* Michael Geary

  That code breaks $.each in exactly the same way as Bill's original code.
 Note that you had to add an explicit test for the getKeys method name to get
 it to work...




-- 
Eric Garside
Front End Developer
LabPrints


[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Rick Faircloth

Awww, be nice, now... I'm just learning basic JS syntax.

Thanks for the help, MorningZ and Liam... it's working.

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of MorningZ
 Sent: Friday, December 12, 2008 9:08 AM
 To: jQuery (English)
 Subject: [jQuery] Re: What's the correct way to write this code?
 
 
 Wow, this is just basic JavaScript syntax
 
 if (conditon) {
 }
 else {
 }
 
 
 you have
 
  if (response.login = Login Successful);
 
 drop the semi-colon after both your (conditions)
 
 
 
 On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:
  How should this be written?  I can't figure it out.
  I keep getting syntax error: else
 
  success: function(response){
 
       if (response.login = Login Successful);
       {top.location.href = site_manager.cfm}
 
       else
 
       if (response.login == Login Unsuccessful);
       {$('#contentdiv').empty().fadeIn(1000).append(response.login)};
 
  }



[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Hobo

success: function(response){
 switch (response.login){
  case 'Login Successful':
   top.location.href = 'site_manager.cfm';
   break;
  case 'Login Unsuccessful':
   $('#contentdiv').empty().fadeIn(1000).append
(response.login);
   break;
 }
}

Also, be sure to use the is equal to operator, which is 2 equal
signs, when doing comparisons.

response.login = Login Successful; // Sets response.login to the
string Login Successful
response.login == Login Successful;  // Tests to see if
response.login is equal to the string Login Successful

On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
 Wow, this is just basic JavaScript syntax

 if (conditon) {

 }
 else {
 }

 you have

  if (response.login = Login Successful);

 drop the semi-colon after both your (conditions)

 On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:

  How should this be written?  I can't figure it out.
  I keep getting syntax error: else

  success: function(response){

       if (response.login = Login Successful);
       {top.location.href = site_manager.cfm}

       else

       if (response.login == Login Unsuccessful);
       {$('#contentdiv').empty().fadeIn(1000).append(response.login)};

  }


[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Rick Faircloth

Thanks for the re-write, Hobo!  I like the case syntax.

Also, the tip on the == vs = is good too.  I'm just hacking
up code that I find trying to make things work.  I think it's time
for a basic JS primer!

Thanks again,

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of Hobo
 Sent: Friday, December 12, 2008 9:48 AM
 To: jQuery (English)
 Subject: [jQuery] Re: What's the correct way to write this code?
 
 
 success: function(response){
  switch (response.login){
   case 'Login Successful':
top.location.href = 'site_manager.cfm';
break;
   case 'Login Unsuccessful':
$('#contentdiv').empty().fadeIn(1000).append
 (response.login);
break;
  }
 }
 
 Also, be sure to use the is equal to operator, which is 2 equal
 signs, when doing comparisons.
 
 response.login = Login Successful; // Sets response.login to the
 string Login Successful
 response.login == Login Successful;  // Tests to see if
 response.login is equal to the string Login Successful
 
 On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
  Wow, this is just basic JavaScript syntax
 
  if (conditon) {
 
  }
  else {
  }
 
  you have
 
   if (response.login = Login Successful);
 
  drop the semi-colon after both your (conditions)
 
  On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:
 
   How should this be written?  I can't figure it out.
   I keep getting syntax error: else
 
   success: function(response){
 
        if (response.login = Login Successful);
        {top.location.href = site_manager.cfm}
 
        else
 
        if (response.login == Login Unsuccessful);
        {$('#contentdiv').empty().fadeIn(1000).append(response.login)};
 
   }



[jQuery] Re: Simple FadeIn with Appending

2008-12-12 Thread ksun

This is one way to do it. Not sure if it can be done more elegantly.

script
$(document).ready(function() {
$('label').after('span style=display:none/span');
$('#button').click(function(){
$('label :input').each(function(){
if 
(!$(this).parent().next('span').text())

$(this).parent().next('span').text('You need to enter ' +
this.name + ' here');
if (!$(this).val())

$(this).parent().next('span').fadeIn('slow');
else

$(this).parent().next('span').hide();
});
});



});

/script
/head
body
labelLabel1: input name=label1 type=text //label
br/
labelLabel2: input name=label2 type=text //label
br /
button id=buttonClick/button

On Dec 11, 4:30 pm, WhoButSB whobu...@gmail.com wrote:
 The variable fieldName is something that I'am pulling in from
 somewhere else.  Here is the full code:
 if(val == ''){
 var fieldName = $(select[name='fieldcategoryID'] :selected).text();
 $(#fieldValue label).fadeIn('slow', function (){
 $(this).after(span class='field-error'You need to enter a 
 +fieldName+ here./span);});

 return false;
 //Send the data to the servers

 }else{

 What I would like to do is have the error message fade In above after
 the label, if the person enters an empty value in to a input box.  I'm
 just unsure what the syntax order is for the fadeIn() and after()
 methods.

 Thanks for the help.

 On Dec 11, 1:03 pm,ksunkavi.sunda...@gmail.com wrote:



                           $(this).after(span class='field-error'You need 
   to enter a 
   +fieldName+ here./span);

  What is fieldName, you need get that value from somewhere, before
  trying to use it. Also the effect is applied only on the object on
  which it is called, so if your label is hidden then it will appear
  slowly. The span tag will just appear, it will not have the fadeIn
  effect. I am not sure what exactly you are trying to achieve here, but
  hope this helps.

  On Dec 11, 11:24 am, WhoButSB whobu...@gmail.com wrote:

   Hello all,
   I have a really simple question but, and once I figure out this little
   hurdle I know I will be able to work on a lot more stuff.

   I would like to add a simple notification to fade in when some one
   presses a button but I would like to attach the notification after a
   label.  I know I have to be really close with this code I just can't
   figure it out.

   $(function(){
           $('#button').click(function(){
                   $(#fieldValue label).fadeIn('slow', function (){
                           $(this).after(span class='field-error'You need 
   to enter a 
   +fieldName+ here./span);
                   });
           });

   });

   Thanks for your help!- Hide quoted text -

 - Show quoted text -


[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Eric Garside

If you haven't already, I'd check out the w3c schools intro to
Javascript.
It's a pretty great way to learn the basic mechanics.

http://www.w3schools.com/JS/default.asp

On Dec 12, 9:51 am, Rick Faircloth r...@whitestonemedia.com wrote:
 Thanks for the re-write, Hobo!  I like the case syntax.

 Also, the tip on the == vs = is good too.  I'm just hacking
 up code that I find trying to make things work.  I think it's time
 for a basic JS primer!

 Thanks again,

 Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
  Behalf Of Hobo
  Sent: Friday, December 12, 2008 9:48 AM
  To: jQuery (English)
  Subject: [jQuery] Re: What's the correct way to write this code?

  success: function(response){
       switch (response.login){
            case 'Login Successful':
                 top.location.href = 'site_manager.cfm';
                 break;
            case 'Login Unsuccessful':
                 $('#contentdiv').empty().fadeIn(1000).append
  (response.login);
                 break;
       }
  }

  Also, be sure to use the is equal to operator, which is 2 equal
  signs, when doing comparisons.

  response.login = Login Successful;     // Sets response.login to the
  string Login Successful
  response.login == Login Successful;  // Tests to see if
  response.login is equal to the string Login Successful

  On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
   Wow, this is just basic JavaScript syntax

   if (conditon) {

   }
   else {
   }

   you have

    if (response.login = Login Successful);

   drop the semi-colon after both your (conditions)

   On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:

How should this be written?  I can't figure it out.
I keep getting syntax error: else

success: function(response){

     if (response.login = Login Successful);
     {top.location.href = site_manager.cfm}

     else

     if (response.login == Login Unsuccessful);
     {$('#contentdiv').empty().fadeIn(1000).append(response.login)};

}


[jQuery] Re: Opacity for a menu background, but not for the element inside

2008-12-12 Thread Jim D

You can use the CSS 'opacity' property.  It accepts a value between
0.0 and 1.0.  For example, if you wanted to set the opacity of an
element to 40%, you would use:

opacity: 0.4;

However, in true MS style, you have to do something different to get
it to work in IE.  Internet Explorer accepts the 'filter' property.
Do make the example above work in IE, you would use:

filter: alpha(filter = 40)

You can learn a little more about it here:
http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/

Hope that helps.

On Dec 12, 6:10 am, Cyril G magiccy...@gmail.com wrote:
 Hye,

 I would like to create a menu, with a 80% opacity background, but I
 want to keep the link element at 100% opacity.

 For example :
 lia href=link.htmllorem ipsum/a/li
 I would like to have the li element at 80%, but the a element at
 100% (or 120%).

 I know that I could use PNG, but it would be great if I could do this
 with just a CSS Color and jQuery. Is there any solution ?


[jQuery] Re: Opacity for a menu background, but not for the element inside

2008-12-12 Thread Liam Potter


Jim, read the question again ;)

Anyway.
There is no simple solution to this problem, I'd advise using a PNG 
image as it is the cleanest way to achieve this.

Jim D wrote:

You can use the CSS 'opacity' property.  It accepts a value between
0.0 and 1.0.  For example, if you wanted to set the opacity of an
element to 40%, you would use:

opacity: 0.4;

However, in true MS style, you have to do something different to get
it to work in IE.  Internet Explorer accepts the 'filter' property.
Do make the example above work in IE, you would use:

filter: alpha(filter = 40)

You can learn a little more about it here:
http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/

Hope that helps.

On Dec 12, 6:10 am, Cyril G magiccy...@gmail.com wrote:
  

Hye,

I would like to create a menu, with a 80% opacity background, but I
want to keep the link element at 100% opacity.

For example :
lia href=link.htmllorem ipsum/a/li
I would like to have the li element at 80%, but the a element at
100% (or 120%).

I know that I could use PNG, but it would be great if I could do this
with just a CSS Color and jQuery. Is there any solution ?





[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Diogo Neves
You can simplify
$('#contentdiv').empty().fadeIn(1000).append(response.login);
To
$('#contentdiv').html(response.login).fadeIn(1000);

Or if you like too short your code you can do all that in:

success: function(response){
response.login == 'Login Successful' ?  top.location.href =
'site_manager.cfm'
 :
$('#contentdiv').html(response.login).fadeIn(1000);
}

On Fri, Dec 12, 2008 at 3:11 PM, Eric Garside gars...@gmail.com wrote:


 If you haven't already, I'd check out the w3c schools intro to
 Javascript.
 It's a pretty great way to learn the basic mechanics.

 http://www.w3schools.com/JS/default.asp

 On Dec 12, 9:51 am, Rick Faircloth r...@whitestonemedia.com wrote:
  Thanks for the re-write, Hobo!  I like the case syntax.
 
  Also, the tip on the == vs = is good too.  I'm just hacking
  up code that I find trying to make things work.  I think it's time
  for a basic JS primer!
 
  Thanks again,
 
  Rick
 
   -Original Message-
   From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com]
 On Behalf Of Hobo
   Sent: Friday, December 12, 2008 9:48 AM
   To: jQuery (English)
   Subject: [jQuery] Re: What's the correct way to write this code?
 
   success: function(response){
switch (response.login){
 case 'Login Successful':
  top.location.href = 'site_manager.cfm';
  break;
 case 'Login Unsuccessful':
  $('#contentdiv').empty().fadeIn(1000).append
   (response.login);
  break;
}
   }
 
   Also, be sure to use the is equal to operator, which is 2 equal
   signs, when doing comparisons.
 
   response.login = Login Successful; // Sets response.login to the
   string Login Successful
   response.login == Login Successful;  // Tests to see if
   response.login is equal to the string Login Successful
 
   On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
Wow, this is just basic JavaScript syntax
 
if (conditon) {
 
}
else {
}
 
you have
 
 if (response.login = Login Successful);
 
drop the semi-colon after both your (conditions)
 
On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com
 wrote:
 
 How should this be written?  I can't figure it out.
 I keep getting syntax error: else
 
 success: function(response){
 
  if (response.login = Login Successful);
  {top.location.href = site_manager.cfm}
 
  else
 
  if (response.login == Login Unsuccessful);

  {$('#contentdiv').empty().fadeIn(1000).append(response.login)};
 
 }




-- 
Thanks,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


[jQuery] Re: nextAll Chaining when nextAll is Empty

2008-12-12 Thread Paul Mills

Hi Michael,
Try this. It uses the index of the a within the div and then
removes the class from all a elements equal or greater than it.
The code is a bit cumbersome but I think it works.

div id=links
a href=# class=star_selectedlorem ipsum/a
a href=# class=star_selectedlorem ipsum/a
a href=# class=star_selectedlorem ipsum/a
a href=# class=star_selectedlorem ipsum/a
a href=# class=star_selectedlorem ipsum/a
/div

$('#links a').click(function(){
  $('a:gt('+($(#links a').index(this)-1)+')').removeClass
('star_selected');
  return false;
});

Paul

On Dec 12, 12:39 pm, Reepsy mre...@gmail.com wrote:
 This might sound naive, but I expected this to work:

 $(this).nextAll('a').andSelf().removeClass
 ('star_selected').triggerHandler('mouseout');

 It's from a star rating I wrote, where I have 5 a tags in a row. If
 you click on one it removes a class from it and all that follow it,
 and then fires the mouseout event. This works perfectly for stars 1-4,
 but fails on #5, because there is no next. But I did not expect it to
 ignore the rest of the chain. Everything after .nextAll is ignored. If
 I break this into two lines, it works fine:

 $(this).nextAll('a').removeClass('star_selected');
 $(this).removeClass('star_selected').triggerHandler('mouseout');

 But  I am repeating myself with the removeClass. Can anyone see a way
 to combine these back into one statement? The mouseout has to go last.

 Michael


[jQuery] nextAll Chaining when nextAll is Empty

2008-12-12 Thread Reepsy

Perhaps this is naive of me, but I was expecting this to work:

$(this).nextAll('a').andSelf().removeClass
('star_selected').triggerHandler('mouseout');

It is used in a rating system  I wrote, where there are 5 a tags in
a row. If you click on one, this fires (adds a class name on all
previous and this one, and fires the mouseout event). It works just
fine for stars 1-4, but fails on #5. The reason is obvious, in that #5
has no nextAll, but I would not have thought that it alone would break
the chain. IF I do this, it works:

$(this).nextAll('a').removeClass('star_selected');
$(this).removeClass('star_selected').triggerHandler('mouseout');

But I do not wish to repeat myself with the removeClass part. The
mouseout needs to be fired last, so I cannot simply reorder the
original. Any idea how this can be done in one statement, without
repeating myself?

Michael


[jQuery] loader for ajax/load

2008-12-12 Thread hcvitto

hi
i want to show/hide a loader when using load() function. With this
script:

$('#load')
.ajaxStart(function() { $(this).show(); })
.ajaxStop(function() { $(this).hide(); });
$('#colCont').load('myFile.php?id=myId #colContIns');
$('#categorie a').click(function(){
$('#categorie 
a').removeClass('selected');
$(this).addClass('selected');
var id = $(this).attr('id');
var s = new Array();
s = id.split('_');

$('#colCont').load('prodotti/famiglie.php?id='+s[1]+'
#colContIns');
return false;
});

the loader shows only on its first call but not when i load html
fragments from links.
Any idea why?
Thanks Vitto




[jQuery] Re: nextAll Chaining when nextAll is Empty

2008-12-12 Thread Reepsy

Paul,

Thanks for the reply. I do not wish to use a container here, if I can
help it, but I do have a unique class name to hook onto, and your
solution works just fine with it. So my code became:

$('a.star:gt(' + ($(a.star).index(this)-1) + ')').removeClass
('star_selected').triggerHandler('mouseout');

I have a similar situation on the hover, but in reverse. The on
hovered and all less than it need to have a class added. So that
becomes:

$('a.star:lt(' + ($(a.star).index(this)+1) + ')').addClass
('star_hover');

Works like a charm. Thanks again.

I still am a bit surprised about how nextAll breaks the chain though.
I realize nothing is returned, but we still know what $(this) is in
this statement:

$(this).nextAll('a').andSelf().removeClass
('star_selected').triggerHandler('mouseout');

So it is still unclear to me why andSelf is not enough to move you on
down the line to removing the class and triggering the mouseout. If
anyone can explain that to me, I'd appreciate it.

Michael


On Dec 12, 10:28 am, Paul Mills paul.f.mi...@gmail.com wrote:
 Hi Michael,
 Try this. It uses the index of the a within the div and then
 removes the class from all a elements equal or greater than it.
 The code is a bit cumbersome but I think it works.

 div id=links
 a href=# class=star_selectedlorem ipsum/a
 a href=# class=star_selectedlorem ipsum/a
 a href=# class=star_selectedlorem ipsum/a
 a href=# class=star_selectedlorem ipsum/a
 a href=# class=star_selectedlorem ipsum/a
 /div

 $('#links a').click(function(){
   $('a:gt('+($(#links a').index(this)-1)+')').removeClass
 ('star_selected');
   return false;

 });

 Paul

 On Dec 12, 12:39 pm, Reepsy mre...@gmail.com wrote:

  This might sound naive, but I expected this to work:

  $(this).nextAll('a').andSelf().removeClass
  ('star_selected').triggerHandler('mouseout');

  It's from a star rating I wrote, where I have 5 a tags in a row. If
  you click on one it removes a class from it and all that follow it,
  and then fires the mouseout event. This works perfectly for stars 1-4,
  but fails on #5, because there is no next. But I did not expect it to
  ignore the rest of the chain. Everything after .nextAll is ignored. If
  I break this into two lines, it works fine:

  $(this).nextAll('a').removeClass('star_selected');
  $(this).removeClass('star_selected').triggerHandler('mouseout');

  But  I am repeating myself with the removeClass. Can anyone see a way
  to combine these back into one statement? The mouseout has to go last.

  Michael


[jQuery] Re: Selectors

2008-12-12 Thread Diogo Neves
div id=div_pdfs
div
input name=my_file_0 size=52 onchange=my$.addfilef( this );
type=file
input class=apagar botao value=Apagar onclick=my$.apagarf(
this ); type=button
/div
div
div
input name=my_file_1 size=52 onchange=my$.addfilef( this
); type=file
input class=apagar botao value=Apagar onclick=my$.apagarf(
this ); type=button
/div
div
div
input name=my_file_2 size=52 onchange=my$.addfilef(
this ); type=file
input class=apagar botao value=Apagar
onclick=my$.apagarf( this ); type=button
/div
div
div
input name=my_file_3 size=52
onchange=my$.addfilef( this ); type=file
input class=apagar botao value=Apagar
onclick=my$.apagarf( this ); type=button
/div
div
/div
/div
/div
/div
/div

On Fri, Dec 12, 2008 at 2:15 PM, MorningZ morni...@gmail.com wrote:


 Some HTML that replects your div's layout would be a huge help for
 others to help you




 On Dec 12, 4:01 am, mangaru dafne...@gmail.com wrote:
  Hi all,
 
  I was using jQuery as usual, but i found someting unusual...
 
  Is there any bug with selector :last?
 
  For me the selector #div_id div:last div:last or #div_id div:last
  div:last div:last isn't getting the div... but if i do a while and
  get the .children( 'div:last' ) it works perfectly!
 
  Some wild guesses?




-- 
Thanks,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt


[jQuery] Submit a form automatically

2008-12-12 Thread Adam

I have a dynamically created form that I'd like to submit
automatically after it loads.  It doesn't look like forms have an
onload event.  I would use the window onload, but the form isn't
necessarily around when the window loads - it is created later in a
jquery popup.

Any suggestions?  I am using the jquery form plugin if it matters.


[jQuery] Re: Selector difficulty/removeClass

2008-12-12 Thread ricardobeat

And in case you wanted to remove the class only from the label
elements *with* that ID form you would use

$('#quiz label[id*=fb]').removeClass('qyes');

that's plenty of help, isn't it? :)

On Dec 12, 2:25 am, Bruce MacKay b.mac...@massey.ac.nz wrote:
 Hello folks,

 I want to remove a css class (.qyes) from every label element inside
 a single div (id=quiz).

 Each label element has an ID of the form fb*** where *** represents
 a unique identifier (that is not in numerical sequence and is not
 related to the label element's position or order in the div in any way).

 Can someone help me with the necessary selectors to identify the
 label elements in the div (so as to invoke a .removeClass) - I'm
 completely stumped.

 Thanks,

 Bruce


[jQuery] Re: Submit a form automatically

2008-12-12 Thread Jim D

Do you have an example of the code you're using to load the form?

On Dec 12, 11:02 am, Adam apcau...@gmail.com wrote:
 I have a dynamically created form that I'd like to submit
 automatically after it loads.  It doesn't look like forms have an
 onload event.  I would use the window onload, but the form isn't
 necessarily around when the window loads - it is created later in a
 jquery popup.

 Any suggestions?  I am using the jquery form plugin if it matters.


[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Eric

If you're looking for a fast, but thorough, intro to Javascript, I
recommend Douglas Crockford's The Javascript Programming Language
video, which can be seen in four parts over at Yahoo Video:
http://video.yahoo.com/search/?p=crockford+javascriptt=video

Here's a link to part 1:
http://video.yahoo.com/watch/111593/1710507

Crockford's book Javascript: The Good Parts is also quite wonderful.

-E

On Dec 12, 9:51 am, Rick Faircloth r...@whitestonemedia.com wrote:
 Thanks for the re-write, Hobo!  I like the case syntax.

 Also, the tip on the == vs = is good too.  I'm just hacking
 up code that I find trying to make things work.  I think it's time
 for a basic JS primer!

 Thanks again,

 Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
  Behalf Of Hobo
  Sent: Friday, December 12, 2008 9:48 AM
  To: jQuery (English)
  Subject: [jQuery] Re: What's the correct way to write this code?

  success: function(response){
       switch (response.login){
            case 'Login Successful':
                 top.location.href = 'site_manager.cfm';
                 break;
            case 'Login Unsuccessful':
                 $('#contentdiv').empty().fadeIn(1000).append
  (response.login);
                 break;
       }
  }

  Also, be sure to use the is equal to operator, which is 2 equal
  signs, when doing comparisons.

  response.login = Login Successful;     // Sets response.login to the
  string Login Successful
  response.login == Login Successful;  // Tests to see if
  response.login is equal to the string Login Successful

  On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
   Wow, this is just basic JavaScript syntax

   if (conditon) {

   }
   else {
   }

   you have

    if (response.login = Login Successful);

   drop the semi-colon after both your (conditions)

   On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:

How should this be written?  I can't figure it out.
I keep getting syntax error: else

success: function(response){

     if (response.login = Login Successful);
     {top.location.href = site_manager.cfm}

     else

     if (response.login == Login Unsuccessful);
     {$('#contentdiv').empty().fadeIn(1000).append(response.login)};

}


[jQuery] Re: Iterating through .data() elements...

2008-12-12 Thread ricardobeat

There are other alternatives:

1. Store everything as an object in data()

  $(element).data('yourdata',{mydata1:'something,
mydata2:'something'})
  var data = $(element).data('yourdata');
  $(element).data('yourdata', $.extend(data, { mydata3:'something' });

  Then you can iterate over that object's properties.

2. Use the metadata plugin, I think it allows you to iterate over all
data stored

3. keep an 'index array'

  $(element).data('mydata1','something')
  var ind = $(element).data('mydataindex');
  $(element).data('mydataindex', ind.push('mydata1'));


All add extra overhead but it might be a worthy trade-off, and you can
write a custom function (or overwrite 'data') that handles the
extending/indexing for you.

- ricardo

On Dec 12, 1:23 am, Nick nschub...@gmail.com wrote:
 queue as in effect queue?  I'm not finding any documentation on queue
 except as used for effects and your sample seems to put items in a
 queue as if I had to execute things in order.  That's not what I'm
 looking for.  I need to store key/value pairs to specific elements on
 the page for nav requests and data() does this perfectly... I
 currently store they keywords I need in the data element for each list
 item and pass the list item contents to the navigation functions.  If
 I can pass a dynamic set of key/value pairs and iterate through the
 data object to get those values instead of having to know the key,
 then I can fully utilize the framework I'm working with (suppression
 flags, navigation keywords, url variables, etc.)

 I'd hate to have to create a new associative object and pass it when I
 can append the appropriate data to the element when the page is built
 and just pass a reference to the element.

 On Dec 11, 7:28 pm, Ariel Flesler afles...@gmail.com wrote:

  You need to use $().queue() not data.

  $().queue('foo',1).queue('foo',2).queue('foo',3)

  Also, $().queue('foo').each() won't work because the returned data is
  an array.

  $.each($().queue('foo'), function(){ }); will work.

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

  On Dec 11, 7:42 pm, Nick nschub...@gmail.com wrote:

   Does anyone know how I can iterate through the elements stored in the
   data element instead of referring to them individually?

   Say I:
   $(someObj).data('myData1', 'Here is some text')
   .data('myData2', 'Here is some more text')
   .data('myG', 'Here is some more text');

   How could I loop through the data() object to get the key/value pairs
   back if I didn't know the keys?

   I tried:
   $(someObj).data().each(function(i, val) { alert(i + ': ' + val); });

   with no success.  I also tried variations of for loops and such.


[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Rick Faircloth

Thanks for the info, Eric!

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of Eric Garside
 Sent: Friday, December 12, 2008 10:11 AM
 To: jQuery (English)
 Subject: [jQuery] Re: What's the correct way to write this code?
 
 
 If you haven't already, I'd check out the w3c schools intro to
 Javascript.
 It's a pretty great way to learn the basic mechanics.
 
 http://www.w3schools.com/JS/default.asp
 
 On Dec 12, 9:51 am, Rick Faircloth r...@whitestonemedia.com wrote:
  Thanks for the re-write, Hobo!  I like the case syntax.
 
  Also, the tip on the == vs = is good too.  I'm just hacking
  up code that I find trying to make things work.  I think it's time
  for a basic JS primer!
 
  Thanks again,
 
  Rick
 
   -Original Message-
   From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
   Behalf Of Hobo
   Sent: Friday, December 12, 2008 9:48 AM
   To: jQuery (English)
   Subject: [jQuery] Re: What's the correct way to write this code?
 
   success: function(response){
        switch (response.login){
             case 'Login Successful':
                  top.location.href = 'site_manager.cfm';
                  break;
             case 'Login Unsuccessful':
                  $('#contentdiv').empty().fadeIn(1000).append
   (response.login);
                  break;
        }
   }
 
   Also, be sure to use the is equal to operator, which is 2 equal
   signs, when doing comparisons.
 
   response.login = Login Successful;     // Sets response.login to the
   string Login Successful
   response.login == Login Successful;  // Tests to see if
   response.login is equal to the string Login Successful
 
   On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
Wow, this is just basic JavaScript syntax
 
if (conditon) {
 
}
else {
}
 
you have
 
 if (response.login = Login Successful);
 
drop the semi-colon after both your (conditions)
 
On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:
 
 How should this be written?  I can't figure it out.
 I keep getting syntax error: else
 
 success: function(response){
 
      if (response.login = Login Successful);
      {top.location.href = site_manager.cfm}
 
      else
 
      if (response.login == Login Unsuccessful);
      {$('#contentdiv').empty().fadeIn(1000).append(response.login)};
 
 }



[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Rick Faircloth
Thanks, Diogo!

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Diogo Neves
Sent: Friday, December 12, 2008 10:24 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: What's the correct way to write this code?

 

You can simplify
$('#contentdiv').empty().fadeIn(1000).append(response.login);
To
$('#contentdiv').html(response.login).fadeIn(1000);

Or if you like too short your code you can do all that in:

success: function(response){
response.login == 'Login Successful' ?  top.location.href = 
'site_manager.cfm'
 :
$('#contentdiv').html(response.login).fadeIn(1000);
}

On Fri, Dec 12, 2008 at 3:11 PM, Eric Garside gars...@gmail.com wrote:


If you haven't already, I'd check out the w3c schools intro to
Javascript.
It's a pretty great way to learn the basic mechanics.

http://www.w3schools.com/JS/default.asp


On Dec 12, 9:51 am, Rick Faircloth r...@whitestonemedia.com wrote:
 Thanks for the re-write, Hobo!  I like the case syntax.

 Also, the tip on the == vs = is good too.  I'm just hacking
 up code that I find trying to make things work.  I think it's time
 for a basic JS primer!

 Thanks again,

 Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
  Behalf Of Hobo
  Sent: Friday, December 12, 2008 9:48 AM
  To: jQuery (English)
  Subject: [jQuery] Re: What's the correct way to write this code?

  success: function(response){
   switch (response.login){
case 'Login Successful':
 top.location.href = 'site_manager.cfm';
 break;
case 'Login Unsuccessful':
 $('#contentdiv').empty().fadeIn(1000).append
  (response.login);
 break;
   }
  }

  Also, be sure to use the is equal to operator, which is 2 equal
  signs, when doing comparisons.

  response.login = Login Successful; // Sets response.login to the
  string Login Successful
  response.login == Login Successful;  // Tests to see if
  response.login is equal to the string Login Successful

  On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
   Wow, this is just basic JavaScript syntax

   if (conditon) {

   }
   else {
   }

   you have

if (response.login = Login Successful);

   drop the semi-colon after both your (conditions)

   On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:

How should this be written?  I can't figure it out.
I keep getting syntax error: else

success: function(response){

 if (response.login = Login Successful);
 {top.location.href = site_manager.cfm}

 else

 if (response.login == Login Unsuccessful);
 {$('#contentdiv').empty().fadeIn(1000).append(response.login)};

}




-- 
Thanks,

Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt



[jQuery] Re: getJSON not triggering success callback

2008-12-12 Thread ricardobeat

Check the status in the XHR object you get back, it's probably not
successfull.

On Dec 12, 11:06 am, Javier Martinez ecentin...@gmail.com wrote:
 I'm making some calls with getJSON on another domain, and the callback is
 not firing.
 My code is the next:

 var url = 
 'http://localhost:8080/cometd/cometd?message=%7B%22version%22%3A%221.0...
 '

 $.getJSON(url + 'jsoncallback=?', function() {
 console.log(arguments)

 })

 And this is the response I get in the added script tag

 [{id:0,minimumVersion:0.9,supportedConnectionTypes:[long-polling,callback-polling],successful:true,channel:/meta/handshake,advice:{reconnect:retry,interval:0,timeout:12},clientId:fzmfrqm3f99vdrhow,version:1.0}]

 Somebody can help me with this?

 Thanks.


[jQuery] Re: nextAll Chaining when nextAll is Empty

2008-12-12 Thread ricardobeat

Do you have a test page we can look at?

nextAll returns an empty object if there is no 'next', but it doesn't
interrupt the chain, there may be something else going on. I couldn't
reproduce your situation here, nextAll().andSelf() returns me the
original element.

- ricardo

On Dec 12, 10:39 am, Reepsy mre...@gmail.com wrote:
 This might sound naive, but I expected this to work:

 $(this).nextAll('a').andSelf().removeClass
 ('star_selected').triggerHandler('mouseout');

 It's from a star rating I wrote, where I have 5 a tags in a row. If
 you click on one it removes a class from it and all that follow it,
 and then fires the mouseout event. This works perfectly for stars 1-4,
 but fails on #5, because there is no next. But I did not expect it to
 ignore the rest of the chain. Everything after .nextAll is ignored. If
 I break this into two lines, it works fine:

 $(this).nextAll('a').removeClass('star_selected');
 $(this).removeClass('star_selected').triggerHandler('mouseout');

 But  I am repeating myself with the removeClass. Can anyone see a way
 to combine these back into one statement? The mouseout has to go last.

 Michael


[jQuery] Re: Jquery autocomplete with spring MVC

2008-12-12 Thread anny

Thank you so much. It works great.

On Dec 11, 5:05 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Though in this case you don't really need JSON, just a line-delimited list.

 searchVal =  ServletRequestUtils.getStringParameter(request, q);
 list= service.getResult(searchVal );
 for (String entry : list) {
   response.getWriter().write(entry + \\n);}

 return null;

 On Thu, Dec 11, 2008 at 11:03 PM, Jörn Zaefferer



 joern.zaeffe...@googlemail.com wrote:
  You should use a JSON library (see json.org) to generate valid JSON,
  then write that directly to the response, returning null to indicate
  to Spring that the response is already rendered.

  Something like this:

  searchVal =  ServletRequestUtils.getStringParameter(request, q);
  list= service.getResult(searchVal );
  response.getWriter().write(new JSONArray(list).toString());
  return null;

  Jörn

  On Thu, Dec 11, 2008 at 8:34 PM,anny2000.ann.s...@gmail.com wrote:

  I have jquery auto complete example working. Trying to integrate with
  spring MVC.

  I use InternalResourceViewResolver and SimpleUrlHandlerMapping.

  I am trying to pass url in autocomplete(url), which is mapped to
  multiactioncontroller which returns array based on value entered in
  tex box.
  But its returning entire jsp instead of array.

  Jsp

  Code:
  html
  head
    script src=http://code.jquery.com/jquery-latest.js;/script
  link rel=stylesheet href=http://dev.jquery.com/view/trunk/plugins/
  autocomplete/demo/main.css type=text/css /
   link rel=stylesheet href=http://dev.jquery.com/view/trunk/
  plugins/autocomplete/jquery.autocomplete.css type=text/css /
   script type=text/javascript src=http://dev.jquery.com/view/trunk/
  plugins/autocomplete/jquery.autocomplete.js/script
   script type=text/javascript src=http://dev.jquery.com/view/trunk/
  plugins/autocomplete/lib/jquery.bgiframe.min.js/script
   script type=text/javascript src=http://dev.jquery.com/view/trunk/
  plugins/autocomplete/lib/query.ajaxQueue.js/script
   script type=text/javascript src=http://dev.jquery.com/view/trunk/
  plugins/autocomplete/lib/thickbox-compressed.js/script
   script
   $(document).ready(function(){
       var url = searchResult.htm;
     $(#example).autocomplete(url);
       });
   /script
  /head
  body
   API Reference: input id=example / (try C or E)
  /body
  /html

  Here is what I return in multiaction actroller

  Code:
  searchVal =  ServletRequestUtils.getStringParameter(request, q);
  list= service.getResult(searchVal );
  return new ModelAndView(SEARCH,  Arr,  list.toArray());

  Thanks in advance.
  Any help will be appreciated.

 Anny- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Cycle plugin: some images not loading

2008-12-12 Thread TNTitan

 I think this is just a result of some of your images not yet being
 downloaded to the browser when Cycle transitions them in.   You can
 either add images dynamically (see the 'add' demos on the Cycle page)
 or wait until the window 'load' event fires (instead of using the
 'ready' event) to start Cycle.

I changed the page to hide the images until the window load is
complete, and then I am triggering Cycle.  That seems to be working
fine.  Thanks for the suggestion!

However, I still don't quite understand the previous behavior.  The
images were not missing just until they were downloaded.  They were
never displayed, even long after the page was loaded and the images
had been cycled through multiple times.  I agree that the problem
seems to be that the browser does not have a copy of the images, but I
can't explain why.  Is there something about starting Cycle before the
images are downloaded that causes the browser to stop downloading
them?  Is Cycle actually removing the images from the DOM rather than
just hiding them?  If so, that would explain what I am seeing.

TNTitan


[jQuery] Re: How do I use getjson to make two attribute pairs

2008-12-12 Thread ricardobeat

According to the API the URL is in item.link, so you just need to wrap
the image in an anchor:

function(data){
  $.each(data.items, function(i,item){
$(img/).attr(src, item.media.m)
.appendTo(#images)
.wrap('a href='+item.link+'/a);
if ( i == 4 ) return false;
  });
});



On Dec 12, 9:45 am, desbest afanintheho...@gmail.com wrote:
 
 HERES THE TASK
 
 To get the 5 newest photos from Flickr tagged with the word light.

 
 HERES THE CODE
 
 html
 head
   script src=../jquery.js/script

   script
   $(document).ready(function(){
     $.getJSON(http://api.flickr.com/services/feeds/photos_public.gne?
 tags=lighttagmode=anyformat=jsonjsoncallback=?,
         function(data){
           $.each(data.items, function(i,item){
             $(img/).attr(src, item.media.m).appendTo(#images);
             if ( i == 4 ) return false;
           });
         });
   });
   /script
   styleimg{ height: 100px; float: left; }/style
 /head
 body
   div id=images/div
 /body
 /html

 ==
 HERES THE OUTPUT
 ==http://sampleswap.uk.to/json/test.html

 ==
 The src of the image is the item.media.m
 According to the flickr api (http://www.wait-till-i.com/2007/10/22/
 hacking-flickr-the-json-way/)
 the href of the image is item.link.m

 How do I make the images be a hyperlink to to the actual Flickr page
 of the image?


[jQuery] Re: JSONP and callback function name

2008-12-12 Thread jtuchscherer

Thanks, Eric, for the reply. But I am only writing the receiving part,
the client. The server is out of my hands. I need to obey the
authentication that they have already in place which leads me to my
problem, that I still haven't figured out.

On Dec 11, 10:15 am, Eric Garside gars...@gmail.com wrote:
 If you are writing the webservice, why not just have it exclude the callback
 param, or change the authentication method to not just hash the params sent
 in?

 On Thu, Dec 11, 2008 at 3:54 AM, jtuchscherer jtuchsche...@gmail.comwrote:





  Hi there,

  I am about to write a web service client with JQuery and I ran into a
  pretty weird problem.
  For some web service calls I need to authenticate a user. Part of the
  authentication is to create a MD5 checksum of all request parameters
  plus values plus a secret. The server than validates the  MD5
  checksum, creating one on its on with the submitted parameter and
  values.This is where my problem comes in. When using JSONP I will have
  a different callback parameter (callback=?) then the server
  (callbck=jsonp+timestamp).

  I found this code in the jquery-1.2.6.js:

  Line 2512: var jsc = now();

  [...]

  Line 2604               // Build temporary JSONP function
  Line 2605               if ( s.dataType == json  (s.data 
  s.data.match(jsre)
  || s.url.match(jsre)) ) {
  Line 2606                       jsonp = jsonp + jsc++;

  I was able to fix my problem to delete Line 2512 and setting the jsc
  variable in my part of the script. Then I have control over it and now
  what functionName jquery will use to overwrite the ? of the callback
  parameter.

  But, of course, I don't want to hack the jquery library. Is there
  another more elegant way to overwrite the jsc variable? I am sure
  there is one, but all my searches didn't bring up anything useful.
  Therefore I am happy about any kind of input.

  Thanks,
  Johannes

 --
 Eric Garside gars...@gmail.com
 Lead PHP Developer


[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread KyleFarris

Umm... also make sure you are using the double equals sign when doing
comparisons... Like:

if (response.login = Login Successful) {
  top.location.href = site_manager.cfm;
} else {
 $('#contentdiv').empty().fadeIn(1000).append(response.login);
}

On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
 Wow, this is just basic JavaScript syntax

 if (conditon) {

 }
 else {
 }

 you have

  if (response.login = Login Successful);

 drop the semi-colon after both your (conditions)

 On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:

  How should this be written?  I can't figure it out.
  I keep getting syntax error: else

  success: function(response){

       if (response.login = Login Successful);
       {top.location.href = site_manager.cfm}

       else

       if (response.login == Login Unsuccessful);
       {$('#contentdiv').empty().fadeIn(1000).append(response.login)};

  }


[jQuery] Change URL in beforeSend

2008-12-12 Thread vtjiles

I have an app and want to change the url for all ajax requests to give
them a relative path. I tried to set up a global change using
ajaxSetup and beforeSend, but the url was only updated in the config,
not the request object. Any thoughts on how to do this?

code
$.ajaxSetup({
   beforeSend : function(J) {
  this.url = /newpath/ + this.url;
   }
});
/code


[jQuery] Re: Opacity for a menu background, but not for the element inside

2008-12-12 Thread ricardobeat

This will be easier sometime around 2012 when RGBA and HSLA colors are
widely supported :)

On Dec 12, 1:22 pm, Liam Potter radioactiv...@gmail.com wrote:
 Jim, read the question again ;)

 Anyway.
 There is no simple solution to this problem, I'd advise using a PNG
 image as it is the cleanest way to achieve this.

 Jim D wrote:
  You can use the CSS 'opacity' property.  It accepts a value between
  0.0 and 1.0.  For example, if you wanted to set the opacity of an
  element to 40%, you would use:

  opacity: 0.4;

  However, in true MS style, you have to do something different to get
  it to work in IE.  Internet Explorer accepts the 'filter' property.
  Do make the example above work in IE, you would use:

  filter: alpha(filter = 40)

  You can learn a little more about it here:
 http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-i...

  Hope that helps.

  On Dec 12, 6:10 am, Cyril G magiccy...@gmail.com wrote:

  Hye,

  I would like to create a menu, with a 80% opacity background, but I
  want to keep the link element at 100% opacity.

  For example :
  lia href=link.htmllorem ipsum/a/li
  I would like to have the li element at 80%, but the a element at
  100% (or 120%).

  I know that I could use PNG, but it would be great if I could do this
  with just a CSS Color and jQuery. Is there any solution ?


[jQuery] Re: Is there a createElement equivalent in jQuery?

2008-12-12 Thread Jozz

I found this plugin that work well..

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





On Dec 4, 5:20 am, Yansky forbo...@gmail.com wrote:
 Hi, I was just wondering if there was a createElement equivalent in jQuery.
 e.g. var el = document.createElement('div');

 I know I can create it with the inbuilt innerHTML way in jQuery - $('div
 id=foo /');
 But I like to add event handlers to the element I've just created without
 having to traverse the dom to find it and then assign an event listener.

 e.g. This is how I like to do it:
 var altPlayerControlsA3 = document.createElement('a');
 altPlayerControlsA3.href='#';
 altPlayerControlsA3.setAttribute('style','margin:5px;');
 altPlayerControlsA3.id=myytplayerControlsMute;      
 altPlayerControlsA3.textContent=Mute;
 altPlayerControlsA3.addEventListener('click', function(e){

   e.preventDefault();

               //do stuff

 }, false);

 document.body.appendChild(altPlayerControlsA3);

 but with jQuery I seem to have to do it like this:

 $('body').append(lt;a href=# id=myytplayerControlsMute'
 style=margin:5px;Mute);
 $('#myytplayerControlsMute').click(function(){...

 Is jQuery able to create elements not using innerHTML?
 --
 View this message in 
 context:http://www.nabble.com/Is-there-a-createElement-equivalent-in-jQuery--...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Konqueror problems?

2008-12-12 Thread romeo

I have a site using JQuery which works a treat using Firefox, Opera
and IE, on Windows and Linux (as well as Safari), but which does not
work at all with Konqueror on Kubuntu (Gutsy, 7.10). Using fadeIn
animations, nothing fades in - the elements remain invisible. Are
there known problems with Konqueror? There does not appear to be an
error console as such to check things with.


[jQuery] Rounded corners plugin with image support for IE?

2008-12-12 Thread da

I've been playing with jquery.corners.js and like it. Seems to work
well.

The only gotcha is that it doesn't seem to support the rounding of
objects that are using a background image in IE.

In IE, it 'adds' to the top of the object to create the rounded
corners, and moves the background image down.

Anyone know if that's user error on my part, or, if it is an issue
with that particular plugin, if there's another plugin that will
accommodate the rounding of objects in IE that use background images?

-DA


[jQuery] [treeview] Would like to limit toggle to the plus/minus icons

2008-12-12 Thread Syntaxis

A few feature requests:

1. I want to be able to click on the text inside an LI-tag without
toggling the tree. Just like in a filesystem, I want to select the
folder, but not necessarily expand it's view.

2. Please keep up the good work!


[jQuery] jQuery Cycle Plugin: 1 pager to control 2 slideshows

2008-12-12 Thread Neil

I have been searching for a way to have 1 pager to control 2
slideshows with the same number of slides. Where one slideshow can
have a scrollLeft and another just with a fade. Is this possible with
the current plugin?


[jQuery] jQuery Cycle Plugin: 1 pager to control 2 slideshows

2008-12-12 Thread Neil

Is there a way in the jQuery Cycle Plugin to have have 1 pager control
2 slideshows? Where one slideshow has a scrollLeft effect and the
other has a fade effect.


[jQuery] Re: BlockUI unchecks checkboxes

2008-12-12 Thread fabianofranz

I had exactly the same issue here, with Chrome:

- You check a checkbox via javascript
- Make an ajax request, then blockUI
- blockUI uncheckes you previously checked checkbox

Best regargs,

Fabiano Franz
http://fabianofranz.com



On 23 out, 21:44, Mike Alsup mal...@gmail.com wrote:
 What exactly is the problem you're seeing?  Could you possibly post a
 demo page somewhere?

 Mike

 On Oct 23, 10:22 am, Snooky jsn...@gmail.com wrote:

  Alright, so I saw that this issue had been raised before, but
  apparently never actually fixed.

  I only tested it in FF andChrome.

  To reproduce:
  html:
  input type=checkbox value=3 id=mycheck /
  div id=return /div

  js:
  $(function()
  {
     $(input#mycheck).click(function()
     {
        // do something with ajax
     }

     $(#return).ajaxStart(function()
     {
        $.blockUI();
     })
     .ajaxStop(function()
     {
        $.unblockUI();
     });

  }

  The fix because I was in a hurry to get something done:
 blockui.js, ~ line 265:
  //    var events = 'mousedown mouseup keydown keypress click';
  //    b ? $(document).bind(events, opts, handler) : $
  (document).unbind(events, handler);


[jQuery] Would anyone care to critique my approach/code to this login scheme?

2008-12-12 Thread Rick Faircloth

Hello, all...

I appreciate everyone's help in getting my first ColdFusion/Ajax/jQuery
code working for this login...except for one minor (sarcasm) point.
The cf line of code in the first page below (PRE_LOGIN.CFM),
which should prevent the login dialog from appearing after someone
logs in, is not doing anything.  I've tried checking the variable with
cfdump var = '#session#', but I get an error saying the variable doesn't 
exist.
Upon successful login, it should get set (session.manager_id) in the
manager_data.cfc below.  Why?

Much of the code and approach has been hacked together from various
tutorials, etc., not specifically dealing with login.

If anyone wants to take the time to look over the code involved in the
pages below and critique the code or approach, if even on just one point,
it would be most welcome...it's how I learn while doing.

The pages involved haven't been optimized for production in terms of their
names, etc., this is just a proof-of-concept at this point.

Anyway, here's the code and approach:



PRE_LOGIN.CFM (first page visited to trigger dialogue if no one's logged
in)


!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;

cfsetting showdebugoutput=no

head

   script type=text/javascript src=jquery-1.2.6.min.js/script
   script type=text/javascript src=jquery.dimensions.min.js/script

   script type=text/javascript src=shadowbox-jquery.js/script
   script type=text/javascript src=shadowbox-2.0.js/script


   cfif not isdefined('session.manager_id')   === This line, I thought, 
would keep the script
from running

 script type=text/javascript

  Shadowbox.loadSkin('classic', 'skin');
  Shadowbox.loadLanguage('en', 'lang');
  Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 
'wmp'], 'player');

  window.onload = function(){

 var options = {
player: 'iframe',
width:  '400',
height: '380',
title:  'Login',
content:'login.cfm',
};

  Shadowbox.init({modal:true,enableKeys:false});
  Shadowbox.open(options);
  }

  /script

   cfelse

 cflocation url=site_manager.cfm addtoken=no

   /cfif

/head

body





LOGIN.CFM (launched in the iframe modal window via the js in the page
above)--


cfsetting showdebugoutput=no

script language=JavaScript src=jquery.js type=text/javascript/script

script

   $(document).ready(function() {

   $('#contentdiv').html('nbsp;'); 

   $('#login-button').click(function(){
  var formval = {email_address:$('#email-address').val(),
 password:$('#password').val()};

  $.ajax({
  type: POST,
   url: login_processor.cfm,
  dataType: json,
  data: formval,
   success: function(response){
   if (response.login == Login 
Successful)
  { top.location.href = 
site_manager.cfm }


   else
{
$('#contentdiv').empty().fadeIn(1000).append(response.login); }
  }


   });
 });
   });  

/script

style type=text/css

   body { font-family: Arial, Helvetica, sans-serif; 
font-size:12px; color:white; }
   #wrapper-div { padding:40px; text-align:left; color:#fff; }
   #databox { border: 1px solid Gray; margin:30px auto 0px auto; 
padding: 10px; width:
200px; } 
   #contentdiv  { color:white; margin-top: 10px; }
   #shadowbox_nav_close { display:none; }

/style

div id=wrapper-div

   Email Address
   input id=email-address type=text name=email_address size=48 /br

   Password
   input id=password type=password name=password size=48 /br

   input id=login-button type=submit value=Login /

   p style=margin-top:20px; id=contentdiv /p

/div





LOGIN_PROCESSOR.CFM
--

cfsetting showdebugoutput=no

cfset mdata = createObject(component,manager_data)
cfset thedata = mdata.getmanagerData(form.email_address, form.password)
cfset ojson = createObject(component,cfjson)
cfset results = ojson.encode(thedata)


[jQuery] Re: Submit a form automatically

2008-12-12 Thread Rick Faircloth

Sorry I don't have an answer for you, Adam. (I'm new to js and jQuery)
But I was just curious as to what you were trying to do with
a dynamically created (and dynamically filled?) form that submits
immediately?

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of Adam
 Sent: Friday, December 12, 2008 11:03 AM
 To: jQuery (English)
 Subject: [jQuery] Submit a form automatically
 
 
 I have a dynamically created form that I'd like to submit
 automatically after it loads.  It doesn't look like forms have an
 onload event.  I would use the window onload, but the form isn't
 necessarily around when the window loads - it is created later in a
 jquery popup.
 
 Any suggestions?  I am using the jquery form plugin if it matters.



[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Rick Faircloth

Thanks, Eric!

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of Eric
 Sent: Friday, December 12, 2008 11:13 AM
 To: jQuery (English)
 Subject: [jQuery] Re: What's the correct way to write this code?
 
 
 If you're looking for a fast, but thorough, intro to Javascript, I
 recommend Douglas Crockford's The Javascript Programming Language
 video, which can be seen in four parts over at Yahoo Video:
 http://video.yahoo.com/search/?p=crockford+javascriptt=video
 
 Here's a link to part 1:
 http://video.yahoo.com/watch/111593/1710507
 
 Crockford's book Javascript: The Good Parts is also quite wonderful.
 
 -E
 




[jQuery] Re: [treeview] Would like to limit toggle to the plus/minus icons

2008-12-12 Thread Jörn Zaefferer
The treeview binds click events on span-elements. If you remove or
replace those, you should get the desired behaviour.

Jörn

On Fri, Dec 12, 2008 at 4:55 PM, Syntaxis m.hage...@gmail.com wrote:

 A few feature requests:

 1. I want to be able to click on the text inside an LI-tag without
 toggling the tree. Just like in a filesystem, I want to select the
 folder, but not necessarily expand it's view.

 2. Please keep up the good work!



[jQuery] Re: Submit a form automatically

2008-12-12 Thread Liam Potter


you could do something like this...

$(document).ready(function () {
   document.NAME_OF_FORM_HERE.submit();
});

Rick Faircloth wrote:

Sorry I don't have an answer for you, Adam. (I'm new to js and jQuery)
But I was just curious as to what you were trying to do with
a dynamically created (and dynamically filled?) form that submits
immediately?

Rick

  

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Adam
Sent: Friday, December 12, 2008 11:03 AM
To: jQuery (English)
Subject: [jQuery] Submit a form automatically


I have a dynamically created form that I'd like to submit
automatically after it loads.  It doesn't look like forms have an
onload event.  I would use the window onload, but the form isn't
necessarily around when the window loads - it is created later in a
jquery popup.

Any suggestions?  I am using the jquery form plugin if it matters.



  




[jQuery] Re: What's the correct way to write this code?

2008-12-12 Thread Rick Faircloth

Thanks, Kyle...

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of KyleFarris
 Sent: Friday, December 12, 2008 9:21 AM
 To: jQuery (English)
 Subject: [jQuery] Re: What's the correct way to write this code?
 
 
 Umm... also make sure you are using the double equals sign when doing
 comparisons... Like:
 
 if (response.login = Login Successful) {
   top.location.href = site_manager.cfm;
 } else {
  $('#contentdiv').empty().fadeIn(1000).append(response.login);
 }
 
 On Dec 12, 9:07 am, MorningZ morni...@gmail.com wrote:
  Wow, this is just basic JavaScript syntax
 
  if (conditon) {
 
  }
  else {
  }
 
  you have
 
   if (response.login = Login Successful);
 
  drop the semi-colon after both your (conditions)
 
  On Dec 12, 8:58 am, Rick Faircloth r...@whitestonemedia.com wrote:
 
   How should this be written?  I can't figure it out.
   I keep getting syntax error: else
 
   success: function(response){
 
        if (response.login = Login Successful);
        {top.location.href = site_manager.cfm}
 
        else
 
        if (response.login == Login Unsuccessful);
        {$('#contentdiv').empty().fadeIn(1000).append(response.login)};
 
   }



[jQuery] Re: BlockUI unchecks checkboxes

2008-12-12 Thread MorningZ

 Could you possibly post a demo page somewhere?

Mike, this code:
http://paste.pocoo.org/show/95075/

shows what he means, i even tried to change .click to .change and
it still never checks the box

Results.ashx  just returns hello world in plain text and works fine
in FireFox






On Oct 23, 6:44 pm, Mike Alsup mal...@gmail.com wrote:
 What exactly is the problem you're seeing?  Could you possibly post a
 demo page somewhere?

 Mike

 On Oct 23, 10:22 am, Snooky jsn...@gmail.com wrote:

  Alright, so I saw that this issue had been raised before, but
  apparently never actually fixed.

  I only tested it in FF and Chrome.

  To reproduce:
  html:
  input type=checkbox value=3 id=mycheck /
  div id=return /div

  js:
  $(function()
  {
     $(input#mycheck).click(function()
     {
        // do something with ajax
     }

     $(#return).ajaxStart(function()
     {
        $.blockUI();
     })
     .ajaxStop(function()
     {
        $.unblockUI();
     });

  }

  The fix because I was in a hurry to get something done:
  blockui.js, ~ line 265:
  //    var events = 'mousedown mouseup keydown keypress click';
  //    b ? $(document).bind(events, opts, handler) : $
  (document).unbind(events, handler);


[jQuery] Re: Konqueror problems?

2008-12-12 Thread MorningZ

Are there known problems with Konqueror?

To start with, it's not supported

http://docs.jquery.com/Browser_Compatibility

jQuery generally works with Konqueror and Firefox 1.0.x, but there
may be some unexpected bugs since we do not test them as regularly as
Firefox 1.5+, IE6+, Opera 9+ and Safari 2.0.2+. 


with the use of generally being pretty vague unfortunately





On Dec 12, 9:40 am, romeo johannes.mo...@gmail.com wrote:
 I have a site using JQuery which works a treat using Firefox, Opera
 and IE, on Windows and Linux (as well as Safari), but which does not
 work at all with Konqueror on Kubuntu (Gutsy, 7.10). Using fadeIn
 animations, nothing fades in - the elements remain invisible. Are
 there known problems with Konqueror? There does not appear to be an
 error console as such to check things with.


[jQuery] jquery ajax-built page with embedded ajax code issue

2008-12-12 Thread ray

i've got a page where the body is dynamically generated/regenerated
using ajax with clickable links, using the following snippet to
replace the maintext div w/ the output from the ajax.php script:

   $('.ajax_link').click(function() {
  clicked_link_id = $(this).attr(id);
  $.ajax({
 dataType: text,
 type: POST,
 url: ajax.php,
 data: a= + clicked_link_id,
 success: function(msg) {
$(#maintext).fadeOut(slow, function() {
   document.getElementById('maintext').innerHTML = msg;
   $(#maintext).fadeIn(slow);
});
 },
 error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(Error:);
 }
  });
  return false;
   });

sometimes the page info returned from ajax.php (and thus displayed in
the maintext div) itself contains an ajax clickable link.  when this
link is clicked, however, instead of being correctly 'intercepted' by
the ajax snippet above, instead attempting to actually load the link
specified in the href parameter in the browser (which i've set to #,
since i want jquery to handle the link).

any help would be appreciated.
thanks,
-ray


[jQuery] mod'ing pseudo-classes...possible?

2008-12-12 Thread D A

I'm using a sprite as a background image for a collapsible pane. It
has for states closed off, closed on, open off, open on.

When the pane opens, I want to move the background image so it's in
the 'open off' state, and then, on mouse-over, whos teh 'open on'
state.

I can easily get former to work, but the latter doesn't seem to be
working--at least via the method I'm using:

$(.detailsPaneToggle).children(a).css('background-position','0px -35px');
$(.detailsPaneToggle).children(a:hover).css('background-position','0px
-80px');

Clearly, my made-up syntax for pseudo classes isn't going to work. ;o)

I found that there are mouse-over listeners, but I'm not sure that
will give me what I want, either, as I need to listen for the
mouseover, but also need to know if the panel is open or closed.

Seems the 'gotcha' here is the use of a sprite. I could easily get
around this by just swapping out the background image, but was hoping
there was a clever way to maintain the use of the sprite (as that's
the standard for the site we're working on).

Any suggestions on how to accomplish this? Thanks!

-DA


[jQuery] Re: change input[type=button] value

2008-12-12 Thread brian

On Fri, Dec 12, 2008 at 6:52 AM, Richard D. Worth rdwo...@gmail.com wrote:

 2) Don't forget you can use .val(newValue) instead of .attr(value,
 newValue)

Yeah, I'd tried that first, then attr() because the first wasn't working.

sheepish
I felt like a terniary n00b.
/sheepish


[jQuery] Re: Selectors

2008-12-12 Thread brian

Thats a lot of divs. You didn't say which div you're aiming to to get
at. But, I think :last doesn't work the wy you're expecting (which was
my initial expectation, as well). If you add some IDs you can see how
it's working:

div id=div_pdfs
div
input name=my_file_0 size=52 onchange=my$.addfilef( this
); type=file
input class=apagar botao value=Apagar
onclick=my$.apagarf( this ); type=button
/div
div id=last_1
div
input name=my_file_1 size=52 onchange=my$.addfilef(
this ); type=file
input class=apagar botao value=Apagar
onclick=my$.apagarf( this ); type=button
/div
div id=last_2
div
input name=my_file_2 size=52
onchange=my$.addfilef( this ); type=file
input class=apagar botao value=Apagar
onclick=my$.apagarf( this ); type=button
/div
div id=last_3
div
input name=my_file_3 size=52
onchange=my$.addfilef( this ); type=file
input class=apagar botao value=Apagar
onclick=my$.apagarf( this ); type=button
/div
div id=last_4
/div
/div
/div
/div
/div

(btw, did you realise that one of those is empty?)

alert($('#div_pdfs div:last').attr('id'));

will give, last_4 because :last drills down as far as it can go. I
think you were expecting it to give you that last direct descendant,
which would be:

alert($('#div_pdfs').children('div:last')..attr('id'));
alert($('#div_pdfs').children('div:last').children('div:last').attr('id'));

... and so on.


[jQuery] Re: Is there a createElement equivalent in jQuery?

2008-12-12 Thread brian

I'm a bit like you in that specifying HTML feels a bit funny. I always
preferred to add attributes, etc. to an object(though it could be
quite tedious before jQuery). Anyway, one still needs to specify some
HTML but this is a bit better:

$('a /')
.attr('href', '#')
.attr('id', 'myytplayerControlsMute')
.css('margin', '5px')
.text('Mute')
.click(function() { e.preventDefault(); })
.appendTo('body');


[jQuery] Re: Would anyone care to critique my approach/code to this login scheme?

2008-12-12 Thread brian

Because your server var is not being set (or saved to the session, or
whatever), this really is  a Coldfusion issue.

On Fri, Dec 12, 2008 at 12:14 PM, Rick Faircloth
r...@whitestonemedia.com wrote:

 Hello, all...

 I appreciate everyone's help in getting my first ColdFusion/Ajax/jQuery
 code working for this login...except for one minor (sarcasm) point.
 The cf line of code in the first page below (PRE_LOGIN.CFM),
 which should prevent the login dialog from appearing after someone
 logs in, is not doing anything.  I've tried checking the variable with
 cfdump var = '#session#', but I get an error saying the variable doesn't 
 exist.
 Upon successful login, it should get set (session.manager_id) in the
 manager_data.cfc below.  Why?

 Much of the code and approach has been hacked together from various
 tutorials, etc., not specifically dealing with login.

 If anyone wants to take the time to look over the code involved in the
 pages below and critique the code or approach, if even on just one point,
 it would be most welcome...it's how I learn while doing.

 The pages involved haven't been optimized for production in terms of their
 names, etc., this is just a proof-of-concept at this point.

 Anyway, here's the code and approach:



 PRE_LOGIN.CFM (first page visited to trigger dialogue if no one's logged
 in)


 !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;

 cfsetting showdebugoutput=no

 head

   script type=text/javascript src=jquery-1.2.6.min.js/script
   script type=text/javascript src=jquery.dimensions.min.js/script

   script type=text/javascript src=shadowbox-jquery.js/script
   script type=text/javascript src=shadowbox-2.0.js/script


   cfif not isdefined('session.manager_id')   === This line, I thought, 
 would keep the script
 from running

 script type=text/javascript

  Shadowbox.loadSkin('classic', 'skin');
  Shadowbox.loadLanguage('en', 'lang');
  Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 
 'wmp'], 'player');

  window.onload = function(){

 var options = {
player: 'iframe',
width:  '400',
height: '380',
title:  'Login',
content:'login.cfm',
};

  Shadowbox.init({modal:true,enableKeys:false});
  Shadowbox.open(options);
  }

  /script

   cfelse

 cflocation url=site_manager.cfm addtoken=no

   /cfif

 /head

 body





 LOGIN.CFM (launched in the iframe modal window via the js in the page
 above)--


 cfsetting showdebugoutput=no

 script language=JavaScript src=jquery.js type=text/javascript/script

 script

   $(document).ready(function() {

   $('#contentdiv').html('nbsp;');

   $('#login-button').click(function(){
  var formval = {email_address:$('#email-address').val(),
 password:$('#password').val()};

  $.ajax({
  type: POST,
   url: login_processor.cfm,
  dataType: json,
  data: formval,
   success: function(response){
   if (response.login == Login 
 Successful)
  { top.location.href = 
 site_manager.cfm }


   else
{
 $('#contentdiv').empty().fadeIn(1000).append(response.login); }
  }


   });
 });
   });

 /script

 style type=text/css

   body { font-family: Arial, Helvetica, sans-serif; 
 font-size:12px; color:white; }
   #wrapper-div { padding:40px; text-align:left; color:#fff; }
   #databox { border: 1px solid Gray; margin:30px auto 0px auto; 
 padding: 10px; width:
 200px; }
   #contentdiv  { color:white; margin-top: 10px; }
   #shadowbox_nav_close { display:none; }

 /style

 div id=wrapper-div

   Email Address
   input id=email-address type=text name=email_address size=48 /br

   Password
   input id=password type=password name=password size=48 /br

   input id=login-button type=submit value=Login /

   p style=margin-top:20px; id=contentdiv /p

 /div





 LOGIN_PROCESSOR.CFM
 --

 cfsetting showdebugoutput=no

 cfset mdata = createObject(component,manager_data)
 cfset thedata = mdata.getmanagerData(form.email_address, form.password)
 cfset ojson = createObject(component,cfjson)
 cfset results = ojson.encode(thedata)

 cfoutput#results#/cfoutput







 MANAGER_DATA.CFC
 

[jQuery] Re: jquery ajax-built page with embedded ajax code issue

2008-12-12 Thread brian

This is probably the most asked question wrt jQuery.

The reason why your newly-created links are not being handled by the
ajax function is because they did not exist when the click handler was
attached. Either set the click handler to be a separate function and
ensure that any new links also get the click handler attached (in your
success block) or have a look at the liveQuery plugin.

On Fri, Dec 12, 2008 at 12:58 PM, ray rayjohnterr...@gmail.com wrote:

 i've got a page where the body is dynamically generated/regenerated
 using ajax with clickable links, using the following snippet to
 replace the maintext div w/ the output from the ajax.php script:

   $('.ajax_link').click(function() {
  clicked_link_id = $(this).attr(id);
  $.ajax({
 dataType: text,
 type: POST,
 url: ajax.php,
 data: a= + clicked_link_id,
 success: function(msg) {
$(#maintext).fadeOut(slow, function() {
   document.getElementById('maintext').innerHTML = msg;
   $(#maintext).fadeIn(slow);
});
 },
 error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(Error:);
 }
  });
  return false;
   });

 sometimes the page info returned from ajax.php (and thus displayed in
 the maintext div) itself contains an ajax clickable link.  when this
 link is clicked, however, instead of being correctly 'intercepted' by
 the ajax snippet above, instead attempting to actually load the link
 specified in the href parameter in the browser (which i've set to #,
 since i want jquery to handle the link).

 any help would be appreciated.
 thanks,
 -ray



[jQuery] Re: Would anyone care to critique my approach/code to this login scheme?

2008-12-12 Thread Rick Faircloth

Hi, Brian, and thanks for the feedback.

This solution mixes jQuery and CF, so I posted it to the CF-Talk list, as well.
Haven't heard from anyone there, yet.  Maybe they can figure out why the 
session.manager_id
isn't being set.

Any other problems or issues that you see?

Thanks,

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
 Behalf Of brian
 Sent: Friday, December 12, 2008 1:52 PM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Re: Would anyone care to critique my approach/code to this 
 login scheme?
 
 
 Because your server var is not being set (or saved to the session, or
 whatever), this really is  a Coldfusion issue.
 
 On Fri, Dec 12, 2008 at 12:14 PM, Rick Faircloth
 r...@whitestonemedia.com wrote:
 
  Hello, all...
 
  I appreciate everyone's help in getting my first ColdFusion/Ajax/jQuery
  code working for this login...except for one minor (sarcasm) point.
  The cf line of code in the first page below (PRE_LOGIN.CFM),
  which should prevent the login dialog from appearing after someone
  logs in, is not doing anything.  I've tried checking the variable with
  cfdump var = '#session#', but I get an error saying the variable doesn't 
  exist.
  Upon successful login, it should get set (session.manager_id) in the
  manager_data.cfc below.  Why?
 
  Much of the code and approach has been hacked together from various
  tutorials, etc., not specifically dealing with login.
 
  If anyone wants to take the time to look over the code involved in the
  pages below and critique the code or approach, if even on just one point,
  it would be most welcome...it's how I learn while doing.
 
  The pages involved haven't been optimized for production in terms of their
  names, etc., this is just a proof-of-concept at this point.
 
  Anyway, here's the code and approach:
 
 
 
  PRE_LOGIN.CFM (first page visited to trigger dialogue if no one's logged
  in)
 
 
  !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;
 
  cfsetting showdebugoutput=no
 
  head
 
script type=text/javascript src=jquery-1.2.6.min.js/script
script type=text/javascript src=jquery.dimensions.min.js/script
 
script type=text/javascript src=shadowbox-jquery.js/script
script type=text/javascript src=shadowbox-2.0.js/script
 
 
cfif not isdefined('session.manager_id')   === This line, I thought, 
  would keep the script
  from running
 
  script type=text/javascript
 
   Shadowbox.loadSkin('classic', 'skin');
   Shadowbox.loadLanguage('en', 'lang');
   Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 
  'wmp'], 'player');
 
   window.onload = function(){
 
  var options = {
 player: 'iframe',
 width:  '400',
 height: '380',
 title:  'Login',
 content:'login.cfm',
 };
 
   Shadowbox.init({modal:true,enableKeys:false});
   Shadowbox.open(options);
   }
 
   /script
 
cfelse
 
  cflocation url=site_manager.cfm addtoken=no
 
/cfif
 
  /head
 
  body
 
 
 
 
 
  LOGIN.CFM (launched in the iframe modal window via the js in the page
  above)--
 
 
  cfsetting showdebugoutput=no
 
  script language=JavaScript src=jquery.js 
  type=text/javascript/script
 
  script
 
$(document).ready(function() {
 
$('#contentdiv').html('nbsp;');
 
$('#login-button').click(function(){
   var formval = {email_address:$('#email-address').val(),
  password:$('#password').val()};
 
   $.ajax({
   type: POST,
url: login_processor.cfm,
   dataType: json,
   data: formval,
success: function(response){
if (response.login == Login 
  Successful)
   { top.location.href = 
  site_manager.cfm }
 
 
else
 {
  $('#contentdiv').empty().fadeIn(1000).append(response.login); }
   }
 
 
});
  });
});
 
  /script
 
  style type=text/css
 
body { font-family: Arial, Helvetica, sans-serif; 
  font-size:12px; color:white; }
#wrapper-div { padding:40px; text-align:left; color:#fff; }
#databox { border: 1px solid Gray; margin:30px auto 0px auto; 
  padding: 10px; width:
  200px; }
#contentdiv  { color:white; margin-top: 10px; }
#shadowbox_nav_close { display:none; }
 
  /style
 
  div id=wrapper-div
 
Email 

[jQuery] Re: jquery ajax-built page with embedded ajax code issue

2008-12-12 Thread ray

could you show me an example of what you mean here by this, either
using the code above or another example?  That sounds like the
'correct' way to do it.

 [ set the click handler to be a separate function and ensure that
any new links also get the click handler attached (in your success
block) ]

-Ray

On Dec 12, 12:58 pm, brian bally.z...@gmail.com wrote:
 This is probably the most asked question wrt jQuery.

 The reason why your newly-created links are not being handled by the
 ajax function is because they did not exist when the click handler was
 attached. Either set the click handler to be a separate function and
 ensure that any new links also get the click handler attached (in your
 success block) or have a look at the liveQuery plugin.

 On Fri, Dec 12, 2008 at 12:58 PM, ray rayjohnterr...@gmail.com wrote:

  i've got a page where the body is dynamically generated/regenerated
  using ajax with clickable links, using the following snippet to
  replace the maintext div w/ the output from the ajax.php script:

    $('.ajax_link').click(function() {
       clicked_link_id = $(this).attr(id);
       $.ajax({
          dataType: text,
          type: POST,
          url: ajax.php,
          data: a= + clicked_link_id,
          success: function(msg) {
             $(#maintext).fadeOut(slow, function() {
                document.getElementById('maintext').innerHTML = msg;
                $(#maintext).fadeIn(slow);
             });
          },
          error: function(XMLHttpRequest, textStatus, errorThrown) {
             alert(Error:);
          }
       });
       return false;
    });

  sometimes the page info returned from ajax.php (and thus displayed in
  the maintext div) itself contains an ajax clickable link.  when this
  link is clicked, however, instead of being correctly 'intercepted' by
  the ajax snippet above, instead attempting to actually load the link
  specified in the href parameter in the browser (which i've set to #,
  since i want jquery to handle the link).

  any help would be appreciated.
  thanks,
  -ray


[jQuery] Re: can one detect if the current tab is still visible?

2008-12-12 Thread Klaus Hartl

Have you tried to add a blur handler to the window object?

--Klaus


On 12 Dez., 05:21, Rene Veerman rene7...@gmail.com wrote:
 I've got a slideshow that polls the server each 7 seconds for new images
 to display, and want to pause it when the tab that the user is on isn't
 visible..
 I have little hope of it being possible (in all browsers), but am asking
 anyway ;)

 Perhaps, perhaps, they thought of it..

 If u know of a way, please let me / us know.


  1   2   >