[jQuery] Re: Modifying Cycle plugin to first check next slide image is loaded

2008-03-26 Thread boermans

Okay I figured it out I think, at least for my simple use of the
plugin:

On Mar 26, 3:02 pm, boermans [EMAIL PROTECTED] wrote:
 Can anyone provide any tips as to what approach I should take to do
 the same with the more complex Cycle plugin:

Added:
if( $(next).find('img')[0].complete ) {
// around
if (manual || !p.cyclePause) {
// etc
}
}
if (opts.timeout)
// etc

Hope someone else finds this useful

Cheers
Ollie


[jQuery] Re: event fired after SlideDown

2008-03-26 Thread Olivier Percebois-Garve
Maye you can use setInterval and periodically test if your elem is visible ?

On Tue, Mar 25, 2008 at 5:40 PM, Yuval Hager [EMAIL PROTECTED] wrote:


 On Mar 25, 3:35 pm, Olivier Percebois-Garve [EMAIL PROTECTED]
 wrote:
  As I am not Drupal user difficult to understand what you can do or cant.
  Basically with jQuery animations you can pass a function as last param
 and
  it
  will be executed after:
 
  $(p).slideDown(slow,function(){
alert(Animation Done.);
 
  });
 

 I wish I could, but this is called from within core drupal and I can't
 change it:

 http://cvs.drupal.org/viewvc.py/drupal/drupal/misc/collapse.js?view=markuppathrev=DRUPAL-5

  If you cant change it, it suggest you to use  setTimeout with a time
 longer
  than the time of the animation.
  I guess it will be ok most of the time, but it wont be bulletproof.
 

 Thanks - I hoped not to get into that and have an event fired when the
 element gets into view..

 (btw, the code I need to run when the animation completes is under
 $document.ready() here:

 http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/imagefield_crop/imagefield_crop.js?revision=1.1.2.1pathrev=DRUPAL-5
 )

 --yuval



[jQuery] Validation Plugins: how to add global error

2008-03-26 Thread Jacky
Hi all, some question about the validation plugins.

There is a form with:
- some search fields
- a table of search result with checkboxes
- some buttons to do next action with checked records

Currently, the form is placing error message after each search fields.
However, I also want to validate the button click, so that user must check
something before proceed to next.
So it would be inappropriate to display error messages after checkbox.
I want to place a div and says 'Please check records before proceed!'.

As sometimes there will be no 'checkbox', it seems not good to place a rule
in the option.

I realize one of the way is to use submitHandler as a final check on that.
But then I have to manage these 'global errors' manually.
Is there any recommended way to do it?

-- 
Best Regards,
Jacky
網絡暴民 http://jacky.seezone.net


[jQuery] [tooltip] Something left in your test page

2008-03-26 Thread alexanmtz

Hi Jorn,

I would like to request you to add a tooltip in your select box that
you use to test bgiframe. Actually it work well, but try to put in
your demo page a tooltip and a title in select box in your test page:

http://jquery.bassistance.de/tooltip/demo/

Try to test this:

$(select).tooltip();

Note when you are choosing a option, the firefox looses the correct
position and the tooltip keeps behind the options and all browsers.

Any idea how to solve this?

Your plugin is almost 100%, it just lack the right handler in select
boxes.

The better way to user its when the user are selecting a option, the
tooltip is blocked, and when he goes out of select, the back to
work...

I hope it helps to make the plugin even better...

thanks for attemption

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


[jQuery] Re: slideing pics

2008-03-26 Thread Ariel Flesler

SerialScroll http://flesler.blogspot.com/2008/02/jqueryserialscroll.html

Bye

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

On Mar 25, 4:20 pm, ripple [EMAIL PROTECTED] wrote:
 http://jquery.com/

 zok [EMAIL PROTECTED] wrote:

 Hi,

 i'd like to display e.g. 5 pics and an arrow to the right. When you
 click that arrow the five pics slide to the left and other 5 pics come
 from the right.

 Is there a script to do such a slide show, i'm really new to jQuery so
 i need a little help with it. Maybe you could also give me some links
 to basic tutrials and/or books!

 Thanks

 -
 Looking for last minute shopping deals?  Find them fast with Yahoo! Search.


[jQuery] Re: jQuery code comments - Is that Javadoc or something else?

2008-03-26 Thread Ariel Flesler

The core of jQuery doesn't have formal comments, and I don't think
there's any standarized documentation among jQuery devs.
I always add some *formal* comments in the header of the source
version of my plugins.
I stick to scriptDoc http://scriptdoc.org/. It's an adaptation of
javadoc and it's supported by some IDEs.
I think I used it for Aptana, back then when I used that app.

I don't use tags that are not specified, instead I just use words
like:  Date: 03/02/08, Notes:, etc.

Hope that helped

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


On Mar 26, 9:53 am, alexanmtz [EMAIL PROTECTED] wrote:
 Good point stephen, I note this too...

 Im develop a plugin and use javadoc and I create some fields that dont
 fit in documentation, but was necessary to describe it...

 I think that the jQuery developers can answer this...

 On Mar 25, 5:34 pm, Stephen [EMAIL PROTECTED] wrote:



  Hi,
  In many jQuery plug-ins and JS code using jQuery, I find comments at
  the top of the source code like this:

  /**
   * SomeFunction - Some comments.
   * @requires jQuery v1.2 or above
   * @example
   *
  */

  This looks like Javadocs to me, but there are certain fields that
  don't seem to be in the Javadoc 
  documentation:http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#tag

  Fields like @example and @option are not in the Javadoc
  specifications, however.

  Is there a URL that discusses how to write jQuery comments like these
  plug-in authors are doing?  I attempted to find something on
  jquery.com, but I have not found anything or have been searching the
  wrong way.

  Thank you for reading this.

  --Stephen- Hide quoted text -

 - Show quoted text -


[jQuery] jQuery moreSelectors :modified - code stopped working

2008-03-26 Thread Stuart

I used the excellent moreSelectors plugin on a project about a year
ago and I just discovered that the old code has stopped working. I'm
using window.onbeforeunload to call a function that checks to see if
there are any modified form fields and alert the user that changes
will be lost. The code below used to work but after an upgrade to
jQuery 1.2.3 it no longer works. I'm unsure if the jQuery upgrade is
actually the culprit however.
[code]
var unsaved = $
(#formId).find(*:modified).not(:checkbox, :radio, :submit, 
:hidden).size();
[/code]

