[jQuery] Re: Help with tabsLoad

2008-06-16 Thread Klaus Hartl

Sigh, I'm not used to using javascript: urls in links, which is
considered bad practice. Please change it to:

javascript:void(loadTab( 'ahah_3.html' ));

Removing the return statement should also work:

function loadTab(url) {
$(this).parents('#container-8').load(url);
}

Please read:
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Operators:Special_Operators:void_Operator

But I encourage you to use a standard link

a href=whatever.html.../a

and bind an event to ajaxify this link by using the load callback in
tabs itself. All you need is this then:

$(function() {
$('#container-8  ul').tabs({
load: function(ui) {
$('a', ui.panel).click(function() {
$(ui.panel).load(this.href);
return false;
});
}
});
});


--Klaus


On 16 Jun., 01:01, keny [EMAIL PROTECTED] wrote:
 Hi, thanks again for answer me,

 Your function dont work, it only show in another page the word false

 I have try all of these combinaison whit the same result :

 function loadTab(url) {
 var url;
     $(this).parents('div.ui-tabs-panel').load(url);
     return false;

 }

 function loadTab(url) {
     $(this).parents('#container-8').load(url);
     return false;

 }

 See by yourself here :http://www.snipvideo.com/tabs/

 Thanks

 On 15 juin, 18:27, Klaus Hartl [EMAIL PROTECTED] wrote:

  Ah, I see. Please change the loadTab function to this:

  function loadTab(url) {
      $(this).parents('div.ui-tabs-panel').load(url);
      return false;

  }

  and try again. The problem with your loadTab function was that it was
  reinitializing tabs turning them into in-page tabs as all anchor
  elements are already pointing to a hash at that point of time.

  --Klaus

  On 15 Jun., 16:55, keny [EMAIL PROTECTED] wrote:

   Hi,

   Ya like i said everyting work the link is loaded but afther that,
    even if you click on tab 1 or 2 or 3 the page d'ont load anymore ist
   stay to page 3

   If i click tab 1 ist should reload the page 1 same thing for tab 2 ...

   Thank you !

   On 15 juin, 02:50, Klaus Hartl [EMAIL PROTECTED] wrote:

So what is going wrong now? To me it looks like everything works as
expected (Tabs are loading correctly and the link saying This link
load page 3 in current tab via ajax does exactly what it says)...

--Klaus

On 15 Jun., 00:36, keny [EMAIL PROTECTED] wrote:

 hi thanks for helping

 i have upload a new version and still dont work

 no sherif code in this one

http://www.snipvideo.com/tabs/
 help is very appreciate

 On 14 juin, 01:58, Klaus Hartl [EMAIL PROTECTED] wrote:

  On 13 Jun., 23:17, keny [EMAIL PROTECTED] wrote:

   Thanks

   Is there a way to make a function that will work ? I am not 
   expert in
   JS like you. Maybe you can check this site that offer tab and a
   function that work to load link via ajax in there tab :

  All you need to do is *not* include the Red Sheriff tracker code
  included in the Ajax tab pages...

  --Klaus- Masquer le texte des messages précédents -

- Afficher le texte des messages précédents -- Masquer le texte des 
messages précédents -

  - Afficher le texte des messages précédents -


[jQuery] Re: Reversing slideDown/slideUp behavior

2008-06-16 Thread andrea varnier

On 15 Giu, 20:45, fallingandlaughing [EMAIL PROTECTED] wrote:
 Hello,

try and take a look at this great tutorial by karl swedberg
http://www.learningjquery.com/2008/02/simple-effects-plugins

:)


[jQuery] Re: ui.datepicker trouble

2008-06-16 Thread andrea varnier

