[jQuery] Re: question about approaching an interactive image gallery

2009-04-24 Thread ml2009

Hi Roryreiff -

would these plugins help?

http://malsup.com/jquery/cycle/

http://code.google.com/p/agile-carousel/

On Apr 15, 11:43 am, roryreiff roryre...@gmail.com wrote:
 Hi there,

 I want to start developing a simple interactive image gallery for a
 home page. My goal is for it to behave similar to SlideViewer 
 (http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imagesli...)
 in it's functionality, except that instead of clicking on a list of
 numbers, there will be navigation controls( arrow left, arrow right)
 to go forwards or backwards in the images. I also want to have
 accompanying text that appears in a div overlay.

 I am thinking that best way to do this is to have jQuery interacting
 with an XML file that contains the image urls and the accompanying
 text? I also want the behavior that on page load I prefetch all the
 images and text so that the navigation between images is seamless (at
 least prefetch a certain number ahead). Does anyone have input on how
 to approach this?

 Thanks,


[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-04-24 Thread ml2009

Hi Roryreiff - thank you so much.

Someone helped me out the other day.  Here is another version:


multiemail: function(value, element) {
 if (this.optional(element)) // return true on optional 
element
 return true;
var emails = value.split( new RegExp( \\s*,\\s*, gi ) );
valid = true;
 for(var i in emails) {
value = emails[i];
valid=valid  
jQuery.validator.methods.email.call(this, value,
element);
}
return valid;

},

On Apr 1, 12:14 pm, roryreiff roryre...@gmail.com wrote:
 ml2009,

 I seem to have it working within the confines of validating multiple
 email addresses within the plugin's reg exp. I made the validation
 check run only if the email length is greater than one...this takes
 care of the case when a user has a comma after the last email address
 (i.e., this prevents validation on the empty list or empty list with
 space). I also remove any whitespaces before or after each email
 address. Hopefully this will help:

 email: function(value, element) {
                         if(this.optional(element))
                         {
                                 return true;
                         }
                         var valid = true;
                         var emails = value.split(,);
                         for(var i in emails)
                         {
                                 emailAddress = Trim(emails[i]);
                                 if (emailAddress.length  0) {
                                         valid = valid  
 /^((([a-z]|\d|[!#\$%'\*\+\-\/=\?\^_`{\|}~]|
 [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%'\*\+\-
 \/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)
 \x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f
 \x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-
 \uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF
 \uFDF0-\uFFEF]*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@
 ((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|
 [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-
 \uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-
 \uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-
 \uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|
 \.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF
 \uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(emailAddress);
                                 }
                         }
                         return valid;
                 },

 // remove whitespaces at beginning and end of string
 function Trim(str){
           while(str.charAt(0) == ( ) )
           {  str = str.substring(1);
           }
           while(str.charAt(str.length-1) ==   )
           {  str = str.substring(0,str.length-1);
           }
           return str;
         }

 On Mar 2, 10:06 am,ml2009mcl...@systemsview.biz wrote:



  Hi Stephan - thank you so much for your response.

  I keep trying, but being unsuccessful.  I tried valid = valid ,
  (valid=valid) , and (valid == valid) , but I get a syntax error
  reference in Firebug. I even tried declaring

   var valid = (value.length  0); // make sure that value is not empty

  outside the for loop with a conditional statement if(valid==true)
  inside the for loop, but I am sure I'm doing something wrong.  could
  you help again?

  jQuery.validator.addMethod(multiemail, function(value, element)
  {
  if (this.optional(element)) // return true on optional element
                             return true;
                  var emails = value.split(',');
                                  valid = true;
                           for(var i in emails) {
                                  value = emails[i];
                                          valid=valid   return 
  jQuery.validator.methods.email.call(this,
  value, element);
                                  }
                  }
                          return valid;
                          },
     jQuery.validator.messages.email // use default message
    );

  On Mar 2, 2:50 am, Stephan Veigl stephan.ve...@gmail.com wrote:

   Hi,

   you have the same error as above.

   Having a return statement in a for loop will evaluate the first element 
   only.
   If you want to validate all emails that's a logical AND conjunction of
   all single email validations. So you have to have some and function in
   your code as well.
   Try something like:

   valid = true;
   for(var i in emails) {
       value = emails[i];
       valid = valid  jQuery.validator.methods.email.call(this, value,
   element, param);}

   return valid;

   by(e)
   Stephan

   

[jQuery] Re: Variable div #menu height - Jquery

2009-04-24 Thread André

This is a shameless bump... Can someone please help me out?

On 22 apr, 14:27, André andrejilde...@gmail.com wrote:
 Whoops,

 The Javascript file can be found 
 here:http://www.opee.nl/jquery/js/init.jshttp://www.opee.nl/jquery/js/init1.js

 Greetings,
 Andre

 On 22 apr, 14:15, André andrejilde...@gmail.com wrote:

  Hello all,

  I've been struggling with implementing Jquery into my navigation menu.
  The
  menu itself is an unordered list with subitems. The subitems appear
  next to
  the main menuitems (for showing, hiding and append classes to these
  items I
  use the 'collapsor'-plugin). So far so good...

  What is bugging me is the height of the menu, which is static. I want
  the
  div #menu to ‘grow’ along when one of the menu-items gets clicked and
  the subitems pop-out.
  This is how I want it to look like (uses a predefined 
  height):http://www.opee.nl/jquery/index.htmlhttp://www.opee.nl/jquery/init.js

  I want to calculate the height ul to use as the height of the div
  #menu. Since I couldn’t grab the .height() of a hidden element, I
  tried to count the children of the next element within the navigation
  by multiplying the height of the li (which is 24px) with the number of
  children +  8px for the padding-top. Maybe it’s more clear when you
  just look at the source.
  This is what I have so far (yup, I miserably failed :) 
  ):http://www.opee.nl/jquery/index1.htmlhttp://www.opee.nl/jquery/init1.js

  I hope you can help me tackle this problem. Any help is appreciated!

  Greetings,
  Andre


[jQuery] Re: traversing UL: Request for help

2009-04-24 Thread Joseph Le Brech

why do you need to give it a class programmaticaly?

try this:

$(ul a).addClass(highlight);

http://docs.jquery.com/Selectors/descendant#ancestordescendant


_
Share your photos with Windows Live Photos – Free.
http://clk.atdmt.com/UKM/go/134665338/direct/01/

[jQuery] Re: Infinite Recall Over a Fixed Interval

2009-04-24 Thread Joseph Le Brech

is this why you have to use setTimeout instead and have the previous loop send 
the instance of the object to the next cycle?

 Date: Thu, 23 Apr 2009 14:46:54 -0700
 Subject: [jQuery] Re: Infinite Recall Over a Fixed Interval
 From: ricardob...@gmail.com
 To: jquery-en@googlegroups.com
 
 
 jQuery obj vs HTML element has nothing to do with it. When you fire
 the function with setInterval or setTimeout it is executed in the
 global scope, so 'this' doesn't refer to the current object anymore,
 that was the problem.
 
 Just for fun, how about this to simplify it?
 
 jQuery.fn.JSClock = function() {
   var self = this;
   function pad(i) {
   return (i  10) ? '0'+i : i;
   };
   setInterval(function(){
  var t = new Date();
  self.text(Local Time: +t.getHours()+:+pad( t.getMinutes() )
 +:+pad( t.getSeconds() );
   }, 1000);
 };
 
 Or this to make it more complex? :)
 (has the advantage of starting immediately)
 
 jQuery.fn.JSClock = function() {
   var self = this;
   (function(){
 var time = Local Time: _Hours:_Minutes:_Seconds.replace(/_(\w+)/
 g, function(a,b){
   var d = new Date()['get'+b]()
 return d10 ? '0'+d : d;
   });
   self.text( time );
   setTimeout(arguments.callee, 1000);
   })();
 };
 
 I better get back to work...
 
 On Apr 23, 4:20 am, Joseph Le Brech jlebr...@hotmail.com wrote:
  I often find that sometimes $(this).html will work.
 
 
 
   Date: Wed, 22 Apr 2009 19:49:13 -0700
   Subject: [jQuery] Re: Infinite Recall Over a Fixed Interval
   From: kiu...@mac.com
   To: jquery-en@googlegroups.com
 
   On Apr 22, 5:29 pm, James james.gp@gmail.com wrote:
Something like the below?
 
(function($) {
  $.fn.JSClock = function() {
  setInterval(function() {
   // code to get and write time here
  }, 1000);
   }
 })(jQuery);
 
   In and of themselves the above and the following both fail. My guess
   is that this.html() object is not a proper reference.  I say this,
   because the code JSClock() does not interfere with the rest of my
   jQuery methods when placed inside the $.ready( ) method.
 
   (function($) {
  $.fn.JSClock = function() {
  function timeFormat(i) {
  if (i  10) {
  i=0 + i;
  }
  return i;
  }
  setInterval(function() {
  var today=new Date();
  var h=today.getHours();
  var m=today.getMinutes();
  var s=today.getSeconds();
  m=timeFormat(m);
  s=timeFormat(s);
  this.html(Local Time:  + h +:+ m +:+s);
  },500);
  }
   })(jQuery);
 
   $(document).ready(function() {
  $('#flowers').writeColorOfFlower();
  $('#today').toDate();
  $('#clock').JSClock();
   });
 
  _
  View your Twitter and Flickr updates from one place – Learn 
  more!http://clk.atdmt.com/UKM/go/137984870/direct/01/

_
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/

[jQuery] Re: traversing UL: Request for help

2009-04-24 Thread ryan.j

Surely it's easier as a CSS jobby, rather than JS?

ul a { background-color:#f00; color:#fff; }

or

ul a:hover { background-color:#f00; color:#fff; }

On Apr 24, 9:26 am, Joseph Le Brech jlebr...@hotmail.com wrote:
 why do you need to give it a class programmaticaly?

 try this:

 $(ul a).addClass(highlight);

 http://docs.jquery.com/Selectors/descendant#ancestordescendant

 _
 Share your photos with Windows Live Photos – 
 Free.http://clk.atdmt.com/UKM/go/134665338/direct/01/


[jQuery] Re: traversing UL: Request for help

2009-04-24 Thread ryan.j

it's easier as a CSS jobby, rather than JS

ul:hover a { background-color:#f00; color:#fff; }

but that won't work in ie6 though.

On Apr 24, 9:26 am, Joseph Le Brech jlebr...@hotmail.com wrote:
 why do you need to give it a class programmaticaly?

 try this:

 $(ul a).addClass(highlight);

 http://docs.jquery.com/Selectors/descendant#ancestordescendant

 _
 Share your photos with Windows Live Photos – 
 Free.http://clk.atdmt.com/UKM/go/134665338/direct/01/


[jQuery] Re: traversing UL: Request for help

2009-04-24 Thread ryan.j

and since you're dealing with an entire UL, rather than targetting
sections if you're dead set on doing it programatically you might
aswell assign the class hilight to the UL rather than all the child A
and have the css below to handle that

ul.hilight a { background-color:#f00; color:#fff; }

On Apr 24, 11:34 am, ryan.j ryan.joyce...@googlemail.com wrote:
 it's easier as a CSS jobby, rather than JS

 ul:hover a { background-color:#f00; color:#fff; }

 but that won't work in ie6 though.

 On Apr 24, 9:26 am, Joseph Le Brech jlebr...@hotmail.com wrote:

  why do you need to give it a class programmaticaly?

  try this:

  $(ul a).addClass(highlight);

 http://docs.jquery.com/Selectors/descendant#ancestordescendant

  _
  Share your photos with Windows Live Photos – 
  Free.http://clk.atdmt.com/UKM/go/134665338/direct/01/


[jQuery] Re: traversing UL: Request for help

2009-04-24 Thread ryan.j

and since you're dealing with an entire UL rather than targeting
specific sections within the element, if you're dead-set on doing it
programmatically you might as well assign the class 'hilight' to the
UL rather than all the child A's

On Apr 24, 11:34 am, ryan.j ryan.joyce...@googlemail.com wrote:
 it's easier as a CSS jobby, rather than JS

 ul:hover a { background-color:#f00; color:#fff; }

 but that won't work in ie6 though.

 On Apr 24, 9:26 am, Joseph Le Brech jlebr...@hotmail.com wrote:

  why do you need to give it a class programmaticaly?

  try this:

  $(ul a).addClass(highlight);

 http://docs.jquery.com/Selectors/descendant#ancestordescendant

  _
  Share your photos with Windows Live Photos – 
  Free.http://clk.atdmt.com/UKM/go/134665338/direct/01/


[jQuery] Re: IE6/IE7 Error (Object doesn't support this property or method)

2009-04-24 Thread MorningZ

I debugged the code  find htat its crashing at this line :
*head.insertBefore( script, head.firstChild );* 

IE doesn't understand that you are dealing with a DOM node, hence the
.firstChild or .insertBefore isn't supported for use at that point


On Apr 24, 12:23 am, Zeeshan Khan khan.zeesha...@gmail.com wrote:
 I debugged the code  find htat its crashing at this line :
 *head.insertBefore( script, head.firstChild );*
 *
 *
 it first checks these 2 lines

 *if ( !jsonp )*
 *success();*
 *
 *
 then it cums at
 *head.insertBefore( script, head.firstChild ); * crashes...Hope this helps
 *
 *Regards;

 Zeeshan Ahmed Khan

 On Thu, Apr 23, 2009 at 1:19 PM, Jonathan Vanherpe (T  T NV) 

 jonat...@tnt.be wrote:
   That is pretty weird, especially since the error happens on a line that
  doesn't exist. The IE js debugger proved useless too. It also loads the
  wrong page.

  As far as i can tell (using Fiddler), the code tries to load Page1.aspx ,
  but instead of putting that in the tab, it embeds the whole current page
  (including all the javascript files, which get loaded again and are probably
  the cause of the error you get).

  If you can manage to figure out why it embeds the current page instead of
  the page you want, you'll have solved your problem.

  Jonathan

  Zeeshan Khan wrote:

  Check this Link U'll knw the Problem that i'm talking about.
   http://aspspider.info/KhanZeeshan/

   Check it IE6  IE7 i chekced it in IE8,FF 3.0 Chorme  safari ti works
  gr8 in All browsers xcpt IE6  IE7.

  On Thu, Apr 23, 2009 at 8:47 AM, Zeeshan Khan 
  khan.zeesha...@gmail.comwrote:

  i validated my html   Javascript as well...but there was no error..i
  don't know any free asp.net web hosting site...if u know any please let
  me know i'll upload my site there..then u guys can check it thoroughly..

  On Wed, Apr 22, 2009 at 6:02 PM, Jonathan Vanherpe (T  T NV) 
  jonat...@tnt.be wrote:

  Fact is that the error is quite generic. I think I've even gotten it for
  forgetting to use a ; at the end of a line.

  Jonathan

  MorningZ wrote:

  --
  Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be

  --
    [image:www.tnt.be] http://www.tnt.be/?source=emailsig  *Jonathan
  Vanherpe*
  jonat...@tnt.be -www.tnt.behttp://www.tnt.be/?source=emailsig - tel.:
  +32 (0)9 3860441


[jQuery] Fadein png black border IE 8 / 7..

2009-04-24 Thread Mech7

Does anybody know a fix for this... if i fadein an element with
transparent png as bg, there is a big ugly black border around it. How
to remove it 0_o


[jQuery] Preventing certain child elems triggering a parent event

2009-04-24 Thread Gordon

I'm adding a feature to a table where it can have a compact r a
verbose display.  When in compact mode a class is added to the table
causing various various elements in the table cells to match a CSS
rule to set them display: none.

I want to be able to expand individual rows by clicking to them so I
added a live event handle to the rows that causes the row to have a
class added when clicked.  With more stylesheet rules I can restore
the full view to just the clicked table row.

The problem is that the rows contain elements that are supposed to do
things when clicked (hyperlinks, mailto:links, form inputs etc) and I
want to ignore clicks that happen on these child elements.  There are
also child elements that otherwise don't do anything when clicked,
paragraphs, images, etc and I want them to trigger the parent
element's click behaviour.  Things are complicated further by things
like having images, some of which are in hyperlinks or forms.  If the
image is inside an interactive element (hyperlink, form, etc) then
clicking it should not trigger the expand/collapse behaviour.  If the
image is not part of an interactive element (paragraph, list item,
etc) then it should trigger the expand/collapse behaviour.

My Javascript code is as follows:

function clickRow (evt)
{
//console.log (this);
//console.log (evt);
switch (evt.target.tagName)
{
case 'A':
case 'INPUT':
case 'IMG'  :
break;
default :
$('.browserList tr').not (this).removeClass ('hover');
$(this).toggleClass ('hover');
break;
}
}


$(function ()
{
$('#fullView').click (function ()
{
var image   = $('img', this);
if ($('.browserList').hasClass ('compact'))
{
//$(this).text ('-');
image.attr ('src', '/ui/icons/zoom_out.png');
$('.browserList').removeClass ('compact');
$('.listRows tr').removeClass ('hover').die ('click', 
clickRow);
}
else
{
//$(this).text ('+');
image.attr ('src', '/ui/icons/zoom_in.png');
$('.browserList').addClass ('compact');
$('.listRows tr').removeClass ('hover').live ('click', 
clickRow);
}
return (false);
});
});

An example table row looks like this:

tr class=even
  td class=sort roundLeftul class=sortGroup
  li class=up
form method=post action=sort.php id=cmsSortUp_2258
  div
input type=hidden value=2258 name=itm_id/
input type=hidden value=-1 name=sort/
input type=image src=/ui/icons/arrow_up.png
title=Sort Up alt=Sort Up/
  /div
/form
  /li
  li class=down
form method=post action=sort.php id=cmsSortDown_2258
  div
input type=hidden value=2258 name=itm_id/
input type=hidden value=1 name=sort/
input type=image src=/ui/icons/arrow_down.png
title=Sort Down alt=Sort Up/
  /div
/form
  /li
/ul/td
  td class=itemInfo CmsSurveyul
  li class=title
h2a href=viewitem.php?itm_id=2258Test 2/a/h2
ul class=ctrlGroup
  li a href=viewitem.php?itm_id=2258img width=16
height=16 src=/ui/icons/magnifier.png title=Preview
alt=Preview//a /li
  li a href=iteminfo.php?itm_id=2258img title=Info
alt=Info src=/ui/icons/information.png//a /li
/ul
  /li
  li class=filenametest_2.php/li
  li class=summary noSummaryNo summary!/li
/ul/td
  td class=userInfoul
  li class=editor
h2a href=mailto:t...@example.com;Tim Bisley/a/h2
  /li
  li class=editDate26 Mar 2009 - 10:38/li
  li class=userEdit
ul class=ctrlGroup
  liimg src=/ui/icons/user_edit.png//li
  liimg src=/ui/icons/group_edit.png//li
/ul
  /li
/ul/td
  td class=controls roundRightul class=ctrlGroup
  lia href=editsurvey.php?itm_id=2258 class=cmsControlimg
width=16 height=16 src=/ui/icons/application_form_edit.png
title=Edit Survey Questions alt=Edit Survey Questions//a/li
  lia href=editdoc.php?itm_id=2258img width=16
height=16 src=/ui/icons/page_edit.png title=Edit alt=Edit//
a/li
  li a href=itemoptions.php?itm_id=2258
class=cmsControlimg width=16 height=16 src=/ui/icons/
cog_edit.png title=Options alt=Options//a/li
  li
form method=post action=publish.php id=cmsPub_2258
class=cmsPub
  div
input type=hidden value=2258 name=itm_id/
input type=image src=/ui/icons/tick.png
title=Publish alt=Publish id=cmsButPub_2258 class=cmsButPub/
  /div
/form
  /li
/ul
ul class=ctrlGroup supplemental
 

[jQuery] Re: Cluetip override Error to stop showing cluetip

2009-04-24 Thread Marv

Karl,

I evaluated ten (10) different tooltip plugins for jQuery and selected
Cluetip based on features, functionality, and ease-of-use. So far, it
has met my expectations wonderfully! Thank you for your efforts. For
the past 2 days I have been struggling with the Cluetip API trying to
programmatically close a displayed Cluetip and could not find a
reliable way to do this.

You solved ALL my problems with this one simple method.

Thanks again.

On Apr 23, 10:59 pm, Karl Swedberg k...@englishrules.com wrote:
 thanks a lot for your patience with me as I make improvements to the  
 plugin. I really appreciate your questions and suggestions. The truth  
 is, this plugin is the very first one that I wrote, and I started  
 working on it just a couple months after I started learning  
 JavaScript, so if I had to do it all over again, I'd write it a lot  
 differently now. Nevertheless, I'm glad it's holding up as well as it  
 is, even with all of the duct tape I've applied to it over the years.  
 I used to give people a hack for hiding the tooltip if they wanted to  
 do it manually, but tonight I realized it would be dead simple to add  
 an artificial event binding that would hide the tooltip when  
 triggered. Now, if you grab the very latest (updated a couple minutes  
 ago) from Github, you should be able to write $
 (document).trigger('hideCluetip'); and it will be hidden.

 https://github.com/kswedberg/jquery-cluetip/tree/master

 Cheers,

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Apr 23, 2009, at 9:35 PM, DotnetShadow wrote:



  Hi there,

  I've been using the most recent version of cluetip 0.9.9.c and I have
  overridden error function in the cluetip, but I was wondering how I
  can hide the actual cluetip? I tried $(this).isActive = false but this
  didn't work.

  error: function(xhr, textStatus) {
     /// HIDE THE TOOLTIP?

  }

  Basically I got a check in the error function that checks whether to
  show the error or redirect to the login page in case I have forms
  authentication. So how can I hide the tooltip?

  Regards DotnetShadow


[jQuery] Get background-image url ?

2009-04-24 Thread Mech7

What is the best way to get the background image url in css?
i have found this in crossfade plugin but does not work in opera..

var target = $$.css('backgroundImage').replace(/^url|[\(\)]/g, '');


[jQuery] SuperFish Arrows

2009-04-24 Thread Praveen

How is the arrows displayed in the superfish menus? If I would like to
change to an image of my choice, how do I go about?

Regards,
Praveen


[jQuery] Re: validation plug in flicker

2009-04-24 Thread Jörn Zaefferer

Could you provide a testpage? Haven't seen that yet...

Jörn

On Fri, Apr 24, 2009 at 4:45 AM, Rabbott abbot...@gmail.com wrote:

 I am using the jquery validation plugin, i am wanting to place all the
 errors in one div at the top of the form - which works. The problem is
 that the first time I submit the form (in FF for MAC) the classes that
 get assigned to the form elements get added, and removed real quickly.
 (I have a bg color of red on the form, so i can see a flicker
 basically) - works just fine in safari. has anyone seen anything like
 this?



[jQuery] Get first child within an element

2009-04-24 Thread dgb

Hi,

I've got a reference to a TableCell and I'd like to use jQuery to get
the first instance of an IMG tag within that TableCell, but can't
get the syntax right, I understand how it would work if I were to
reference the TableCell by and ID or class, but not when I have a
direct reference to the cell, I've got:

var tdRef = xxx;

$(tdRef).html();

... could somebody let me know what the jQuery syntax should be to get
the first img tag within tdRef?

Thanks! :-)



[jQuery] Superfish - permanently display drop-down

2009-04-24 Thread Alex

the superfish dropdown menu is almost perfect for some work i'm doing.
however, on some pages i need the dropdown content from the relevant
menu item to be on display.
i'm competent enough to simply change the hover state in css for a
javascript disabled menu to work, but would appreciate some help
adapting the full superfish version to do so.

is it possible to tweak the code to do this on certain pages?

thanks in advance, Alex.


[jQuery] Autocomplete Question

2009-04-24 Thread pjecty

Is there's a way to link each seach result value in the localdata.js
to another page so that when i search for something and click it, it
goes to another page?
Thanks


[jQuery] Re: Superfish menus in nav-bar style require subnavs to behave correctly?

2009-04-24 Thread kemie

Sorry to add a me too, but I'd also be interested in a solution to
this problem. The workaround suggested in the official example
(duplicating the link with a descriptive text) is not always feasible/
practical.


[jQuery] Autoreload in thickbox

2009-04-24 Thread anikutta

I have the page which is  displayed in thickbox js, Once the values
are entered it should automatically update in the parent window
without refreshing the page. I tried with this line of code

parent.top.tb_remove()
parent.location.reload(1)

But this is refreshing. I dont the page to get refresh as soon as I
close the thichbox window.

Can any one assist on this


[jQuery] Changing the arrow color : Superfish

2009-04-24 Thread Praveen

How to change the arrow color(right and down arrows) in the superfish
menu?

-Praveen


[jQuery] Re: Jcarousel - Can I make a jcarousel completely reset and reload!

2009-04-24 Thread TomDB

I'm also trying to have access to the jcarousel object. there are a
couple of methods accessbile via a callback function, but since I'd
like to call them from an other objects callback function - I'd need
them to be accessble directly. Unless somebody has an other solution?

On Feb 28, 2:01 am, Alextronic alejandro.garciacue...@gmail.com
wrote:
 Oh I'm having the same problem, exactly.

 I have been working on this for a long time, me not being proficient
 in jQuery.
 I'm trying to do something very much like your tabs loading new sets
 of items.
 The carousel gets confused, the items seem to persist, and I can'treloadit 
 without having the old number of items.
 Did you get to a solution?
 Thank you

 Alex

 On 13 feb, 09:19, FruitBatInShades fruitbatinsha...@gmail.com wrote:

  I am having terrible trouble gettingajcarouselto reset.  I have a
  series of tabs that when clicked get thejcarouselto load witha new
  set of items.  I have been trying for days, trying the ajax demos and
  just replacing the content by setting the html() but to no avail. it
  works but the carousel gets confused. Even if I walk the list and
  remove all the items they still seem to be there.

  1. How do I get a reference to the carousel object via jquery
  2. How do I get it clear itself and the dom of its items
  3. How do Ireloadit without it still having the old number of items
  etc.

  Many thanks

  Lee


[jQuery] performance of jQuery.each

2009-04-24 Thread Magnus O.

Hi!

I saw that the jQuery.each function iterates over the array like this:

for ( name in object){}

From what I read this is one of the slowest ways of iterating over an
array in js.

I made a very simple test like:

var array = [];
for (var i = 0; i  100; i++)
array[i] = Math.random();

var t = new Array();

//Start jquery.each test
var start = (new Date).getTime();
$(array).each(function() {
t.push(this);
});
alert((new Date).getTime() - start);

t = new Array();

//Start another iteraton way test
start = (new Date).getTime();
var i = array.length;
while (i--) {
t.push(array[i]);
}
alert((new Date).getTime() - start);



In my testbrowser the jquery.each testtime was 2378ms and the other
test was 110ms. This is a big difference. I know this test was very
easy bit it still shows that the each function could be made faster?

Is there any reason why the for ( name in object){} way of iterating
an array is used? Is this the most optimized way of iteration an
array?

//Magnus


[jQuery] autocomplete

2009-04-24 Thread gianluca.corre...@gmail.com

Hi,
  I'm trying to use jQuery and the autocomplete plugin for the first
time in a web application, so maybe I've made a gross mistake in using
it. I tried to start with a plain copy and paste of the example
provided implementing my own service for retrieving the data.
  The behavior I'm having, that is different from the one of the
example, is that after I digited 4 characters, the autocomplete box
just disappear, or better, it is there but without any alement inside
(and I am sure that the list has at least 2 elements inside that match
the edited input.
  I've searched the forum for similar problems but I didn't find
anything similar. Is it a trivial problem of wrong cut and paste? Can
anybody help me?
  Thanks in advance
  Gianluca C.


  The html code is the following:

 ...
h2 class=titleRKB Explorer/h2
table
tr
  td  label for=rkbexplorer_uriRKB Explorer uri:/label/
td
  td  input id=rkbexplorer_uri type=text
name=rkbexplorer_uri maxlength=200 style=width:255px;//td
/tr
/table
...
script type=text/javascript
function findValue(li) {
if( li == null ) return alert(No match!);
// if coming from an AJAX call, let's use the CityId as the value
if( !!li.extra ) var sValue = li.extra[0];
// otherwise, let's just display the value in the text box
else var sValue = li.selectValue;
}

function selectItem(li) {
findValue(li);
}

function formatItem(row) {
return row[1];
}

function lookupAjax(){
var oSuggest = $(/search/person/)[0].autocompleter;
oSuggest.findValue();
return false;
}

$(document).ready(function() {
$(#rkbexplorer_uri).autocomplete(
/search/person/,
{
delay:1,
minChars:3,
matchSubset:1,
matchContains:1,
cacheLength:100,
onItemSelect:selectItem,
onFindValue:findValue,
formatItem:formatItem,
matchSubset: true,
autoFill:false
}
);
})
/script
...

The service used, search/person/ retrieve contacts of people in the
right format:

uri1 | name1
uri2 | name2
uri3 | name3
uri4 | name4
uri5 | name5


[jQuery] Re: IE6/IE7 Error (Object doesn't support this property or method)

2009-04-24 Thread Zeeshan Khan
so what shud i do to solve my prblm?
Regards;

Zeeshan Ahmed Khan


On Fri, Apr 24, 2009 at 3:58 PM, MorningZ morni...@gmail.com wrote:


 I debugged the code  find htat its crashing at this line :
 *head.insertBefore( script, head.firstChild );* 

 IE doesn't understand that you are dealing with a DOM node, hence the
 .firstChild or .insertBefore isn't supported for use at that point


 On Apr 24, 12:23 am, Zeeshan Khan khan.zeesha...@gmail.com wrote:
  I debugged the code  find htat its crashing at this line :
  *head.insertBefore( script, head.firstChild );*
  *
  *
  it first checks these 2 lines
 
  *if ( !jsonp )*
  *success();*
  *
  *
  then it cums at
  *head.insertBefore( script, head.firstChild ); * crashes...Hope this
 helps
  *
  *Regards;
 
  Zeeshan Ahmed Khan
 
  On Thu, Apr 23, 2009 at 1:19 PM, Jonathan Vanherpe (T  T NV) 
 
  jonat...@tnt.be wrote:
That is pretty weird, especially since the error happens on a line
 that
   doesn't exist. The IE js debugger proved useless too. It also loads the
   wrong page.
 
   As far as i can tell (using Fiddler), the code tries to load Page1.aspx
 ,
   but instead of putting that in the tab, it embeds the whole current
 page
   (including all the javascript files, which get loaded again and are
 probably
   the cause of the error you get).
 
   If you can manage to figure out why it embeds the current page instead
 of
   the page you want, you'll have solved your problem.
 
   Jonathan
 
   Zeeshan Khan wrote:
 
   Check this Link U'll knw the Problem that i'm talking about.
http://aspspider.info/KhanZeeshan/
 
Check it IE6  IE7 i chekced it in IE8,FF 3.0 Chorme  safari ti works
   gr8 in All browsers xcpt IE6  IE7.
 
   On Thu, Apr 23, 2009 at 8:47 AM, Zeeshan Khan 
 khan.zeesha...@gmail.comwrote:
 
   i validated my html   Javascript as well...but there was no error..i
   don't know any free asp.net web hosting site...if u know any please
 let
   me know i'll upload my site there..then u guys can check it
 thoroughly..
 
   On Wed, Apr 22, 2009 at 6:02 PM, Jonathan Vanherpe (T  T NV) 
   jonat...@tnt.be wrote:
 
   Fact is that the error is quite generic. I think I've even gotten it
 for
   forgetting to use a ; at the end of a line.
 
   Jonathan
 
   MorningZ wrote:
 
   --
   Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be
 
   --
 [image:www.tnt.be] http://www.tnt.be/?source=emailsig  *Jonathan
   Vanherpe*
   jonat...@tnt.be -www.tnt.behttp://www.tnt.be/?source=emailsig -
 tel.:
   +32 (0)9 3860441


[jQuery] validation plug in flicker

2009-04-24 Thread Rabbott

I am using the jquery validation plugin, i am wanting to place all the
errors in one div at the top of the form - which works. The problem is
that the first time I submit the form (in FF for MAC) the classes that
get assigned to the form elements get added, and removed real quickly.
(I have a bg color of red on the form, so i can see a flicker
basically) - works just fine in safari. has anyone seen anything like
this?


[jQuery] Re: Cluetip override Error to stop showing cluetip

2009-04-24 Thread Karl Swedberg
Wonderful, Marv! Thanks for that note. I'm glad it's working for you.  
My next step, before I start on a complete rewrite, is to update the  
documentation with the added/improved features.


Cheers,

--Karl


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




On Apr 24, 2009, at 7:28 AM, Marv wrote:



Karl,

I evaluated ten (10) different tooltip plugins for jQuery and selected
Cluetip based on features, functionality, and ease-of-use. So far, it
has met my expectations wonderfully! Thank you for your efforts. For
the past 2 days I have been struggling with the Cluetip API trying to
programmatically close a displayed Cluetip and could not find a
reliable way to do this.

You solved ALL my problems with this one simple method.

Thanks again.

On Apr 23, 10:59 pm, Karl Swedberg k...@englishrules.com wrote:

thanks a lot for your patience with me as I make improvements to the
plugin. I really appreciate your questions and suggestions. The truth
is, this plugin is the very first one that I wrote, and I started
working on it just a couple months after I started learning
JavaScript, so if I had to do it all over again, I'd write it a lot
differently now. Nevertheless, I'm glad it's holding up as well as it
is, even with all of the duct tape I've applied to it over the years.
I used to give people a hack for hiding the tooltip if they wanted to
do it manually, but tonight I realized it would be dead simple to add
an artificial event binding that would hide the tooltip when
triggered. Now, if you grab the very latest (updated a couple minutes
ago) from Github, you should be able to write $
(document).trigger('hideCluetip'); and it will be hidden.

https://github.com/kswedberg/jquery-cluetip/tree/master

Cheers,

--Karl


Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Apr 23, 2009, at 9:35 PM, DotnetShadow wrote:




Hi there,


I've been using the most recent version of cluetip 0.9.9.c and I  
have

overridden error function in the cluetip, but I was wondering how I
can hide the actual cluetip? I tried $(this).isActive = false but  
this

didn't work.



error: function(xhr, textStatus) {
   /// HIDE THE TOOLTIP?



}



Basically I got a check in the error function that checks whether to
show the error or redirect to the login page in case I have forms
authentication. So how can I hide the tooltip?



Regards DotnetShadow




[jQuery] Re: jeditable addition of checkboxes, doubleclick to select.

2009-04-24 Thread Wellington

A used your sugestion by Han to solve my problem, but because of
problem of undefined don't works for me, then I tried done by other
way as not add one item at result list. I create a function
noSelection.

I used the 3 firsts steps that they used.

the 4th step I rewrote as

if(!config.mouseDownOnSelect) {
 hideresults();
 if (selectionMade == 0) {
   $input.trigger(noSelection); // This Line Changed
 }

}

and I need instance de function noSelection to it works I need add
this at line 39.

  result: function(handler) {
  return this.bind(result, handler);
  },

  noSelection: function(handler) {
  return this.bind(noSelection, handler);
  },

  search: function(handler) {
  return this.trigger(search, [handler]);
  },


and to finally I personalize for each autocomplete that I have on my
page.

$(#name).autocomplete('seatch.php');

$(#id).result(function(event, data, formatted) {
  $(#id).val(data[1]);
 }

$(#id).noSelection(function() {
  $(#id).val(); // Clear the input hidden
 }

My code where I call the autocomplete is a little diferent of this
above, but I think work as same. see how was my code.

  $(function() {
  $(#txtSomeone).autocomplete('ajax.aspx', {
  multiple: false,
  minChars: 2,
  parse: function(data) {
  return $.map(eval(data), function(row) {
  return {
  data: row,
  value: row.texto,
  result: row.texto
  }
  });
  },
  formatItem: function(item) {
  return format(item);
  }
  }).result(function(e, item) {
  $(#hiddenOfSomeone).val(item.codigo);
  })
  .noSelection(function(){
 $(#hiddenOfSomeone).val();
  }) ;

  });


[ ],s

sorry for my English ;)

Wellington Rodrigues


On 1 mar, 11:08, Paul Noden nods...@gmail.com wrote:
 Hi Brian,

 How did you get on with adding checkbox support to jeditable, it would
 be nice to have jeditable support all input types such as checkboxes
 and radio buttons (the ok/cancel would need to be for the entire named
 group) and of course password, and file. jeditable is pretty great as
 it stands, but with a more rounded support it makes things that little
 bit quicker.

 I've yet to test this comprehensively, but I've written a very quick
 proof of concept to allow the callback function make changes to the
 value returned. This allows your callback function to intercept the
 response from the server and process any validation messages you might
 want to alert the user to.

 On the simplest level:

  var callback = settings.callback || function() { };
 becomes
  var callback = settings.callback || function(value, settings)
 { return value; };

 callback.apply(self, [self.innerHTML, settings]);
 becomes
 $(self).html(callback.apply(self, [self.innerHTML, settings]));

 This allows you to then use a callback to provide validation
 responses, such as edit unsaved, 'value' already exists and then
 return the control to it's original value or as desired...

 As a quick example your server response might be %%original value%%
 [edit unsaved, '%%new value%%' already exists] for a failure and %
 %new value%% for a success together with a callback like the
 following:

 callback :function(value, settings) {
                   if(value.indexOf('[')=0){
                                 
 alert(value.substring(value.indexOf('[')+1,value.indexOf(']')));
                                 return value.substring(0,value.indexOf('['));
                 }else{
                         return value;
                 }
      }

 of course you can put your validation message into an element on the
 page rather than alert the message... Hopefully this illustrates the
 power of a proper callback function and will see the idea develop
 within the plugin.

 Paul


[jQuery] Re: Background flash white briefly

2009-04-24 Thread advert_red

Try adding wmode: 'transparent' to .flash();

as in  $('#hello').flash({ src: 'hello.swf', height:199, width:240,
wmode: 'transparent', });


[jQuery] Re: 2 Superfish menus on one page (1 verticle, 1 horizontal)

2009-04-24 Thread kemie

can you post a link/example? hard to guess otherwise.



[jQuery] autocomplete stop providing entries when typing

2009-04-24 Thread gianluca.corre...@gmail.com

Hi,
  I'm trying to use jQuery and the autocomplete plugin for the first
time in a web application, so maybe I've made a gross mistake in using
it. I tried to start with a plain copy and paste of the example
provided implementing my own service for retrieving the data.
  The behavior I'm having, that is different from the one of the
example, is that after I digited 4 characters, the autocomplete box
just disappear, or better, it is there but without any alement inside
(and I am sure that the list has at least 2 elements inside that match
the edited input.
  I've searched the forum for similar problems but I didn't find
anything similar. Is it a trivial problem of wrong cut and paste? Can
anybody help me?
  Thanks in advance
  Gianluca C.


  The html code is the following:

 ...
h2 class=titleRKB Explorer/h2
table
tr
  td  label for=rkbexplorer_uriRKB Explorer uri:/label/
td
  td  input id=rkbexplorer_uri type=text
name=rkbexplorer_uri maxlength=200 style=width:255px;//td
/tr
/table
...
script type=text/javascript
function findValue(li) {
if( li == null ) return alert(No match!);
// if coming from an AJAX call, let's use the CityId as the value
if( !!li.extra ) var sValue = li.extra[0];
// otherwise, let's just display the value in the text box
else var sValue = li.selectValue;
}

function selectItem(li) {
findValue(li);
}

function formatItem(row) {
return row[1];
}

function lookupAjax(){
var oSuggest = $(/search/person/)[0].autocompleter;
oSuggest.findValue();
return false;
}

$(document).ready(function() {
$(#rkbexplorer_uri).autocomplete(
/search/person/,
{
delay:1,
minChars:3,
matchSubset:1,
matchContains:1,
cacheLength:100,
onItemSelect:selectItem,
onFindValue:findValue,
formatItem:formatItem,
matchSubset: true,
autoFill:false
}
);
})
/script
...

The service used, search/person/ retrieve contacts of people in the
right format:

uri1 | name1
uri2 | name2
uri3 | name3
uri4 | name4
uri5 | name5


[jQuery] Re: Some pseudo help if you'd be so kind?

2009-04-24 Thread MOZ

How about this?

Code:
http://beski.wordpress.com/2009/04/24/show-more-comments-ajax-jquery-php-mysql/

Demo:
http://mix26.com/demo/show_more/index.php

-Beschi

On Apr 22, 7:18 pm, ldexterldesign m...@ldexterldesign.co.uk wrote:
 Hey guys,

 I have 10 separate posts displayed on a page. I want to hide 7 (of the
 oldest) of them and display a link; 'show more posts' - kinda a
 pagination thing I guess.

 My PHP pumps out 10 posts, and I'd like to do the hide/show with JS.

 I'm aware I could simply add and remove a height class, hiding/
 revealing the posts, but I'd like to make it a bit more complex and
 have accurate control over how many posts are shown if my client turns
 around and says he wants 5 posts displayed prior to the button being
 clicked.

 Just thinking about how I might go about this in code I'm thinking of
 doing it the following way. I'm not an excellent programmer, so the
 time you'd, potentially, save me getting it clear in pseudo will most
 likely save me a lot of time this evening. Hell, there might even be a
 plug-in or simpler solution than below you can think of:

 - I get a unique 'post-x' ID for each of the posts, where 'x' is the
 post ID, so I was thinking about just hiding the lowest 7 numeric post
 IDs displayed on the page?

 Thoughts?

 :]
 L


[jQuery] Delayed execution

2009-04-24 Thread Dragon-Fly999

Hi, my page allows the user to enter a number in a text box and a
search request is sent to the server (if the user stops typing for 200
ms) using AJAX.  The following is the desired behavior.

(1) User starts typing a number in the text box.  As the user is
typing, no search requests are sent to the server.
(2) Once the user stops typing (i.e. no key events for 200 ms), use
$.post() to execute a search.

What is a good way to detect that the user hasn't typed anything for
200 ms?  Is there anything in JQuery that I can use? Thank you.


[jQuery] Re: Autocomplete Question

2009-04-24 Thread Tom Worster

On 4/23/09 10:27 PM, pjecty pje...@gmail.com wrote:

 Is there's a way to link each seach result value in the localdata.js
 to another page so that when i search for something and click it, it
 goes to another page?

could you write such redirection into a .result() handler?

http://docs.jquery.com/Plugins/Autocomplete/result#handler




[jQuery] File uploads, Form plugin and XMLHttpReques t‏

2009-04-24 Thread oi_antz

I'm trying to ajaxify my application, which requires submitting forms
via $.post or $(form).ajaxSubmit. Problem I'm having with $.post is
that file fields don't work. So I use $(form).ajaxSubmit and my
response text is something like this:

{
'_JS':'/* javascript code to evaluate, contains escaped quotes
(\) */',
'_CONTENT' : '!-- html code containing escaped quotes and stuff --
'
}

The callback tries JSON.parse(responseText), but I am finding all my
\ characters inside data members _JS and _CONTENT have been converted
to html entities. I guess this is because the jquery form plugin is
using a custom html element for xhr and firefox converts quotes found
inside quotes to html entities.

Is there a way to configure the form plugin to use XMLHttpRequest, or
another method that doesn't tamper with the responseText?


[jQuery] Re: AJAX Response causing character display problems with chars like

2009-04-24 Thread Michael Lawson

You could always try converting it to an html entity in your application,
then you don't have to worry about character sets.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   rmeder rme...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/24/2009 08:56 AM  
   
  Subject:[jQuery] AJAX Response causing character display problems with 
chars like
   






Hi Guys,

When passing a é character as part of an an ajax responset and
printing the text to the screen from js, the value display as a ?. I
tried converting the piece of text to utf8 and then it displays
correctly on a windows server however on Linux server the vallues
still displays as a ?.

I am using Java as my backend code and encode the text as UTF8 by
using the getBytes method. Can anybody assist me with the problem or
have any suggestions how to go about fixxing it.


Regards,

Ryan






inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Delayed execution

2009-04-24 Thread temega

something along the lines of this:

var interval;
$(#searchField).keyup(function(){
clearInterval(interval);
interval = setInterval($.post(), '200');
});


On Apr 24, 1:46 pm, Dragon-Fly999 dragon-fly...@hotmail.com wrote:
 Hi, my page allows the user to enter a number in a text box and a
 search request is sent to the server (if the user stops typing for 200
 ms) using AJAX.  The following is the desired behavior.

 (1) User starts typing a number in the text box.  As the user is
 typing, no search requests are sent to the server.
 (2) Once the user stops typing (i.e. no key events for 200 ms), use
 $.post() to execute a search.

 What is a good way to detect that the user hasn't typed anything for
 200 ms?  Is there anything in JQuery that I can use? Thank you.


[jQuery] Re: File uploads, Form plugin and XMLHttpRequest?

2009-04-24 Thread Donny Kurnia

oi_antz wrote:
 I'm trying to ajaxify my application, which requires submitting forms
 via $.post or $(form).ajaxSubmit. Problem I'm having with $.post is
 that file fields don't work. So I use $(form).ajaxSubmit and my
 response text is something like this:
 
 {
 '_JS':'/* javascript code to evaluate, contains escaped quotes
 (\) */',
 '_CONTENT' : '!-- html code containing escaped quotes and stuff --
 '
 }
 
 The callback tries JSON.parse(responseText), but I am finding all my
 \ characters inside data members _JS and _CONTENT have been converted
 to html entities. I guess this is because the jquery form plugin is
 using a custom html element for xhr and firefox converts quotes found
 inside quotes to html entities.
 
 Is there a way to configure the form plugin to use XMLHttpRequest, or
 another method that doesn't tamper with the responseText?
 

Are you using malsup's form plugins? In the server side processing, the
json response must wrapped inside textarea/textarea. You can see the
the example php page in malsup's site.

File upload didn't submitted via XMLHttpRequest, but via hidden iframe.
That's why you need to wrap it inside textarea so jQuery can parse the
response json.

--
Donny Kurnia
http://hantulab.blogspot.com
http://www.plurk.com/user/donnykurnia



[jQuery] Re: traversing UL: Request for help

2009-04-24 Thread paulinstl

This looks promising.  I'll give it a shot and report back.

On Apr 24, 12:35 am, mkmanning michaell...@gmail.com wrote:
 From the sample markup with the highlight classes, it looks like the
 OP wants to highlight anchors in the LI tags that are in direct line
 to the final anchor. In that case, just adding the class to all the
 anchors in each parent UL won't work. If you filter the results you
 can achieve what your sample code indicates:

 $('a').hover(function(){
         var _this = this;
         $(this).parents('li').find('a').filter(function(){
                 return $.inArray(_this,$(this).parent().find('a'))+1;
         }).addClass('highlight');},function(){

         $(this).parents('li').find('a').removeClass('highlight');

 });

 On Apr 23, 2:51 pm, Ricardo ricardob...@gmail.com wrote:



  Assuming the base UL or any of it's parents are contained in another
  UL (which would mess this up):

  $(this).parents('ul').find('a').addClass('highlight');

  On Apr 23, 5:00 pm, paulinstl paulsha...@gmail.com wrote:

   Request: I want to highlight every A within the parents of an
   object up to the base element of UL

   For example, this original code:
   ul
     lia href=/link/a/li
     lia href=/link/a
       ul
         lia href=/link/a/li
         lia href=/link/a
           ul
             lia href=/link/a
               ul
                 lia href=/HOVER OVER THIS/a/li
               /ul
             /li
             lia href=/link/a/li
           /ul
         /li
         lia href=/link/a/li
       /ul
     /li
     lia href=/link/a/li
   /ul

   Should appear like so (assuming an addclass method):

   ul
     lia href=/link/a/li
     lia href=/ class=highlightlink/a
       ul
         lia href=/link/a/li
         lia href=/ class=highlightlink/a
           ul
             lia href=/ class=highlightlink/a
               ul
                 lia href=/ class=highlightHOVER OVER THIS/a/
   li
               /ul
             /li
             lia href=/link/a/li
           /ul
         /li
         lia href=/link/a/li
       /ul
     /li
     lia href=/link/a/li
   /ul

   I'm at a loss and I'm tired.  Can you help a brother out?  Basically
   the best path from A to Z

   Thanks for glancing at this.

   paul- Hide quoted text -

 - Show quoted text -


[jQuery] Re: AJAX Response causing character display problems with chars like

2009-04-24 Thread rmeder

when displaying as html content it works fine soon as you pass this
text through js the problem occurs by converting the é character as
a ?.


Any thoughts



On Apr 24, 2:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 You could always try converting it to an html entity in your application,
 then you don't have to worry about character sets.

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 E-mail:  mjlaw...@us.ibm.com

 'Examine my teachings critically, as a gold assayer would test gold. If you
 find they make sense, conform to your experience, and don't harm yourself
 or others, only then should you accept them.'

   From:       rmeder rme...@gmail.com                                       
                                                    

   To:         jQuery (English) jquery-en@googlegroups.com                 
                                                    

   Date:       04/24/2009 08:56 AM                                             
                                                    

   Subject:    [jQuery] AJAX Response causing character display problems with 
 chars like                                          

 Hi Guys,

 When passing a é character as part of an an ajax responset and
 printing the text to the screen from js, the value display as a ?. I
 tried converting the piece of text to utf8 and then it displays
 correctly on a windows server however on Linux server the vallues
 still displays as a ?.

 I am using Java as my backend code and encode the text as UTF8 by
 using the getBytes method. Can anybody assist me with the problem or
 have any suggestions how to go about fixxing it.

 Regards,

 Ryan

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload


[jQuery] Re: AJAX Response causing character display problems with chars like

2009-04-24 Thread Michael Lawson

I mean, convert it in your java application to an entity, that way when it
hits your javascript its a plain ASCII character representation of the
special character.  When the rendering engine picks it up, it'll display as
the special character.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   rmeder rme...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/24/2009 09:44 AM  
   
  Subject:[jQuery] Re: AJAX Response causing character display problems 
with chars like
   






when displaying as html content it works fine soon as you pass this
text through js the problem occurs by converting the é character as
a ?.


Any thoughts



On Apr 24, 2:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 You could always try converting it to an html entity in your application,
 then you don't have to worry about character sets.

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 E-mail:  mjlaw...@us.ibm.com

 'Examine my teachings critically, as a gold assayer would test gold. If
you
 find they make sense, conform to your experience, and don't harm yourself
 or others, only then should you accept them.'

   From:       rmeder rme...@gmail.com


   To:         jQuery (English) jquery-en@googlegroups.com


   Date:       04/24/2009 08:56 AM


   Subject:    [jQuery] AJAX Response causing character display problems
with chars like

 Hi Guys,

 When passing a é character as part of an an ajax responset and
 printing the text to the screen from js, the value display as a ?. I
 tried converting the piece of text to utf8 and then it displays
 correctly on a windows server however on Linux server the vallues
 still displays as a ?.

 I am using Java as my backend code and encode the text as UTF8 by
 using the getBytes method. Can anybody assist me with the problem or
 have any suggestions how to go about fixxing it.

 Regards,

 Ryan

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Changing the arrow color : Superfish

2009-04-24 Thread Charlie





arrows are image files, modify the image in css images folder


Praveen wrote:

  How to change the arrow color(right and down arrows) in the superfish
menu?

-Praveen

  






[jQuery] Re: finding mouse position within a div with a scrollbar

2009-04-24 Thread Charlie Park

Marv -

I could be mistaken here, but I think your solution's really good so
long as the entire sub-element (the DIV or image or whatever) is
visible. But if there's a scrollbar on that element, I think your code
will only tell you where you clicked in terms of the position on the
page (relative to the 0,0 of the page, or to the 0,0 of the visible
(non-scroll-bar) div), rather than the distance *within* the scrolled
div, relative to the 0,0 of the scrollbar-having div (which could be
off-screen, since you've scrolled). If that makes sense. It's tricky
to describe.

Basically, you have a 200px-tall div, and it's inside a container
that's only 50px tall. You've scrolled down by 40px, and you click a
spot that's 20px down within the element. The value you want back is
60 (40 hidden px + 20 visible px), but I think the code you gave would
only give you a value of 20. Whereas the code I listed at 4/22 8:09
should give you the value of 60.


[jQuery] Re: creating an animated PNG loader pinwheel (sprite)

2009-04-24 Thread Adam

Thanks everyone, but none of these use jquery- the mootools version is
exactly what I am looking to do. Anyone interested in helping me port
that to JQ? I have posted on devthought as well.
Thanks!

On Apr 23, 4:03 pm, Ricardo ricardob...@gmail.com wrote:
 Seems it has already been done, and more than 
 once:http://devthought.com/projects/mootools/apng/http://www.squaregoldfish.co.uk/software/animatedpng/http://www.otanistudio.com/swt/sprite_explosions/

 -- ricardo

 On Apr 23, 5:14 pm, Adam adambu...@gmail.com wrote:



  So I was trying to think of a way to create what was effectively aPNG
  animation similar to ananimatedGIF. What I decided was that it would
  be fairly simple to make aPNGsprite of each 'frame' of the
  animation, then set that image as the background of a container div,
  then move it in a stepping fashion to reveal each frame, then reset it
  when it gets to the end of the strip. If someone could help with the
  JQ to do the background-position stepping and the reset, I will post a
  link to the completed piece with my image as well. I will do a white
  and black version as well- this will make it possible to have one,
  smooth-looking loader animation to use on all background colors/image.
  Thanks!


[jQuery] animate color over time using Timers plugin

2009-04-24 Thread kgosser

Hey all,

I'm using the Timers plugin to do a count down timer. I like it a lot.

I would like to enhance my UI by having the numbering being counted
down transition from black to red as it gets closer to 0.

The jQuery UI demo for animate seems to be what I need, but what I'm
having trouble figuring out is how to have it transition gracefully
over time. It seems like the animation is a one-shot deal.

Any help or tips with this? Thanks.


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


[jQuery] Animating height but closing any already open (like an accordion)

2009-04-24 Thread Musixz Man

Hi all!

I have anywhere from 3 - 8 DIVs on a page that I open/close (animate height 
toggle) via a button and want to close any (one) that are already open when 
another is opened - just like an accordion. 

How do I either determine the current open state of a DIV so I know which to 
close, or maybe close all of them (less efficient) before opening a new one?

I can't use the UI accordion because of the way the DIVs are separated and 
nested deep within a bunch of other stuff.

The code I am using to toggle them is:

onclick=$('#slideblock_?php echo $group['id'] 
?').animate({height:'toggle',opacity:'toggle'}, 'fast')

Any help would be great. Thanks!!



_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.  
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009

[jQuery] Re: Table sorter.

2009-04-24 Thread Mazi

Hallo all.
I'm using this plugin and I consider it fantastic.

I need in a table to ignore some rows from ordering.
Is it possibile to accomplish a task like this?

Kind regards
Massimo

On Apr 21, 1:26 pm, MorningZ morni...@gmail.com wrote:
 Why not base your use/non-use of a plugin based on features and
 application for your usage?

 I don't see any plugins out there stamped jQuery Official Plugin...

 need something done, there's probably 20+ different plugins out there
 that will do it

 As for TableSorter... i use it pretty extensively, and the users of my
 site love it

 On Apr 21, 6:47 am, m.ugues m.ug...@gmail.com wrote:

  I was searching for a table sorter plugin and I found this 
  onehttp://tablesorter.com/docs/

  Is the official plugin for this purpose or there is something else.

  Kind regards

  Massimo


[jQuery] Re: traversing UL: Request for help

2009-04-24 Thread paulinstl

thanks @mkmanning... it works perfectly.

On Apr 24, 12:35 am, mkmanning michaell...@gmail.com wrote:
 From the sample markup with the highlight classes, it looks like the
 OP wants to highlight anchors in the LI tags that are in direct line
 to the final anchor. In that case, just adding the class to all the
 anchors in each parent UL won't work. If you filter the results you
 can achieve what your sample code indicates:

 $('a').hover(function(){
         var _this = this;
         $(this).parents('li').find('a').filter(function(){
                 return $.inArray(_this,$(this).parent().find('a'))+1;
         }).addClass('highlight');},function(){

         $(this).parents('li').find('a').removeClass('highlight');

 });

 On Apr 23, 2:51 pm, Ricardo ricardob...@gmail.com wrote:



  Assuming the base UL or any of it's parents are contained in another
  UL (which would mess this up):

  $(this).parents('ul').find('a').addClass('highlight');

  On Apr 23, 5:00 pm, paulinstl paulsha...@gmail.com wrote:

   Request: I want to highlight every A within the parents of an
   object up to the base element of UL

   For example, this original code:
   ul
     lia href=/link/a/li
     lia href=/link/a
       ul
         lia href=/link/a/li
         lia href=/link/a
           ul
             lia href=/link/a
               ul
                 lia href=/HOVER OVER THIS/a/li
               /ul
             /li
             lia href=/link/a/li
           /ul
         /li
         lia href=/link/a/li
       /ul
     /li
     lia href=/link/a/li
   /ul

   Should appear like so (assuming an addclass method):

   ul
     lia href=/link/a/li
     lia href=/ class=highlightlink/a
       ul
         lia href=/link/a/li
         lia href=/ class=highlightlink/a
           ul
             lia href=/ class=highlightlink/a
               ul
                 lia href=/ class=highlightHOVER OVER THIS/a/
   li
               /ul
             /li
             lia href=/link/a/li
           /ul
         /li
         lia href=/link/a/li
       /ul
     /li
     lia href=/link/a/li
   /ul

   I'm at a loss and I'm tired.  Can you help a brother out?  Basically
   the best path from A to Z

   Thanks for glancing at this.

   paul- Hide quoted text -

 - Show quoted text -


[jQuery] Please Wait While Processing help

2009-04-24 Thread Shadraq

I've designed a payment system that, generally gets a response
quickly. However, if there is any delay at all, customers will click
Pay again, thinking that they didn't hit it. This, of course, will
cause duplicate transactions.

I'm looking for some sort of Please wait while we process your
request. message/decal/modal that freezes the screen while the
payment is processing, and releases once a response comes back from
the server.

Any ideas/links to examples. I googled and searched the UI...and
didn't find anything that I could use. It is likely I missed
something.

Thanks,

Shadraq


[jQuery] jQuery Recursion/Iteration through JSON variable.

2009-04-24 Thread Bruno Gama

Hi I would like to know if there is a simple way to show all elements
of that variable?
var collectionElements = {
teste: {
var1: 'teste[]',
var2: 'brincadeira-2',
var3 : 'Elemento 2'
},
teste: {
var1 : 'teste[]',
var2 : 'brincadeira-3',
var3 : 'Elemento 3'
},
teste: {
var1 : 'teste[]',
var2 : 'brincadeira',
var3 : 'Elemento 1',
teste: {
var1 : 'teste[]',
var2 : 'brincadeira-4',
3 : 'Elemento 4'
}
}
};

I am tryin' to iterate all elements using this function (for debug
only)

function iterateAllElements( elements ) {
var ret = '';
  jQuery.each( elements, function( i,val ) {
  ret += ( typeof val == 'object') ? '\n Node ' + 
iterateAllElements
( val ) : i + ' : ' + val + ' / ';
  });
  return ret;
};

With this function my firebug Console outputs only the last object
(3th node) with its child object.

Sorry my bad english! ^^


[jQuery] Re: Delayed execution

2009-04-24 Thread Remon Oldenbeuving
The following will do the trick i guess:

var timeout;
$('#search').keyup(function(){
clearTimeout(timeout);
timeout = setTimeout($.ajax(),200);
}

On Fri, Apr 24, 2009 at 2:46 PM, Dragon-Fly999 dragon-fly...@hotmail.comwrote:


 Hi, my page allows the user to enter a number in a text box and a
 search request is sent to the server (if the user stops typing for 200
 ms) using AJAX.  The following is the desired behavior.

 (1) User starts typing a number in the text box.  As the user is
 typing, no search requests are sent to the server.
 (2) Once the user stops typing (i.e. no key events for 200 ms), use
 $.post() to execute a search.

 What is a good way to detect that the user hasn't typed anything for
 200 ms?  Is there anything in JQuery that I can use? Thank you.


[jQuery] Re: Table sorter.

2009-04-24 Thread Remon Oldenbeuving
Is this what your looking for?
http://tablesorter.com/docs/example-meta-headers.html

On Fri, Apr 24, 2009 at 5:10 PM, Mazi m.ug...@gmail.com wrote:


 Hallo all.
 I'm using this plugin and I consider it fantastic.

 I need in a table to ignore some rows from ordering.
 Is it possibile to accomplish a task like this?

 Kind regards
 Massimo

 On Apr 21, 1:26 pm, MorningZ morni...@gmail.com wrote:
  Why not base your use/non-use of a plugin based on features and
  application for your usage?
 
  I don't see any plugins out there stamped jQuery Official Plugin...
 
  need something done, there's probably 20+ different plugins out there
  that will do it
 
  As for TableSorter... i use it pretty extensively, and the users of my
  site love it
 
  On Apr 21, 6:47 am, m.ugues m.ug...@gmail.com wrote:
 
   I was searching for a table sorter plugin and I found this onehttp://
 tablesorter.com/docs/
 
   Is the official plugin for this purpose or there is something else.
 
   Kind regards
 
   Massimo


[jQuery] Re: Animating height but closing any already open (like an accordion)

2009-04-24 Thread Remon Oldenbeuving
You could just add classes for open divs?

On Fri, Apr 24, 2009 at 4:59 PM, Musixz Man mus...@hotmail.com wrote:

  Hi all!

 I have anywhere from 3 - 8 DIVs on a page that I open/close (animate height
 toggle) via a button and want to close any (one) that are already open when
 another is opened - just like an accordion.

 How do I either determine the current open state of a DIV so I know which
 to close, or maybe close all of them (less efficient) before opening a new
 one?

 I can't use the UI accordion because of the way the DIVs are separated and
 nested deep within a bunch of other stuff.

 The code I am using to toggle them is:

 onclick=$('#slideblock_?php echo $group['id']
 ?').animate({height:'toggle',opacity:'toggle'}, 'fast')

 Any help would be great. Thanks!!



 --
 Windows Live™ SkyDrive™: Get 25 GB of free online storage. Check it 
 out.http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009



[jQuery] Re: $.getScript Must Take .js File?

2009-04-24 Thread nlloyds

On Mar 26, 1:11 am, Code Daemon ryan.det...@gmail.com wrote:
 I am using codeigniter and it forms urls like this:

 http://mydomain/index.php/system/edit_js

 I'm trying to call $.getScript by going:

 $.getScript( ) but I get a
 404 not found error. I pasted the url in my webbrowser and it works
 just fine.

 Is there any way to make this work?

I'm having the same problem, and it looks like both frameworks (CI and
jQuery) are partially responsible.

If you look in firebug in the net panel or at the generated source of
your page you'll see something like http://mydomain/index.php/system/
edit_js?_=1240583133908, the ?_NNN is appended by jQuery's ajax
method and looks like a cache buster. Code igniter, however, doesn't
like to use query strings and will return a 404 on this.

To disable this you could make you own getScript function that passes
parameters to jQuery's ajax function:

// Create a modified getScript method to ignore the cache buster
function getScript(url, callback) {
return jQuery.ajax({
type: GET,
url: url,
data: null,
success: callback,
dataType: script,
cache : true
});
}

This will stop it from putting that query string in there, but certain
browsers (guess!) will cache the response indefinitely. This works
fine for data that doesn't change much, but could be a problem for
something that is frequently updated.

You other option might be to turn on query strings in CI, but that's
an all or nothing option (that's my least favorite thing about CI,
besides the language it's witten in :))

Hope that helps.

Nathan


[jQuery] Re: animate color over time using Timers plugin

2009-04-24 Thread Remon Oldenbeuving
Is there a reason why you dont just use setInterval()?
When you do it that way, you are able to make a function for the countdown,
and in the function set some nice effects as time passes on. (like fading it
from green to blue to red, or something like that).

On Fri, Apr 24, 2009 at 4:56 PM, kgosser kgos...@gmail.com wrote:


 Hey all,

 I'm using the Timers plugin to do a count down timer. I like it a lot.

 I would like to enhance my UI by having the numbering being counted
 down transition from black to red as it gets closer to 0.

 The jQuery UI demo for animate seems to be what I need, but what I'm
 having trouble figuring out is how to have it transition gracefully
 over time. It seems like the animation is a one-shot deal.

 Any help or tips with this? Thanks.


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


[jQuery] Re: Cycle Plugin - Can't Get Pause To Work

2009-04-24 Thread Nic Hubbard

Anyone?

On Apr 23, 9:44 pm, Nic Hubbard nnhubb...@gmail.com wrote:
 Shawn,

 Yes, I have pause on hover set, and this is correctly working.  It is
 when the overlay comes up, and it is suppose to pause the current
 image, which, my code seems to be correct to do so $
 ('#artistCycleParent').cycle('pause'); but it just keeps cycling and
 does not honor the pause.

 I have it in my click function, and everything in the click function
 does work, but not the pause.  Once the user clicks off of the
 overlay, it should resume.

 On Apr 23, 9:22 pm, Shawn sgro...@open2space.com wrote:

  Pause is working for me, with a catch.

  If my mouse is not over the image, it cycles.  Placing my mouse over the
  image pauses the cycling.

  Clicking the link brings up an overlay (?) and a form - at this point
  the mouse is not over the image, but over the overlay/form.  So the
  image cycles as it should.

  I don't think you want the pause option here.  I think you want to
  progamatically start/stop the cycling.  See the section Manually
  Pausing a slideshow athttp://malsup.com/jquery/cycle/int2.html.

  HTH.

  Shawn

  Nic Hubbard wrote:
   I am using the cycle plugin, but for some reason I can't get the pause
   feature to work.  I am showing a hidden div, and when I do, I need to
   pause the slideshow.
   Here is what I am using:

      $('#artistCycleParent').cycle({
              fx:      'fade',
              speed:    3000,
              timeout:  5000,
              pause:  1,
              next:   '#artworkNext',
              prev:   '#artworkPrev'
      });

      // Pause the cycle
      $('#pauseButton').click(function() {
              $('#artistCycleParent').cycle('pause');
              $(this).hide();
              $('#resumeButton').show();
              return false;
      });

      // Resume the cycle
      $('#resumeButton').click(function() {
              $('#artistCycleParent').cycle('resume');
              $(this).hide();
              $('#pauseButton').show();
              return false;
      });

   The code looks ok to me, but it just does not seem to pause.

   Example:http://www.caldwellsnyder.com/artists/montoya-ortiz/view-artworks
   Click on Contact about artwork

   Thanks.


[jQuery] Re: Please Wait While Processing help

2009-04-24 Thread Remon Oldenbeuving
If youre using ajax you should look at the Ajax-events section here:
http://docs.jquery.com/Ajax

You can easily bind a function to an ajax-event. This way you will be able
to freeze the screen, or disable all buttons.

On Fri, Apr 24, 2009 at 5:02 PM, Shadraq shadraq.thee...@gmail.com wrote:


 I've designed a payment system that, generally gets a response
 quickly. However, if there is any delay at all, customers will click
 Pay again, thinking that they didn't hit it. This, of course, will
 cause duplicate transactions.

 I'm looking for some sort of Please wait while we process your
 request. message/decal/modal that freezes the screen while the
 payment is processing, and releases once a response comes back from
 the server.

 Any ideas/links to examples. I googled and searched the UI...and
 didn't find anything that I could use. It is likely I missed
 something.

 Thanks,

 Shadraq



[jQuery] Re: Get background-image url ?

2009-04-24 Thread Daniel

$$.css('background-image').replace(/^url|[\(\)]/g, '');

should do the trick.

On Apr 24, 6:34 am, Mech7 chris.de@gmail.com wrote:
 What is the best way to get the background image url in css?
 i have found this in crossfade plugin but does not work in opera..

 var target = $$.css('backgroundImage').replace(/^url|[\(\)]/g, '');


[jQuery] Re: serialScroll option : start -- no effect

2009-04-24 Thread Niels

Sorry for my late response.

here is the demo:

If you click on:
http://www.egoactive.com/transfer/jquery-demo/#technical/django

It shouls scroll to item # 3...

As we defined in de serialScroll methode (interfase.js):
start: 3


Thanks in advance


On Apr 14, 1:16 am, Ariel Flesler afles...@gmail.com wrote:
 Can you provide a demo online ?

 Cheers
 --
 Ariel Flesler

 On Apr 10, 6:17 am, Niels niels.siem...@gmail.com wrote:

  We're using the serialScroll method and using some of the options.
  Only the option start has no effect.

  We want to scroll at the start to element 2 and not to the default
  position 0

  Suggestions?

          $('#technical').serialScroll({
                  target:'#technical-sections',
                  items:'li', // Selector to the items ( relative to the 
  matched
  elements, '#sections' in this case )
                  axis:'x',// The default is 'y' scroll on both ways
                  navigation:'#technical-navigation li a',
                  duration:900,// Length of the animation (if you scroll 2 
  axes and
  use queue, then each axis take half this time)
                  force: true, // Force a scroll to the element specified by
  'start' (some browsers don't reset on refreshes)
                  constant: false, // constant speed
                  lock:false, // Ignore events if already animating (true by 
  default)
                  //prev:'img.prev',// Selector to the 'prev' button 
  (absolute!,
  meaning it's relative to the document)
                  //next:'img.next',// Selector to the 'next' button 
  (absolute too)
                  //queue:false,// We scroll on both axes, scroll both at the 
  same
  time.
                  //event:'click',// On which event to react (click is the 
  default,
  you probably won't need to specify it)
                  //stop:false,// Each click will stop any previous 
  animations of the
  target. (false by default)
                  //lock:true, // Ignore events if already animating (true by
  default)
                  start: 2, // On which element (index) to begin ( 0 is the 
  default,
  redundant in this case )
                  //cycle:true,// Cycle endlessly ( constant velocity, true 
  is the
  default )
                  //step:1, // How many items to scroll each time ( 1 is the 
  default,
  no need to specify )
                  jump:true, // If true, items become clickable (or w/e 
  'event' is,
  and when activated, the pane scrolls to them)
                  //lazy:false,// (default) if true, the plugin looks for the 
  items on
  each event(allows AJAX or JS content, or reordering)
                  //interval:1000, // It's the number of milliseconds to 
  automatically
  go to the next


[jQuery] basic image gallery, running into a few problems

2009-04-24 Thread roryreiff

Hello there,

I have created a simply navigable image gallery with a bit of json, as
well as .animate() and altering the margin of elements. Currently, I
am pulling in the 5 most recent images with a tag of 'spock' from
flickr. It seems to be working fine, except that when clicking through
very fast it gets a bit wonky. I am also really curious as to opinions
on better ways of doing this? Perhaps there is a way that relies upon
the json instead of simply just injecting it into the dom right off
the bat?

The basic strategy I employed was to animate the current image off the
stage, and then make it invisibe, while also animating the next image
onto the stage after making it visible. I have a feeling it's these
queued effects/animations that aren't dealing so well with fast
clicks. Perhaps the best way to solve this is limit when/how the
arrows can be clicked?

Any help is greatly appreciated. Thanks!

example: http://www.pomona.edu/dev/spock/index.asp

js: http://www.pomona.edu/dev/spock/spock-feed.js


[jQuery] Re: SuperFish Arrows

2009-04-24 Thread Brad Hile

it's set in the css file at the bottom. Just change the file name and
dimensions to suit

On Apr 24, 12:09 am, Praveen praveen.rajendrab...@gmail.com wrote:
 How is the arrows displayed in the superfish menus? If I would like to
 change to an image of my choice, how do I go about?

 Regards,
 Praveen


[jQuery] Re: performance of jQuery.each

2009-04-24 Thread Daniel

Well, you have to keep in mind that not all arrays will be as
structured as yours.
with an array like [1=4,5=3,foo=4], your iteration won't work. In
fact, yours will only work for arrays with sequential numeric keys. If
that is the array that you have, a for loop might be the best way to
go. If you are trying to iterate through an array of unknown objects/
items, the each function is your way to go.

-Daniel

On Apr 24, 3:24 am, Magnus O. mag...@magnusottosson.se wrote:
 Hi!

 I saw that the jQuery.each function iterates over the array like this:

 for ( name in object){}

 From what I read this is one of the slowest ways of iterating over an
 array in js.

 I made a very simple test like:

                                 var array = [];
                                 for (var i = 0; i  100; i++)
                                         array[i] = Math.random();

                                 var t = new Array();

 //Start jquery.each test
                                 var start = (new Date).getTime();
                                 $(array).each(function() {
                                         t.push(this);
                                 });
                                 alert((new Date).getTime() - start);

                                 t = new Array();

 //Start another iteraton way test
                                 start = (new Date).getTime();
                                 var i = array.length;
                                 while (i--) {
                                         t.push(array[i]);
                                 }
                                 alert((new Date).getTime() - start);

 In my testbrowser the jquery.each testtime was 2378ms and the other
 test was 110ms. This is a big difference. I know this test was very
 easy bit it still shows that the each function could be made faster?

 Is there any reason why the for ( name in object){} way of iterating
 an array is used? Is this the most optimized way of iteration an
 array?

 //Magnus


[jQuery] What's the best way to pass parameters through jQuery's ajax?

2009-04-24 Thread Thierry

Right now, I'm using jQuery's ajax like the following:

function hello_world(param1, param2, param3, param4)
{
$.ajax(
{
type: 'POST',
url: 'foo.php',
dataType: 'html',
data: 'param1=' + param1 + 'param2=' + param2 + 'param3=' +
param3 + 'param4=' + param4,

success: function(data)
{
}
});
}

In foo.php, I retrieve the parameters like:

$_POST['param1], ...

Is there a more elegant way to pass the parameters on the javascript
side?


[jQuery] Re: jQuery Recursion/Iteration through JSON variable.

2009-04-24 Thread Remon Oldenbeuving
It is only returning the information of the last entry because you overwrite
'teste' two times. When I change the setting to:

var collectionElements = {
teste1: {
var1: 'teste[]',
var2: 'brincadeira-2',
var3 : 'Elemento 2'
},
teste2: {
var1 : 'teste[]',
var2 : 'brincadeira-3',
var3 : 'Elemento 3'
},
teste3: {
var1 : 'teste[]',
var2 : 'brincadeira',
var3 : 'Elemento 1',
teste: {
var1 : 'teste[]',
var2 : 'brincadeira-4',
3 : 'Elemento 4'
}
}
};

Your functions seems to work.

On Fri, Apr 24, 2009 at 3:54 PM, Bruno Gama bga...@gmail.com wrote:


 Hi I would like to know if there is a simple way to show all elements
 of that variable?
var collectionElements = {
teste: {
var1: 'teste[]',
var2: 'brincadeira-2',
var3 : 'Elemento 2'
},
teste: {
var1 : 'teste[]',
var2 : 'brincadeira-3',
var3 : 'Elemento 3'
},
teste: {
var1 : 'teste[]',
var2 : 'brincadeira',
var3 : 'Elemento 1',
teste: {
var1 : 'teste[]',
var2 : 'brincadeira-4',
3 : 'Elemento 4'
}
}
};

 I am tryin' to iterate all elements using this function (for debug
 only)

function iterateAllElements( elements ) {
var ret = '';
  jQuery.each( elements, function( i,val ) {
  ret += ( typeof val == 'object') ? '\n Node ' +
 iterateAllElements
 ( val ) : i + ' : ' + val + ' / ';
  });
  return ret;
};

 With this function my firebug Console outputs only the last object
 (3th node) with its child object.

 Sorry my bad english! ^^



[jQuery] Re: Animating height but closing any already open (like an accordion)

2009-04-24 Thread Remon Oldenbeuving
Maybe you can use the toggleClass() function?
You could give them all a class from the beginning (e.g. closed), and in the
animate function you can toggle this class. and use the class
$('.closet').animate({height:'toggle',opacity:'toggle'}, 'fast');

You can also use this in combination with the callback function of the
animate function (toggling the class).

Hope this will help you achieve your goals.

On Fri, Apr 24, 2009 at 6:02 PM, Musixz Man mus...@hotmail.com wrote:



 --
 Thanks Remon.

 But since I'm using a toggle, wouldnt I still have to know the current
 state before I assigned it the opened class?*
 *



 You could just add classes for open divs?

 On Fri, Apr 24, 2009 at 4:59 PM, Musixz Man mus...@hotmail.com wrote:

  Hi all!

 I have anywhere from 3 - 8 DIVs on a page that I open/close (animate height
 toggle) via a button and want to close any (one) that are already open when
 another is opened - just like an accordion.

 How do I either determine the current open state of a DIV so I know which
 to close, or maybe close all of them (less efficient) before opening a new
 one?

 I can't use the UI accordion because of the way the DIVs are separated and
 nested deep within a bunch of other stuff.

 The code I am using to toggle them is:

 onclick=$('#slideblock_?php echo $group['id']
 ?').animate({height:'toggle',opacity:'toggle'}, 'fast')

 Any help would be great. Thanks!!



 --
 Windows Live™ SkyDrive™: Get 25 GB of free online storage. Check it 
 out.http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009



 --
 Rediscover Hotmail®: Get e-mail storage that grows with you. Check it 
 out.http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009



[jQuery] [Star Rating Plugin] How to change the star rating display WITHOUT firing off the click callback?

2009-04-24 Thread kevin

Hello,

I am using the Star Rating Plugin from

http://www.fyneworks.com/jquery
http://jquery-star-rating-plugin.googlecode.com/svn/trunk/index.html


What I am trying to do is when a star rating is initially requested,
an ajax submit is fired off to update the database on the server side.
However IF the user has already rated the item in question I want to
be able to reset the star rating back to its initial display state
(whatever the initial rating was).


I am attempting to do this in the ajax submit success callback
however, when I try change the star rating via the API the star rating
click callback keeps getting called resulting in a loop.

Can anyone suggest a way around this?


Thanks


[jQuery] Re: serialScroll option : start -- no effect

2009-04-24 Thread Ariel Flesler

Your 'items' selector ('li') is not JUST matching the panes, but other
LIs as well. The plugin is indeed scrolling to the forth LI within the
container.

Cheers

On Fri, Apr 24, 2009 at 2:37 PM, Niels niels.siem...@gmail.com wrote:

 Sorry for my late response.

 here is the demo:

 If you click on:
 http://www.egoactive.com/transfer/jquery-demo/#technical/django

 It shouls scroll to item # 3...

 As we defined in de serialScroll methode (interfase.js):
 start: 3


 Thanks in advance


 On Apr 14, 1:16 am, Ariel Flesler afles...@gmail.com wrote:
 Can you provide a demo online ?

 Cheers
 --
 Ariel Flesler

 On Apr 10, 6:17 am, Niels niels.siem...@gmail.com wrote:

  We're using the serialScroll method and using some of the options.
  Only the option start has no effect.

  We want to scroll at the start to element 2 and not to the default
  position 0

  Suggestions?

          $('#technical').serialScroll({
                  target:'#technical-sections',
                  items:'li', // Selector to the items ( relative to the 
  matched
  elements, '#sections' in this case )
                  axis:'x',// The default is 'y' scroll on both ways
                  navigation:'#technical-navigation li a',
                  duration:900,// Length of the animation (if you scroll 2 
  axes and
  use queue, then each axis take half this time)
                  force: true, // Force a scroll to the element specified by
  'start' (some browsers don't reset on refreshes)
                  constant: false, // constant speed
                  lock:false, // Ignore events if already animating (true by 
  default)
                  //prev:'img.prev',// Selector to the 'prev' button 
  (absolute!,
  meaning it's relative to the document)
                  //next:'img.next',// Selector to the 'next' button 
  (absolute too)
                  //queue:false,// We scroll on both axes, scroll both at 
  the same
  time.
                  //event:'click',// On which event to react (click is the 
  default,
  you probably won't need to specify it)
                  //stop:false,// Each click will stop any previous 
  animations of the
  target. (false by default)
                  //lock:true, // Ignore events if already animating (true by
  default)
                  start: 2, // On which element (index) to begin ( 0 is the 
  default,
  redundant in this case )
                  //cycle:true,// Cycle endlessly ( constant velocity, true 
  is the
  default )
                  //step:1, // How many items to scroll each time ( 1 is the 
  default,
  no need to specify )
                  jump:true, // If true, items become clickable (or w/e 
  'event' is,
  and when activated, the pane scrolls to them)
                  //lazy:false,// (default) if true, the plugin looks for 
  the items on
  each event(allows AJAX or JS content, or reordering)
                  //interval:1000, // It's the number of milliseconds to 
  automatically
  go to the next
 




-- 
Ariel Flesler
http://flesler.blogspot.com


[jQuery] Re: Lightbox with thumbnails

2009-04-24 Thread Dayjo

If you're looking for something simple I would suggestion prettyPhoto
by Stephane Caron;

http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/

On Apr 23, 3:25 pm, Laker Netman laker.net...@gmail.com wrote:
 Hi.

 I am looking for a version of lightbox that would allow the user to
 click on a single reference image and when the lightboxed version
 appears a strip of thumbnails would be available at the top or bottom
 of that image. Thus, the user could navigate between images within the
 lightbox by clicking on a different thumbnail.

 If such beast exists a URL would appreciated. Extensive Googling
 hasn't turned up what I'm looking for at all.

 TIA,
 Laker


[jQuery] Re: basic image gallery, running into a few problems

2009-04-24 Thread Daniel

A simple solution would be:

function forwardClick() {
var i = $('#images .visible').attr('id');
var currentImg = $('#images .foo:eq(' + i + ')');
var nextImg = $('#images .foo:eq(' + j + ')');
var currentDesc = $('#descriptions .bar:eq(' + i + ')');
var nextDesc = $('#descriptions .bar:eq(' + j + ')');

currentImg.animate( { marginLeft: left }, 300, function 
() { $
(this).removeClass('visible'); } );
nextImg.css('margin-left', 
'240px').addClass('visible').animate
( { marginLeft: 0 }, 300 );

currentDesc.animate( { marginLeft: descLeft }, 300, 
function() { $
(this).removeClass('visible'); } );
nextDesc.css('margin-left', 
descRight).addClass('visible').animate
( {marginLeft: 0 }, 300 );
i += 1; j += 1; k += 1;

if (i  length - 1) { i = 0; }
if (j  length - 1) { j = 0; }
if (k  length - 1) { k = 0; }
$('#forward').bind(click, function() {
 $('#forward').unbind(click);
 forwardClick();
};
}
$('#forward').click( function() {
 $('#forward').unbind(click);
 forwardClick();
});

But I'm sure there's a better way to do it...

On Apr 24, 10:39 am, roryreiff roryre...@gmail.com wrote:
 Hello there,

 I have created a simply navigable image gallery with a bit of json, as
 well as .animate() and altering the margin of elements. Currently, I
 am pulling in the 5 most recent images with a tag of 'spock' from
 flickr. It seems to be working fine, except that when clicking through
 very fast it gets a bit wonky. I am also really curious as to opinions
 on better ways of doing this? Perhaps there is a way that relies upon
 the json instead of simply just injecting it into the dom right off
 the bat?

 The basic strategy I employed was to animate the current image off the
 stage, and then make it invisibe, while also animating the next image
 onto the stage after making it visible. I have a feeling it's these
 queued effects/animations that aren't dealing so well with fast
 clicks. Perhaps the best way to solve this is limit when/how the
 arrows can be clicked?

 Any help is greatly appreciated. Thanks!

 example:http://www.pomona.edu/dev/spock/index.asp

 js:http://www.pomona.edu/dev/spock/spock-feed.js


[jQuery] Re: Animating height but closing any already open (like an accordion)

2009-04-24 Thread Musixz Man



Thanks Remon.

But since I'm using a toggle, wouldnt I still have to know the current state 
before I assigned it the opened class?



You could just add classes for open divs?

On Fri, Apr 24, 2009 at 4:59 PM, Musixz Man mus...@hotmail.com wrote:






Hi all!

I have anywhere from 3 - 8 DIVs on a page that I open/close (animate height 
toggle) via a button and want to close any (one) that are already open when 
another is opened - just like an accordion. 

How do I either determine the current open state of a DIV so I know which to 
close, or maybe close all of them (less efficient) before opening a new one?


I can't use the UI accordion because of the way the DIVs are separated and 
nested deep within a bunch of other stuff.

The code I am using to toggle them is:

onclick=$('#slideblock_?php echo $group['id'] 
?').animate({height:'toggle',opacity:'toggle'}, 'fast')


Any help would be great. Thanks!!



Windows Live™ SkyDrive™: Get 25 GB of free online storage.   Check it out.



_
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009

[jQuery] Re: Lightbox with thumbnails

2009-04-24 Thread Rick Faircloth
Hi, Dayjo...

Yes, prettyPhoto is nice and simple, but the conversation started with
needing
to find a plug-in which offered thumbnail images below the main imageas
a slideshow
or as click-able thumbnails for manual navigation.

Thanks for the link!

Rick

On Fri, Apr 24, 2009 at 11:50 AM, Dayjo dayjoas...@gmail.com wrote:


 If you're looking for something simple I would suggestion prettyPhoto
 by Stephane Caron;


 http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/

 On Apr 23, 3:25 pm, Laker Netman laker.net...@gmail.com wrote:
  Hi.
 
  I am looking for a version of lightbox that would allow the user to
  click on a single reference image and when the lightboxed version
  appears a strip of thumbnails would be available at the top or bottom
  of that image. Thus, the user could navigate between images within the
  lightbox by clicking on a different thumbnail.
 
  If such beast exists a URL would appreciated. Extensive Googling
  hasn't turned up what I'm looking for at all.
 
  TIA,
  Laker




-- 
-
It has been my experience that most bad government is the result of too
much government. - Thomas Jefferson


[jQuery] Re: performance of jQuery.each

2009-04-24 Thread Matt Kruse

On Apr 24, 3:24 am, Magnus O. mag...@magnusottosson.se wrote:
 I saw that the jQuery.each function iterates over the array like this:
 for ( name in object){}

Only for objects which lack the 'length' property.

That's why the code exists below this comment:
  // A special, fast, case for the most common use of each

The speed improvement you are seeing is probably because you are
avoiding a jQuery constructor, a function call, and many function
callbacks. Internally, it is iterating over your array using an index.

See this thread, where I make some suggestions for improving .each()
  
http://groups.google.com/group/jquery-dev/browse_frm/thread/be468dd3344f5f26/d340a8799e416615

Matt Kruse


[jQuery] flexigrid and coldfusion

2009-04-24 Thread garrettjohnson

If anyone has used flexigrid and coldfusion before I would really
appreciate your insight!  I have my flexigrid set up...

$(document).ready(function(){
$(#flex1).flexigrid({
   url: ../com/nyumba/test/Test.cfc?
method=getTestDatareturnFormat=json,
   dataType:json,
   colModel:[
  {display:First Name, 
name:user_fname, width:100,
align:center},
  {display:Last Name, 
name:user_lname, width:100,
align:center},
  {display:Email, name:user_email, 
width:100,
align:center},
  {display:Type, name:user_type, 
width:100, sortable:true,
align:center}
],
   sortname:user_type,
   sortorder:asc,
   height:250,
   title:User Data
  });
});

I am posting to the following method...

cffunction name=getTestData access=remote returntype=query
output=false
cfargument name=sortname /
cfargument name=sortorder /

cfset var local = {} /
cfquery datasource=loadTesting name=local.testData
SELECT TOP 100
user_fname,
user_lname,
user_email,
user_type

FROM lt_user

ORDER BY #arguments.sortname# #arguments.sortorder#
/cfquery

cfreturn local.testData /
/cffunction

I can see that my JSON is being returned okay in firebug, but I keep
getting the following error..

G is undefined
[Break on this error] (function(){var l=this,g,y=l.jQuery,p=l.each
(function(){o.dequeue(this,E)})}});

I am totally lost!





[jQuery] Re: Please Wait While Processing help

2009-04-24 Thread Dexter's Brain

If you are using Ajax, then this can be a simple solution

Just before making the ajax call, show an animated picture, or a
blinking text saying Please wait.

When you get the response from the server, in the success method,
remove this pic/text and display a success message.

Dexter...

On Apr 24, 8:25 pm, Remon Oldenbeuving r.s.oldenbeuv...@gmail.com
wrote:
 If youre using ajax you should look at the Ajax-events section 
 here:http://docs.jquery.com/Ajax

 You can easily bind a function to an ajax-event. This way you will be able
 to freeze the screen, or disable all buttons.

 On Fri, Apr 24, 2009 at 5:02 PM, Shadraq shadraq.thee...@gmail.com wrote:

  I've designed a payment system that, generally gets a response
  quickly. However, if there is any delay at all, customers will click
  Pay again, thinking that they didn't hit it. This, of course, will
  cause duplicate transactions.

  I'm looking for some sort of Please wait while we process your
  request. message/decal/modal that freezes the screen while the
  payment is processing, and releases once a response comes back from
  the server.

  Any ideas/links to examples. I googled and searched the UI...and
  didn't find anything that I could use. It is likely I missed
  something.

  Thanks,

  Shadraq


[jQuery] Help : sort name in an ul where the li's a created from drag and drop.

2009-04-24 Thread hollow

Hi as the title says i'm looking to order a list taht is created by
drag and drop.

the structure is a normal unordered list

ul
liC item/li
liE item/li
liD item/li
liF item/li
liF item/li
liA item/li
/ul

Can someone help me with that please.

Have looked at sort , sortable , etc...
But no real explanation found.

Regards


[jQuery] very stupid question

2009-04-24 Thread ryanfred

I'm brand new to jQuery...
just getting started, not really a programmer/developer more a
designer.

when i download my copy of jQuery, the file is named: jquery-1.3.2.js
or something like this...

all the tutorials reference a file: jQuery.js

do I simply rename the file I've downloaded as jquery-1.3.2.js???

I've tried it but stuffs not working and need to know if this is the
issue or not..

thanks whoever answers this...

ryanfred


[jQuery] Re: very stupid question

2009-04-24 Thread MorningZ

you could name if foo.js for all you want, as long as the file name
matches what is on the disk..



On Apr 24, 11:28 am, ryanfred ryanf...@gmail.com wrote:
 I'm brand new to jQuery...
 just getting started, not really a programmer/developer more a
 designer.

 when i download my copy of jQuery, the file is named: jquery-1.3.2.js
 or something like this...

 all the tutorials reference a file: jQuery.js

 do I simply rename the file I've downloaded as jquery-1.3.2.js???

 I've tried it but stuffs not working and need to know if this is the
 issue or not..

 thanks whoever answers this...

 ryanfred


[jQuery] Re: creating an animated PNG loader pinwheel (sprite)

2009-04-24 Thread mkmanning

Here's quick plugin for you:

http://actingthemaggot.com/test/jquery_example/animbg.html


On Apr 24, 7:47 am, Adam adambu...@gmail.com wrote:
 Thanks everyone, but none of these use jquery- the mootools version is
 exactly what I am looking to do. Anyone interested in helping me port
 that to JQ? I have posted on devthought as well.
 Thanks!

 On Apr 23, 4:03 pm, Ricardo ricardob...@gmail.com wrote:

  Seems it has already been done, and more than 
  once:http://devthought.com/projects/mootools/apng/http://www.squaregoldfis...

  -- ricardo

  On Apr 23, 5:14 pm, Adam adambu...@gmail.com wrote:

   So I was trying to think of a way to create what was effectively aPNG
   animation similar to ananimatedGIF. What I decided was that it would
   be fairly simple to make aPNGsprite of each 'frame' of the
   animation, then set that image as the background of a container div,
   then move it in a stepping fashion to reveal each frame, then reset it
   when it gets to the end of the strip. If someone could help with the
   JQ to do the background-position stepping and the reset, I will post a
   link to the completed piece with my image as well. I will do a white
   and black version as well- this will make it possible to have one,
   smooth-looking loader animation to use on all background colors/image.
   Thanks!


[jQuery] Open browse UI on clicking a button

2009-04-24 Thread Dexter's Brain

Hi,

I have a form to upload a photo/file. I have the following html code
snippet.

input type=file id=file style=display:none;/
input type=text id=file_visible/
input type=image src=image.jpg onclick=clickFile()/

The problem is that I don't want to show the default Browse button
with the input type=file.
So, I have made the first input invisible, and instead, I am showing a
text field and an image button.

I want to trigger the click event of the first element.

Here is the js code.

function clickFile(){
   $('#file').click();
}

This seems to work in IE, but it doesn't work in other browsers. And
also, I want to copy the contents of the invisible input field to the
text field after the user has selected a file. Can this be
achieved ???

Thanks,
Dexter.


[jQuery] Re: Jquery 1.3 - Not all selectors work in IE 8?

2009-04-24 Thread John Resig
Interesting. Do you think you could file a bug on this and then post it to
the jQuery-dev list? Thanks!

http://dev.jquery.com/newticket
http://groups.google.com/group/jquery-dev

--John


On Thu, Apr 23, 2009 at 5:11 PM, giovanni gflam...@gmail.com wrote:


 I found that certain selectors work in all browsers except IE 8
 and they need to modified.

 This selector pattern seem to work well in all browsers, including IE
 8:

 jQuery(input[class='class_name'][type='text'])

 But this identical selector works in Firefox, Safari but not in IE 8:

 jQuery(input.class_name:text)

 In IE 8 it returns a property not found javascript runtime error.
 I don't know whether that the actual issue or if it is a side effect
 of some memory leak.

 Giovanni






[jQuery] Re: creating an animated PNG loader pinwheel (sprite)

2009-04-24 Thread Adam

Excellent! Thanks mkmanning!

On Apr 24, 11:49 am, mkmanning michaell...@gmail.com wrote:
 Here's quick plugin for you:

 http://actingthemaggot.com/test/jquery_example/animbg.html

 On Apr 24, 7:47 am, Adam adambu...@gmail.com wrote:



  Thanks everyone, but none of these use jquery- the mootools version is
  exactly what I am looking to do. Anyone interested in helping me port
  that to JQ? I have posted on devthought as well.
  Thanks!

  On Apr 23, 4:03 pm, Ricardo ricardob...@gmail.com wrote:

   Seems it has already been done, and more than 
   once:http://devthought.com/projects/mootools/apng/http://www.squaregoldfis...

   -- ricardo

   On Apr 23, 5:14 pm, Adam adambu...@gmail.com wrote:

So I was trying to think of a way to create what was effectively aPNG
animation similar to ananimatedGIF. What I decided was that it would
be fairly simple to make aPNGsprite of each 'frame' of the
animation, then set that image as the background of a container div,
then move it in a stepping fashion to reveal each frame, then reset it
when it gets to the end of the strip. If someone could help with the
JQ to do the background-position stepping and the reset, I will post a
link to the completed piece with my image as well. I will do a white
and black version as well- this will make it possible to have one,
smooth-looking loader animation to use on all background colors/image.
Thanks!


[jQuery] Re: integrating galleria and scrollto

2009-04-24 Thread allroad02

I have this functioning much better now mostly thanks to Jesse Pinho
who sent me his script of basically the same.  A few mods and it
worked horizontally as I needed.

Seems to work well in FF.

It functions in IE 7.0.x but always displays (xx items remaing) in the
status bar and appears to be loading the images constantly.  Looking
for some solution to this...

Thanks,Adrian

example: http://www.ezfoamglove.com/dev/scroll_gallery.cfm


@Rick Faircloth: thanks for pointing that out, its much better without
the mouseover.




[jQuery] Re: jquery validation using thickbox

2009-04-24 Thread Phill Pafford


Did you ever find a solution? I'm facing the same problem.

Thanks,
--Phill



bookme wrote:
 
 
 Hi,
 
 Sorry to bother you but I am not able to solve this problem so posting
 in forum
 
 I am using two jquery plugin
 1 Thickbox
 2 Jquery validation
 
 Without thickbox validation is working fine but validation is not
 working in thickbox.
 
 There is two files ajaxLogin.htm and second is index.html
 
 ajaxLogin.htm :
 
 script src=/thickbox/js/jquery.js type=text/javascript/script
 script src=/thickbox/js/jquery.validate.js type=text/
 javascript/
 script
 script
 $(document).ready(function() {
 // validate signup form on keyup and submit
 var validator = $(#signupform).validate({
 rules: {
 password: {
 required: true,
 minlength: 5
 },
 password_confirm: {
 required: true,
 minlength: 5,
 equalTo: #password
 }
 },
 messages: {
 password: {
 required: Provide a password,
 rangelength: jQuery.format(Enter at
 least {0} characters)
 },
 password_confirm: {
 required: Repeat your password,
 minlength: jQuery.format(Enter at
 least {0} characters),
 equalTo: Enter the same password as
 above
 }
 },
 // the errorPlacement has to take the table layout
 into account
 errorPlacement: function(error, element) {
  
 error.appendTo( element.parent().next() );
 }
 
 });
 });
 
 /script
 div id=signupwrap
 form id=signupform method=POST action=http://localhost/thickbox/
 index.html
 table
 tr
 td class=labellabel id=lpassword for=passwordPassword/
 label/td
 td class=fieldinput id=password name=password type=password
 maxlength=50 value= //td
 td class=status/td
 /tr
 tr
 td class=labellabel id=lpassword_confirm
 for=password_confirmConfirm Password/label/td
 td class=fieldinput id=password_confirm name=password_confirm
 type=password maxlength=50 value= //td
 td class=status/td
 /tr
  /table
 input id=signupsubmit name=signup type=submit
 value=Signup /
 /form
 /div
 
 ---
 
 index.html :
 
 head
 style type=text/css media=all
 @import css/global.css;
 /style
 script src=/thickbox/js/jquery.js type=text/javascript/script
 script src=/thickbox/js/thickbox_plus.js type=text/javascript/
 script
 /head
 body
 li ajaxLogin.htm?height=500amp;width=550 ThickBox login 
 /body
 /html
 
 Please tell me how can I get validation in thickbox?
 
 Thanks
 
 

-- 
View this message in context: 
http://www.nabble.com/jquery-validation-using-thickbox-tp19996094s27240p23221895.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery “Superfish” Menu: Newbie needs h elp...

2009-04-24 Thread cfDEV

Hello all. I've used several jQuery scripts with success, but I
haven't ever coded with it. Anyway, I have implemented an old
Suckerfish menu that was pulled an tweaked from another site. See link
below. I really like the way it looks and would like to make a jQuery
version of this menu to work the other jQuery features of the site...
complete with two column, indented drop down menus. (See the Books/
DVDs tab.) Is this possible? How hard would it be to do? I really
don't know where to begin.

http://beta.awma.com/menu4/


[jQuery] jQuery + document.write + ajax

2009-04-24 Thread Don

Hi Folks,
by clicking on a link I want to reload a skyscraper banner. The code
for the skyscraper banner is in a file_with_the_banner.html I want to
include this file with jquery ajax.

I have this code in the index.html

script type=text/javascript
$(function() {
  $('a').click(function() {
$('div id=info /').load(file_with_the_banner.html
#bannercode, function() {
$(this).hide()
.appendTo('#skyscraper)
.slideDown(1000);
 });

return false;
})
});
/script
.../head/bod.

div id=skyscraper/div
aLoad new Banner/a

/// END INDEX.HTML


and the code in the file_with_the_banner.html

div id=bannercode
script type=text/javascript
!--
document.write('scr'+'ipt language=javascript1.1
src=..URL;loc=100;target=_blank;grp='+var1+';misc='+new Date
().getTime()+'/scri'+'pt');
//--
/script/div


The problem is, that the new banner doesn't appear. When I open the
file_with_the_banner.html directly in the browser, the banner appears.
I think that jquery has a problem with document.write.

Does anyone know how to solve this issue??


[jQuery] Re: Help : sort name in an ul where the li's a created from drag and drop.

2009-04-24 Thread mkmanning

Something like this?

var sorted = $.makeArray($('ul li')).sort(function(a,b){
return $(a).text()  $(b).text();
});
$('ul').html(sorted);


On Apr 24, 9:16 am, hollow engstrom.rag...@gmail.com wrote:
 Hi as the title says i'm looking to order a list taht is created by
 drag and drop.

 the structure is a normal unordered list

 ul
 liC item/li
 liE item/li
 liD item/li
 liF item/li
 liF item/li
 liA item/li
 /ul

 Can someone help me with that please.

 Have looked at sort , sortable , etc...
 But no real explanation found.

 Regards


[jQuery] Re: Get first child within an element

2009-04-24 Thread Karl Swedberg

this should do the trick:

$(tdRef).find('img:first');



--Karl


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




On Apr 24, 2009, at 7:43 AM, dgb wrote:



Hi,

I've got a reference to a TableCell and I'd like to use jQuery to get
the first instance of an IMG tag within that TableCell, but can't
get the syntax right, I understand how it would work if I were to
reference the TableCell by and ID or class, but not when I have a
direct reference to the cell, I've got:

var tdRef = xxx;

$(tdRef).html();

... could somebody let me know what the jQuery syntax should be to get
the first img tag within tdRef?

Thanks! :-)





[jQuery] Re: What's the best way to pass parameters through jQuery's ajax?

2009-04-24 Thread Dexter's Brain

JSON will work efficiently, Else, you can pass an XML String which you
can parse and extract parameters thru your PHP code.

Thanks,
Dexter.

On Apr 24, 11:58 pm, imrane...@gmail.com imrane...@gmail.com
wrote:
 I think going on json way is much better

 function hello_world(param1, param2, param3, param4)
 {
     $.ajax(
     {
         type: 'POST',
         url: 'foo.php',
         dataType: 'html',
         data: {param1 : param1_value, para2 : param2_value, param3 :
 param3_value},
         success: function(data)
         {
         }
     });

 }

 On Apr 24, 7:30 pm, Thierry lamthie...@gmail.com wrote:

  Right now, I'm using jQuery's ajax like the following:

  function hello_world(param1, param2, param3, param4)
  {
      $.ajax(
      {
          type: 'POST',
          url: 'foo.php',
          dataType: 'html',
          data: 'param1=' + param1 + 'param2=' + param2 + 'param3=' +
  param3 + 'param4=' + param4,

          success: function(data)
          {
          }
      });

  }

  In foo.php, I retrieve the parameters like:

  $_POST['param1], ...

  Is there a more elegant way to pass the parameters on the javascript
  side?


[jQuery] Re: Please Wait While Processing help

2009-04-24 Thread Mike Alsup

 I'm looking for some sort of Please wait while we process your
 request. message/decal/modal that freezes the screen while the
 payment is processing, and releases once a response comes back from
 the server.

 Any ideas/links to examples. I googled and searched the UI...and
 didn't find anything that I could use. It is likely I missed
 something.

The BlockUI plugin is a good option:

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


[jQuery] Re: What's the best way to pass parameters through jQuery's ajax?

2009-04-24 Thread imrane...@gmail.com

I think going on json way is much better

function hello_world(param1, param2, param3, param4)
{
$.ajax(
{
type: 'POST',
url: 'foo.php',
dataType: 'html',
data: {param1 : param1_value, para2 : param2_value, param3 :
param3_value},
success: function(data)
{
}
});

}

On Apr 24, 7:30 pm, Thierry lamthie...@gmail.com wrote:
 Right now, I'm using jQuery's ajax like the following:

 function hello_world(param1, param2, param3, param4)
 {
     $.ajax(
     {
         type: 'POST',
         url: 'foo.php',
         dataType: 'html',
         data: 'param1=' + param1 + 'param2=' + param2 + 'param3=' +
 param3 + 'param4=' + param4,

         success: function(data)
         {
         }
     });

 }

 In foo.php, I retrieve the parameters like:

 $_POST['param1], ...

 Is there a more elegant way to pass the parameters on the javascript
 side?


[jQuery] Re: Background flash white briefly

2009-04-24 Thread James

Is your background being set dynamically (e.g. through Javascript on
runtime) or is it through CSS on load?

On Mar 3, 6:18 am, marc0047 marc0...@gmail.com wrote:
 I have a project where I am implementing the jQuery library, and I
 believe it is causing my body backgrounds to flash white very quickly
 from page to page (the entire site has the same image background).
 This only appears to be happening in Safari 3.2.1.

 The reason I believe it is jQuery is because I tested it with and
 without the library: when jQuery is removed, the backgrounds don't
 flash white at all, and behave how I expect them.

 Is there a solution to this problem?


[jQuery] Safari Layout Issues

2009-04-24 Thread Nic Hubbard

For some strange reason I am only having layout issues in Safari, even
IE6 renders the page correctly!  I have using jQuery Cycle on the
page, and I am starting to wonder if that is what is causing the
layout issue.

Example:  http://www.caldwellsnyder.com/home

It seems that the div #home_exhibition_hold won't honor the height and
width settings when loaded in Safari.  And I am wondering if there is
some js that is effecting this.

Does anyone have any ideas?


[jQuery] Re: Safari Layout Issues

2009-04-24 Thread Nic Hubbard

Here is the cycle code I am using:

if ($('#home_exhibition_hold').length) {
$('#home_exhibition_hold').cycle({
fx:  'fade',
speed:2000,
timeout:  7000,
pause:  0,
pager:   '#slide_pager'
});
}
if ($('.home_slides').length  2) {
$('#slide_pager').hide();
}


On Apr 24, 12:54 pm, Nic Hubbard nnhubb...@gmail.com wrote:
 For some strange reason I am only having layout issues in Safari, even
 IE6 renders the page correctly!  I have using jQuery Cycle on the
 page, and I am starting to wonder if that is what is causing the
 layout issue.

 Example:  http://www.caldwellsnyder.com/home

 It seems that the div #home_exhibition_hold won't honor the height and
 width settings when loaded in Safari.  And I am wondering if there is
 some js that is effecting this.

 Does anyone have any ideas?


[jQuery] Re: Tablesorter with pager extension check boxes not present on form submit

2009-04-24 Thread Justin

Bump message please.


[jQuery] Re: Safari Layout Issues

2009-04-24 Thread Nic Hubbard

Ok, sorry guys, I realized I had come .css files below my .js files,
this was causing the conflict in Safari.

On Apr 24, 12:55 pm, Nic Hubbard nnhubb...@gmail.com wrote:
 Here is the cycle code I am using:

 if ($('#home_exhibition_hold').length) {
                 $('#home_exhibition_hold').cycle({
                         fx:      'fade',
                         speed:    2000,
                         timeout:  7000,
                         pause:  0,
                         pager:   '#slide_pager'
                 });
         }
         if ($('.home_slides').length  2) {
                 $('#slide_pager').hide();
         }

 On Apr 24, 12:54 pm, Nic Hubbard nnhubb...@gmail.com wrote:

  For some strange reason I am only having layout issues in Safari, even
  IE6 renders the page correctly!  I have using jQuery Cycle on the
  page, and I am starting to wonder if that is what is causing the
  layout issue.

  Example:  http://www.caldwellsnyder.com/home

  It seems that the div #home_exhibition_hold won't honor the height and
  width settings when loaded in Safari.  And I am wondering if there is
  some js that is effecting this.

  Does anyone have any ideas?


[jQuery] Re: Tablesorter with pager extension check boxes not present on form submit

2009-04-24 Thread Jack Killpatrick


Checkbox names are only posted if they're checked. You'll need to check 
for the presence of the name on the server side and if it's not there, 
then none were checked. That's not a tablesorter issue (doesn't sound 
like it).


- Jack

Justin wrote:

Hello everyone,

This is my first post to the jQuery group.  I am using the tablesorter
and tablesorter.pager jQuery plugin in an ASP.NET web page.

Each row in the table has a checkbox and is intended to be used by the
user to add or remove an item from the final selection.  The problem
is that when the form is submitted and you are on a page with no
checkboxes checked, on the server side, the Request.Form.AllKeys does
not show the checkbox's named as a member of the request.

I think this has something to do with the caching mechanism and the
fact the checkboxes are physically taken out of the table.

What methods are there to make sure all the hidden rows form
elements are submitted back to the server?

Thanks,
Justin

  





[jQuery] Re: Animating height but closing any already open (like an accordion)

2009-04-24 Thread Musixz Man

Ahhh..sweet. Now I understand.

Caffeine does wonders!

Thanks Remon.


_
Rediscover Hotmail®: Now available on your iPhone or BlackBerry
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile2_042009

[jQuery] Re: Help : sort name in an ul where the li's a created from drag and drop.

2009-04-24 Thread hollow

mkmanning

Thanks for the response.

Yes, but this doesn't give me the result
i've changed it to work on click

but the result doesn't appear all li's disappears.

$('#mylist ul').click(function(){
var sorted = $.makeArray($('#mylist ul li')).sort(function(a,b){
return $(a).text()  $(b).text();
});
$('#mylist ul').html(sorted);
});

On Apr 24, 8:26 pm, mkmanning michaell...@gmail.com wrote:
 Something like this?

 var sorted = $.makeArray($('ul li')).sort(function(a,b){
         return $(a).text()  $(b).text();});

 $('ul').html(sorted);

 On Apr 24, 9:16 am, hollow engstrom.rag...@gmail.com wrote:



  Hi as the title says i'm looking to order a list taht is created by
  drag and drop.

  the structure is a normal unordered list

  ul
  liC item/li
  liE item/li
  liD item/li
  liF item/li
  liF item/li
  liA item/li
  /ul

  Can someone help me with that please.

  Have looked at sort , sortable , etc...
  But no real explanation found.

  Regards


[jQuery] Re: $.getScript Must Take .js File?

2009-04-24 Thread nlloyds

See also this discussion:
http://groups.google.com/group/jquery-en/browse_thread/thread/f9b57a8e00662d84/fb73b4affb81a816

Nathan


  1   2   >