I've tried to simplify the code to just test the :modified selector
but no luck. With this code unsaved is still undefined:
[code]
var unsaved = $(#formId:modified).size();
[/code]

Any ideas anyone?



[jQuery] Re: jQuery moreSelectors :modified - code stopped working

2008-03-26 Thread Stuart

I've done some further testing using this simplified code: var unsaved
= $(*:selector).size();

The following selectors work as expected (returning the correct number
of elements):
:text
:textarea
:select
:selected
:multiple

The :modified selector returns undefined. The odd thing is that this
seems to be, at least coincidentally, related to another problem I'm
having with firebug. Firebug has been ignoring breakpoints and the
debug directive lately and I've determined that, at least in the test
code I'm using, it only does this when using the :modified selector.
I'm completely stumped.

Any thoughts?

On Mar 26, 10:05 am, Stuart [EMAIL PROTECTED] wrote:
 I used the excellent moreSelectors plugin on a project about a year
 ago and I just discovered that the old code has stopped working. I'm
 using window.onbeforeunload to call a function that checks to see if
 there are any modified form fields and alert the user that changes
 will be lost. The code below used to work but after an upgrade to
 jQuery 1.2.3 it no longer works. I'm unsure if the jQuery upgrade is
 actually the culprit however.
 [code]
 var unsaved = $
 (#formId).find(*:modified).not(:checkbox, :radio, :submit, 
 :hidden).size();
 [/code]

 I've tried to simplify the code to just test the :modified selector
 but no luck. With this code unsaved is still undefined:
 [code]
 var unsaved = $(#formId:modified).size();
 [/code]

 Any ideas anyone?


[jQuery] Re: Can't assign variable content to some element border color in IE (very weird problem)

2008-03-26 Thread Nazgulled

:(

Nazgulled wrote:
 Anyone please... This is really making me mad and I have no clue on
 how to fix this stupid bug that shouldn't be happening.

 If anyone as any idea, please, let me now... :(

 Nazgulled wrote:
  Hi there,
  I'm having this strange problem with IE that I don't know how to fix.
  Tried countless things, but neither worked and I just can't understand
  why this is happening, it makes no sense to me.
 
  First things first... To assign a color to some element border I do
  the following which works fine:
  $('id#element').css('borderColor', '#ff');
 
  Now let's say I have a variable with that string, something like this
  that also works fine:
  var color = '#ff';
  $('id#element').css('borderColor', color);
 
  Now the real problem. On my original code, I have something like the
  above example, the only difference is that the color variable is not
  manually assigned like in the example. I have a function that grabs
  some colors from an external stylesheet, puts them into an array and
  returns the array.
 
  That function is called getColorsFromCSS and the code is the
  following:
  getColorsFromCSS: function(cssElement) {
  var cssRules, cssSelector;
  var colors = [];
 
  // Which CSS rules are available in the browser?
  if (document.styleSheets[0].cssRules) {
  cssRules = document.styleSheets[0].cssRules;
  } else {
  cssRules = document.styleSheets[0].rules;
  }
 
  // Double check if the CSS rules are really available
  if (cssRules) {
  // Loops through each CSS selector
  for (var i = 0; i  cssRules.length; i++) {
  cssSelector = cssRules[i].selectorText.toLowerCase();
 
  // Get colors from which CSS elements?
  if (cssElement == 'links') {
  // Gets the color value for a specific selector
  switch (cssSelector.replace(/,.+/i, )) {
  case ul#cp-block-items a:link:
  colors[0] = 
  cssRules[i].style.color;
  break;
  case ul#cp-block-items a:hover:
  colors[1] = 
  cssRules[i].style.color;
  break;
  case div#content a:link:
  colors[2] = 
  cssRules[i].style.color;
  break;
  case div#content a:hover:
  colors[3] = 
  cssRules[i].style.color;
  break;
  }
 
  //
  if(colors.length == 4) return colors;
  } else if (cssElement.indexOf('popup') == 0) {
  // Gets the color value for a specific selector
  switch (cssSelector.replace(/,.+/i, )) {
  case div# + cssElement:
  colors[0] = 
  cssRules[i].style.color;
  colors[1] = 
  cssRules[i].style.backgroundColor;
  break;
  }
 
  //
  if(colors.length == 2) return colors;
  }
  }
  }
  },
 
  Yes, the function is working, meaning the values are retrieved from
  the external CSS and the array is returned with all the values inside
  it. I conformed this by doing an alert(popupColors[0]); before trying
  to set the border color and the output was a string with the color
  value (like the code below).
 
  And my real code goes like this:
  var popupColors = $.admin.getColorsFromCSS('popup-notice-error');
  alert(popupColors[0]); // This outputs the color value assigned to
  this array index
  $('div#popup-block').css('borderColor', popupColors[0]); // But this
  doesn't work :(
 
  This is only happening in IE6/7, not on Firefox 2.0.0.12, Opera 9.26
  and Safari 3.1 (Win).
 
  Any thoughts on this?


[jQuery] Re: Validation Plugins: how to add global error

2008-03-26 Thread Jörn Zaefferer


Jacky schrieb:

Hi all, some question about the validation plugins.

There is a form with:
- some search fields
- a table of search result with checkboxes
- some buttons to do next action with checked records

Currently, the form is placing error message after each search fields.
However, I also want to validate the button click, so that user must 
check something before proceed to next.

So it would be inappropriate to display error messages after checkbox.
I want to place a div and says 'Please check records before proceed!'.

As sometimes there will be no 'checkbox', it seems not good to place a 
rule in the option.


I realize one of the way is to use submitHandler as a final check on 
that.

But then I have to manage these 'global errors' manually.
Is there any recommended way to do it?
You could add a hidden field somewhere, put a custom rule on it that 
checks if all checkboxes are checked, and gets the error message 
displayed beneath it, eg. place it where you want the error message to 
be and hide it via display:none.


Let me know if that helps.

Jörn


[jQuery] Re: tooltip in select

2008-03-26 Thread jquertil

I have had so many problems of similar sort with select's that I
finally gave up and now I just use a library to generate a select box
that's got only DIV tags. That way I can have multi-line items,
tooltips, fading, etc...

death to select input form tag :P

especially I see google using similar technigues everywhere in their
apps - yahoo as well.

did I say 'death to select input form tag' ?



On Mar 25, 10:45 am, alexanmtz [EMAIL PROTECTED] wrote:
 When you hover a tooltip in a select, it should disappear when you are
 selecting a option.
 In this case, the tooltip are putting the box of tip completely in
 wrong place. And worse: when you are hovering the option the tooltip
 keeps behind them, whats its strange user experience.

 I try to solve this problem with this code
 $(select).click(function(){
         $.Tooltip.blocked ? $.Tooltip.blocked = false :
 $.Tooltip.blocked =
 true;
         $(#tooltip:hidden).length ? $(#tooltip).show() : $
 (#tooltip).hide();

 });

 $(select).blur(function(){
         $.Tooltip.blocked = false;

 });

 It works in firefox, blocking the tooltip when you click in a select
 and when you exit the tooltip back to act

 But didnt works in safari and IE.

 Anyone know a way to handler the tooltip properly with select when you
 are choosing a option?


[jQuery] Re: hover() only working on DOM elements NOT loaded via jQuery?

2008-03-26 Thread jquertil

thanks Karl, but you see, I thought I circumvent the issue by actually
having loaded the new content into an invisible DIV already. hence
lis line:

$('#tab_1').html( $('#tabcontent_1').html() );

it's moving the contents of the invisible DIV into the tab DIV.


scratching head still...


[jQuery] Re: Recommendations needed to replicate this flash functionality

2008-03-26 Thread sweetL

How new are you to web developing?

XML / Database will be whatever you prefer.

Im guessing what you're interested in, is the fade/slide-in effect of
the red content box when you click a menu item.

You want to be looking at the animate() functionality.

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

Bear in mind that you only want to pop the content into the box ONCE
the animation has finished... else its gonna be fugly.

On Mar 25, 9:11 pm, makgik [EMAIL PROTECTED] wrote:
 At first hello to everybody! I'm new to jquery and this group.

 I'm just starting to dig into the framework, and I need some kind of
 more concise guidelines on my very first project I'm trying to create
 with jquery.

 What I want is to clone this flash functionality 
 here:http://asaucerfulofpixels.com/files/mockup.swfwith jquery.

 Can somebody please point me to some resources where I can learn how I
 can do this? Are there any specific plugins/extensions that I can use?
 Also, if it is possible, can I use some sort of simple backend cms to
 change the contents on the panels? And What's best to use for dynamic
 source: XML, Database or?

 Thank you so much in advance!


[jQuery] attr() fails sometimes.... (using droppable and draggable)

2008-03-26 Thread sweetL

I did initially post this over on the jquery UI group, but the
concensus is that its not really a ui issue, its a jquery issue... so
im posting here.  Sorry to just join without introduction, this issue
is doing my head in...

First off, firefox + firebug is a must, some console.debug'ing going
on.


 A Demo :-
http://www.edition38.com/ui/uitest3.php



 What it does:-
You can drag + drop connectors onto each other, across each of the
'boards' (a grey area is a board).  When you drop a connector onto
another it does the following:-

 - checks current 'connectedto' attribute.

 - - already has a value
a popup box (via impromptu plugin) is displayed asking the user to
either overwrite the current connection, or keep it.

 - - doesnt have a value set at present.
 - - - sets 'connectedto' attribute of currently dragged element to be
the id of the element onto which it is dropped.
 - - - sets 'connectedto' attribute of dropped element, to be the id
of the element currently being dragged.
 - - - sets some 'mouseover' and 'mouseout' events to enable some css
rollover effects - highlights itself, and the connector to which it
was dropped. it remembers this, using the connectedto attribute.


When you drag a connector, it does the following:-

 - checks to see whats droppable. at present, none of the connectors
are actually 'locked' but if a connector already has a valid
'connectedto' attribute, it is given the 'connectorLocked' class,
simply to show the user dragging a connector, that if he DOES drop
onto either of those connectors, that connection will be lost.



 The Problem:-
The first time you drag a connector onto another, the 'connectedto'
attributes on both the dragged and dropped elements are set correctly,
meaning that rolling over either of these elements highlights them
correctly as connected to each other.

Dragging another connector shows that the current connection has made
the two connectors 'inadvisable' by bordering them in red.


Hope this is clear!


[jQuery] Re: Recommendations needed to replicate this flash functionality

2008-03-26 Thread bcherry

This is actually reall simple (probably not a surprise).

I assume you have html code somewhat like the following:
div class=Button../div
div class=Button../div
...
div class=ContentArea../div

Of course, I'll leave the CSS to you for how to make these position
correctly to look like that flash mockup.

your jquery looks like this:
$(document).ready(function(){
  $(div.Button).click(function(){
$(div.ContentArea).animate({
  width: 0px,
  opacity: 0.0},
  slow,
  function() { //this function should hold AJAX calls etc
 $(div.ContentArea).animate({ // this animation should
instead be in the AJAX callback
   width: 500px,
   opacity: 1.0},
   slow
 );
  }
);
 }
});

Braces might not match right...

That will provide the simple mockup for you (i tested this).  You'll
need to add the cursor: hand or whatever CSS attributes as well, and
adjust the width/opacity I used to your desired  values.  Obviously,
you'd like to also make an AJAX call to give new information to the
ContentArea.  I would put that AJAX call into the callback to the
animation (right before the reanimation).  I've marked this above,
then that AJAX should use as its callback the updating of information
and reshowing the area.  You can of course approach this other ways as
well (I would do it differently, but its a little more complicated to
explain and relies on globals and such).

Cheers!
Ben Cherry

On Mar 25, 2:11 pm, makgik [EMAIL PROTECTED] wrote:
 At first hello to everybody! I'm new to jquery and this group.

 I'm just starting to dig into the framework, and I need some kind of
 more concise guidelines on my very first project I'm trying to create
 with jquery.

 What I want is to clone this flash functionality 
 here:http://asaucerfulofpixels.com/files/mockup.swfwith jquery.

 Can somebody please point me to some resources where I can learn how I
 can do this? Are there any specific plugins/extensions that I can use?
 Also, if it is possible, can I use some sort of simple backend cms to
 change the contents on the panels? And What's best to use for dynamic
 source: XML, Database or?

 Thank you so much in advance!


[jQuery] Loading a form via ajax load and then submitting with ajax form helper not working.

2008-03-26 Thread delay

I am having trouble getting a form to submit using the jquery form
helper.
I load the form with jquery load which works fine.  Then if I try to
submit the form using the form helper it doesn't seem to find it.  I
assume the DOM is not being reparsed for the html loaded by the ajax
call.   I am sure I am just making some basic error. Below is my
javascript function, my html and the initial link which loads the form
initially.   I am a javascript/jquery beginner so any help or code
examples would be very much appreciated.

---JAVASCRIPT---
//add a comment
function add_comment(CommentId)  {
new jQuery('#addcomment'+CommentId).hide().load('/comments/
add_comment/'+CommentId,
  {},
  function() { jQuery(this).slideDown('fast'); }
);

var options = {
target:'#addcomment'+CommentId,   // target element(s)
to be updated with server response

};

  jQuery('#frmaddcomment'+CommentId).submit(function() {
// inside event callbacks 'this' is the DOM element so we
first
// wrap it in a jQuery object and then invoke ajaxSubmit
jQuery(this).ajaxSubmit(options);
// !!! Important !!!
// always return false to prevent standard browser submit and
page navigation
return false;
 });



 }

---HTML---
div class=commentadd id=addcomment0
img src=/images/comments.png class=iconh1Add Comments:/h1
form action=http://localhost/index.php/comments/add_comment;
method=post id=frmaddcomment0
input type=hidden name=CommentId value=0 /
plabel for=titleTitle:/labelbr /
input type=text name=title value= maxlength=255 size=43
id=title class=textfield  /
plabel for=titleComments:/labelbr /
textarea name=description cols=41 rows=10 id=description
class=textfield /textarea
input type=submit name=submit value=Submit Comments
id=submit_comments  /
 /form
/div

---INITIAL LINK---
a href=javascript:add_comment(0)Add New Comment/a


[jQuery] Re: Superfish Plugin - transparency

2008-03-26 Thread Schmitt


Hi Joel,

with your original opacity values it didn't work, I had to switch them
around.

It looks lovely in Firefox but in IE even the first submenu is already
completely transparent. I'm still poking it, so maybe will figure something
out.

Cynthia



Joel Birch wrote:
 
 
 Hi Adrian,
 
 Hmm, this isn't pretty, but sort of does the job (see below). I set
 the animation to fade to opacity .92 which is only a subtle amount of
 transparency because deeper nested submenus will inherit this and
 apply their own further .92 amount, which could get hard to read. The
 onBeforeShow callback was needed to set initial values so that the
 fade-in worked. Like I said - it ain't perdy:
 
 $(document).ready(function(){
   $(ul.nav)
   .superfish({
   animation : { opacity:.92},
   onBeforeShow : function() {
   $(this).css({
   opacity :'.01',
   display : 'block'
   });
   }
   });
 });
 
 

-- 
View this message in context: 
http://www.nabble.com/Superfish-Plugin---transparency-tp16252046s27240p16299638.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jquery 1.2.3 not working in my application

2008-03-26 Thread nacnez

That worked. I was using an older version of jQuery livequery. I
replaced it with the proper version and it worked!.. Thanks a lot
folks.
nacnez

On Mar 25, 10:43 pm, Adrián Moreno [EMAIL PROTECTED] wrote:
 I recently have had some similar problems when including jQuery into
 my wordpress theme. The trouble was being caused by a wordpress plugin
 that added some javascript code to the head, and it seemed to make
 jQuery stop working, altough I could see it with firebug, as you.

 If you have some other JS code, try commenting it and see if that
 happens...

 On Mar 25, 12:33 pm, nacnez [EMAIL PROTECTED] wrote:

  I have just started learning jquery on the job. I am working on
  existing application which uses jquery 1.2.1. I wanted to use 1.2.3
  for getting better performance. When I do the substitution and load my
  page, I get the following errors

  jQuery(document).ready is not a function

  jQuery(document).triggerHandler is not a function

  I am not sure why these are caused. And both these are very
  fundamental stuff. When I compared 1.2.1 and 1.2.3 versions, the
  1.2.1's ready function does not have a call to triggerHandler where as
  1.2.3's has. Again I am not sure exactly why the addition and why that
  should cause a problem.

  I commented out the triggerHandler call in ready function of 1.2.3 and
  tried out to see if that works. Nope it does not.

  As suggested by Karl Swedberg, I checked whether the jQuery 1.2.3 file
  is accessible through firebug without getting 404. That does happen,
  but my issue persists.

  Please help me out regarding the same. I am sure I am making some
  silly mistake.

  Thanks,
  nacnez


[jQuery] jScrollPane: horizontal scroll and dynamic height/width

2008-03-26 Thread Hk.

Hello,
I have just found this nice little piece of JS while I was looking for
a nice script to replace this cruel scrollbars from my site. Anyway, I
miss two features and thought it would be more clever to ask here if
someone has already customized the script in the way I need it before
I try it by myself (I'm not a JS expert).

I have two problems, first of all I need the possibility to scroll the
div horizontal and vertical, the second problem ist, that height and
width of my div have to be dynamic, depending on the screen
resolution/
window size of my visitors. I tried so give the div the individual
height by using the DOM but the ScrollPane script doesn't seem to
recognize it, seems that it only notices the static height of the div.

Any hints, ideas or snippets out there?

Good night and thanks for your response...


[jQuery] Re: horizontal menu

2008-03-26 Thread [EMAIL PROTECTED]

I believe your are wanting slidingPanels...
http://cherne.net/brian/resources/jquery.slidingPanels.html

On Mar 25, 4:07 pm, Pofferbacco [EMAIL PROTECTED] wrote:
 Hello,
 is there a plugin to have an horizontal menu like 
 thishttp://www.phatfusion.net/imagemenu/index.htm?

 Thank you,
 Luca


[jQuery] Re: How to get the first matching parent of each element?

2008-03-26 Thread Will Moffat

Thanks Ariel,

  Is there an elegant way to return the
  _first_ matching parent of each element in a collection?
  Am I missing something obvious?

Yes, it seems I was :-(

 $('.clickable').map(function(){
    return $(this).parents('.container')[0];
 });

That's exactly what I was looking for.
cheers!
--Will



[jQuery] Tablesorter parsing question

2008-03-26 Thread DavidH

Hi,

I have a column I want to use tablesorter to act on. It's a time
column, where the times are in the format mm:ss.tenths, e.g. (10:12.2,
15:12.2). Times of under 10 minutes are 7:12.4, 9:12.5. Tablesorter
deals with these by sorting them, in ascending order, as 10:12.2,
15:12.2, 7:12.4, 9:12.5.

How do I get it to treat them as purely numeric. Do I need to create
an additional parsing rule for this column. If so, what would it look
like?

Thanks,

David


[jQuery] Problem in IE6 with empty() and replaceWith()

2008-03-26 Thread lemp

Hi,

I'm new to jQuery so I may miss something obvious...

I created a script that create/update a second select list when a
choice is made in the first one. Works fine in Firefox but only
partially in Explorer.

There is 2 problems:

On line:
if ($(div#categories).length  0) $(div#categories).empty();

it do resolve the condition but don't execute empty()

Same for replaceWith at the end of the script.

$(document).ready(function() {
$(select#quantitesType).change(function() {
var type = $(this).val();
if (type == 0) {
if ($(div#categories).length  0) 
$(div#categories).empty();
} else {
var categories = ?php echo $categories ?; // Json 
array
var selectDiv = $('div').attr('id', 
'categories').attr('class',
'input');
selectDiv.html('label for=quantitesCategory?php
__('Catégorie') ?/label');
var selectObj = $('select').attr('name', 
'data[quantites]
[category]').attr('id', 'quantitesCategory');
for (var i = 0; i  categories.length; i++) {
if (categories[i].quantite_type_id == type) {
$('option').attr('value',
categories[i].id).text(categories[i].name).appendTo($(selectObj));
}
}
selectDiv.append(selectObj);
if ($(div#categories).length  0) {
$(div#categories).replaceWith(selectDiv);
} else {
$(fieldset).append(selectDiv);
}

}
})
});
/script


[jQuery] ... new posts not working? ...

2008-03-26 Thread sweetL

 tried putting up a post twice today with no joy, whats going on?


[jQuery] jquery validate, addMethod strange behaviour

2008-03-26 Thread hosea46

Hi there,

I have two issues here:

a) When adding a method to the validator the message does not return
on an error
b) Even though the added method returns false the submit handler still
submits the form.

Any suggestions?

Here the code:

$.validator.addMethod(userExists, function(value, element) {
var r = true;
var jqe = $(element);


jqe.parent(td).next().children(div).empty().append('nbsp;img
src=images/validate_loader.gif width=16 height=16 /');
$.get(ajaxindex.php?module=validateaction=username,
  { username: value },
  function(data){
if(data==false) {

jqe.parent(td).next().children(div).empty().append('nbsp;b
class=error-style*/b');
jqe.focus();
r = false;
} else {

jqe.parent(td).next().children(div).empty().append(' nbsp;
');
}
  });
  return r;
}, The username already exists.);
$.validator.addMethod(emailExists, function(value, element) {
var r = true;
var jqe = $(element);

jqe.parent(td).next().children(div).empty().append('nbsp;img
src=images/validate_loader.gif width=16 height=16 /');
$.get(ajaxindex.php?module=validateaction=email,
  { email: value },
  function(data){
if(data==false) {

jqe.parent(td).next().children(div).empty().append('nbsp;b
class=error-style*/b');
jqe.focus();
r = false;
} else {

jqe.parent(td).next().children(div).empty().append(' nbsp;
');
}
  });
  return r;
}, The email address already exists.);
$(#register_form).validate({
errorLabelContainer: $(#error_li),
wrapper: li,
rules: {
reg_username: {
required: true,
minLength: 4,
maxLength: 120,
userExists: true
},
reg_password: {
required: true,
minLength: 4
},
reg_confirm_password: {
equalTo: #reg_password
},
reg_email: {
email: true,
required: true,
emailExists: true
}
 },
 messages: {
 reg_username: {
required: A valid username is 
required.,
minLength: Please enter a username at 
least 4 characters long.,
maxLength: Please enter a username no 
longer then 120
characters long.
 },
 reg_password: {
required: A password is required.,
minLength: Please enter a password at 
least 4 characters long.
 },
 reg_email: {
required: A valid email address is 
required.
 }
 },
submitHandler: function(form) {
$(form).ajaxSubmit(options);
}
});

Thanks for the help.
Thomas


[jQuery] Re: Set src of image in containing div of this div ?

2008-03-26 Thread the_woodsman

 $(this).parent().parent('.display img').attr('src', val);

I think with a bit mroe debugging you can crack this - one thing that
looks suspect is parent().parent('.display img'), surely nothing's
going to have an image as a parent? I would assume you're looking for
something more like parent().parent('.display').find('img'), or
similar.

If I were you I'd break it into smaller chunks and use Firebug to see
what dom elements get returned by different calls to parent/parents.






On Mar 25, 8:36 pm, elspiko [EMAIL PROTECTED] wrote:
 Hi,

 I'm fairly new to jQuery so bare with me. I've had a search on the forums,
 but if its already been answered i apologise

 I'll show the code first...easier to explain

 div class=product
 div class=display images/bedroom.jpg /divbr /
 div class=thumbs images/thumbs/bedroom.jpg  images/thumbs/bedroom1.jpg
 images/thumbs/bedroom2.jpg /div
 /div

 div class=product
 div class=display images/tables.jpg /divbr /
 div class=thumbs images/thumbs/tables.jpg  images/thumbs/tables1.jpg
 images/thumbs/tables2.jpg /div
 /div

 Multiple product classes, when you click on one of the thumbnails, the img
 in the display class updatesor rather it should. When a thumbnail is
 clicked the images in all of the display classes change to the selected
 image rather than just the display class in the containing div.

 I know its because I need to select display class in the current selected
 product but i don't know how...

 I've tried variations on the theme of

 $(this).parent().parent('.display img').attr('src', val);
 $(this).parents...
 etc etc

 Below is the current code (where all the images display the same)

 $(document).ready(function() {
   $('.thumbs img').click(function() {
 var scr = $(this).attr('src').replace(thumbs/,);
 $('.display img').attr(src, scr);
   });

 });

 But I'm just stumped. Please help, I hope I've made myself as clear as
 possible, if not i apologise

 --
 View this message in 
 context:http://www.nabble.com/Set-src-of-image-in-containing-div-of-this-div-...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: jQuery code comments - Is that Javadoc or something else?

2008-03-26 Thread Eric Martin

I'm not sure what the jQuery developers use this format for, but it is
not javadoc, per se.

If you are looking for something to create documentation , I
personally have used jsdoc-toolkit (http://code.google.com/p/jsdoc-
toolkit/) which is a javadoc type api for JavaScript. There are a
number of other similar type api's out there.

On Mar 26, 5:53 am, alexanmtz [EMAIL PROTECTED] wrote:
 Good point stephen, I note this too...

 Im develop a plugin and use javadoc and I create some fields that dont
 fit in documentation, but was necessary to describe it...

 I think that the jQuery developers can answer this...

 On Mar 25, 5:34 pm, Stephen [EMAIL PROTECTED] wrote:

  Hi,
  In many jQuery plug-ins and JS code using jQuery, I find comments at
  the top of the source code like this:

  /**
   * SomeFunction - Some comments.
   * @requires jQuery v1.2 or above
   * @example
   *
  */

  This looks like Javadocs to me, but there are certain fields that
  don't seem to be in the Javadoc 
  documentation:http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#tag

  Fields like @example and @option are not in the Javadoc
  specifications, however.

  Is there a URL that discusses how to write jQuery comments like these
  plug-in authors are doing?  I attempted to find something on
  jquery.com, but I have not found anything or have been searching the
  wrong way.

  Thank you for reading this.

  --Stephen


[jQuery] Re: Set src of image in containing div of this div ?

2008-03-26 Thread sweetL

can you post a workable demo somewhere?

even if you do a self-contained html file and put it in a pastebin
somewhere.

On Mar 25, 8:36 pm, elspiko [EMAIL PROTECTED] wrote:
 Hi,

 I'm fairly new to jQuery so bare with me. I've had a search on the forums,
 but if its already been answered i apologise

 I'll show the code first...easier to explain

 div class=product
 div class=display images/bedroom.jpg /divbr /
 div class=thumbs images/thumbs/bedroom.jpg  images/thumbs/bedroom1.jpg
 images/thumbs/bedroom2.jpg /div
 /div

 div class=product
 div class=display images/tables.jpg /divbr /
 div class=thumbs images/thumbs/tables.jpg  images/thumbs/tables1.jpg
 images/thumbs/tables2.jpg /div
 /div

 Multiple product classes, when you click on one of the thumbnails, the img
 in the display class updatesor rather it should. When a thumbnail is
 clicked the images in all of the display classes change to the selected
 image rather than just the display class in the containing div.

 I know its because I need to select display class in the current selected
 product but i don't know how...

 I've tried variations on the theme of

 $(this).parent().parent('.display img').attr('src', val);
 $(this).parents...
 etc etc

 Below is the current code (where all the images display the same)

 $(document).ready(function() {
   $('.thumbs img').click(function() {
 var scr = $(this).attr('src').replace(thumbs/,);
 $('.display img').attr(src, scr);
   });

 });

 But I'm just stumped. Please help, I hope I've made myself as clear as
 possible, if not i apologise

 --
 View this message in 
 context:http://www.nabble.com/Set-src-of-image-in-containing-div-of-this-div-...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] jQuery with jquery.corners displaying differently in IE6 than FF

2008-03-26 Thread Dan Hudson

I have a horizontal menu that with the use of jQuery and a plug in
jquery.corner.js I am rounding the upper left corner. It appears fine
in FF but fails to work properly in IE6. Also, in FF the area to click
on is very small - not even the width/height of the text.  Is this due
to the numerous divs that are added?

Here is the HTML:
HTML Code:

div id=header
div id=nav_wrapper
div id=nav
ul
lia href=/apply/APPLY/a/li
li class=divider|/li
lia href=/teach/FOR TEACHERS/a/li
li class=divider|/li
lia href=/schools/FOR SCHOOLS/a/li
li class=divider|/li
lia href=/about/ABOUT VIF/a/li
/ul
/div!-- End Nav --
/div
/div!-- End Header --

And here is the relevant CSS:
CSS Code:

#header {
background-image:url(/images/sitewide/header.gif);
background-repeat:no-repeat;
height:110px;
width:820px;
text-align:right;
}
#nav_wrapper {
background:#007ec4;
display:inline;
}

#nav {
margin-top:79px;
margin-right:3px;
float:right;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
font-weight:bold;
display:inline;
padding:0px;
}

#nav ul {
list-style:none;
display:inline;
padding-left:7px;
margin:0px;
background:#ff;
}
#nav li {
display:inline;
padding: 0px 5px;
}

#nav .divider {
color:#0065bd;
}


When I look at the page with the IE dev toolbar it shows the div
stretching all the way across the header width. Is this because that
is the only div with a width? If I try to set a width in either
nav_wrapper or nav it still does not give me the rounded corner and it
also starts to break in FF.


Any suggestions?

Thanks,

Dan


[jQuery] JSONP timestamp parameter (Answered)

2008-03-26 Thread [EMAIL PROTECTED]

I'm re-posting this message, which I originally posted to the
Development list by my mistake, for those to find on a search for a
similar problem.
Answer included:

---
I've written a Picasa Webalbum integration script that uses the JSONP
calls for collecting the necessary data from the Picasa API feeds.
I had to adapt jQuery (v.1.2.3) to NOT include the timestamp
(_=12345678) to the request because this results in a Invalid Query
Param from the API.

I might make it a jQuery plugin, but the above has to change for that.

Can this param be made optional in some way so that I can use the
original jQuery.js (and even the jquery.pack.js) and other users don't
need to adapt their jquery to be able to work with my script.

I hope the above makes any sense...
---
ANSWER:
---
add the cache param: cache:true
$.ajax({
  cache:true,
})

by Benjamin Sterling


Excellent! Thx a lot Benjamin!
My code is now compliant to jQuery :-)
for those interested, demo at: http://www.multiprof.nl/pwi/
(early alpha)


Regards,
JD



[jQuery] Re: Attach Event to Class Instantiation

2008-03-26 Thread jmar777

Thanks Chris - that actually looks fairly close to what I'm looking
for.  If I could add an advice to the constructor method using
before(), then I think that would solve my problem.  Thanks again!


[jQuery] links in accordion plugin?

2008-03-26 Thread Netherscurial

Hello,

I have a page at http://www.consultwebs.com/videoNEW.htm which uses
the accordion plugin to run those tabs you see where the video is. It
works fine but none of the links works in the tabs, and some of them
disappear. Like under the Example Videos on Consultwebs' Client
Websites. heading. When you click on the links it closes the tab
instead of going to the page I want.

How do I get the links working in the paragraphs?

Anyone know the problem?

thanks alot!


[jQuery] links in accordion plugin?

2008-03-26 Thread netherscurial


Hello, 

I have a page at http://www.consultwebs.com/videoNEW.htm which uses the
accordion plugin to run those tabs you see where the video is. It works fine
but none of the links works in the tabs, and some of them disappear. Like
under the Example Videos on Consultwebs' Client Websites. heading. When
you click on the links it closes the tab instead of going to the page I
want. 

How do I get the links working in the paragraphs? 

Anyone know the problem? 

thanks alot! 


-- 
View this message in context: 
http://www.nabble.com/links-in-accordion-plugin--tp16304014s27240p16304014.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Attach Event to Class Instantiation

2008-03-26 Thread jmar777

Thanks Ariel,

Your example (b) is more or less what I wanted.  I was hoping to find
an approach that didn't require firing an event from within the
constructor, but that doesn't seem to be possible.  BTW, I've enjoyed
your blog on numerous occasions - keep it up!


[jQuery] Problem with jquery.validate.js

2008-03-26 Thread Paul Collins

Hi all,

I'm working with the JQuery validate plugin and having a few problems.
I must first point out that I am a novice and may be asking dumb
questions! Any tips or links would be great.

I have a test page here I am working on:
http://paulcollinslondon.com/contactTest.php

I am using another script to replace the normal submit button with an
image (/javascript/scripts.js). The problem with this is when I use
this script it doesn't interact with the JQuery validation and it uses
the standard PHP. When I remove the ID (id=sendButton_replace) to
call the button script, the validation works fine.

If anyone has a moment, would they be able to take a look?! You don't
have to give me the answer even, just point me in the right direction.
I'm stuck!

Thanks for any help.
Paul


[jQuery] links in accordion plugin?

2008-03-26 Thread Kevin Evans
Hello,

I have a page at http://www.consultwebs.com/videoNEW.htm which uses  
the accordion plugin to run those tabs you see where the video is. It  
works fine but none of the links works in the tabs, and some of them  
disappear. Like under the Example Videos on Consultwebs' Client  
Websites. heading. When you click on the links it closes the tab  
instead of going to the page I want.

How do I get the links working in the paragraphs?

Anyone know the problem?

thanks alot! 

[jQuery] Re: jquery hover in ie

2008-03-26 Thread mcniac

Hi,
I am having the same issue, the events that are not working in IE
are mouseenter and mouseleave (which are used to make the hover event)
i haven' t had the time to debug it, but using mouseover and mouseout
works for what i needed

Esteban



On Feb 22, 11:09 am, Jarrod [EMAIL PROTECTED] wrote:
 Hi,

 I have a small problem when using the hover effect in ie (6 and 7)

 When hover is applied to the area tag (hotspots in an image map) it
 doesn't seem to fire the events, but mouseover and mouseout do (which
 I ultimately used to solve the problem).

 so
 area.hover( function() {alert(on)},function() {alert(off)});

 didn't work

 but
 area.mouseover( function() {alert(on)});
 area.mouseout( function() {alert(off)});
 did work.

 Any ideas?

 Thanks,
 Jarrod


[jQuery] Re: jQuery code comments - Is that Javadoc or something else?

2008-03-26 Thread Stephen

Ariel,
Thank you for confirming this.  Since there isn't any formal
commenting process for jQuery code, I will use the scriptDoc spec,
which suits my needs.

--Stephen



On Mar 26, 9:47 am, Ariel Flesler [EMAIL PROTECTED] wrote:
 The core of jQuery doesn't have formal comments, and I don't think
 there's any standarized documentation among jQuery devs.
 I always add some *formal* comments in the header of the source
 version of my plugins.
 I stick to scriptDochttp://scriptdoc.org/. It's an adaptation of
 javadoc and it's supported by some IDEs.
 I think I used it for Aptana, back then when I used that app.

 I don't use tags that are not specified, instead I just use words
 like:  Date: 03/02/08, Notes:, etc.

 Hope that helped

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

 On Mar 26, 9:53 am, alexanmtz [EMAIL PROTECTED] wrote:

  Good point stephen, I note this too...

  Im develop a plugin and use javadoc and I create some fields that dont
  fit in documentation, but was necessary to describe it...

  I think that the jQuery developers can answer this...

  On Mar 25, 5:34 pm, Stephen [EMAIL PROTECTED] wrote:

   Hi,
   In many jQuery plug-ins and JS code using jQuery, I find comments at
   the top of the source code like this:

   /**
* SomeFunction - Some comments.
* @requires jQuery v1.2 or above
* @example
*
   */

   This looks like Javadocs to me, but there are certain fields that
   don't seem to be in the Javadoc 
   documentation:http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#tag

   Fields like @example and @option are not in the Javadoc
   specifications, however.

   Is there a URL that discusses how to write jQuery comments like these
   plug-in authors are doing?  I attempted to find something on
   jquery.com, but I have not found anything or have been searching the
   wrong way.

   Thank you for reading this.

   --Stephen- Hide quoted text -

  - Show quoted text -


[jQuery] iPhoto done in JQuery

2008-03-26 Thread ajk49

Check out these three Ajax apps developed almost entirely using JQuery
by Mobyko. They are an iPhoto type photo management tool, a video
management tool and a text management tool. Click on the links in the
navigation to switch between the galleries. All the galleries are
aimed at helping people to manage their mobile assets - photos, videos
and texts.

Demo versions can be seen at

http://www.mobyko.com/gallerydemo/mobykogallery/index.php

Sign up with Mobyko if you want your own galleries.

ajk49


[jQuery] Re: jQuery code comments - Is that Javadoc or something else?

2008-03-26 Thread matheus

Hello Stephen!

This code comments looks like phpDocumentor...

/** --- Start of comment block
@require --- file needed
@example --- One example of the use of code (I dont remeber if this
example is a external file or a internal.)
*/ --- End of comment block


On 26 mar, 10:47, Ariel Flesler [EMAIL PROTECTED] wrote:
 The core of jQuery doesn't have formal comments, and I don't think
 there's any standarized documentation among jQuery devs.
 I always add some *formal* comments in the header of the source
 version of my plugins.
 I stick to scriptDochttp://scriptdoc.org/. It's an adaptation of
 javadoc and it's supported by some IDEs.
 I think I used it for Aptana, back then when I used that app.

 I don't use tags that are not specified, instead I just use words
 like:  Date: 03/02/08, Notes:, etc.

 Hope that helped

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

 On Mar 26, 9:53 am, alexanmtz [EMAIL PROTECTED] wrote:

  Good point stephen, I note this too...

  Im develop a plugin and use javadoc and I create some fields that dont
  fit in documentation, but was necessary to describe it...

  I think that the jQuery developers can answer this...

  On Mar 25, 5:34 pm, Stephen [EMAIL PROTECTED] wrote:

   Hi,
   In many jQuery plug-ins and JS code using jQuery, I find comments at
   the top of the source code like this:

   /**
* SomeFunction - Some comments.
* @requires jQuery v1.2 or above
* @example
*
   */

   This looks like Javadocs to me, but there are certain fields that
   don't seem to be in the Javadoc 
   documentation:http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#tag

   Fields like @example and @option are not in the Javadoc
   specifications, however.

   Is there a URL that discusses how to write jQuery comments like these
   plug-in authors are doing?  I attempted to find something on
   jquery.com, but I have not found anything or have been searching the
   wrong way.

   Thank you for reading this.

   --Stephen- Hide quoted text -

  - Show quoted text -


[jQuery] Accessing Parent Classes variables from $.Post function

2008-03-26 Thread snyderp

Hi Everyone,

I'd like to use jQuery in a class I'm working on for a project.
However, I'm quickly getting lost in variable resolution, and any help
people could provide would be greatly appreciated.

So, the just of it is that I have something like:

function DB_info(script) {

this.db_info_script = script;
this.results = '';

};

and then:

DB_info.prototype.get_column_details = function(obj, table, column) {

$.post(this.db_info_script,
{   action: get_column_details,
table:  table,
column: column},
function(json) {

   // Watch out, here comes the tricky part
this.parent.results = json;
},
json);

return true;

}

The tricky part, or the part I'm having trouble with, is how to set
DB_info.results = to the json results of the $.post call.  I realize
that the problem at the tricky part is that this at that point is
refering to the jQuery object, but DB_info.results and
DB_info.prototype.results don't seem to work either.

Is there anyway I can pass something through the $.post callback so
that my ajaxComplete listeners can get to that json object?  Or is
there an obvious better way to do be doing all this in the first
place.

Again, thanks all for reading!


[jQuery] Re: jQuery code comments - Is that Javadoc or something else?

2008-03-26 Thread matheus

Its looks like phpDocumentor...

On 26 mar, 10:47, Ariel Flesler [EMAIL PROTECTED] wrote:
 The core of jQuery doesn't have formal comments, and I don't think
 there's any standarized documentation among jQuery devs.
 I always add some *formal* comments in the header of the source
 version of my plugins.
 I stick to scriptDochttp://scriptdoc.org/. It's an adaptation of
 javadoc and it's supported by some IDEs.
 I think I used it for Aptana, back then when I used that app.

 I don't use tags that are not specified, instead I just use words
 like:  Date: 03/02/08, Notes:, etc.

 Hope that helped

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

 On Mar 26, 9:53 am, alexanmtz [EMAIL PROTECTED] wrote:

  Good point stephen, I note this too...

  Im develop a plugin and use javadoc and I create some fields that dont
  fit in documentation, but was necessary to describe it...

  I think that the jQuery developers can answer this...

  On Mar 25, 5:34 pm, Stephen [EMAIL PROTECTED] wrote:

   Hi,
   In many jQuery plug-ins and JS code using jQuery, I find comments at
   the top of the source code like this:

   /**
* SomeFunction - Some comments.
* @requires jQuery v1.2 or above
* @example
*
   */

   This looks like Javadocs to me, but there are certain fields that
   don't seem to be in the Javadoc 
   documentation:http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#tag

   Fields like @example and @option are not in the Javadoc
   specifications, however.

   Is there a URL that discusses how to write jQuery comments like these
   plug-in authors are doing?  I attempted to find something on
   jquery.com, but I have not found anything or have been searching the
   wrong way.

   Thank you for reading this.

   --Stephen- Hide quoted text -

  - Show quoted text -


[jQuery] Re: Problem with jquery.validate.js

2008-03-26 Thread Paul Collins

Hi all,

As a follow up to this, I've decided to try and rewrite the image
replace script with JQuery, so I can re-use it.

The one thing I can't seem to find any info on at the moment is doing
a search for only part of an ID.

So in this instance, I would like to search for all submit input tags
in a form that have an ID ending in _replace. So the ID might be
called submit_replace. I would only like to search for the
_replace part of any ID in the form.

So far I have:

$('form').find('#_replace').addClass(_replace);

Any ideas would be great.
Thanks
Paul


On 26/03/2008, Paul Collins [EMAIL PROTECTED] wrote:
 Hi all,

  I'm working with the JQuery validate plugin and having a few problems.
  I must first point out that I am a novice and may be asking dumb
  questions! Any tips or links would be great.

  I have a test page here I am working on:
  http://paulcollinslondon.com/contactTest.php

  I am using another script to replace the normal submit button with an
  image (/javascript/scripts.js). The problem with this is when I use
  this script it doesn't interact with the JQuery validation and it uses
  the standard PHP. When I remove the ID (id=sendButton_replace) to
  call the button script, the validation works fine.

  If anyone has a moment, would they be able to take a look?! You don't
  have to give me the answer even, just point me in the right direction.
  I'm stuck!

  Thanks for any help.

 Paul



[jQuery] Re: [validate] need help with addMethod

2008-03-26 Thread Jörn Zaefferer


Priest, James (NIH/NIEHS) [C] schrieb:

Jörn, the issue is it's not a checkbox :)   It's a set of radio buttons:  o yes 
o no

The user must select 'yes' or they can't continue to submit the form.  
  
Okay, if you want to stick with radio buttons for a boolean value, 
please post a testpage with what you've got so far.


Jörn


[jQuery] Re: jquery validate, addMethod strange behaviour

2008-03-26 Thread Jörn Zaefferer


hosea46 schrieb:

Hi there,

I have two issues here:

a) When adding a method to the validator the message does not return
on an error
b) Even though the added method returns false the submit handler still
submits the form.

Any suggestions?[...]

Thanks for the help.
  
Validation methods are called synchronously. Please take a look at the 
remote method do to remote validation. If the implementation itself 
doesn't work for you, take it as a starting point to implement your own.


Jörn


[jQuery] Re: Problem with jquery.validate.js

2008-03-26 Thread Jörn Zaefferer


Paul Collins schrieb:

Hi all,

As a follow up to this, I've decided to try and rewrite the image
replace script with JQuery, so I can re-use it.

The one thing I can't seem to find any info on at the moment is doing
a search for only part of an ID.

So in this instance, I would like to search for all submit input tags
in a form that have an ID ending in _replace. So the ID might be
called submit_replace. I would only like to search for the
_replace part of any ID in the form.

So far I have:

$('form').find('#_replace').addClass(_replace);
  

Take a look at:

http://docs.jquery.com/Selectors
http://docs.jquery.com/Selectors/attributeEndsWith#attributevalue

Jörn


[jQuery] Tablesorter parsing question

2008-03-26 Thread Apemantus


Hi,

I have a column I want to use tablesorter to act on. It's a time column,
where the times are in the format mm:ss.tenths, e.g. (10:12.2, 15:12.2).
Times of under 10 minutes are 7:12.4, 9:12.5. Tablesorter deals with these
by sorting them, in ascending order, as 10:12.2, 15:12.2, 7:12.4, 9:12.5. 

How do I get it to treat them as purely numeric. Do I need to create an
additional parsing rule for this column. If so, what would it look like?

Thanks,

David
-- 
View this message in context: 
http://www.nabble.com/Tablesorter-parsing-question-tp16300427s27240p16300427.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: links in accordion plugin?

2008-03-26 Thread Jörn Zaefferer


Netherscurial schrieb:

Hello,

I have a page at http://www.consultwebs.com/videoNEW.htm which uses
the accordion plugin to run those tabs you see where the video is. It
works fine but none of the links works in the tabs, and some of them
disappear. Like under the Example Videos on Consultwebs' Client
Websites. heading. When you click on the links it closes the tab
instead of going to the page I want.

How do I get the links working in the paragraphs?
  
Try to specify the header to use for the accordion via the 
header-option, see http://docs.jquery.com/UI/Accordion/accordion#options


Jörn


[jQuery] Re: Accessing Parent Classes variables from $.Post function

2008-03-26 Thread Jörn Zaefferer


snyderp schrieb:

Hi Everyone,

I'd like to use jQuery in a class I'm working on for a project.
However, I'm quickly getting lost in variable resolution, and any help
people could provide would be greatly appreciated.

So, the just of it is that I have something like:

function DB_info(script) {

this.db_info_script = script;
this.results = '';

};

and then:

DB_info.prototype.get_column_details = function(obj, table, column) {

$.post(this.db_info_script,
{   action: get_column_details,
table:  table,
column: column},
function(json) {

   // Watch out, here comes the tricky part
this.parent.results = json;
},
json);

return true;

}

The tricky part, or the part I'm having trouble with, is how to set
DB_info.results = to the json results of the $.post call.  I realize
that the problem at the tricky part is that this at that point is
refering to the jQuery object, but DB_info.results and
DB_info.prototype.results don't seem to work either.

Is there anyway I can pass something through the $.post callback so
that my ajaxComplete listeners can get to that json object?  Or is
there an obvious better way to do be doing all this in the first
place.
  

Try this:

DB_info.prototype.get_column_details = function(obj, table, column) {
var parent = this.parent;
$.post(this.db_info_script,
{   action: get_column_details,
table:  table,
column: column},
function(json) {

  // Watch out, here comes the tricky part
parent.results = json;
},
json);

return true;

}

Jörn


[jQuery] Problem fiding a certain text inside a table

2008-03-26 Thread Feed

Hello all,

I'm having a hard time trying to make a script. This is the whole
picture:

- I have lots of tables in the same page
- Each of those tables has a button that, once pressed, find and
highlight all '*' characters inside the table

What I'm thinking about doing is:

Find all TDs that contain '*' inside:

$(this).find(td:contains('*'));

Ok, this worked, I found the TDs but now I have to look inside
these TDs and highlight ONLY the * character how can I do it? I
need to find the * and then wrap it in a span... in the end there will
be something like this:

I found the span class=highlight*/span, yay!

Thanks in advance.


[jQuery] Re: [tooltip] Something left in your test page

2008-03-26 Thread Jörn Zaefferer


alexanmtz schrieb:

Hi Jorn,

I would like to request you to add a tooltip in your select box that
you use to test bgiframe. Actually it work well, but try to put in
your demo page a tooltip and a title in select box in your test page:

http://jquery.bassistance.de/tooltip/demo/

Try to test this:

$(select).tooltip();

Note when you are choosing a option, the firefox looses the correct
position and the tooltip keeps behind the options and all browsers.

Any idea how to solve this?

Your plugin is almost 100%, it just lack the right handler in select
boxes.

The better way to user its when the user are selecting a option, the
tooltip is blocked, and when he goes out of select, the back to
work...

I hope it helps to make the plugin even better... [...]
  
I've taken a look at the issue and commited a first fix: 
http://dev.jquery.com/changeset/5131

Take a look at the update method if you want.

Its still a bit annoying, but at least not as broken as before.

Jörn


[jQuery] Re: [tooltip] image map area not working on ie6

2008-03-26 Thread Jörn Zaefferer


flobou schrieb:

Thanks Karl and Jörn,

I'm sad there's no solution yet with jQuery toolip but I will try
clueTip.
The mouse tracking was very good with tooltip so I hope to find a good
combination, I'll let you know =) [...]
  
Thanks for Karls motiviation. I found the issue and fixed it: 
http://dev.jquery.com/changeset/5133


Please give the latest revision a try: 
http://dev.jquery.com/view/trunk/plugins/tooltip/


Jörn


[jQuery] Re: horizontal menu

2008-03-26 Thread Brian Cherne
I haven't officially announced my slidingPanels plugin to the community.
There are still a few odd bugs with it. I'd say it's fine for a non-critical
site, but I (personally) wouldn't be comfortable with it on a
mainstream/commercial web site (yet).

There are a bunch of additional features and safety measures I'd like to
implement. Unfortunately I'm currently slammed with work (and visiting
family)... and won't have time for a few weeks (at least) to work on the
next release.

I just updated it from prototype/proof-of-concept to an honest-to-goodness
jQuery plug-in a few weeks ago. I'm surprised folks already know about it.

See what you can make it do. Let me know if there are features/options you'd
like to see in a future release. But also know I won't be able to bug fix
for a little while.

Brian.

On Tue, Mar 25, 2008 at 9:12 PM, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:


 I believe your are wanting slidingPanels...
 http://cherne.net/brian/resources/jquery.slidingPanels.html

 On Mar 25, 4:07 pm, Pofferbacco [EMAIL PROTECTED] wrote:
  Hello,
  is there a plugin to have an horizontal menu like
 thishttp://www.phatfusion.net/imagemenu/index.htm?
 
  Thank you,
  Luca



[jQuery] Re: hover() only working on DOM elements NOT loaded via jQuery?

2008-03-26 Thread Karl Rudd

You can't really circumvent it. If the elements don't exist when you
try to attach events to them, they won't get events attached to them.

If that's the problem then try the LiveQuery plugin.

Karl

On Wed, Mar 26, 2008 at 11:54 AM, jquertil [EMAIL PROTECTED] wrote:

  thanks Karl, but you see, I thought I circumvent the issue by actually
  having loaded the new content into an invisible DIV already. hence
  lis line:


  $('#tab_1').html( $('#tabcontent_1').html() );

  it's moving the contents of the invisible DIV into the tab DIV.


  scratching head still...



[jQuery] TOT: Anyone gotten any CF-Talk mail today?

2008-03-26 Thread Rick Faircloth

Sorry for the TOT, but I'm trying to find out if the
HouseofFusion.com mailing lists are down.

Haven't gotten anything from CF-Talk, CFEclipse, CFNewbie, etc.

Any news?

Thanks for the indulgence!

Rick



[jQuery] Re: TOT: Anyone gotten any CF-Talk mail today?

2008-03-26 Thread Josh Nathanson


Nope, down all day for me.

-- Josh

- Original Message - 
From: Rick Faircloth [EMAIL PROTECTED]

To: jquery-en@googlegroups.com
Sent: Wednesday, March 26, 2008 3:50 PM
Subject: [jQuery] TOT: Anyone gotten any CF-Talk mail today?




Sorry for the TOT, but I'm trying to find out if the
HouseofFusion.com mailing lists are down.

Haven't gotten anything from CF-Talk, CFEclipse, CFNewbie, etc.

Any news?

Thanks for the indulgence!

Rick



[jQuery] Caching issues jqModal??

2008-03-26 Thread Kenny1980


Hi,

I got some problems using jqModal and ajax. I found some posts about caching
issues with jqModal, but those solutions didn't help.

==
page1.php


...
ul
li id=item_1Item 1/li
li id=item_2Item 2/li
li id=item_3Item 3/li
li id=item_4Item 4/li 
/ul

...

$(document).ready( function() {

$(li).dblclick( function () {
theId =  this.id;   
theId = theId.substring(theId.indexOf(_)+1);

$a = 'page2.php?id=' + theId;
alert($a);
$(#dialog).jqm({  
ajax: $a
}).jqmShow();
});
});


page2.php


You have requested id '?=$_REQUEST['id']?'

==

If i load page1.php and doubleclick on an item, the first time it displays
the correct id. But the next couple of times (until page refresh) it still
shows the same id as the first time. Tough the alert in page1 gives the
correct url, the page2.php request['id'] doesn't change.

Hope anyone can clarify what i have done wrong or have forgotten.

Thanks,
Kenny
-- 
View this message in context: 
http://www.nabble.com/Caching-issues-jqModal---tp16310251s27240p16310251.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Accessing Parent Classes variables from $.Post function

2008-03-26 Thread snyderp

I'm not having any luck using parent.results.  If I do this even:


this.db_info_script = script;
this.results = false;

}

DB_info.prototype.get_columns = function(table) {

$.post(this.db_info_script,
{   action: get_columns,
table:  table},
function(json) {

alert(parent.results);
parent.results = json;

},json);
}

that alert returns says undefined and not false, which, I think, is
what I'd need to know I was on the right track.  Or maybe I'm missing
something big.  That sure seems possible :-/

that alert


[jQuery] Re: links in accordion plugin?

2008-03-26 Thread Kevin Evans
Thanks for the help, I'm quite a newbie at jQuery so not sure how to  
add that. I attempted to add that code to the jquery code the top in  
the head

I have this now:

script type=text/javascript
jQuery().ready(function(){
// simple accordion
jQuery('#list1b').accordion({
autoheight: false
});

$(.ui-accordion).bind(changeaccordion, function(event, ui) {
   ui.accordion-heading // internal widget instance
});
});
/script


It does not seem to be working, but I know I'm doing something wrong.

my heading code is like this:

a class=accordion-headingExample Videos on Consultwebs#39; Client  
Websites./a
Thanks again for the help!

Kevin


On Mar 26, 2008, at 2:38 PM, Jörn Zaefferer wrote:



 Try to specify the header to use for the accordion via the header- 
 option, see http://docs.jquery.com/UI/Accordion/accordion#options

 Jörn



[jQuery] Re: Problem fiding a certain text inside a table

2008-03-26 Thread motob

You could try using regular expressions on the text inside of each TD.
Something like this:

$(this).find(td:contains('*')).each(function(){
  $(this).text().replace(/\*/g, span class='highlight'*/span);
});

The above code is untested and may not work, but you get the picture.



On Mar 26, 3:00 pm, Feed [EMAIL PROTECTED] wrote:
 Hello all,

 I'm having a hard time trying to make a script. This is the whole
 picture:

 - I have lots of tables in the same page
 - Each of those tables has a button that, once pressed, find and
 highlight all '*' characters inside the table

 What I'm thinking about doing is:

 Find all TDs that contain '*' inside:

 $(this).find(td:contains('*'));

 Ok, this worked, I found the TDs but now I have to look inside
 these TDs and highlight ONLY the * character how can I do it? I
 need to find the * and then wrap it in a span... in the end there will
 be something like this:

 I found the span class=highlight*/span, yay!

 Thanks in advance.


[jQuery] Loading a form via ajax load and then submitting with ajax form helper not working.

2008-03-26 Thread delay

I am having trouble getting a form to submit using the jquery form
helper.
I load the form with jquery load which works fine.  Then if I try to
submit the form using the form helper it doesn't seem to find it.  I
assume the DOM is not being reparsed for the html loaded by the ajax
call.   I am sure I am just making some basic error. Below is my
javascript function, my html and the initial link which loads the form
initially.   I am a javascript/jquery beginner so any help or code
examples would be very much appreciated.

---JAVASCRIPT---
//add a comment
function add_comment(CommentId)  {
new jQuery('#addcomment'+CommentId).hide().load('/comments/
add_comment/'+CommentId,
 {},
 function() { jQuery(this).slideDown('fast'); }
);

   var options = {
   target:'#addcomment'+CommentId,   // target element(s)
to be updated with server response

   };

  jQuery('#frmaddcomment'+CommentId).submit(function() {
// inside event callbacks 'this' is the DOM element so we
first
// wrap it in a jQuery object and then invoke ajaxSubmit
jQuery(this).ajaxSubmit(options);
// !!! Important !!!
// always return false to prevent standard browser submit and
page navigation
return false;
 });



}

---HTML---
div class=commentadd id=addcomment0
img src=/images/comments.png class=iconh1Add Comments:/h1
form action=http://localhost/index.php/comments/add_comment;
method=post id=frmaddcomment0
input type=hidden name=CommentId value=0 /
plabel for=titleTitle:/labelbr /
input type=text name=title value= maxlength=255 size=43
id=title class=textfield  /
plabel for=titleComments:/labelbr /
textarea name=description cols=41 rows=10 id=description
class=textfield /textarea
input type=submit name=submit value=Submit Comments
id=submit_comments  /
/form
/div

---INITIAL LINK---
a href=javascript:add_comment(0)Add New Comment/a


[jQuery] Re: Horizontal slide Panic.com

2008-03-26 Thread JFRanger

Ariel, Sorry for the delay (reply), very busy these days!

Thank you for the .each function suggestion, as a beginner, it help
me a lot!

- cleaner code
- easier to understand

I'm going for a few day outside Montreal to relax, with my new jQuery
in action book in my possession, I will drink to John Rensiq 
you :=)

Cheers,
//JF//


On 20 mar, 10:52, Ariel Flesler [EMAIL PROTECTED] wrote:
 HiJFRanger

 The site looks good, you seem to have based you code on the old demo
 of ScrollTo.. ehm.. that's not something I'll endorse.. that demo was
 all but didactic.

 For that kind of situations, I'd advice using LocalScroll
  http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html

 Or make your own script, but simplified, something like this:

 $('a.buttons').each(function( i ){
    $(this).click(function(){
        e.preventDefault();
        $('#container').scrollTo('li:eq('+i+')', 1000, {axis:'x'} );
    });

 });

 Or an anchor based navigation, like LocalScroll.

 Note that I'm not bashing your code, just mentioning this because you
 are directing people to it.

 Cheers, let me know if you want me to link to your site from the blog.

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



[jQuery] Re: Recommendations needed to replicate this flash functionality

2008-03-26 Thread makgik

Thanks man, I'll test this and will see if I can make it work.

One more thing, How can I fadein (from 0 to 100% opacity ) the whole
page like in the mockup? Is your code doing this as well?

Thanks again!

On Mar 26, 2:19 am, bcherry [EMAIL PROTECTED] wrote:
 This is actually reall simple (probably not a surprise).

 I assume you have html code somewhat like the following:
 div class=Button../div
 div class=Button../div
 ...
 div class=ContentArea../div

 Of course, I'll leave the CSS to you for how to make these position
 correctly to look like that flash mockup.

 your jquery looks like this:
 $(document).ready(function(){
   $(div.Button).click(function(){
 $(div.ContentArea).animate({
   width: 0px,
   opacity: 0.0},
   slow,
   function() { //this function should hold AJAX calls etc
  $(div.ContentArea).animate({ // this animation should
 instead be in the AJAX callback
width: 500px,
opacity: 1.0},
slow
  );
   }
 );
  }

 });

 Braces might not match right...

 That will provide the simple mockup for you (i tested this).  You'll
 need to add the cursor: hand or whatever CSS attributes as well, and
 adjust the width/opacity I used to your desired  values.  Obviously,
 you'd like to also make an AJAX call to give new information to the
 ContentArea.  I would put that AJAX call into the callback to the
 animation (right before the reanimation).  I've marked this above,
 then that AJAX should use as its callback the updating of information
 and reshowing the area.  You can of course approach this other ways as
 well (I would do it differently, but its a little more complicated to
 explain and relies on globals and such).

 Cheers!
 Ben Cherry

 On Mar 25, 2:11 pm, makgik [EMAIL PROTECTED] wrote:

  At first hello to everybody! I'm new to jquery and this group.

  I'm just starting to dig into the framework, and I need some kind of
  more concise guidelines on my very first project I'm trying to create
  with jquery.

  What I want is to clone this flash functionality 
  here:http://asaucerfulofpixels.com/files/mockup.swfwithjquery.

  Can somebody please point me to some resources where I can learn how I
  can do this? Are there any specific plugins/extensions that I can use?
  Also, if it is possible, can I use some sort of simple backend cms to
  change the contents on the panels? And What's best to use for dynamic
  source: XML, Database or?

  Thank you so much in advance!


[jQuery] Re: Recommendations needed to replicate this flash functionality

2008-03-26 Thread makgik

Hi, thanks for your time put in answering my  question.

I'm not new at web developing at all. I'm using php/mysql/asp/access
for quite long time now. But, I can't decode this ajax/javascript
approach yet (and no time left for that). And this flash like
interface functionality is also causing me headache :(

Yes you're right I,m interested in fade/slide-in effect of the red
content box when menu clicked, and also I'm not so sure how can I
fade in the whole page, like in the mockup?

Suppose I can do that, but then how can I distribute all the other
effects to show in certain order?

Thank you

 Any help appreciated.

On Mar 26, 12:34 pm, sweetL [EMAIL PROTECTED] wrote:
 How new are you to web developing?

 XML / Database will be whatever you prefer.

 Im guessing what you're interested in, is the fade/slide-in effect of
 the red content box when you click a menu item.

 You want to be looking at the animate() functionality.

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

 Bear in mind that you only want to pop the content into the box ONCE
 the animation has finished... else its gonna be fugly.

 On Mar 25, 9:11 pm, makgik [EMAIL PROTECTED] wrote:

  At first hello to everybody! I'm new to jquery and this group.

  I'm just starting to dig into the framework, and I need some kind of
  more concise guidelines on my very first project I'm trying to create
  with jquery.

  What I want is to clone this flash functionality 
  here:http://asaucerfulofpixels.com/files/mockup.swfwithjquery.

  Can somebody please point me to some resources where I can learn how I
  can do this? Are there any specific plugins/extensions that I can use?
  Also, if it is possible, can I use some sort of simple backend cms to
  change the contents on the panels? And What's best to use for dynamic
  source: XML, Database or?

  Thank you so much in advance!


[jQuery] Re: Caching issues jqModal??

2008-03-26 Thread Shelane

I posted a workaround to this problem on this thread:
http://groups.google.com/group/jquery-en/browse_thread/thread/40137ddd2b5cfdcc/c70dadc91b0f941d?lnk=gstq=shelane+jqmodal#c70dadc91b0f941d

(very last post on it)

On Mar 26, 11:40 am, Kenny1980 [EMAIL PROTECTED] wrote:
 Hi,

 I got some problems using jqModal and ajax. I found some posts about caching
 issues with jqModal, but those solutions didn't help.

 ==
 page1.php
 

 ...
 ul
 li id=item_1Item 1/li
 li id=item_2Item 2/li
 li id=item_3Item 3/li
 li id=item_4Item 4/li
 /ul

 ...

 $(document).ready( function() {

 $(li).dblclick( function () {
 theId =  this.id;
 theId = theId.substring(theId.indexOf(_)+1);

 $a = 'page2.php?id=' + theId;
 alert($a);
 $(#dialog).jqm({
 ajax: $a
 }).jqmShow();
 });

 });

 page2.php
 

 You have requested id '?=$_REQUEST['id']?'

 ==

 If i load page1.php and doubleclick on an item, the first time it displays
 the correct id. But the next couple of times (until page refresh) it still
 shows the same id as the first time. Tough the alert in page1 gives the
 correct url, the page2.php request['id'] doesn't change.

 Hope anyone can clarify what i have done wrong or have forgotten.

 Thanks,
 Kenny
 --
 View this message in 
 context:http://www.nabble.com/Caching-issues-jqModal---tp16310251s27240p16310...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Superfish Plugin - transparency

2008-03-26 Thread Joel Birch

On 26/03/2008, Schmitt [EMAIL PROTECTED] wrote:
  with your original opacity values it didn't work, I had to switch them
  around.

Hmm, my code worked for me when I tested it. Must be some unknown
difference in the rest of the code I guess.

All this JS hackery aside, I think the easiest and most attractive way
to do this would actually to use a semi-transparent png CSS image for
the background instead of a background-color. That way the type is
full strength and nested submenus do not get more transparent than
they should. Two problems with this however, would be: 1: you'd have
to degrade it for IE6 and and avoid fade-in animations with IE7 (as
its support for png is hacky in that it doesn't combine with
additional filters), and 2: you may want to consider how it would look
with images disabled.

Joel Birch.


[jQuery] Re: Superfish problem with pathClass

2008-03-26 Thread Joel Birch

This sounds like an issue I faced when using this type of menu
recently. I worked around the issue by adding a nested ul with one
item that duplicated the parent's href. I used the text in the nested
link as extra information about the parent link and also as a label
for the page when that is the current page. Below is a link to this
job so you can see what I mean. Check out the Term Dates and the
OSA links in the main navigation.

http://www.strathcona.vic.edu.au/

Joel Birch