On 15 Giu, 08:48, Shawn [EMAIL PROTECTED] wrote:
$(#criteriaStart).datepicker(setDate, sd);
$(#criteriaEnd).datepicker(setDate, ed);

I think you're missing curly brackets here:

$(#criteriaStart).datepicker({setDate: sd});


[jQuery] Re: Is there a way to use the css function with $(document) directly?

2008-06-16 Thread Olaf Bosch


Brian J. Fink schrieb:


$(document).css(selector1,rule1).css(selector2,rule2)...css(selectorN,ruleN);

If this is already part of the jQuery functionality, tell me the
syntax to use.


Yes, it's ON:

 $(p).css({ color: red, background: blue });


--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de/
http://ohorn.info/
http://www.akitafreund.de/
---


[jQuery] Re: Working with text

2008-06-16 Thread andrea varnier

On 15 Giu, 14:55, Ariel Flesler [EMAIL PROTECTED] wrote:
 var n = +forum-list-1.slice(-1);   ;-)

I think this won't work if the number has 2 or more digits.
The split('-').pop() way works better imho :)


[jQuery] Re: [validate] addWrapper bug

2008-06-16 Thread Jörn Zaefferer

Could you post a testpage?

Jörn

On Mon, Jun 16, 2008 at 3:11 AM, Cao Le Thang Long
[EMAIL PROTECTED] wrote:

 Hi,

 I'm currently using the validation plugin. However I ran into some
 problems.

 When I use div (or even ul) as a wrapper, if there is a validation
 error and I correct it, the whole form disappear, in fact the whole
 body element is marked as display: none.

 I did a search on Google and found out that this has been briefly
 discussed at : 
 http://bassistance.de/jquery-plugins/jquery-plugin-validation/#comment-50074
 (read the comment of Michiel Thalen) , and Jorn also said that the fix
 will be included. However I checked the latest CVS and nothing
 changed.

 As far as I tried, changing:

 toToggle.push( toToggle.parents( this.settings.wrapper ) );

 to:

 toToggle.push( toToggle.parent() );

 fixes this problem. But I am not certain that this change will affect
 any other behaviors of the plugin.

 I guess this is a pretty annoying bug that should be fixed in the next
 release.

 Thanks



[jQuery] Re: ui.datepicker trouble

2008-06-16 Thread Shawn


Thank you Andrea.  I will fire up the VMs for this project tomorrow 
(after I get some sleep), and test out your suggestion.


However, the docs found at 
http://docs.jquery.com/UI/Datepicker/datepicker#.22setDate.22dateendDate 
(scroll to the bottom of the page), do not seem to indicate an object is 
being used to pass the parameters.  Are the docs not up to date?  A 
quick check of the author's documentation - 
http://marcgrabanski.com/code/ui-datepicker/ - also does not shed any 
light on this.  I don't see any reference to setDate or getDate on that 
page at all.  (though I could just be missing it - it is 03:45am)


Thanks again for the response.

Shawn


andrea varnier wrote:

On 15 Giu, 08:48, Shawn [EMAIL PROTECTED] wrote:

   $(#criteriaStart).datepicker(setDate, sd);
   $(#criteriaEnd).datepicker(setDate, ed);


I think you're missing curly brackets here:

$(#criteriaStart).datepicker({setDate: sd});


[jQuery] Converting this mootools code to jQuery....help?

2008-06-16 Thread azz0r

Hey guys, I'm trying to convert my scripts to jQuery, I wondered if
you guys could help me out with this...

window.addEvent('domready', function Online_User_Updater() {
ajaxRequest = new Ajax(siteURL+'fetch/online-users', {method: 'get',
update: $('usersOnlineTxt')});
if(ajaxRequest.request()){
 var interval = 
setInterval('ajaxRequest.request()',30);
}
} );



[jQuery] Autocomplete

2008-06-16 Thread Richard Dyce

Just a quickie - does anyone know of a jQuery plugin for creating an  
autocomplete that acts like a SELECT i.e. I need people to search by  
name, and have them choose one from the list - but whilst displaying  
the name, the form needs to return an associated ID (as well as the  
name which will be ignored).

TIA

R


[jQuery] reusing events on freshly ajax updated content

2008-06-16 Thread C. Feldmann

Hello,
I am just starting out with jQuery – I used to use prototype. I must
say jQuery really makes reusing functionality very simple. However I
am having a little trouble reusing events on freshly ajax updated
content.

...
div id=myDivBtn/div
div id=myDiv
Old Content
div class=myClass/div
/div
...

in the $(document).ready() event-function I have the following events:

$('#myDivBtn').click(function() { $('#myDiv').load('script.php'); });
$('.myClass').click(function() { /* do something */ });

script.php would produce something like:
...
New Content
div class=myClass/div
...

Both functions work fine. Except when I attempt to use the class
selected event on the new content it doesn't work.

I assume that the newly ajax updated content has not been initialized.
What do I have to call after an ajax updating function to ensure
working events? I googled for some info on this, but didn’t find
anything. Maybe one of you can help. :)

Hope my problem is halfway understandable ;)
Thanks

Casper


[jQuery] [Validate] Validation Demo does't work in Opera 9.5 with jQuery 1.2.6

2008-06-16 Thread Finchi

Hello,

i just discoverd a Problem in my App an this can be perfectly
reproduced by using the Demos provided with the bassistance Validation
Plugin Download.
Just open demo/index.html (you have to use jQuery 1.2.6, it's still
working with 1.2.4) and check the first form (it's the green one).
The form is getting submitted without entering any value.

Any idea on how to get around this ??

Thanks,
Finchi


[jQuery] Re: jQuery tabs and cookies

2008-06-16 Thread Isaak Malik
It was just that I misplaced the cookie option, I had put it in the fx part
while it should have been outside of it.

Thank you for your answer.

On 6/16/08, Klaus Hartl [EMAIL PROTECTED] wrote:


 That looks correct. Did you not forget to include the cookie plugin?


 --Klaus



 On 15 Jun., 18:34, Isaak Malik [EMAIL PROTECTED] wrote:
  Oups, it was a mistake at my side, corrected code:
 
  $(function()
  {
$('#tabCont  ul').tabs({fx: {opacity: 'toggle', duration: 500},
 cookie:
  {expires: 7, path: '/'}});
 
  });
 
  --
  Isaak Malik
  Web Developer




-- 
Isaak Malik
Web Developer


[jQuery] imageAreaSelect bug

2008-06-16 Thread Chris

im using the imageAreaSelect ( http://odyniec.net/projects/imgareaselect/
) plugin.

i have (code below and at http://pastebin.com/ma828e3e ) which works
fine. i.e. i am able to select a portion of the image.

script type=text/javascript

$(window).load(function () {
$('#asdf img').imgAreaSelect({ maxWidth: 20,
maxHeight: 20 });

});

/script

div id=asdf style=display:block;

img src=../../common/images/blankImage.gif
alt=A ladybug being harassed by an ant. title=A ladybug being
harassed by an ant. /

/div

--


However, if #asdf was initially hidden and displayed again ( as seen
in this code http://pastebin.com/mb87bcc1 and below), the script
doesnt work appropriately as it was supposed to. anyone know why? This
is a screenshot of how it looks http://imagebin.org/20058

script type=text/javascript

$(document).ready(function(){

$('#asdf').slideDown('slow');

});

$(window).load(function () {
$('#asdf img').imgAreaSelect({ maxWidth: 20,
maxHeight: 20 });

});

/script

div id=asdf style=display:none;

img src=../../common/images/blankImage.gif
alt=A ladybug being harassed by an ant. title=A ladybug being
harassed by an ant. /

/div

-

Alternatively, im trying to crop an image then upload it onto the
server with the image cropped. If anyone knows a good working jquery
plugin for this, please recommend one.


[jQuery] Is it possible for jQuery define version of browser, for example IE 7.0?

2008-06-16 Thread mtest

I know that jQuery can define browser:
$.browser.msie
$.browser.safari
$.browser.opera
$.browser.mozilla
but can I define version???
IE 7.0 - ?
IE 6.0 - ?
IE 5.0 - ?


[jQuery] Re: jQuery enable/disable problem with IE 6 and 7

2008-06-16 Thread Gearóid O'Ceallaigh

bump, any suggestions?

On Jun 13, 11:20 am, Gearóid O'Ceallaigh [EMAIL PROTECTED] wrote:
 Hi,

 I'm having a few problems getting my jQuery code to work in internet
 explorer 6 and 7. The best way I can describe it is: there are several
 text fields on my webpage and each should be enabled/disabled based
 upon the radio button selected at the top of the page. The code I have
 written works fine in firefox, opera and safari.

 The problem with IE is that it requires 2 clicks for the jQuery to
 take effect (ie. user clicks the radio button, nothing happens, but
 then they click another part of the screen and the changes take
 effect). Also, when the jQuery IS invoked, the incorrect text fields
 are enabled/disabled.

 I tried a much simpler example to try to find the problem but
 encounter similar issues. Here is the code for that:

 /JQUERY/

 $(document).ready(function() {

 $([EMAIL PROTECTED]).change(function() {

 var thisValue = $(this).val();

 switch (thisValue) {

 case one:

  $(select#cars).attr(disabled,disabled);
  $(select#animals).attr(disabled,);
  break;
 case two:
  $(select#animals).attr(disabled,disabled);
  $(select#animals).attr(value,dog);
  $(select#cars).attr(disabled,);
  break;
  case three:

  $(select#cars).attr(disabled,);
 $(select#animals).attr(disabled,);
  break;
  }

 });

 });

 /**HTML***/
 html
 head
 //get jQuery code
 /head
 body
 form
 input type=radio name=choice value=one class=second
 id=firstChoiceOption One
 input type=radio name=choice  value=two class=second
 id=secondChoiceOption Two
 input type=radio name=choice value=three class=second
 id=thirdChoiceOption Three

  BRBR

 select id=cars name=cars class=second
 option value=volvoVolvo/option
 option value=saabSaab/option
 option value=fiatFiat/option
 option value=audiAudi/option
 /select

 select id=animals name=animals class=second
 option value=dogdog/option
 option value=catcat/option
 option value=sheepsheep/option
 option value=cowcow/option
 /select
 /form
 /div
 /body
 /html

 Any help would be greatly appreciated, thanks.


[jQuery] Autocomplete with hidden ID

2008-06-16 Thread Richard Dyce

Just a quickie - does anyone know of a jQuery plugin for creating an  
autocomplete that acts like a SELECT i.e. I need people to search by  
name, and have them choose one from the list - but whilst displaying  
the name, the form needs to return an associated ID (as well as the  
name which will be ignored).

TIA

R


[jQuery] Re: Reversing slideDown/slideUp behavior

2008-06-16 Thread Isaak Malik
You could simply use the slideToggle() method, so it would be something like
this:

$('#myElement').slideToggle('fast');

And to check if an element is hidden you can use this:

if ( $('#myElement').is(':hidden') ) alert('It is hidden!');

On 6/15/08, fallingandlaughing [EMAIL PROTECTED] wrote:


 Hello,

 I have what seems like a pretty basic question about the slideDown/
 slideUp effects, but I'm new-ish to jquery and haven't been able to
 find a way to do what I'm after. Is there any way to reverse the
 default slideDown/slideUp behavior--so that, when the content is
 revealed, it slides upward, and when it is hidden, it slides downward?
 I going for something kind of like the pop-up bubble effect achieved
 in this tutorial: http://jqueryfordesigners.com/coda-popup-bubbles/
 But instead of the opacity transition and the upward puff, I'd like
 the panel to just smoothly slide upward.

 Thanks in advance for any suggestions or advice!

 Erik




-- 
Isaak Malik
Web Developer


[jQuery] jquery doesn't work in dynamic table??!

2008-06-16 Thread vile

hi can anyone help solve this problem..

i created a table using javascript. basically it creates dynamic
row...
How come that jquery doest affect the table using  $('tr:even') and
$('tr:odd')?

heres my code
javascript:
var newPara = document.getElementById('newText');
var mybody = document.getElementsByTagName(body)[0];
var newtable = document.createElement('table');
newtable.setAttribute('align','center');
newtable.setAttribute('id','clientTable');
var newtbody = document.createElement('tbody');

for(var i = 0; i  options.length ; i++){
//create table row cols

var tablerow = document.createElement(tr);
//tablerow.setAttribute('id','tableRow');
var tableLabel = document.createElement(td);
var tableOpen = document.createElement(td);
var tableDel = document.createElement(td);
var tableSave =
document.createElement(td);

var newText = document.createTextNode(chat with
guest: + (i + 1) +
);
var chatlink = document.createElement('a');
var savelink = document.createElement('a');
var dellink = document.createElement('a');

//var tableObj =  document.createElement(table)
var xmlfile = options[i].firstChild.data;
xmlfile.substring(1,10)

chatlink.setAttribute('href','/chat/chat_frame/'+
xmlfile.substring(0,10));
chatlink.setAttribute('target','_blank');
chatlink.innerHTML = Open Chat!

savelink.setAttribute('href','saveChat/' +
options[i].firstChild.data);
savelink.innerHTML = Save;

dellink.setAttribute('href','delXML/' +
options[i].firstChild.data);
dellink.innerHTML = Delete;

//contrct table
tableLabel.appendChild(newText);
tableOpen.appendChild(chatlink);
tableSave.appendChild(savelink);
tableDel.appendChild(dellink);

tablerow.appendChild(tableLabel);
tablerow.appendChild(tableOpen);
tablerow.appendChild(tableSave);
tablerow.appendChild(tableDel);
//newtable.appendChild(tablerow);
newtbody.appendChild(tablerow);
}
newtable.appendChild(newtbody);
newPara.appendChild(newtable);


jquery code:
$(document).ready(

$('tbody tr:odd').addClass('odd');
$('tbody tr:even').addClass('even');
}
);


it works if i create a tble manually..


[jQuery] Re: Linking showing Subsection of page

2008-06-16 Thread Pickledegg

Does anyone have any ideas to offer by any chance?

On Jun 13, 1:02 pm, Pickledegg [EMAIL PROTECTED] wrote:
 Heres my page:

 http://tinyurl.com/5eov82

 If you click on the 'FAQ' or 'Prices' buttons you wil see that it
 shows/hides certain divs on the page. If the javascript is disabled
 it, autmaticaly shows all of the content in one long page.

 The problem is, I'll need to link directly to the 'FAQ' section and
 the 'Prices' section, from other parts of the site, or possibly
 externally.

 If it was just a case of anchor tags, it wouldn't be a problem, but if
 I try and link direct (#faq etc) the div is hidden by default, as  it
 relies on a click event from the buttons to show it.

 Does anyone see a way of being able to link directly to the
 subsection, and have the other sections hidden? I'm starting to think
 I shouldn't have built my pages in this fashion.


[jQuery] Re: .load and asp.net postback

2008-06-16 Thread Mike

Any?

On May 27, 8:00 am, Mike [EMAIL PROTECTED] wrote:
 I am having a problem with the .loadand a asp.netpostback.  Iloada
 div with a page called myquickcart.aspx on the page and it works
 great.  But when I click a button on the parent page that causes 
 thepostbackit goes directly to myquickcart.aspx intead of posting back.
 My server isnt being hit at all so I have no clue why its posting back
 to myquickcart.aspx and not the parent page?  Any ideas?


[jQuery] Use different CSS class

2008-06-16 Thread shapper

Hello,

As far as I know to style the error messages a error CssClass is
used.
Can I use another CSS Class? For example, ShowError?

Thanks,
Miguel


[jQuery] Clicking an image and changing a div's html content.

2008-06-16 Thread Jordban

Hello,

I'm new to jQuery and i'm trying to solve a rather simple problem.

I'd like to create an image that when clicked changes the html of a
div. I'd like to have many different images that change the content of
many different divs with different html.

I've currently figured out how to do it using:

 $(document).ready(function(){
$(img.div1).click(function(){
   $(#div1).html(strongcool this is bold/strong);
 return false;
 });
});

However I'd like to be able to use the same function and pass
different parameters into it.

Example, but doesn't work.

function changehtml (divid,content) {
 // blah blah
}

then on the image onclick = changehtml(div1,strongcool this is
bold/strong);

Any help is apprechiated!

Best Regards,

Jordan Berry



[jQuery] Re: ui.datepicker trouble

2008-06-16 Thread andrea varnier

On 16 Giu, 11:48, Shawn [EMAIL PROTECTED] wrote:
 However, the docs found 
 athttp://docs.jquery.com/UI/Datepicker/datepicker#.22setDate.22dateendDate
 (scroll to the bottom of the page), do not seem to indicate an object is
 being used to pass the parameters.

you're right, and maybe my suggestion is wrong.
actually I use an older version of the datepicker.
but I gave the same piece of advice on this same ml a couple of days
ago, and it worked, so I just tried with you, too :D

in production here I don't use the latest ui.datepicker, so I can't
help that much.
sorry :)


[jQuery] Re: .load and asp.net postback

2008-06-16 Thread andrea varnier

On 16 Giu, 08:06, Mike [EMAIL PROTECTED] wrote:
 Any?

it would help if you posted some code, I think :)


[jQuery] Re: Form Plugin - Feature Request

2008-06-16 Thread Mike Alsup

 All I'm trying to do is make the options persist into the success
 callback - just like they do in the beforeSubmit callback.  This way
 some information can be stashed on dynamically generated javascript.

Since the form plugin uses jQuery's $.ajax method under the hood, you
could use the 'complete' callback to get access to the options object:

$('#myForm').ajaxForm({
beforeSubmit: function(data, $form, opts) {
opts.stashed = 'hello';
},
complete: (xhr, status) {
// *this* is the settings object
alert(this.stashed)
}
});

Another way to stash data, for *any* element, is the 'data' method:

http://docs.jquery.com/Core/data#namevalue


Mike


[jQuery] Re: Clicking an image and changing a div's html content.

2008-06-16 Thread andrea varnier

On 16 Giu, 06:07, Jordban [EMAIL PROTECTED] wrote:
 I'd like to create an image that when clicked changes the html of a
 div. I'd like to have many different images that change the content of
 many different divs with different html.

hi :)
you don't need to create functions and pass parameters, neither you
need to use old 'onclick' attribute.
you simply attach a jQuery handle to images that have a certain class
(for example).
let's say those images are '.textChanger'.

$('.textChanger').click(function(){
// code here
});

now this is listening for a click on those images. each and every one
of them.
every time the event is fired, the code is executed.

what code?
I would do something like this (but it's just my way, there are surely
many other, and better).
I'd use the class name to store the id of the div that is going to be
changed.
if the class was like 'textChanger_div1', you could use a split()
method to get the id of the div.
like this:

$('img[class^=textChanger]').click(function(){
var $this = $(this);
var the_id = $this.attr('class').split('_')[1];
$('#' + the_id).html('strongcool this is bold/strong');
});

$('img[class^=textChanger]') means: look for the images that have a
class whose name starts with the string 'textChanger'.
hope this helps

andrea


[jQuery] Re: Use different CSS class

2008-06-16 Thread andrea varnier

On 16 Giu, 11:58, shapper [EMAIL PROTECTED] wrote:
 Hello,

 As far as I know to style the error messages a error CssClass is
 used.
 Can I use another CSS Class? For example, ShowError?

hi
you can use any class you want, as long as it is defined in your style
sheet :)


[jQuery] Re: reusing events on freshly ajax updated content

2008-06-16 Thread andrea varnier

On 16 Giu, 11:29, C. Feldmann [EMAIL PROTECTED]
wrote:
 I assume that the newly ajax updated content has not been initialized.

you're right.

 What do I have to call after an ajax updating function to ensure
 working events?

you could simply re-initialize the elements, or, better, read these:
http://www.learningjquery.com/2008/03/working-with-events-part-1
http://www.learningjquery.com/2008/05/working-with-events-part-2


[jQuery] Re: Linking showing Subsection of page

2008-06-16 Thread Liam Byrne


a) Since you're using PHP, use that to access a $_GET variable and 
make that one visible:


style
.hiddenBits {
   display:none;
   :
   :

}
/style

div id=faq class=hiddenBits ?php if ($_GET[section]==faq) { ? 
style=display:block?php } ?a name=#faq/aFAQs go here/div
div id=prices class=hiddenBits ?php if 
($_GET[section]==prices) { ? style=display:block?php } ?a 
name=#prices/aPrices go here/div


Liam

Pickledegg wrote:

Does anyone have any ideas to offer by any chance?

On Jun 13, 1:02 pm, Pickledegg [EMAIL PROTECTED] wrote:
  

Heres my page:

http://tinyurl.com/5eov82

If you click on the 'FAQ' or 'Prices' buttons you wil see that it
shows/hides certain divs on the page. If the javascript is disabled
it, autmaticaly shows all of the content in one long page.

The problem is, I'll need to link directly to the 'FAQ' section and
the 'Prices' section, from other parts of the site, or possibly
externally.

If it was just a case of anchor tags, it wouldn't be a problem, but if
I try and link direct (#faq etc) the div is hidden by default, as  it
relies on a click event from the buttons to show it.

Does anyone see a way of being able to link directly to the
subsection, and have the other sections hidden? I'm starting to think
I shouldn't have built my pages in this fashion.




  




[jQuery] Re: New JQuery Plugin - Menu Toggle Adder

2008-06-16 Thread Liam Byrne


...or style the main link so that it's not underlined  cursored as a 
link, because yup, I agree with Seth - it's confusing / unexpected as it is.



Seth - TA wrote:

Just a suggestion - it took me a while to figure out I had to click
the triangle for the drop down to work. Not many people are going to
do that the first time. Might want to expand to having the triangle
and the header clickable.

Seth

On Jun 13, 7:21 am, Ed [EMAIL PROTECTED] wrote:
  

Thanks for the feed back. I still haven't installed ie8, but I finally
got ff3. Everything in the example seems to be working as expected in
ff3. Please let me know what you spotted that isn't working.

For example:

Here:http://robottoysreviews.com/menu_toggle_adder_example_1.htm

or Here:http://robottoysreviews.com/menu_toggle_adder_example_2.htm

On Jun 7, 11:25 am, steve_f [EMAIL PROTECTED] wrote:



Your demo page does not work in FF3, also I get a script error running
IE8.0 but in IE7.0 compat mode.
  
On Jun 7, 4:20 pm, Ed [EMAIL PROTECTED] wrote:
  

Here's a new JQuery Plugin: Menu Toggle Adder

http://code.google.com/p/js-menu-toggle-adder/

It automatically adds toggle triangles to unordered list menus for

each list item that contains an unordered list.

It does a bunch of other stuff, like expanding the nested ul

that matches the current url and adds a class to links that match the
current url.

It's designed to help long, vertical menus on ecommerce websites be

more usable.

This is my first JQuery plugin. Any feedback is greatly appreciated.




  




[jQuery] Re: Is it possible for jQuery define version of browser, for example IE 7.0?

2008-06-16 Thread Gordon

$.browser.version

On Jun 16, 7:38 am, mtest [EMAIL PROTECTED] wrote:
 I know that jQuery can define browser:
 $.browser.msie
 $.browser.safari
 $.browser.opera
 $.browser.mozilla
 but can I define version???
 IE 7.0 - ?
 IE 6.0 - ?
 IE 5.0 - ?


[jQuery] Re: AJAX data inserted into DOM does not trigger click-event

2008-06-16 Thread Gordon

I haven't heard of the Listen plugin before. How does it stack up
against livequery?

On Jun 15, 9:47 pm, Kevin Pepperman [EMAIL PROTECTED] wrote:
 Have you tried the listen plugin?
 It works with dynamicly added content.

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



 On Sun, Jun 15, 2008 at 12:52 PM, Thasmo [EMAIL PROTECTED] wrote:

  Hoi guys!

  I define a event trigger $('#id div a).click().

  The url in the href attribute of the a tag is called via $.ajax
  and the returned data is inserted into the #id element.

  So, the actual HTML in the #id event is replaced
  by the data AJAX response data. After the data
  was inserted into the #id element, the click event
  is not working anymore for HTML code which was
  inserted in the #id element.

  What can be the reason for this?

  Thanks so much for your help!

 --
 He's spending $300 million in advertising to convince people of something
 he claims there is already a consensus on.--
 --Think of it as going green by getting lots of green.
 -Glenn Beck (CNN) about Al Gore.


[jQuery] Re: What point i should take care while upgrading to jQuery 1.2.6

2008-06-16 Thread Stamen Georgiev



On Jun 13, 8:00 pm, Dushyant Patel [EMAIL PROTECTED] wrote:
 hello,

 What point i should take care while upgrading to jQuery 1.2.6?

 Can anyone suggest me?


jqModal stopped working properly in IE6  7 for me after upgrading...


[jQuery] [jQuery.TreeView] in Castle MonoRail

2008-06-16 Thread Gabriel Schenker

I'm trying to use jQuery and the jQuery plug-in. Now when I also have
installed the Scriptaculous scripts (of MonoRail) I encounter a
problem which I cannot explain...

When trying to display (a basic) tree I encounter the following java
script error:

a.parentNode has no properties (jQuery.js line 1390)
last-child: function(a){return jQuery.nth(a.parentNode.lastChild,
1,previou...

Note that I
- use jQuery 1.2.6
- tried to consider what is told in the chapter Using jQuery with
Other Libraries...

Anybody has had the same problems? Any suggestions how to solve it?


[jQuery] Offset from a given node

2008-06-16 Thread kishore

Hello there,

I need some help here in finding out how many characters the first
character of a given node is offset from a parent node. In the
simplest case, for the following:

div id=rootHellospanworld!/span/div

I want a way to figure out that the w in the span is offset from the
div by 5 characters.

I attempted at DOM traversal and finding the .text() property of each
node leading upto the target node and then summing up the length of
all the texts...but it was sort of beyond me to get that working.

I would appreciate any help with regard to this.. is there any easier
way to achieve this.

Regards,
Kishore.


[jQuery] Re: Linking showing Subsection of page

2008-06-16 Thread Pickledegg

Ahah, thats simple and effective. I may need to use mod rewrite to
tidy things up but it will definitely work. Thanks!

On Jun 16, 11:47 am, Liam Byrne [EMAIL PROTECTED] wrote:
 a) Since you're using PHP, use that to access a $_GET variable and
 make that one visible:

 style
 .hiddenBits {
 display:none;
 :
 :

 }

 /style

 div id=faq class=hiddenBits ?php if ($_GET[section]==faq) { ?
 style=display:block?php } ?a name=#faq/aFAQs go here/div
 div id=prices class=hiddenBits ?php if
 ($_GET[section]==prices) { ? style=display:block?php } ?a
 name=#prices/aPrices go here/div

 Liam

 Pickledegg wrote:
  Does anyone have any ideas to offer by any chance?

  On Jun 13, 1:02 pm, Pickledegg [EMAIL PROTECTED] wrote:

  Heres my page:

 http://tinyurl.com/5eov82

  If you click on the 'FAQ' or 'Prices' buttons you wil see that it
  shows/hides certain divs on the page. If the javascript is disabled
  it, autmaticaly shows all of the content in one long page.

  The problem is, I'll need to link directly to the 'FAQ' section and
  the 'Prices' section, from other parts of the site, or possibly
  externally.

  If it was just a case of anchor tags, it wouldn't be a problem, but if
  I try and link direct (#faq etc) the div is hidden by default, as  it
  relies on a click event from the buttons to show it.

  Does anyone see a way of being able to link directly to the
  subsection, and have the other sections hidden? I'm starting to think
  I shouldn't have built my pages in this fashion.


[jQuery] [validate] Use Ajax

2008-06-16 Thread shapper

Hello,

How can I check the value inserted in an Input using Ajax?

Thanks,
Miguel


[jQuery] Re: reusing events on freshly ajax updated content

2008-06-16 Thread C. Feldmann

Found a post from earlier today refering to livequery.
That solved my problem.

Thanks


[jQuery] Re: Cycle - per slide settings

2008-06-16 Thread jdenkaat

Mike

sorry to be a pain! and this maybe the exactly the same question as I
originally asked.

The slideshow I will be using will always use images with the same
dimensions and css styles

I would like to use the wipe transitions and fade transitions
interchangeably.

e.g. use 'l2r' for first wipe, 't2b' for second wipe, fade the third
transition  etc.

Is this a case of changing the clip option.

Is there a way for the cycle to look at the transition effect on each
iteration so that I can configure them

Thanks in advance

James



On 12 Jun, 16:23, jdenkaat [EMAIL PROTECTED] wrote:
 Thanks Mike you are a star!

 These are exactly the transitions I wanted and are very quick compared
 to the brothercake ones.

 James

 On May 23, 8:18 pm, Mike [EMAIL PROTECTED] wrote:

   It's currently not possible tocyclewith clip animation since
   jQuery's animate function doesn't support it andCycledelegates to
   that for the animation.  But I'd be willing to add a wipe transition
   using custom logic.  What sort of wipe transitions are you looking
   for?  Just simple left-to-right or top-to-bottom type stuff?

  I decided to go ahead and add the wipe transitions:

 http://www.malsup.com/jquery/cycle/wipe.html

  Mike


[jQuery] Re: Is it possible for jQuery define version of browser, for example IE 7.0?

2008-06-16 Thread mtest

also know that mozilla's version can get by $.browser.version


[jQuery] [validate] Use Regex

2008-06-16 Thread shapper

Hello,

How can I check the value inserted in an Input using a RegEx
expression?

Thanks,
Miguel


[jQuery] Re: [validate] Use different CSS class

2008-06-16 Thread shapper

The question is concerning the Validate plugin in
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Thanks,
Miguel

On Jun 16, 10:58 am, shapper [EMAIL PROTECTED] wrote:
 Hello,

 As far as I know to style the error messages a error CssClass is
 used.
 Can I use another CSS Class? For example, ShowError?

 Thanks,
 Miguel


[jQuery] Re: ui.datepicker trouble

2008-06-16 Thread John Morrison

On Sun, June 15, 2008 7:48 am, Shawn wrote:

 I'm having a problem wit the ui.datepicker.  Specifically
 setting/getting the default date.  I have the following function:

 function setDefaultDates() {
var temp = new Date();
var sd = new Date(temp.getFullYear(), temp.getMonth(), temp.getDate()
 - 8);
var ed = new Date(temp.getFullYear(), temp.getMonth(), temp.getDate()
 - 1);

$(#criteriaStart).datepicker(setDate, sd);
$(#criteriaEnd).datepicker(setDate, ed);

 alert(sd + \n + $(#criteriaStart).datepicker(getDate));

$(#criteriaStart).val($.datepicker.formatDate( d M yy,
 $(#criteriaStart).datepicker(getDate) ));
$(#criteriaEnd).val($.datepicker.formatDate( d M yy,
 $(#criteriaEnd).datepicker(getDate) ));

return;
 }

 The alert() is showing that sd does have a value, but the
 datepicker(getDate) bit returns null.

 So, the rest of the routine obviously fails because there doesn't appear
 to be any value stored in the datepicker.

I had the problem the other week, basically the datepicker doesn't let you
do getDate until after it's been displayed.  I emailed the folks who wrote
datepicker and they did get back with a solution, but that's at work and
I'm not for the next week.

I can get it you then... but from memory,

$('#dFrom').datepicker({
defaultDate: '-1m',
minDate: '-3m'
});

set the date correctly, to get the date you need the instance...

$.datepicker._getInst($('#dFrom')[0]._calId)._getMinMaxDate('min')

that gets the MinMaxDate, I can't remember what the GetDate function is
called.

You might be interested in the rest of the code, two textboxes with custom
range with overall min/max set...

$('#dTo').datepicker({
maxDate: 0
});

// Customize two date pickers to work as a date range
function customRange(input) {
return {
minDate: (input.id == 'dTo' ?
$('#dFrom').datepicker('getDate') :
$.datepicker._getInst($('#dFrom')[0]._calId)._getMinMaxDate('min')),
maxDate: (input.id == 'dFrom' ?
$('#dTo').datepicker('getDate') :
$.datepicker._getInst($('#dTo')[0]._calId)._getMinMaxDate('max'))
};
}

Sorry I can't give you the exact code, but I think once you get the
instance you've got the rest.

J.



[jQuery] [HELP] Problem in IE (67). Can't use two eventhandlers of change in one *.js file

2008-06-16 Thread ardnet

The code in my drupal module is more like below:

//--- start code -//
$('div#select_cat select').change(function(){
var check_cat = this.value;
});

$('div#select_subcat').change(function(){
var sub_cat_id = $('#select_subcat select').val();
alert(sub_cat_id);
});
//--- end code -//

With the code above, I can make the alert box come out in FF, OP, and
Safari. But it doesn't works at all in IE (67).
Is this a bug in JQuery? Or there's a mistake in my code?
This is supposed to be no problem at all right?

Thanks, before and after.


[jQuery] Re: Is it possible for jQuery define version of browser, for example IE 7.0?

2008-06-16 Thread RobG

On Jun 16, 4:38 pm, mtest [EMAIL PROTECTED] wrote:
 I know that jQuery can define browser:
 $.browser.msie
 $.browser.safari
 $.browser.opera
 $.browser.mozilla
 but can I define version???
 IE 7.0 - ?
 IE 6.0 - ?
 IE 5.0 - ?

Browser detection is almost always based on the user agent string.  It
is known that UAs do not honestly report the vendor, version or
platform so any strategy based on that is flawed.  There are thousands
(literally) of UA strings, yet they are not guaranteed to be unique
for any particular browser or version.

Do a search for user agent string databases, there are quite a few of
them.


--
Rob


[jQuery] YouLove.us crazy cool.

2008-06-16 Thread Ty (tzmedia)

Did anyone else see the new http://youlove.us design-house portfolio
site?
It's pretty cutting edge stuff, worth a study.


[jQuery] CYCLE PLUGIN -- Creating a Realtime Status/Progress Bar

2008-06-16 Thread Joe

I am using Mike Alsup's Cycle Plugin, but am running into a snag.
Here is what I'm trying to accomplish:

I have 4 div tags each with an image inside that is a link to that
image:

div id=slides class=pics
div
a href=img/1.jpgimg src=img/1.jpg
width=200 height=200 //a
/div
div
a href=img/2.jpgimg src=img/2.jpg
width=200 height=200 //a
/div
div
a href=img/3.jpgimg src=img/3.jpg
width=200 height=200 //a
/div
div
a href=img/4.jpgimg src=img/4.jpg
width=200 height=200 //a
/div
/div

Here is the initial call:

// Timeout and Speed Values
var tVal = 3000;
var sVal = 1000;

$('#slides').cycle( {fx: 'fade', speed: sVal, timeout: tVal });


Now, I am using the Report Progress plugin as well, which builds a
simple progress/status bar. ( 
http://digitalbush.com/projects/progress-bar-plugin
)

I have the progress bar using the same time value as the cycle plugin,
namely, the variable tVal.  So when the page loads, the progress for
how much longer the current image (the div) is going to be shown is
displayed.  However, when the user mouse's over the image, the cycle
plugin pauses as does the progress bar, and then on mouseout the
progress bar continues as does the current image cycle.

The issue is if I mouseover with say only 30% of the time elapsed,
pause, and then mouseout, the progress bar restarts at 31% and
continues fine, but the image suddenly fades to the next one.  As if
the transition itself paused, but the time interval did not.  Or
sometimes, I does the opposite, where the progress bar is ahead of
the transition, or simply the transition is lagging.  Have a look via
the link below.

Ultimately, I will need the progress bar itself to reset upon each new
image load, but for the time being I need to get them in sync with
each other.

Any ideas on this?

www.subprint.com/dev/cycle/

Thanks.


[jQuery] Re: [validate] Use Ajax

2008-06-16 Thread Jörn Zaefferer

http://docs.jquery.com/Plugins/Validation/Methods/remote#url

Jörn

On Mon, Jun 16, 2008 at 12:12 PM, shapper [EMAIL PROTECTED] wrote:

 Hello,

 How can I check the value inserted in an Input using Ajax?

 Thanks,
 Miguel



[jQuery] Re: [validate] Use Regex

2008-06-16 Thread Jörn Zaefferer

http://docs.jquery.com/Plugins/Validation/Validator/addMethod#namemethodmessage

Jörn

On Mon, Jun 16, 2008 at 12:11 PM, shapper [EMAIL PROTECTED] wrote:

 Hello,

 How can I check the value inserted in an Input using a RegEx
 expression?

 Thanks,
 Miguel



[jQuery] Re: [validate] Use different CSS class

2008-06-16 Thread Jörn Zaefferer

See http://docs.jquery.com/Plugins/Validation/validate#toptions
The errorClass option

Jörn

On Mon, Jun 16, 2008 at 12:10 PM, shapper [EMAIL PROTECTED] wrote:

 The question is concerning the Validate plugin in
 http://bassistance.de/jquery-plugins/jquery-plugin-validation/

 Thanks,
 Miguel

 On Jun 16, 10:58 am, shapper [EMAIL PROTECTED] wrote:
 Hello,

 As far as I know to style the error messages a error CssClass is
 used.
 Can I use another CSS Class? For example, ShowError?

 Thanks,
 Miguel



[jQuery] Re: jquery doesn't work in dynamic table??!

2008-06-16 Thread Brian Schilt

I believe its a timing issue. jQuery might be trying to select the
table elements before javascript has finished building the table. You
might want to try wrapping the table building code in a function, then
return the jquery selector code. That way you know the table is
actually appended to the DOM when jquery runs.

$(document).ready(function(){
  createTable();
});

function createTable() {
  //your table code here...

  return function(){
$('tbody tr:odd').addClass('odd');
$('tbody tr:even').addClass('even');
  };
}


Give that a whirl and see what happens.

Brian

On Jun 16, 2:32 am, vile [EMAIL PROTECTED] wrote:
 hi can anyone help solve this problem..

 i created a table using javascript. basically it creates dynamic
 row...
 How come that jquery doest affect the table using  $('tr:even') and
 $('tr:odd')?

 heres my code
 javascript:
     var newPara = document.getElementById('newText');
     var mybody = document.getElementsByTagName(body)[0];
     var newtable = document.createElement('table');
     newtable.setAttribute('align','center');
     newtable.setAttribute('id','clientTable');
     var newtbody = document.createElement('tbody');

     for(var i = 0; i  options.length ; i++){
                     //create table row cols

                     var tablerow = document.createElement(tr);
                     //tablerow.setAttribute('id','tableRow');
                     var tableLabel = document.createElement(td);
                     var tableOpen = document.createElement(td);
                     var tableDel = document.createElement(td);
                     var tableSave =
 document.createElement(td);

                     var newText = document.createTextNode(chat with
 guest: + (i + 1) +
 );
                     var chatlink = document.createElement('a');
                     var savelink = document.createElement('a');
                     var dellink = document.createElement('a');

                     //var tableObj =  document.createElement(table)
                     var xmlfile = options[i].firstChild.data;
                     xmlfile.substring(1,10)

                     chatlink.setAttribute('href','/chat/chat_frame/'+
 xmlfile.substring(0,10));
                     chatlink.setAttribute('target','_blank');
                     chatlink.innerHTML = Open Chat!

                     savelink.setAttribute('href','saveChat/' +
 options[i].firstChild.data);
                     savelink.innerHTML = Save;

                     dellink.setAttribute('href','delXML/' +
 options[i].firstChild.data);
                     dellink.innerHTML = Delete;

                     //contrct table
                     tableLabel.appendChild(newText);
                     tableOpen.appendChild(chatlink);
                     tableSave.appendChild(savelink);
                     tableDel.appendChild(dellink);

                     tablerow.appendChild(tableLabel);
                     tablerow.appendChild(tableOpen);
                     tablerow.appendChild(tableSave);
                     tablerow.appendChild(tableDel);
                     //newtable.appendChild(tablerow);
                     newtbody.appendChild(tablerow);
                 }
                 newtable.appendChild(newtbody);
                 newPara.appendChild(newtable);

 jquery code:
 $(document).ready(

     $('tbody tr:odd').addClass('odd');
     $('tbody tr:even').addClass('even');
     }
 );

 it works if i create a tble manually..


[jQuery] Re: YouLove.us crazy cool.

2008-06-16 Thread Joe

Interesting.  I dig the dynamic parallax effect, but the transitions
are a bit jagged.  Maybe a fade in fade out?

Overall cool stuff.

Joe

www.subprint.com

On Jun 16, 8:07 am, Ty (tzmedia) [EMAIL PROTECTED] wrote:
 Did anyone else see the newhttp://youlove.usdesign-house portfolio
 site?
 It's pretty cutting edge stuff, worth a study.


[jQuery] idiot requests SIMPLE ajax explanation!

2008-06-16 Thread [EMAIL PROTECTED]

I'm embarrassed. I used to cheerfully mix PHP with Javascript, but now
I don't understand the terminology! I see the advantages of
'asynchronous' data exchange and I would like some of that  but I
can't for the life of me understand what to do!!

Does anybody know where to find a REALLY SIMPLE, step-by-step
explanation?

Supposing I eventually get to grips with this, has anybody (Mike
Alsup!) written a REALLY simple explanation of the Taconite plugin, as
that's where I'm heading?

Thank you [blushes]
Cherry.


[jQuery] Bindable variable data - similar to Flex?

2008-06-16 Thread Andy Matthews
I'm reading about a newish JS framework called SproutCore:
http://www.roughlydrafted.com/2008/06/14/cocoa-for-windows-flash-killer-spro
utcore/
 
in which the article says that SproutCore supports binding to
data/variables. Thus, when the data changes, you can fire an event or some
code construct. I know jQuery supports binding to form controls, but is it
possible to bind a variable?
 
For example, in Flex, I can create an array, and make it bindable. I can
then use that array to build a data grid of some sort. When/if the source
array changes via some process, the data grid automatically updates.
 
Can jQuery do this sort of thing? If not, are there plans to offer something
like this?
 

 
Andy Matthews
Senior ColdFusion Developer

Office:  615.627.9747
Fax:  615.467.6249
www.dealerskins.com http://www.dealerskins.com/ 
 
Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with the service I have provided, please let me know
right away so I can correct the problem, or notify my manager Aaron West at
[EMAIL PROTECTED]
 
2008 Email NADA.jpg

[jQuery] jScrollPane and display:none

2008-06-16 Thread yabado

I have a page that shows and hides a layer based on a click.

When the page loads, this layer is set to css ; display:none

I have a scrollpane inside of this layer.

When I click and show the hidden layer, everything works except the
scrollpane?

If I remove the display attribute and reload the page, then the
scrollpane is there and works fine.

It has something to do with the parent layer being hidden I and I
cannot figure it out.

Any ideas?

Using FF and Safari


[jQuery] Re: jScrollPane and display:none

2008-06-16 Thread yabado

To elaborate, when I say it does not work, I mean it stays hidden,
but the rest of the parent layers shows and hides as expected.




On Jun 16, 10:27 am, yabado [EMAIL PROTECTED] wrote:
 I have a page that shows and hides a layer based on a click.

 When the page loads, this layer is set to css ; display:none

 I have a scrollpane inside of this layer.

 When I click and show the hidden layer, everything works except the
 scrollpane?

 If I remove the display attribute and reload the page, then the
 scrollpane is there and works fine.

 It has something to do with the parent layer being hidden I and I
 cannot figure it out.

 Any ideas?

 Using FF and Safari


[jQuery] Re: [PLUGIN] Tweet! Added Twitter to your website

2008-06-16 Thread Rey Bango


Hi Guy,

You should consider emailing them and asking the rationale and perhaps 
even a workaround.


Rey


Guy Fraser wrote:

Rey Bango wrote:


Found on Twitter:

Announcing Tweet (http://tweet.seaofclouds.com/), a simple @jquery 
plugin to put Twitter on your website.


Rey...


Pity they are sticking stuff on String.prototype :( Aside from that, 
nice plugin.


[jQuery] Re: YouLove.us crazy cool.

2008-06-16 Thread Sam Collett

Lags a bit with me as well, site looks quite good though. It is
actually smoother without JavaScript enabled.

It illustrates that when developing sites/applications it is a good
idea to test with a slower PC (it is likely a lot of developers have
above average specification computers).

-Sam

On Jun 16, 3:10 pm, Joe [EMAIL PROTECTED] wrote:
 Interesting.  I dig the dynamic parallax effect, but the transitions
 are a bit jagged.  Maybe a fade in fade out?

 Overall cool stuff.

 Joe

 www.subprint.com

 On Jun 16, 8:07 am, Ty (tzmedia) [EMAIL PROTECTED] wrote:

  Did anyone else see the newhttp://youlove.usdesign-houseportfolio
  site?
  It's pretty cutting edge stuff, worth a study.


[jQuery] Re: jQuery + Prototype on newest release (1.2.6)

2008-06-16 Thread Rey Bango


Mike,

Compatibility with release candidates is something that we can't really 
promote because that means the library, in this case Prototype, is still 
in a state of flux. Could you please try a final version of Prototype to 
see if you still have the same issue?


v1.5.1, 1.5.1.1  1.5.2.2 have been out for some time now and can be 
found here:


http://prototypejs.org/download

If you have problems after you use a stable/final release and can 
provide a reproducible example, then we can see how we can help.


The main thing to keep in mind is that jQuery's noConflict is included 
as a convenience for the jQuery community and we don't receive any 
assistance from any other JS library teams. So if they decide to change 
something between code bases, this type of issue may happen.


Rey...
jQuery Team

mike wrote:

No, the Scriptaculous library is not being loaded.

Prototype version: 1.5.1_rc3



[jQuery] [validate] Resetting validation rules dynamically

2008-06-16 Thread kapowaz

I'm currently using the jQuery Validation plugin on a page that needs
to dynamically update the particular rules you validate against
according to which options the user selects (imagine a payment page
which accepts different payment methods; you wouldn't want to validate
against credit card fields if the user isn't paying by credit card).
I've been working under the assumption that I could do this simply by
firing the $().validate(options); method again, with a new set of
arguments, but this doesn't appear to be working, and the original
rules are still being applied (leading to some annoying interactions,
as the user who said they didn't want to pay by credit card is being
told their credit card number is missing).

Essentially, within my code I have the equivalent of the following:

$('#paymentMethod input[type=radio]').change(function(){
$('#paymentMethod input[type=radio]').each(function(){
if (this.checked) {
switch ($(this).val())
{
case 'pay_cc':
$('#myForm').validate(rulesForCC);
break;
case 'pay_offline':
$('#myForm').validate(rulesForOffline);
break;

}
}
}
});

(forgive any slight errors in the above; I've redacted a large part of
it, so I may have introduced bugs).

Is there any mechanism for clearing existing rules on a form, or in
any other way allowing me to reset the rules more explicitly?


[jQuery] editable table + json

2008-06-16 Thread maryspt

Hi,
is there any jQuery plugin that would allow me to create dynamic table
based on JSON data set, with possibility to edit cells?

thanks in advance :)
michal


[jQuery] Re: Autocomplete with hidden ID

2008-06-16 Thread Priest, James (NIH/NIEHS) [C]

Richard, Jorn's Autocomplete plugin can be used to do this...

http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

On the demo page you can see this in the Multiple Birds (remote) is
returning another value in 'hidden input'.

Jim 

 -Original Message-
 From: Richard Dyce [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 16, 2008 5:17 AM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Autocomplete with hidden ID
 
 
 Just a quickie - does anyone know of a jQuery plugin for creating an  
 autocomplete that acts like a SELECT i.e. I need people to 
 search by  
 name, and have them choose one from the list - but whilst displaying  
 the name, the form needs to return an associated ID (as well as the  
 name which will be ignored).
 
 TIA
 
 R
 


[jQuery] Automatically expanding input form --- please help to port it to jQuery!

2008-06-16 Thread yaakov

Quite frequently, I need an input form with a variable number of
records/rows --- as many as the visitor wants to enter (which is not
known before hand).

Please check the following example (tested with Firefox):
http://www.yaakovnet.net/AutoForm/input.html

As soon as the visitor selects an option from the select box, a new
input row is appended --- allowing unlimited input.  The visitor can
also delete a record by selecting the option '---' from the select
box.

I would like to improve my JavaScript and turn it into a generally
usable jQuery module (unless such feature already exists and the work
is not necessary).  As I am new to jQuery, I request the guidance of
experienced jQuery programmers how to do it the right way.

Of course, I am a programmer --- I can follow your hints, read
documentation, implement code and test it.  Here I am just asking for
guidance.  In particular, pointing out which of the many available
jQuery features are usable in this project will be very helpful.

Here is a description of how I implemented the current version --- I
am happy for any feedback (in particular criticism).

=== 1.  Getting started ===

The document contains an empty table with id=searchinput.
The body tag has an event onload=init_searchinput();

The function init_searchinput() creates the two initial input rows by
calling the add_row() function with the appropriate HTML text of the
rows:

function init_searchinput() {
  add_row('trtd_align=center... /// pre-formatted html text ///
/td/tr');
  add_row('trtd_align=center... /// pre-formatted html text ///
/td/tr');
')


The function add_row selects the searchinput table, adds a row to the
end and inserts the provided HTML:

function add_row(str) {
  var row=document.getElementById('searchinput').insertRow(-1);
  var id=++id_max;
  row.innerHTML=str.replace(/#id#/g,id);
}

Note1: This is working but bad design: It would be much better to
start with a YAML list of the initial values and to build the input
elements from this data.  But I don't yet know how to build tables and
input fields step by step in JavaScript.  Hence, I used the innerHTML
feature. Any advice on building table rows and input fields in
JavaScript will greatly be appreciated.

Note2: I did make some experiments with building the input fields in
JavaScript  but it did not work: Even though HTML output *looked*
ok --- but the input fields were not connected to the input form: I
entered numbers and clicked on the submit button  but the data
was not sent to the server.  I don't know why it did not work.

=== 2. Adding rows automatically ===

The select box in each row has an event:
onchange=changed_selection(this): this function will add or remove
rows as needed:

function changed_selection(x) {
  var y=x.options[0]; var t=y.text; y.text=---;
  if(x.options[x.selectedIndex].text==---) {delete_row(x);}
  if(t==?){add_row(new_row);}
}

The first option (x.options[0]) is ? in the last row and --- in
all other rows.  When you change the selection in the last row, the
function changed_selection(x) noticed the value ?, changes it to
--- and adds a new row to the input form.  As it happens, in the new
row, x.options[0] is ? --- so you always get a new row when you
change the selection in the bottom row.

=== 3. Deleting rows ===

If you change the selection to --- (which is in the same place where
the ? originally was), the delete_row(x) function deletes the
current row:

function delete_row(x) { var y=x;
  while(x){if(x.deleteRow){
x.deleteRow(y.rowIndex);return;} x=(y=x).parentNode
  }
}

This function does some DOM traversing --- it should definitely use
the appropriate jQuery methods instead of my hand-baked loop.
Basically, we move up the DOM tree from the current input form until
we find a parent x that has a deleteRow method.  Once we found that
parent x, the previous step y refers to the table row that we want to
delete.  We get it's rowIndex and delete it.

This code works on Firefox  but I am not sure that it's portable.
Again, any guidance on how to do this properly will be greatly
appreciated.

=== Moving on from here ===

Please point me to jQuery features (or more appropriate JavaScript
features) to achieve the same results as the current code (portable).
I would be quite happy to understand how I can build the input forms
and table rows without pre-formatted innerHTML.

Once the core functionality works properly, I will convert this to a
more standard jQery interface.  Any suggestions about usable options
are appreciated.

Thanks,

Yaakov




[jQuery] Re: Is it possible for jQuery define version of browser, for example IE 7.0?

2008-06-16 Thread Roncioso

I noticed Firefox 3rc3 with $.browser.version returns 1.9 (Gecko
version?)

On Jun 16, 8:38 am, mtest [EMAIL PROTECTED] wrote:
 I know that jQuery can define browser:
 $.browser.msie
 $.browser.safari
 $.browser.opera
 $.browser.mozilla
 but can I define version???
 IE 7.0 - ?
 IE 6.0 - ?
 IE 5.0 - ?


[jQuery] Re: What is +new Date; in the function now()?

2008-06-16 Thread Doug Domeny

Thanks for the explanation. It's the unary plus operator!

-Doug

On Jun 11, 5:52 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
 I actually added that, to save some bytes.
 now() is a private function, that is reused 5 or 6 times along the
 code.

 1-newDateis the same asnewDate().
 2- +newDatecasts thedateobject to number.
 3- When dates are casted to numbers, they behave likenewDate().getTime().

 So... that function returns a timestamp.
 That is, the amount of milliseconds since midnight of January 1, 1970.

 http://www.w3schools.com/jsref/jsref_getTime.asp

 Cheers

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

 On 11 jun, 15:36, Doug D [EMAIL PROTECTED] wrote:

  I'm not familiar with the JavaScript syntax of +new in the now()
  function in jQuery 1.2.5. Would you explain the plus (+) operator? How
  does it work? What does it mean?

  function now(){
  return +newDate;

  }

  Is it the same as the following?

  function now(){
  returnnewDate();

  }- Ocultar texto de la cita -

  - Mostrar texto de la cita -


[jQuery] Re: IE keep loading after opening a modal

2008-06-16 Thread pokey

I've just started using jqModal and am experiencing this same issue. I
haven't found any information on how to resolve this. Have you been
able to resolve this?

On Apr 21, 9:52 pm, Jacky [EMAIL PROTECTED] wrote:
 Hi all,

 I have come to an issue that IE is keep loading after a jqModal is opened.
 I think the issue might be related to an IE bug [link]. I tried to add
 window.status everywhere in code but still no progress.
 Anyone have encounter this before?

 [link]http://dangermoose.blogspot.com/2006/01/why-status-bar-keeps-loading-...

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


[jQuery] Re: idiot requests SIMPLE ajax explanation!

2008-06-16 Thread Stefan Petrea

there is a book ... I read some of it and thought it was nice.
have a look if you have some time.

Apress Dom Scripting Web Design With Javascript And The Document Object
Model


On 06-16 07-12, [EMAIL PROTECTED] wrote:
 
 I'm embarrassed. I used to cheerfully mix PHP with Javascript, but now
 I don't understand the terminology! I see the advantages of
 'asynchronous' data exchange and I would like some of that  but I
 can't for the life of me understand what to do!!
 
 Does anybody know where to find a REALLY SIMPLE, step-by-step
 explanation?
 
 Supposing I eventually get to grips with this, has anybody (Mike
 Alsup!) written a REALLY simple explanation of the Taconite plugin, as
 that's where I'm heading?
 
 Thank you [blushes]
 Cherry.
 

-- 

Stefan Petrea
homepage : http://perlhobby.googlecode.com/
mobile phone : +40732070179



[jQuery] editable table + json

2008-06-16 Thread maryspt

hi,
 is there any plugin for creating editable tables out of json data?

thanks  in advance
michal


[jQuery] Re: Is it possible for jQuery define version of browser, for example IE 7.0?

2008-06-16 Thread Isaak Malik
Checking the version is more reliable by using object checking than the
useragent string checking, or you can use both to increase the reliabilty.

IE 7:

if ( document.all  !window.opera  window.XMLHttpRequest 
$.browser.msie ) var isIE7 = true;

or in HTML which is much better:

!––[if IE 7]
script type=text/javascriptvar isIE7 = true;/script
![endif]––

IE6:

if ( document.all  !window.opera  !window.XMLHttpRequest 
$.browser.msie ) var isIE6 = true;

or

!––[if IE 6]
script type=text/javascriptvar isIE6 = true;/script
![endif]––

It is ok to leave out the $.browser.msie.

I hope this willbe of any use.

On 6/16/08, RobG [EMAIL PROTECTED] wrote:


 On Jun 16, 4:38 pm, mtest [EMAIL PROTECTED] wrote:
  I know that jQuery can define browser:
  $.browser.msie
  $.browser.safari
  $.browser.opera
  $.browser.mozilla
  but can I define version???
  IE 7.0 - ?
  IE 6.0 - ?
  IE 5.0 - ?


 Browser detection is almost always based on the user agent string.  It
 is known that UAs do not honestly report the vendor, version or
 platform so any strategy based on that is flawed.  There are thousands
 (literally) of UA strings, yet they are not guaranteed to be unique
 for any particular browser or version.

 Do a search for user agent string databases, there are quite a few of
 them.



 --
 Rob




-- 
Isaak Malik
Web Developer


[jQuery] Re: [validate] Use Regex

2008-06-16 Thread Isaak Malik
Try this out:

if ( !/[a-z0-9\-_]/i.test( $([EMAIL PROTECTED]'firstname']).val() ) )
alert('Wrong!');

On 6/16/08, shapper [EMAIL PROTECTED] wrote:


 Hello,

 How can I check the value inserted in an Input using a RegEx
 expression?

 Thanks,
 Miguel




-- 
Isaak Malik
Web Developer


[jQuery] Re: File upload of a form inside another form

2008-06-16 Thread Giovanni Battista Lenoci


Giovanni Battista Lenoci ha scritto:

Put your nested form after the parent form, and hide it. Keep the
upload-elements in the parent form and move them to the upload-form on
submit (using a different submit button). Clone/move back to the
parent form after the submit for more files.



Thank you for your answer Jörn, It works :-)
  
Hi, I resume this discussion, cause after playing around with this 
method I noticed that it doesn't work with IE.


I've tried cloning the input:file element, but in internet explorer the 
input is cloned without the value, and even a $input.val() doen't work.


I was tinking that maybe moving the input element could works, but I'm 
looking in the doc and I cant find a method for moving a DOM element.


Any idea?

Thank you

--
gianiaz.net - web solutions
p.le bertacchi 66, 23100 sondrio (so) - italy
+39 347 7196482 



[jQuery] Re: idiot requests SIMPLE ajax explanation!

2008-06-16 Thread Pyrolupus

Have you already run through the stuff at jQuery Ajax Tutorials[1]?  I
thought that Akash Mehta's article[2] looked like a pretty good
sampling with lots of step-by-step stuff.  Older version of jQuery,
but pretty much all still applicable.

[1] http://docs.jquery.com/Tutorials#Ajax
[2] http://www.sitepoint.com/article/ajax-jquery

~Pyro

On Jun 16, 10:12 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 I'm embarrassed. I used to cheerfully mix PHP with Javascript, but now
 I don't understand the terminology! I see the advantages of
 'asynchronous' data exchange and I would like some of that  but I
 can't for the life of me understand what to do!!

 Does anybody know where to find a REALLY SIMPLE, step-by-step
 explanation?

 Supposing I eventually get to grips with this, has anybody (Mike
 Alsup!) written a REALLY simple explanation of the Taconite plugin, as
 that's where I'm heading?

 Thank you [blushes]
 Cherry.


[jQuery] Re: jScrollPane and display:none

2008-06-16 Thread Kelvin Luck


I'm not sure what could be happening - do you have a test URL?

A possible workaround might be to not initialise the jScrollPane until 
you show the layer. Then the code which shows the hidden layer could 
immediately initialise the jScrollPane once it's shown it...


Cheers,

Kelvin :)

yabado wrote:

To elaborate, when I say it does not work, I mean it stays hidden,
but the rest of the parent layers shows and hides as expected.




On Jun 16, 10:27 am, yabado [EMAIL PROTECTED] wrote:

I have a page that shows and hides a layer based on a click.

When the page loads, this layer is set to css ; display:none

I have a scrollpane inside of this layer.

When I click and show the hidden layer, everything works except the
scrollpane?

If I remove the display attribute and reload the page, then the
scrollpane is there and works fine.

It has something to do with the parent layer being hidden I and I
cannot figure it out.

Any ideas?

Using FF and Safari


[jQuery] jQuery BlockUI Plugin

2008-06-16 Thread last_elf

Greetings!

I faced with such a problem with jQuery BlockUI Plugin: I need to
display a dialog-window on the page of the site I working with. After
opening this 'window' (which is div, you know) UI should be blocked,
but the window position should not be fixed. Simply, the window could
be bigger than the client height of the browser. I inspected all the
demo-pages of http://www.malsup.com/jquery/block/ but didnt found the
solution.


[jQuery] jQuery.sheet thoughts, maybe UI compliant?

2008-06-16 Thread K-BL

Hey Guys,
A lot has happened since I first posted about jQuery.sheet - A jQuery
Spreadsheet with Calculations v0.1.  We're now at version 2.5.
Version 2.5 adds ajax load/save, in-place navigation, in-place edit,
cross browser compatibility, true resize (opera  safari have some
trouble here), upper menu (uses jquery.clickmenu), and many other tiny
features.

I'm working on version 0.3 at the moment, and things are progressing
well.  The next release will get rid of those pesky onScroll bars
flying all over the place and many fixes. Also I'm working on
converting it's styling to be used with jQuery UI Theming.  I'm also
working on a packed version, but it's proving somewhat tricky.

I've looked and looked all over the web and only found (at this point
in time) only one other real-world usable competitor (wpSS).  My hopes
are that jQuery.sheet will give everyone some real flexibility, speed,
and minimal JS.

I would like to get some input from your guys.  As I stated before,
this is my first plugin.  If you guys don't mind, check out the Demo
and give me a suggestion.  Also, is there anything I can do to see
about getting into jQuery UI?

Demo found here: 
http://jqueryplugins.weebly.com/uploads/3/1/3/8/313814/jquery.sheet.html

Thanks Guys,
K-BL


[jQuery] BlockUI Plugin

2008-06-16 Thread last_elf

Greetings!

I faced with such a problem with jQuery BlockUI Plugin: I need to
display a dialog-window on the page of the site I working with. After
opening this 'window' (which is div, you know) UI should be blocked,
but the window position should not be fixed. Simply, the window could
be bigger than the client height of the browser. I inspected all the
demo-pages of http://www.malsup.com/jquery/block/ but didnt found the
solution.

PS: sorry if I posted this twice.


[jQuery] Re: [validate] Resetting validation rules dynamically

2008-06-16 Thread Jörn Zaefferer

Instead of trying to change the rules for the whole form, try to
modify the rule just for those fields. The required-method accepts
additional arguments for that:
http://docs.jquery.com/Plugins/Validation/Methods/required (scroll
down a bit)

Please give that a try.

Jörn

On Mon, Jun 16, 2008 at 5:04 PM, kapowaz [EMAIL PROTECTED] wrote:

 I'm currently using the jQuery Validation plugin on a page that needs
 to dynamically update the particular rules you validate against
 according to which options the user selects (imagine a payment page
 which accepts different payment methods; you wouldn't want to validate
 against credit card fields if the user isn't paying by credit card).
 I've been working under the assumption that I could do this simply by
 firing the $().validate(options); method again, with a new set of
 arguments, but this doesn't appear to be working, and the original
 rules are still being applied (leading to some annoying interactions,
 as the user who said they didn't want to pay by credit card is being
 told their credit card number is missing).

 Essentially, within my code I have the equivalent of the following:

 $('#paymentMethod input[type=radio]').change(function(){
$('#paymentMethod input[type=radio]').each(function(){
if (this.checked) {
switch ($(this).val())
{
case 'pay_cc':
$('#myForm').validate(rulesForCC);
break;
case 'pay_offline':
$('#myForm').validate(rulesForOffline);
break;

}
}
}
 });

 (forgive any slight errors in the above; I've redacted a large part of
 it, so I may have introduced bugs).

 Is there any mechanism for clearing existing rules on a form, or in
 any other way allowing me to reset the rules more explicitly?



[jQuery] Re: jQuery + Prototype on newest release (1.2.6)

2008-06-16 Thread Wil Everts
I've been using jQuery with Prototype (already having remove scriptaculous)
for a while now at Zivity (slowly working our way to a Prototype-free
world). We run jQuery in no conflicts mode: var $j = jQuery.noConflict();
with prototype loaded before jQuery in the head.

On the branch I'm currently working on I have jQuery 1.2.6 running in no
conflict next to Prototype without any problems.

Regards,

Wil Everts
[EMAIL PROTECTED]


[jQuery] Re: Converting this mootools code to jQuery....help?

2008-06-16 Thread John Resig

jQuery(document).ready(function(){
  setInterval(function(){
jQuery('#usersOnlineTxt').load(siteURL+'fetch/online-users');
  }, 30);
});

--John

On Mon, Jun 16, 2008 at 5:58 AM, azz0r [EMAIL PROTECTED] wrote:

 Hey guys, I'm trying to convert my scripts to jQuery, I wondered if
 you guys could help me out with this...

 window.addEvent('domready', function Online_User_Updater() {
ajaxRequest = new Ajax(siteURL+'fetch/online-users', {method: 'get',
 update: $('usersOnlineTxt')});
if(ajaxRequest.request()){
 var interval = 
 setInterval('ajaxRequest.request()',30);
}
 } );




[jQuery] Re: jQuery + Prototype on newest release (1.2.6)

2008-06-16 Thread Rey Bango


Thanks Wil,

I think most have a similar experience and hopefully this is isolated to 
some form of older version of Prototype.


Where on Zivity are you using jQuery?

Rey...


Wil Everts wrote:
I've been using jQuery with Prototype (already having remove 
scriptaculous) for a while now at Zivity (slowly working our way to a 
Prototype-free world). We run jQuery in no conflicts mode: var $j = 
jQuery.noConflict(); with prototype loaded before jQuery in the head.


On the branch I'm currently working on I have jQuery 1.2.6 running in no 
conflict next to Prototype without any problems.


Regards,

Wil Everts
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]


[jQuery] Re: Bindable variable data - similar to Flex?

2008-06-16 Thread Andy Matthews

No one has any comments on this?

On Jun 16, 9:25 am, Andy Matthews [EMAIL PROTECTED] wrote:
 I'm reading about a newish JS framework called 
 SproutCore:http://www.roughlydrafted.com/2008/06/14/cocoa-for-windows-flash-kill...
 utcore/

 in which the article says that SproutCore supports binding to
 data/variables. Thus, when the data changes, you can fire an event or some
 code construct. I know jQuery supports binding to form controls, but is it
 possible to bind a variable?

 For example, in Flex, I can create an array, and make it bindable. I can
 then use that array to build a data grid of some sort. When/if the source
 array changes via some process, the data grid automatically updates.

 Can jQuery do this sort of thing? If not, are there plans to offer something
 like this?

 

 Andy Matthews
 Senior ColdFusion Developer

 Office:  615.627.9747
 Fax:  615.467.6249www.dealerskins.comhttp://www.dealerskins.com/

 Total customer satisfaction is my number 1 priority! If you are not
 completely satisfied with the service I have provided, please let me know
 right away so I can correct the problem, or notify my manager Aaron West at
 [EMAIL PROTECTED]

  2008 Email NADA.jpg
 17KViewDownload


[jQuery] Re: jQuery + Prototype on newest release (1.2.6)

2008-06-16 Thread mike

Thanks for the suggestions.

I just realized that ONE file from the Scritaculous source files
(effects.js) was being loaded. I'm still using some of those effects
on my old Prototype pages. The problem I'm having is most likely
associated with this file.

Are there any known conflicts between jQuery 1.2.6 and Scriptaculous
(when using jQuery.noConflict())?

Version of the effects.js file: 1.8.1 (latest)


[jQuery] Binding in jQuery

2008-06-16 Thread markhuot

Ok, so I know that the Prototype `bind` method isn't the correct way
to go about things in jQuery. The problem is I don't know what the
correct way is…So, I offer up an example:

$(document).ready(function(){
$('h2.countdown[paused=no]').each(function(){
this.update = function()
{
this.innerHTML = 'stuff';
}
this.interval = setInterval(this.update, 1000);
});
});

The idea here is that every second the update function runs on the
selected h2's. Meaning every second a function call should be
triggered with the h2 as the scope. Is this not possible or even the
correct way to do this? How should I do this in jQuery?


[jQuery] Re: jQuery.sheet thoughts, maybe UI compliant?

2008-06-16 Thread K-BL

current version is 0.25 not 2.5, sorry guys.

On Jun 16, 12:29 pm, K-BL [EMAIL PROTECTED] wrote:
 Hey Guys,
 A lot has happened since I first posted about jQuery.sheet - A jQuery
 Spreadsheet with Calculations v0.1.  We're now at version 2.5.
 Version 2.5 adds ajax load/save, in-place navigation, in-place edit,
 cross browser compatibility, true resize (opera  safari have some
 trouble here), upper menu (uses jquery.clickmenu), and many other tiny
 features.

 I'm working on version 0.3 at the moment, and things are progressing
 well.  The next release will get rid of those pesky onScroll bars
 flying all over the place and many fixes. Also I'm working on
 converting it's styling to be used with jQuery UI Theming.  I'm also
 working on a packed version, but it's proving somewhat tricky.

 I've looked and looked all over the web and only found (at this point
 in time) only one other real-world usable competitor (wpSS).  My hopes
 are that jQuery.sheet will give everyone some real flexibility, speed,
 and minimal JS.

 I would like to get some input from your guys.  As I stated before,
 this is my first plugin.  If you guys don't mind, check out the Demo
 and give me a suggestion.  Also, is there anything I can do to see
 about getting into jQuery UI?

 Demo found 
 here:http://jqueryplugins.weebly.com/uploads/3/1/3/8/313814/jquery.sheet.html

 Thanks Guys,
 K-BL


[jQuery] [validate] success, failure?

2008-06-16 Thread Dorian

Hi! I want to do something when input is correct and something else
when isn't. I found options 'success' and 'errorPlacement' which
aren't in documentation.

errorPlacement: function(error, element) {
error.appendTo(element.parent());
doSomething();
},
success: function(label) {
doSomethingElse();
label.remove();
}

Works well, but I don't like it. I must remove label in success,
because another way errorPlacement works only once (when validation is
ok and I change input to incorrect errorPlacement doesn't work). So,
Is there any different solution without removing label (something like
failure, which works similarly to success? Thanks and sorry for my
English.


[jQuery] Controlling a list box change event that fires faster than ajax can complete.

2008-06-16 Thread Eric

I'm making a web application that will be the front end for a MySQL
database. I've got a page that displays a row's data. There are about
20 input fields and a list box. This list box lists the pk of each row
and on change loads that row into the fields. Also, one of the fields
is the source of an image and that image is loaded. So it can take a
moment to load. My problem is dealing with scrolling through the list
(holding the down or up arrow) and having the list change function
fire a bazillion times. The loads lag behind the list. I'm not even
sure how I want to solve this conceptually. And now that I have my
problem typed out, I'm not even sure I should ask my question here,
but I do all my ajax with jQuery so I might as well get an answer in
it. Thanks for your time and help!


[jQuery] jScrollPane - maintainPosition:true

2008-06-16 Thread Luxiouronimo

i can't find any examples wherein this works..

i'm using treeview to expand ul's and li's.. i set a toggle function
for my treeview, and i can reinitialize my .jScrollPane after my items
expand/collapse, but i can't maintainPosition.. the scrollbar position
resets to the top..

it doesn't appear to be working in the #pane4 example here..:
http://kelvinluck.com/assets/jquery/jScrollPane/basic.html

any input is sincerely appreciated


[jQuery] Re: Is there a way to use the css function with $(document) directly?

2008-06-16 Thread Brian J. Fink

I didn't mean $(element).css(object), I meant $
(document).css(selector,rule). The difference is this: css() as it
stands makes a one-time change to the members of the jQuery object by
adjusting the style attribute of each. When a new element matching the
query string is created, it does not have the desired css values.
Trust me: I've already tested it.

What I'm talking about is a way to directly manipulate the document's
style sheets using jQuery.

On Jun 16, 4:32 am, Olaf Bosch [EMAIL PROTECTED] wrote:
 Brian J. Fink schrieb:

  $(document).css(selector1,rule1).css(selector2,rule2)...css(selectorN,ruleN);

  If this is already part of the jQuery functionality, tell me the
  syntax to use.

 Yes, it's ON:

   $(p).css({ color: red, background: blue });

 --
 Viele Grüße, Olaf

 ---
 [EMAIL PROTECTED]://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/
 ---


[jQuery] [tooltip] bug on $('select').tooltip({...}) ...

2008-06-16 Thread Webio.eu

I think i have found a little bug,
you can see it when you call tooltip on select form element with an
any options

The tooltip will show in the top left of the screen. not over the
select..
dont know solution...


(bgiframe not helps)

thanks for any kind of info
best regards to authors :)


[jQuery] Re: calling a function before a form is submitted

2008-06-16 Thread Mike Alsup

 I am having the same issue as Francesco. Can anyone verify that
 $('form').bind('submit', fn); and $('form').submit(fn);
 are actually different

They are the same.  However, if you invoke submit() with no args then
you do not bind a listener, but instead trigger the event.


[jQuery] Re: Is there a way to use the css function with $(document) directly?

2008-06-16 Thread Erik Beeson

This worked for me on FF2/Mac:

$('style/style').attr('type', 'text/css').text('div { background:
red; }').appendTo('head');

--Erik


On 6/16/08, Brian J. Fink [EMAIL PROTECTED] wrote:

  I didn't mean $(element).css(object), I meant $
  (document).css(selector,rule). The difference is this: css() as it
  stands makes a one-time change to the members of the jQuery object by
  adjusting the style attribute of each. When a new element matching the
  query string is created, it does not have the desired css values.
  Trust me: I've already tested it.

  What I'm talking about is a way to directly manipulate the document's
  style sheets using jQuery.


  On Jun 16, 4:32 am, Olaf Bosch [EMAIL PROTECTED] wrote:
   Brian J. Fink schrieb:
  

 $(document).css(selector1,rule1).css(selector2,rule2)...css(selectorN,ruleN);
  
If this is already part of the jQuery functionality, tell me the
syntax to use.
  
   Yes, it's ON:
  
 $(p).css({ color: red, background: blue });
  
   --
   Viele Grüße, Olaf
  
   ---

  [EMAIL 
  PROTECTED]://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/
   ---



[jQuery] Re: File upload of a form inside another form

2008-06-16 Thread Mike Alsup

 I was tinking that maybe moving the input element could works, but I'm
 looking in the doc and I cant find a method for moving a DOM element.

There's a ton of them.  after, before, insertAfter, insertBefore,
append, prepend, etc

http://docs.jquery.com/Manipulation

Ex:  $('#myElementToMove').insertAfter('#myDestinationDiv');


[jQuery] Re: How to tell submit event to wait for method to return

2008-06-16 Thread Hamish Campbell

Change return true to return false.

I assume the geoencode() function fires some sort of ajax call. You'll
need to submit the form once this ajax call has returned a result.

Note that currently, when your function hits return true, it has
fired off the request but a response has yet to be received. This is
what is meant by an Asyncronous call (ie, the A at the start of AJAX).

On Jun 17, 7:33 am, meppum [EMAIL PROTECTED] wrote:
 I have a form that takes an address as input and on submit makes a
 call to google (using googles javascript libraries) and geocodes the
 address.

 The problem is that if I use $(#form).submit(function() { //do
 stuff; } the form posts back to the server before the result from
 google posts back. I'm assuming that google is making an ajax call.

 How can I tell the form to wait until the result has been returned?
 Mind you I am not manually creating the ajax call myself so I don't
 think I can use jquery's ajax library, though correct me if I'm wrong.

 I tried using event.PreventDefault(); which does work, but then the
 form doesn't submit.

 Any help would be appreciated.

 This is basically my code:

 $(#main_form).submit(function(){
    geoencode(); // pseudo code
    return true;



 }- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Is there a way to use the css function with $(document) directly?

2008-06-16 Thread Hamish Campbell

As an example do you mean:

$(document).css('p', 'color: red').css('h1', 'font-size: 200%');



On Jun 14, 6:13 am, Brian J. Fink [EMAIL PROTECTED] wrote:
 I was tinkering with jQuery when I got an idea: why not have a way to
 do something like:

 $(document).css(selector,rule);

 Then it could be chained for as many rules as you would wish:

 $
 (document).css(selector1,rule1).css(selector2,rule2)...css(selectorN,ruleN)­;

 If this is already part of the jQuery functionality, tell me the
 syntax to use. Otherwise, consider this a submission of a new idea.


[jQuery] Re: Binding in jQuery

2008-06-16 Thread Michael Geary

There's nothing wrong with using a bind() function - it's just that jQuery
doesn't provide one. It isn't really necessary, because in any situation
where you might use bind(), you can use a closure - and the code is usually
simpler. In fact, a closure is what bind() uses.

Here is one way you could code it:

$(function(){
$('h2.countdown[paused=no]').each(function( i, element ){
setInterval( function() {
element.innerHTML = 'stuff';
  // or do it the jQuery way:
$(element).html( 'stuff' );
}, 1000 );
});
});

I didn't see the code using this.inverval - if you have an example of how
that might be used, I can give you another idea or two on it.

-Mike

 Ok, so I know that the Prototype `bind` method isn't the 
 correct way to go about things in jQuery. The problem is I 
 don't know what the correct way is.So, I offer up an example:
 
 $(document).ready(function(){
   $('h2.countdown[paused=no]').each(function(){
   this.update = function()
   {
   this.innerHTML = 'stuff';
   }
   this.interval = setInterval(this.update, 1000);
   });
 });
 
 The idea here is that every second the update function runs 
 on the selected h2's. Meaning every second a function call 
 should be triggered with the h2 as the scope. Is this not 
 possible or even the correct way to do this? How should I do 
 this in jQuery?
 



[jQuery] Re: jQuery + Prototype on newest release (1.2.6)

2008-06-16 Thread Rey Bango


Hi Mike,

Actually, there is an issue with noConflict and older versions of 
Scriptaculous but not jQuery v1.2.6 and the most recent Scriptaculous.


You can check out the whole threads here:

http://groups.google.com/group/jquery-en/browse_thread/thread/69cb41d2e3710c70/f707b1df7821d026?hl=en#f707b1df7821d026
http://groups.google.com/group/jquery-en/browse_thread/thread/dde6b91c3ad00ecc/25465bb7850810fa?hl=en%E6%8D%B9bb7850810fa

The issue wasn't so much a problem with jQuery as it was with 
Scriptaculous overwriting the call() method with custom functionality 
solely in effects.js. The script the implement is seen here:


Array.prototype.call = function() {
var args = arguments;
this.each(function(f){ f.apply(this, args) });
}

That is most likely the conflict you're experiencing. They've since 
fixed that in the latest version of scriptaculous.


If after reading that and upgrading accordingly, if you still have a 
problem, could you post up a test case so we can check it out?


Rey...

mike wrote:

Thanks for the suggestions.

I just realized that ONE file from the Scritaculous source files
(effects.js) was being loaded. I'm still using some of those effects
on my old Prototype pages. The problem I'm having is most likely
associated with this file.

Are there any known conflicts between jQuery 1.2.6 and Scriptaculous
(when using jQuery.noConflict())?

Version of the effects.js file: 1.8.1 (latest)



[jQuery] Flowplayer vs. jqModal in IE 7

2008-06-16 Thread anesthete

Using jqModal in a page with the Flowplayer video player. In Firefox,
it works as anticipated -- opening a jqModal window covers (or
hides, anyway) the FP object. In IE7, the FP stays visible (and
operable) on top and, depending on where the close button happens to
be, prevents the user from closing the modal dialog.

Lil demo here:

http://www.limitedsector.com/flowplayer_vs_jqmodal/

Not sure if this is a Flowplayer problem or a jqModal problem,
suspecting the latter. I'm guessing there's something about SWF
objects that makes them float to the top no matter what you do in IE?

Dave LaDelfa


[jQuery] Re: Help with tabsLoad

2008-06-16 Thread keny

Hi,

Without the return statement nothing happen :-(

And i understand why you told me to choose a normal link but dont
worry ist in a member section of my site and google dont even crawl
those web page. And i can't use the second function as in the page i
show i whant some link to point to my function (and load in tab) and
some to do not load in tab that why i try to use the first function.

that no way to use that one and reload the tab to work after ?

function loadTab(tab) {
var tab ;


$('#container-8').tabs({
load: function(ui) {


$(ui.panel).load(tab);

// here someting to make it work ???

}



});
}

thanks you



On 16 juin, 02:12, Klaus Hartl [EMAIL PROTECTED] wrote:
 Sigh, I'm not used to using javascript: urls in links, which is
 considered bad practice. Please change it to:

 javascript:void(loadTab( 'ahah_3.html' ));

 Removing the return statement should also work:

 function loadTab(url) {
     $(this).parents('#container-8').load(url);

 }

 Please 
 read:http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Op...

 But I encourage you to use a standard link

 a href=whatever.html.../a

 and bind an event to ajaxify this link by using the load callback in
 tabs itself. All you need is this then:

 $(function() {
     $('#container-8  ul').tabs({
         load: function(ui) {
             $('a', ui.panel).click(function() {
                 $(ui.panel).load(this.href);
                 return false;
             });
         }
     });

 });

 --Klaus

 On 16 Jun., 01:01, keny [EMAIL PROTECTED] wrote:



  Hi, thanks again for answer me,

  Your function dont work, it only show in another page the word false

  I have try all of these combinaison whit the same result :

  function loadTab(url) {
  var url;
      $(this).parents('div.ui-tabs-panel').load(url);
      return false;

  }

  function loadTab(url) {
      $(this).parents('#container-8').load(url);
      return false;

  }

  See by yourself here :http://www.snipvideo.com/tabs/

  Thanks

  On 15 juin, 18:27, Klaus Hartl [EMAIL PROTECTED] wrote:

   Ah, I see. Please change the loadTab function to this:

   function loadTab(url) {
       $(this).parents('div.ui-tabs-panel').load(url);
       return false;

   }

   and try again. The problem with your loadTab function was that it was
   reinitializing tabs turning them into in-page tabs as all anchor
   elements are already pointing to a hash at that point of time.

   --Klaus

   On 15 Jun., 16:55, keny [EMAIL PROTECTED] wrote:

Hi,

Ya like i said everyting work the link is loaded but afther that,
 even if you click on tab 1 or 2 or 3 the page d'ont load anymore ist
stay to page 3

If i click tab 1 ist should reload the page 1 same thing for tab 2 ...

Thank you !

On 15 juin, 02:50, Klaus Hartl [EMAIL PROTECTED] wrote:

 So what is going wrong now? To me it looks like everything works as
 expected (Tabs are loading correctly and the link saying This link
 load page 3 in current tab via ajax does exactly what it says)...

 --Klaus

 On 15 Jun., 00:36, keny [EMAIL PROTECTED] wrote:

  hi thanks for helping

  i have upload a new version and still dont work

  no sherif code in this one

 http://www.snipvideo.com/tabs/
  help is very appreciate

  On 14 juin, 01:58, Klaus Hartl [EMAIL PROTECTED] wrote:

   On 13 Jun., 23:17, keny [EMAIL PROTECTED] wrote:

Thanks

Is there a way to make a function that will work ? I am not 
expert in
JS like you. Maybe you can check this site that offer tab and a
function that work to load link via ajax in there tab :

   All you need to do is *not* include the Red Sheriff tracker code
   included in the Ajax tab pages...

   --Klaus- Masquer le texte des messages précédents -

 - Afficher le texte des messages précédents -- Masquer le texte des 
 messages précédents -

   - Afficher le texte des messages précédents -- Masquer le texte des 
   messages précédents -

 - Afficher le texte des messages précédents -


[jQuery] ColourLovers Navigation

2008-06-16 Thread Phuzion


Hi all,

I am looking to do a navigation bar very similar to colour lovers. 
http://www.colourlovers.com/ http://www.colourlovers.com/  I am new to
jQuery and Javascript and was wondering if someone could point me in the
right direction to build a navigation like that (or if it can even be done
in jQuery).  I have been using the animation features in JQuery but all the
animations tend to move downward and not upwards.  Any links or help is
great appreciated. 

Thanks,

Phuzion
-- 
View this message in context: 
http://www.nabble.com/ColourLovers-Navigation-tp17831945s27240p17831945.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] how to make browser ensure specific element is visible

2008-06-16 Thread Colin Manning

Hi

Newbie user and I guess this probably has a simple answer.

I have a hidden div on the page that is shown when user clicks a button. 
Its a help text, in a div, for the page that is only to be shown when the 
user wants it. But the page is long and when I un-hide the div I also want 
the browser to scroll the document so as to ensure this div actually 
visible within the browser window.

Is there an easy way in jQuery to ensure a given element is actually 
visible on screen and not scrolled off the bottom?


Thanks
Colin


-- 
No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.523 / Virus Database: 270.3.0/1503 - Release Date: 14/06/2008 18:02




  1   2   >