[jQuery] Re: [ANNOUNCE] jFlip plugin

2008-06-11 Thread Renato Formato

Hi Andy,
I understand your point but the plugin captures mouse events only over
the flipping area, so, even moving it to the center won't change its
behavior.
If the plugin captures mouse events on the document, that could be
possible, but the turning page would be drawn always only inside the
flipping area.

Drawing the turning page even outside the block whose dimensions are
given to the plugin, would require the canvas to extend much further
and to
inject additional css to keep the layout consistent with the
dimensions provided.

Renato

On Jun 4, 3:28 pm, Andy Matthews [EMAIL PROTECTED] wrote:
 When I'm trying to grab the bottom right corner, and flip it to the left, I
 keep wanting to move my mouse past the edge of the flip area (just like I
 would with a real book). If the flip area were in the middle of the window,
 that would be no big deal. However since the flip area is flush to the edge
 of the window, when my mouse goes past the edge of the flip area, it also
 goes past the window which causes the corner to release and go back to it's
 original position.



[jQuery] changing value of hidden input

2008-06-11 Thread Andri

I have this input input type=hidden name=tes value=something

then when i try to change it with
$('[EMAIL PROTECTED]').val('change to somethat');

it doesn't work. if i change the type to 'text' it works. from now on
i'm just write like this

div style=display:none
input type=text name=tes value=something/div

i just curiuos is there any tricks to change the input, from the
'hidden' input  not 'text'


thx before


[jQuery] Re: Validation Problem

2008-06-11 Thread Jörn Zaefferer

Please provide a testpage - code snippets don't help.

Jörn

On Wed, Jun 11, 2008 at 4:01 AM, Nimrod [EMAIL PROTECTED] wrote:

 Hi,

 Thanks for the help!

 I revised my code but still doesn't work. I know there's wrong in my
 code but I can't figure it out. Here is the revised code. I hope you
 can help me with this.

 script type=text/javascript

 $().ready(function() {
var container = $('div.error-container');
// Validate the form when it is submitted
$(#frmCompanyGroup).validate({
rules: {
GroupName: {
required: true,
remote: 
 contents/company_group_validate_name.asp
}
},
messages: {
GroupName: {
required: Enter a Group Name,
remote: jQuery.format({0} is already in use)
}
},
errorContainer: container,
errorLabelContainer: $(ol, container),
wrapper: 'li',
meta: validate
});

$('#btnCancel').click
(
function ()
{
location.href = '%=MAIN_URL  co-grp%'
}
);

 });

 /script


 div class=col60
form action=%=MAIN_URL  sPageOption m=add% method=post
 id=frmCompanyGroup class=basic-form
input type=hidden name=CompanyGroupID value=
 %=lCompanyGroupID%
fieldset class=standard-form
legendDetails/legend
table class=form-table
tr
td class=keylabel for=GroupNameCompany
 Group Name:/label/td
tdinput type=text name=GroupName
 id=GroupName size=50 maxlength=150 value=%=sGroupName% //
 td
/tr
/table
/fieldset

div class=standard-form-buttons
% If sMode = edit Or sMode = add Then %input 
 name=Submit
 id=Submit type=submit value=%=sButton%% End If
 %nbsp;nbsp;
input name=btnCancel id=btnCancel type=button
 value=Cancel
/div
/form


 Thanks,
 Nimrod


 On Jun 11, 1:51 am, Jörn Zaefferer [EMAIL PROTECTED]
 wrote:
 Methods that you add via $.validator.addMethod have to run
 synchronously, so using ajax in there doesn't work.

 The remote method implements the necessary 
 synchronization:http://docs.jquery.com/Plugins/Validation/Methods/remote#url
 An example for the unique remote validation is 
 here:http://jquery.bassistance.de/validate/demo/milk/(included in the
 download)

 Jörn

 On Tue, Jun 10, 2008 at 5:42 PM, Nimrod [EMAIL PROTECTED] wrote:

  Hi All,

  I'm just new to jQuery and I would like to ask for your help with my
  validation code. My problem in the code below is that it's not
  validating the intended field. What I want to do here is to validate
  if a user entered a unique name.

  // a custom method for validating the Group Name
  $.validator.addMethod(unique, function() {
 $.ajax({
 type: POST,
 dataType: json,
 url: contents/company_group_validate_name.asp,
 data: name=+$(#GroupName).val()+id=%=lCompanyGroupID%m=
  %=sMode%,
 success: function(data){
 if (data.name_exists == True) {
 //alert('Existing!');
 return false;
 }else{
 //alert('Not Existing!');
 return true;
 }
 }
 });
  }, 'Please enter a unique name!');

  $().ready(function() {
 var container = $('div.error-container');
 // Validate the form when it is submitted
 $(#frmCompanyGroup).validate({
 errorContainer: container,
 errorLabelContainer: $(ol, container),
 wrapper: 'li',
 meta: validate,
 rules: {
 GroupName: {
 //required:true,
 unique:true
 }
 }

 });

 $('#btnCancel').click
 (
 function ()
 {
 location.href = '%=MAIN_URL  co-grp%'
 }
 );

  });



[jQuery] Re: [ANNOUNCE] jFlip plugin

2008-06-11 Thread Giovanni Battista Lenoci


Renato Formato ha scritto:


Hi all,
I've just released the jFlip plugin,
a plugin to make unobtrusive flipping page image galleries using 
canvas (warning: no Flash needed!).


It works with all jquery compatible browsers, IE included, using an 
enhanced version of excanvas I wrote.


Enjoy!

http://www.jquery.info/The-jFlip-plugin

Renato Formato



Very nice!

Complimenti!



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



[jQuery] Re: Validate plugin - validate only PART of a form

2008-06-11 Thread Michael Price


Jörn Zaefferer wrote:

Take a look at this multipart form, it uses the accordion and custom
methods to split validation across parts:
http://jquery.bassistance.de/validate/demo/multipart/


I'll check that out - thanks :)

Regards,
Michael Price




[jQuery] Re: [ANNOUNCE] jFlip plugin

2008-06-11 Thread Giovanni Battista Lenoci


Renato Formato ha scritto:


Hi all,
I've just released the jFlip plugin,
a plugin to make unobtrusive flipping page image galleries using 
canvas (warning: no Flash needed!).


It works with all jquery compatible browsers, IE included, using an 
enhanced version of excanvas I wrote.


Enjoy!

http://www.jquery.info/The-jFlip-plugin

Renato Formato


A little note, if you drag the corner and the move the mouse pointer 
outside the sensible area the flip doesn't occur, maybe you can manage 
this case.


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



[jQuery] Re: simple horizontal slide panel - IE7 DOM, Jquery

2008-06-11 Thread bjorsq


I have managed to get this to work - although probably not the best solution,
by placing the panel and panel reveal link in a wrapper div, and placing
them off screen. Your positioning was all a bit messed up - only the panel
needs to have absolute positioning. The animate function slides the anel on
and off screen by checking first whether the panel is shown or not. Here is
the code I'm using:

JS

$(document).ready(function(){
$(.btn-slide).click(function(){
var targetX = $(#panelwrapper).css(left) == 0px? '-340px':
'0px';
$(#panelwrapper).animate({left: targetX, opacity: 0.8}, {
duration: slow });
return false;
});
});

CSS:

body {
  margin: 0;
  padding: 0;
  width: 670px;
  font: 75%/120% Arial, Helvetica, sans-serif;
}
#panelwrapper {
  position:absolute;
  top:0;
  left:-340px;
  height:600px;
  width:400px;
  z-index:1;
}
#panel {
  float:left;
  margin:0;
  padding:20px;
  background:yellow;
  height:600px;
  width:300px;
}   
#content {
  position:relative;
  margin-left:50px;
}
.slide {
  float:left;
  width:1em;
  height:520px;
  margin:0;
  padding:40px 0;
  border-left:4px solid #422410;
}
.btn-slide {
  font:bold 160%/2em Arial, Helvetica, sans-serif;
  color:orange;
  text-decoration:none;
}

HTML:

body
  div id=panelwrapper
  div id=panel
  p
  Phasellus ut libero. Nulla in libero non enim 
tristique sollicitudin.
Ut tempor. Phasellus pellentesque augue eget ante. Mauris malesuada. Donec
sit amet diam sit amet dolor placerat blandit. Morbi enim purus, imperdiet
in, molestie sit amet, pellentesque eu, mauris. In vel erat vel ipsum
bibendum commodo. Curabitur accumsan. Nam sed metus. Etiam tristique
bibendum justo.
  /p
  /div
  p class=slide # S L I D E  nbsp; P A N E L /p
/div
div id=content
p
Lorem ipsum dolor sit amet, consectetuer 
adipiscing elit. In commodo
lorem sed nisl. Aliquam commodo urna non lacus. Cras auctor sapien sodales
massa. Integer et sem. Pellentesque dolor sapien, lacinia sit amet,
imperdiet at, pretium in, neque. Nullam euismod commodo orci. Aliquam est
dolor, scelerisque non, sodales nec, tempor sit amet, lacus. Nullam ut nisl.
Donec congue neque in metus. Proin et nisi. Praesent porttitor semper purus.
Nam velit nulla, vulputate a, porta quis, dapibus a, purus. Aenean vitae
erat a urna bibendum tincidunt. Nullam tincidunt fermentum elit. Fusce diam.
Ut tempor. Sed sed est sit amet tortor hendrerit pulvinar. Aenean eu pede id
lorem ornare blandit. Duis justo lorem, laoreet quis, ullamcorper ut,
hendrerit non, augue. Morbi malesuada nisi non tortor pulvinar vulputate.
/p
/div
/body




two7s_clash wrote:
 
 
 Hi all,
 
 I am working on slide panel:
 http://f1shw1ck.com/activity_viewer/slider.html#
 
 Problem: The panel which slides across pushes all the div' s in the
 page to the right when viewed in IE.
 
 Expected: The panel should act as an overlay on the current page
 without pushing any div's.
 
 Things tried:
 
 I wrapped the panel and button in a div with absolute positioning, but
 now the slide panel button doesn't move from place.
 
 Both URLs work as desired in Firefox.
 
 Thanks for any help you can provide.
 
 

-- 
View this message in context: 
http://www.nabble.com/simple-horizontal-slide-panel---IE7-DOM%2C-Jquery-tp17766819s27240p17773253.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: superfish animation (yet another )

2008-06-11 Thread justrox420

Not sure it will ever come across, but if someone else asks, you can
center this by just using some oldschool layout methods

table cellpadding=0 cellspacing=0 border=0 align=center
trtd

just thought i'd share. I've tested this and it centers the nav
beautifully.  Nothing else I've tried has worked.  Some times the old
tricks are, in fact, the best trick.


On Jun 10, 5:34 am, Joel Birch [EMAIL PROTECTED] wrote:
 Hey thanks for the props! ;)

 Theanimationworks fine when I check your previous link - I assume
 you found that issue. As for centring the nav items - I've never
 attempted that before. The CSS currently depends on floating left so I
 can imagine you would have trouble getting them centred. However, read
 through this article on 24 Ways - it shows how to centre a tab
 navigation and could probably be slightly adapted for what you 
 want:http://24ways.org/2005/centered-tabs-with-css

 Cheers
 Joel Birch.


[jQuery] Re: click / dblclick Problem

2008-06-11 Thread Joel Newkirk
Richard: Your example (utilizing event detail - useful info, that) will
still perform the 'click' action when double-clicked, just does it once
instead of twice.

I believe the OP (I wanted to execute dblclick or click, not both.) was
asking How do I prevent the click() event from firing when the user
performs a doubleclick?

The answer appears, however, to be there's no easy way.  (a 'click
handler' could conceivably be written to accept the click and do nothing for
a specified period of time, then act on the click if a double-click were not
also received, so if it's important enough it CAN be done)

j


[jQuery] Re: Draggable and Fadeto

2008-06-11 Thread msm.stef

Hello,

I still have problem.
Here my page for  example: http://msmfarcry02.free.fr/test/menu_demo.html

When mouse over, function over/out work continuously.
When drag, same.

here is the script : http://msmfarcry02.free.fr/test/jscript.js
and the css: http://msmfarcry02.free.fr/test/presentation.css

Many thanks for your help


Stephan

On 11 juin, 05:48, Richard D. Worth [EMAIL PROTECTED] wrote:
 Here's a way to do with bind/unbind:

 function over() { $(this).fadeTo(slow, 1.0); }
 function out() { $(this).fadeTo(slow, 0.6); }

 function unBind() {
   $(#navigation).unbind(mouseover, over).unbind(mouseout, out);}

 function reBind() {
   $(#navigation).bind(mouseover, over).bind(mouseout, out);

 }

 reBind();

 $(#navigation).draggable({ start: unBind, stop: reBind });

 In this case you want to use the start callback, not the drag callback as
 drag is called continuously (for each mousemove) during the drag.

 - Richard

 On Tue, Jun 10, 2008 at 10:52 AM, msm.stef [EMAIL PROTECTED] wrote:

  Thank for this, but it doesnt works.

  I try to use this :

 $(#navigation).hover(function () {
$(this).fadeTo(slow, 1.0);
},function(){
$(this).fadeTo(slow, 0.6);
 });

  $(#navigation).draggable({
 drag: function() { $(this).unbind(hover); },
 stop: function() { $(this).bind(hover); }
 });

  but, not good !!!

  Have you a solution for me ?
  Thanks

  Stephan


[jQuery] Re: ext js-like dropdown box in jQuery?

2008-06-11 Thread Ettiene

Thanks Adam and Glen,

I've implemented the jNice plugin and tweaked it a bit. It's working
for me now :)

Thanks again for the help.

Ettiene

On Jun 11, 2:52 am, Glen Lipka [EMAIL PROTECTED] wrote:
 Maybe this one?http://jquery.bassistance.de/autocomplete/demo/

 Glen

 On Tue, Jun 10, 2008 at 5:04 PM, Adam Weis [EMAIL PROTECTED] wrote:
  Have you seen the jNice plugin?

 http://www.whitespace-creative.com/jquery/jNice/

  -Adam

  On Tue, Jun 10, 2008 at 5:05 PM, Ettiene [EMAIL PROTECTED] wrote:

  Hi guys,

  I'm looking for a cool alternative to the normal HTML select
  dropdown box. Preferrably some javascript code that will take the
  existing HTML select code and generate a dropdown widget or something.
  A necessary feature that I'm also looking at is that the dropdown
  container displaying the options should be able to be wider than the
  element/widget itself and should render this way in all major
  browsers. I've tried this with a normal select element and CSS, but
  only got the desired results in FF.

  I've almost got it working in EXT JS using their combobox object, but
  I'm still having issues with displaying default Select one... text.

  Here is an image of what I've got so far -
 http://www.w3sandbox.com/ie7_combo.jpg

  Is this possible in jQuery? I've tried to find some solution, but
  without luck so far.

  Thanks
  ettiene


[jQuery] Re: target ajax tab from an external page

2008-06-11 Thread Joel Newkirk
Take a look at the history plugin.

Among other things, it takes the URL fragment and uses it to perform the
needed ajax query (or what-have-you) on pageload.  For example, you could
link to newpage.html#tab2 and the ajax tab referred to by '#tab2' would be
opened on pageload.  (this presumes that you've included the history plugin
and properly initialized it and so on)  It also allows you to use
back/forward browser buttons and bookmarks.

j


On Tue, Jun 10, 2008 at 8:50 PM, Screenblind [EMAIL PROTECTED]
wrote:


 I looked all over for tutorial or explanation to my issue to no avail.
 I need to be able to open a target ajax tab in an external page

 Basically  homepage (link) -- new page with selected tab
 opened...




[jQuery] Re: 1 item remaining hang up with document.ready

2008-06-11 Thread MorningZ

Have you fired up a tool like Fiddler (http://www.getfiddler.com) to
see what particular item it is hanging on?


[jQuery] Re: Unbinding event for specific element after binding for entire document

2008-06-11 Thread nandu

On Jun 10, 11:21 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
 When you bind the document, you just bind the document, not all its
 elements. So you can't unbind afterwards.

 You need to use conditions (.is() to skip clicks on textareas from
 that handler.

 if( this.nodeName == 'TEXTAREA' ) // or $(this).is('textarea')
 return;

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

Dear Ariel,

Thank you for your reply but I do not quite understand. Do you mean to
say that I can skip the click handler on selected elements
while it is bound to the entire document because I cannot see anyway
to do that.

Alternatively do you mean that I should find every single element on
the document and then bind the click handler to each one skipping
textareas.

Could you please enlighten me because I still feel a bit lost.

Thanks,

Nandu


[jQuery] Re: Too much recursion error with jQuery 1.2.6 and blockUI 2.07

2008-06-11 Thread Mike Alsup

  Firebug spits out

  ///
  too much recursion
  [Break on this error] jQuery.globalEval(elem.text||
  elem.textCo...Query.browser.msie)script.text=data;else

 Change this:

 $('.jqmClose').click($.unblockUI);

 to this:

 $('.jqmClose').click(function() {
     $.unblockUI();
     return false;

 });


The latest version of blockUI fixes this bug.

http://www.malsup.com/jquery/block/jquery.blockUI.js?v2.08


[jQuery] Re: changing value of hidden input

2008-06-11 Thread MorningZ

Why not just simply use document.getElementById?  (which
ultimately .val() uses anyways)


[jQuery] $.map flattens results

2008-06-11 Thread Marc Galera

Hi.

I've recently been surprised with $.map. I've found that it flattens
the result so I can't return an array in the callback. For example, on
this code:

$.map([1, 2, 3], function(n) {
   return [n, 'xxx'];
});

I get:

[1, xxx, 2, xxx, 3, xxx]

Instead of what I expected:

[[1, xxx], [2, xxx], [3, xxx]]


Looking on the source code is obvious that this is made on purpose,
and there are workarounds, but I was curious on why this is happening.

Marc.


[jQuery] Re: treeview async - callback on completion? (or some other way to do temporary loading... text)

2008-06-11 Thread Max Williams (Brighton)

Hi rolf

yeah, that would do fine actually - i missed that.  Do you know how
that is generated?

thanks
max

On Jun 10, 5:41 pm, rolfsf [EMAIL PROTECTED] wrote:
 If you look at the async 
 demo:http://dev.jquery.com/view/trunk/plugins/treeview/demo/async.html

 in the first tree, click on item 3, and then on item 3.6 - you'll see
 a loading icon for a few seconds, then the branch will load. Is that
 what you're looking for?

 rolf

 On Jun 10, 9:10 am, Max Williams (Brighton)

 [EMAIL PROTECTED] wrote:
  I'm using the async version of the treeview plugin to deal with a
  rather large tree.  When the user first loads it there's nothing
  there, and quite a delay before the main set of branches loads, and
  i'd like to have some 'loading...' text there.

  How can i get the treeview to signal when it's finished loading the
  json, so i can remove the text?  Is there a simpler way to have some
  loading... text displayed so that it will disappear when the tree
  loads?

  thanks
  max


[jQuery] Get text from an element then append it immediately after

2008-06-11 Thread Garth McMillan
I tried posting this earlier, but not sure if it worked, so trying again.
 
I'm want to get the content from inside address elements, then place the 
content in a link, that will get sent to Google maps, after the address 
element. 
 
There will be multiple addresses on the same page. 
 
For example (I've substituted [] for ):
 
[address]Location[/address]
 
would become 
 
[address]Location[/address][a 
href=http://maps.google.com/maps?hl=enq=Location]Blah Blah[/a]
 
I imagine I need to use some combination of .clone and .append, but I'm not 
sure how. 
 
Any help would be greatly appreciated. 
 
 
Regards,Garth McMillan
_
Be part of history. Take part in Australia's first e-mail archive with Email 
Australia.
http://emailaustralia.ninemsn.com.au

[jQuery] Re: Flecks on some images with jQuery+Cycle Plugin

2008-06-11 Thread ProNotion

On Jun 10, 10:59 pm, Mike Alsup [EMAIL PROTECTED] wrote:
   Can you post a demo link

  Yes I can now as the client has decided to go live with the issue on
  the understanding it is resolved asap.
  The url iswww.plymouthcollege.com

 Thanks for posting the link (and nice site, btw).  I'm not sure what
 to suggest, although I can say that it has nothing to do with jQuery
 or Cycle.  The following link shows the issue with nothing on the page
 other than some pics with an IE alpha filter applied.

 http://malsup.com/jquery/specs.html

 Anyone know what the deal is with this?

 Mike

Thanks for the comments on the site and for your help Mike.
Are you by any chance the developer of the plug-in?

I guess based on your url above we can rule out the plugin for causing
this problem!

Some further information on the subject which I will look into but
doesn't appear to offer a definitive solution:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3308055SiteID=1

I will keep you updated with any progress.

Simon

Simon


[jQuery] Re: how do I get a printed jQuery documentation

2008-06-11 Thread Brian Schilt

You can refer to this post regarding printing documentation from the
website:

http://groups.google.com/group/jquery-ui/browse_frm/thread/8e79882c2b401e75/9204a3a4b256ce5a?lnk=stq=#9204a3a4b256ce5a

Brian

On Jun 10, 9:23 pm, JACK [EMAIL PROTECTED] wrote:
 Hi, all

 How do I get a printed documentation?

 Jack


[jQuery] Check if callback is empty

2008-06-11 Thread harmstra


hi all,

In PHP i have:

if ($data = get_order_by_id($order_id))
{
echojson_encode($data);
return TRUE;
} else {
return FALSE;
}

Jquery:
$.post(/od/get_order/, 
{order_no: order_no},  
function(order){
$(#name).html(order.name);
$(#address).html(order.address);
$(#zipcode).html(order.zipcode);

}, 'json');


So if the $order_id in PHP does not exist, the function returns FALSE.
In this case, it like to throw an error on de client
Something like 

$(#zipcode).html('Order does not exist');

But where would i place this piece of code?
-- 
View this message in context: 
http://www.nabble.com/Check-if-callback-is-empty-tp17775622s27240p17775622.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: treeview async - callback on completion? (or some other way to do temporary loading... text)

2008-06-11 Thread Max Williams (Brighton)

I actually just solved this, not with some animation but with some
text:  i modified the jquery.treeview.async.js file to send a custom
event after the $.getJSON block (line 44):

jQuery(document).trigger('treeviewLoaded');

Then in my javascript code that calls the tree i add the text to the
tree ul and then hide it when the above event occurs:

 //add some loading text:
 jQuery(#prop-tree).append(p id='loading-text'loading.../
p);

 //set up call for the property tree, to get new branches as json
when tree is expanded
  jQuery(#prop-tree).treeview({
url: /tree/children?for=%= tree_name %random=%=
rand(10)%%= extra_params.collect{|k,v| '' + k.to_s + '=' +
v.to_s}.join('')%
  });

  //hide the loading text once the tree has loaded
  jQuery(document).bind('treeviewLoaded', function() {
jQuery(#loading-text).hide();
  });

It's not ideal as it's called every time a branch loads whereas it
really only needs to be called the first time.  And it feels a bit
dirty.  I'd still like to know how the animation works. :)

thanks
max

On Jun 11, 10:29 am, Max Williams (Brighton)
[EMAIL PROTECTED] wrote:
 Hi rolf

 yeah, that would do fine actually - i missed that.  Do you know how
 that is generated?

 thanks
 max

 On Jun 10, 5:41 pm, rolfsf [EMAIL PROTECTED] wrote:

  If you look at the async 
  demo:http://dev.jquery.com/view/trunk/plugins/treeview/demo/async.html

  in the first tree, click on item 3, and then on item 3.6 - you'll see
  a loading icon for a few seconds, then the branch will load. Is that
  what you're looking for?

  rolf

  On Jun 10, 9:10 am, Max Williams (Brighton)

  [EMAIL PROTECTED] wrote:
   I'm using the async version of the treeview plugin to deal with a
   rather large tree.  When the user first loads it there's nothing
   there, and quite a delay before the main set of branches loads, and
   i'd like to have some 'loading...' text there.

   How can i get the treeview to signal when it's finished loading the
   json, so i can remove the text?  Is there a simpler way to have some
   loading... text displayed so that it will disappear when the tree
   loads?

   thanks
   max


[jQuery] Val() and if statement? Possibly just wrong syntax

2008-06-11 Thread Hinch

I'm quite new to jQuery but forms are proving difficult for me. I'm
trying to make a dynamic select box named 'educType' allow or disallow
two other form fields depending on the selection. I'm pretty sure it
is just the 'if' statement being incorrect syntax but I can't find
examples for it.

Here is the code I have got below.

$(document).ready(function() {

function changeEd(){

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

 if (edValues == university) {
  $(#edcounty, #coluni).attr(disabled, this.value == 'no');
 }
}

$(#educType).change(changeEd);
changeEd();

});

I made it following the val() docs and some help from a previous post
(the code there is now in use elsewhere so thanks!) but this isn't
working and I give up!


[jQuery] Re: Draggable and Fadeto

2008-06-11 Thread bjorsq


I think what is happening here is you are binding the mouseover and mouseout
functions to the #navigation div, so when your mouse passes over the ul
and li elements inside it, the mouseout function is triggered (the mouse
moves out as far as the div is concerned, and over its child elements).
You need to be more specific and target the elements within the #navigation
div you are looking for, by giving them a class. If you give the li
elements the class, you will end up with the same problem when it comes to
nested lists, so target the   and elements of the top level menu items.

One other thing is that fadeTo forms a queue so if you frantically move the
mouse about over the elements, you will see the results in the form of
ghosting for a while afterwards - not sure how you would correct this.


msm.stef wrote:
 
 
 Hello,
 
 I still have problem.
 Here my page for  example: http://msmfarcry02.free.fr/test/menu_demo.html
 
 When mouse over, function over/out work continuously.
 When drag, same.
 
 here is the script : http://msmfarcry02.free.fr/test/jscript.js
 and the css: http://msmfarcry02.free.fr/test/presentation.css
 
 Many thanks for your help
 
 
 Stephan
 
 On 11 juin, 05:48, Richard D. Worth [EMAIL PROTECTED] wrote:
 Here's a way to do with bind/unbind:

 function over() { $(this).fadeTo(slow, 1.0); }
 function out() { $(this).fadeTo(slow, 0.6); }

 function unBind() {
   $(#navigation).unbind(mouseover, over).unbind(mouseout, out);}

 function reBind() {
   $(#navigation).bind(mouseover, over).bind(mouseout, out);

 }

 reBind();

 $(#navigation).draggable({ start: unBind, stop: reBind });

 In this case you want to use the start callback, not the drag callback as
 drag is called continuously (for each mousemove) during the drag.

 - Richard

 On Tue, Jun 10, 2008 at 10:52 AM, msm.stef [EMAIL PROTECTED] wrote:

  Thank for this, but it doesnt works.

  I try to use this :

 $(#navigation).hover(function () {
$(this).fadeTo(slow, 1.0);
},function(){
$(this).fadeTo(slow, 0.6);
 });

  $(#navigation).draggable({
 drag: function() { $(this).unbind(hover); },
 stop: function() { $(this).bind(hover); }
 });

  but, not good !!!

  Have you a solution for me ?
  Thanks

  Stephan
 
 

-- 
View this message in context: 
http://www.nabble.com/Draggable-and-Fadeto-tp17752714s27240p17776225.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery ui-interface sortable: contents of callback funciton parameter, ui

2008-06-11 Thread pankaj


Hi,
ui-interface sortable has many callbacks. For example
update:function(e,ui) etc.
The contents of the object ui varies for different callbacks. Can any
one tell what are the contents for this object. In documentation on
jquery site only partial information is given.
*  ui.options - options used to initialize the sortable
* ui.position - current position of the helper
* ui.absolutePosition - current absolute position of the helper
* ui.helper - the current helper element (most often a clone of
the item)
* ui.placeholder - the placeholder (if you defined one).
Wheras on the demo page ohter things such as ui.item, ui.sender can be
seen.
Can any one provide a complete list or how to get one
Thanks,
Pankaj


[jQuery] Re: [ANNOUNCE] Toaster plugin

2008-06-11 Thread h3

http://code.google.com/p/jquery-ui/source/browse/branches/experimental/ui.toaster.js

It's the link the author gave me so I guess it's the last committed
version.. It's experimental so I wouldn't hold my breath for it
working on IE6..


On Jun 11, 6:47 am, Bart Hermans [EMAIL PROTECTED] wrote:
 Are the older versions still available, cause it's broken in IE6 now.
 Everything opens in the bl corner (see screenshot).

 On Tue, Jun 10, 2008 at 19:31, Andy Matthews [EMAIL PROTECTED]
 wrote:



  BEAUTIFUL! That works perfectly.

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of h3
  Sent: Tuesday, June 10, 2008 11:53 AM
  To: jQuery (English)
  Subject: [jQuery] Re: [ANNOUNCE] Toaster plugin

  Done, it worked :)

  On Jun 10, 11:54 am, Dan G. Switzer, II [EMAIL PROTECTED]
  wrote:
   I just updated the demo, I added a stack option I had some problem
   calculating the spacing dynamically so I had to add a spacing option
   too..

   There is some behavior that I don't like much, try the following:

   Open 3 sticky toasters, then close the first one and open a new one..

   Not sure how I will fix this yet..

   http://www.haineault.com/media/examples/jquery-ui-toaster/demo/

   You could simplify this code a ton by putting everything inside one
   outer container. The outer container is what you position to top-left,
   top-right, bottom-left, bottom-right, etc.

   You then just either append (top) or prepend (bottom) the toaster
   notification to the container element.

   The cool thing about this, is it will handle all the positioning
   automatically. As one toaster element hides everything should shift
   appropriately. Also, you don't have to worry about calculating where
   to place each individual notification.

   -Dan



  toaster.jpg
 60KViewDownload


[jQuery] class keyup() get id

2008-06-11 Thread iam_peter

hello,

folowing problem:

i have to (or more) textareas look like this

textarea class=comment id=comment1 rows=6 cols=50/
textareabr /
textarea class=comment id=comment2 rows=6 cols=50/
textareabr /

you see the clas of both is comment so i can combine more textareas to
one keyup (later) and the id is different (this is important for
another thing).

i call this function to get the event when keyup on one of the
textareas with the class comment

$(function(){
$('.comment').keyup(function(){
limitChars('comment1,comment2', 20, 'charlimitinfo');
})
});

now my question is: how can i get the id on wich the keyup was done,
f.e. when i type something into textarea id=comment1 then i want to
know the id?

possible solution is this one, but i can not make a class of
textfareas this one is just for 2 and every time i will add a textarea
i have to add a newline of code here:

$(function(){
$('#comment1').keyup(function(){
limitChars('comment1,comment2', 20, 'charlimitinfo');
})
$('#comment2').keyup(function(){
limitChars('comment1,comment2', 20, 'charlimitinfo');
})
});

thanks


[jQuery] Re: Val() and if statement? Possibly just wrong syntax

2008-06-11 Thread Klaus Hartl

You will always enable these inputs with the code you have:

edValues == $(this).val() == this.value

The statement inside the if condition is only executed for edValues ==
university, thus inside

this.value == 'no'

is always false. Maybe that's what is going wrong here?


--Klaus




On 11 Jun., 14:24, Hinch [EMAIL PROTECTED] wrote:
 I'm quite new to jQuery but forms are proving difficult for me. I'm
 trying to make a dynamic select box named 'educType' allow or disallow
 two other form fields depending on the selection. I'm pretty sure it
 is just the 'if' statement being incorrect syntax but I can't find
 examples for it.

 Here is the code I have got below.

 $(document).ready(function() {

 function changeEd(){

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

  if (edValues == university) {
   $(#edcounty, #coluni).attr(disabled, this.value == 'no');
  }

 }

 $(#educType).change(changeEd);
 changeEd();

 });

 I made it following the val() docs and some help from a previous post
 (the code there is now in use elsewhere so thanks!) but this isn't
 working and I give up!


[jQuery] Re: Flecks on some images with jQuery+Cycle Plugin

2008-06-11 Thread Mike Alsup

 Thanks for the comments on the site and for your help Mike.
 Are you by any chance the developer of the plug-in?

 I guess based on your url above we can rule out the plugin for causing
 this problem!

 Some further information on the subject which I will look into but
 doesn't appear to offer a definitive 
 solution:http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3308055SiteID=1

 I will keep you updated with any progress.

 Simon

Very interesting.  Thanks for posting that info, Simon.  So based on
that discussion it does appear that using a black background fixes the
problem:

http://malsup.com/jquery/specs2.html

And this seems to make it all work in a live Cycle environment:

http://malsup.com/jquery/specs3.html

I don't know why, but for some reason you actually *need* the IE
opacity filter to be defined.

Mike


[jQuery] Re: changing value of hidden input

2008-06-11 Thread Klaus Hartl

Changing the value of a hidden input like this works fine for me. Can
you post an example?

--Klaus


On 11 Jun., 12:10, Andri [EMAIL PROTECTED] wrote:
 oops..sorry

 apparently if i use

 div style=display:none
 input type=text name=tes value=something/div

 it's also doesnt work

 On Jun 11, 2:44 pm, Andri [EMAIL PROTECTED] wrote:

  I have this input input type=hidden name=tes value=something

  then when i try to change it with
  $('[EMAIL PROTECTED]').val('change to somethat');

  it doesn't work. if i change the type to 'text' it works. from now on
  i'm just write like this

  div style=display:none
  input type=text name=tes value=something/div

  i just curiuos is there any tricks to change the input, from the
  'hidden' input  not 'text'

  thx before


[jQuery] Re: simple horizontal slide panel - IE7 DOM, Jquery

2008-06-11 Thread two7s_clash

Great, although the HTML needs to be:


body
div id=panelwrapper
div id=panel
p
Phasellus ut libero. Nulla in libero 
non enim tristique
sollicitudin. Ut tempor. Phasellus pellentesque augue eget ante.
Mauris malesuada. Donec sit amet diam sit amet dolor placerat blandit.
Morbi enim purus, imperdiet in, molestie sit amet, pellentesque eu,
mauris. In vel erat vel ipsum bibendum commodo. Curabitur accumsan.
Nam sed metus. Etiam tristique bibendum justo.
/p
/div
 p class=slide
a href=# class=btn-slide# S L I D 
E  nbsp; P A N E L/a
/p
/div
div id=content
p
Lorem ipsum dolor sit amet, consectetuer 
adipiscing elit. In
commodo lorem sed nisl. Aliquam commodo urna non lacus. Cras auctor
sapien sodales massa. Integer et sem. Pellentesque dolor sapien,
lacinia sit amet, imperdiet at, pretium in, neque. Nullam euismod
commodo orci. Aliquam est dolor, scelerisque non, sodales nec, tempor
sit amet, lacus. Nullam ut nisl. Donec congue neque in metus. Proin et
nisi. Praesent porttitor semper purus. Nam velit nulla, vulputate a,
porta quis, dapibus a, purus. Aenean vitae erat a urna bibendum
tincidunt. Nullam tincidunt fermentum elit. Fusce diam. Ut tempor. Sed
sed est sit amet tortor hendrerit pulvinar. Aenean eu pede id lorem
ornare blandit. Duis justo lorem, laoreet quis, ullamcorper ut,
hendrerit non, augue. Morbi malesuada nisi non tortor pulvinar
vulputate.
/p
/div
/body

Thanks for your help1


[jQuery] Re: IE and selectors

2008-06-11 Thread Asgl

Problem solved.
The problem is that IE adds full path to created links (for example,
if I create a link to #contact.2, it becomes 
http://mysite.com/page.php#contact.2).
So the selector was wrong.
Now's fixed :)

On Jun 10, 10:01 pm, Asgl [EMAIL PROTECTED] wrote:
 I've a strange problems with IE (currently, IE6. Don't know IE 7):

 I've got this method:

 function iSMSfixIEHistory()
 {
 var temp;
 $(#log).append(Function calledbr);
 $.each($(a[href^='#']), function() {
 temp = $(this).attr(href).replace(/\#/, 
 stupidIE.php?query=);
 $(this).attr(href,
 'javascript:document.getElementById(stupidIEiframe).setAttribute(src,
 '+temp+')');
 $(#log).append(temp+br);
 });

 }

 It's working correctly in Firefox.
 It works in IE only for elements that weren't created using
 javascript. Let me explain:
 This method has to be executed when the page loads and when new links
 are added dinamically to the page (after a AJAX call). For the first
 ones, it works perfectly, but the second ones aren't found.

 This is how I create new links:
 for(key in use_list)
 {
 list += 'lia href=#contact.' + use_list[key][0] + '' +
 use_list[key][1] + /a/li;
 }

 (then I add list contents to the page using $(#content).html(list) )

 I've made a log:

 This is what looks like in Firefox (and what should be):
 Function called
 stupidIE.php?query=import
 stupidIE.php?query=prefs
 stupidIE.php?query=home
 stupidIE.php?query=contact.3
 stupidIE.php?query=contact.1219
 stupidIE.php?query=contact.1148
 stupidIE.php?query=contact.53
 stupidIE.php?query=contact.29
 stupidIE.php?query=contact.15
 stupidIE.php?query=contact.38
 (etc)

 But this is what happens in IE:
 Function called
 stupidIE.php?query=import
 stupidIE.php?query=prefs
 stupidIE.php?query=home
 Function called

 (the first three were in HTML code)

 Is it a jQuery bug? How could I solve it?

 Thank you


[jQuery] jcarousel : bug patch

2008-06-11 Thread bruno

Hi, i had a little problem with jcarousel.
With firefox, the scroll caused the fisrt slided item to have a width
of 0px a few ms.
so I've putten an animate on the width modification, (wich make Ie
bug) so, there is the code.
ps : Thanks all of you, jquery is so great :)

remove: function(i) {
var e = this.get(i);

// Check if item exists and is not currently visible
if (!e.length || (i = this.first  i = this.last))
return;

var d = this.dimension(e);

if (i  this.first)
this.list.css(this.lt,
$jc.intval(this.list.css(this.lt)) + d + 'px');

if ($.browser.mozilla) {
var width = this.wh;
this.list.animate({width: 
$jc.intval(this.list.css(this.wh)) - d +
'px'}, 50);
e.remove();
} else {
e.remove();
this.list.css(this.wh, 
$jc.intval(this.list.css(this.wh)) - d +
'px');
}




},


[jQuery] Re: class keyup() get id

2008-06-11 Thread Richard D. Worth
$(function(){
  $('.comment').keyup(function(ev){
var textarea = $(this);
var id = textarea.attr('id');
  })
});

The context 'this' in jQuery callbacks is always a DOMElement and always
corresponds to the element to which the event is bound.

You could also get it from ev.target in this case, but they may not always
be the same (if the event has bubbled up to a parent element that has the
bound event). For example

divtextarea/textarea/div

If you bind a keyup to the div, then press a key in the textarea, 'this'
will be the div, event.target will be the textarea.

- Richard

On Wed, Jun 11, 2008 at 8:42 AM, iam_peter [EMAIL PROTECTED] wrote:


 hello,

 folowing problem:

 i have to (or more) textareas look like this

 textarea class=comment id=comment1 rows=6 cols=50/
 textareabr /
 textarea class=comment id=comment2 rows=6 cols=50/
 textareabr /

 you see the clas of both is comment so i can combine more textareas to
 one keyup (later) and the id is different (this is important for
 another thing).

 i call this function to get the event when keyup on one of the
 textareas with the class comment

 $(function(){
$('.comment').keyup(function(){
limitChars('comment1,comment2', 20, 'charlimitinfo');
})
 });

 now my question is: how can i get the id on wich the keyup was done,
 f.e. when i type something into textarea id=comment1 then i want to
 know the id?

 possible solution is this one, but i can not make a class of
 textfareas this one is just for 2 and every time i will add a textarea
 i have to add a newline of code here:

 $(function(){
$('#comment1').keyup(function(){
limitChars('comment1,comment2', 20, 'charlimitinfo');
})
$('#comment2').keyup(function(){
limitChars('comment1,comment2', 20, 'charlimitinfo');
})
 });

 thanks



[jQuery] Re: changing value of hidden input

2008-06-11 Thread Andri

the problem is solved  :D

If u using

input type=hidden name=tes value=something or

div style=display:none
input type=text name=tes value=something/div

the value can't be changed. The solution is using jquery field plugin
(http://www.pengoworks.com/workshop/jquery/field/field.plugin.htm).
instead using val(), using setValue() from this plugin work for me


On Jun 11, 8:08 pm, Klaus Hartl [EMAIL PROTECTED] wrote:
 Changing the value of a hidden input like this works fine for me. Can
 you post an example?

 --Klaus

 On 11 Jun., 12:10, Andri [EMAIL PROTECTED] wrote:

  oops..sorry

  apparently if i use

  div style=display:none
  input type=text name=tes value=something/div

  it's also doesnt work

  On Jun 11, 2:44 pm, Andri [EMAIL PROTECTED] wrote:

   I have this input input type=hidden name=tes value=something

   then when i try to change it with
   $('[EMAIL PROTECTED]').val('change to somethat');

   it doesn't work. if i change the type to 'text' it works. from now on
   i'm just write like this

   div style=display:none
   input type=text name=tes value=something/div

   i just curiuos is there any tricks to change the input, from the
   'hidden' input  not 'text'

   thx before


[jQuery] Re: jQuery UI v1.5 Officially Released

2008-06-11 Thread Adam Greene

Fantastic work folks!  You are going to see your work popping up all
over the web here pretty soon I think.

Adam

--
SweetSpot.dm -- Diabetes Wellness for the Family
http://www.SweetSpot.dm
http://blog.SweetSpot.dm

On Jun 9, 5:04 pm, Richard D. Worth [EMAIL PROTECTED] wrote:
 A quick update. The original zip file (now deprecated):

 http://code.google.com/p/jquery-ui/downloads/detail?name=jquery.ui-1

 had the incorrect version.txt (1.5rc1). This has been updated and a new
 package is available:

 http://code.google.com/p/jquery-ui/downloads/detail?name=jquery.ui-1

 Other than version.txt, these files are identical. Thanks.

 - Richard

 On Mon, Jun 9, 2008 at 1:24 PM, Rey Bango [EMAIL PROTECTED] wrote:

  After 6 long months of hard work, the jQuery UI team is proud to announce
  the immediately availability of the jQuery UI effects and UI library.

  Full details of this awesome release can be found here:

 http://jquery.com/blog/2008/06/09/jquery-ui-v15-released-focus-on-con...

  The official site for the jQuery UI library can be found here:

 http://ui.jquery.com/

  Apart from the awesome UI controls and effects now included, this new
  release also introduces a new killer application called ThemeRoller which
  allows you to build your own themes for jQuery UI components.

  Support will be offered via the jQuery UI mailing list found here:

 http://groups.google.com/group/jquery-ui?hl=en

  Many congrats to the whole UI team for your hard work and dedication.

  NOTE: Due to tremendous interest in this new release, you may experience
  some slowness accessing the jQuery UI site. We are working to correct this
  and ask that you please be patient.

  Rey...


[jQuery] vertical scroll of jcarousel in Mozilla and Safari

2008-06-11 Thread Tal

Hi all,

I tried to use the vertical specification of the JCarousel but for
some reason it doesnt work in Mozilla or Safari.

In IE7 it asks you whether you want to allow active content and as
soon as you allow it, it seems to work fine, most of the time.

Did anyone encounter a problem with the vertical display? and does
anyone know how to solve it?

here is my css files as well as the html file:

[css name=jquery.jcarousel.css]
/**
 * This div element is wrapped by jCarousel around the list
 * and has the classname jcarousel-container.
 */
/*#mycarousel{ display : none; }*/

.jcarousel-container{ position : relative; }

.jcarousel-clip
{
z-index  : 2;
padding  : 0;
margin   : 0px 0px 10px 7px;
#margin  : 0;
overflow : hidden;
position : relative;
float: left;
#float   : none;
width: 365px;
}

.jcarousel-list
{
z-index  : 1;
overflow : hidden;
position : relative;
top  : 0;
left : 0;
margin   : 0;
padding  : 0;
}

.jcarousel-item
{
float : left;
list-style: none;
/* We set the width/height explicitly. No width/height causes
infinite loops. */
width : 144px;
height: 132px;
cursor: pointer;
/*margin-right  : 10px;
#margin-right : 0px;*/
margin-bottom : 5px;
}

/**
 * The buttons are added dynamically by jCarousel before
 * the ul list (inside the div described above) and
 * have the classnames jcarousel-next and jcarousel-prev.
 */
.jcarousel-next
{
/*position   : relative;
float  : right;
margin-top : 27px;*/
z-index: 3;
/*display: none;*/
width  : 34px;
height : 34px;
cursor : pointer;
background : transparent url(../skins/tango/next-vertical.png) no-
repeat 0 0;
}

.jcarousel-prev
{
/*position   : relative;
float  : left;
margin-top : 27px;*/
z-index: 3;
/*display: none;*/
width  : 34px;
height : 34px;
cursor : pointer;
background : transparent url(../skins/tango/prev-vertical.png) no-
repeat 0 0;
}
[/css]

[css name=skin.css] (tango)
.jcarousel-skin-tango.jcarousel-container-horizontal
{
width   : 450px;
padding : 0px;
}

.jcarousel-skin-tango.jcarousel-container-vertical
{
width   : 147px;
height  : 580px;
padding : 40px 0px 40px 0px;
}

.jcarousel-skin-tango.jcarousel-clip-horizontal
{
width  : 365px;
height : 115px;
}

.jcarousel-skin-tango.jcarousel-clip-vertical
{
width  : 147px;
height : 580px;
}

.jcarousel-skin-tango.jcarousel-item
{
width  : 144px;
height : 132px;
}

.jcarousel-skin-tango.jcarousel-item-horizontal{ margin-right :
10px; }

.jcarousel-skin-tango.jcarousel-item-vertical{ margin-bottom : 5px; }

.jcarousel-skin-tango.jcarousel-item-placeholder
{
background : #FF;
color  : #00;
}

/* Horizontal Buttons */
.jcarousel-skin-tango.jcarousel-next-horizontal
{
position   : absolute;
top: 43px;
right  : 5px;
width  : 32px;
height : 32px;
/*cursor : pointer;*/
/*background : transparent url(next-horizontal.png) no-repeat 0
0;*/
}

.jcarousel-skin-tango.jcarousel-next-horizontal:hover{ background-
position : -32px 0; }

.jcarousel-skin-tango.jcarousel-next-horizontal:active{ background-
position : -64px 0; }

.jcarousel-skin-tango.jcarousel-next-disabled-horizontal,
.jcarousel-skin-tango.jcarousel-next-disabled-horizontal:hover,
.jcarousel-skin-tango.jcarousel-next-disabled-horizontal:active
{
cursor  : default;
background-position : -96px 0;
}

.jcarousel-skin-tango.jcarousel-prev-horizontal
{
position   : absolute;
top: 43px;
left   : 5px;
width  : 32px;
height : 32px;
/*cursor : pointer;*/
/*background : transparent url(prev-horizontal.png) no-repeat 0
0;*/
}

.jcarousel-skin-tango.jcarousel-prev-horizontal:hover{ background-
position : -32px 0; }

.jcarousel-skin-tango.jcarousel-prev-horizontal:active{ background-
position : -64px 0; }

.jcarousel-skin-tango.jcarousel-prev-disabled-horizontal,
.jcarousel-skin-tango.jcarousel-prev-disabled-horizontal:hover,
.jcarousel-skin-tango.jcarousel-prev-disabled-horizontal:active
{
cursor  : default;
background-position : -96px 0;
}

/* Vertical Buttons */
.jcarousel-skin-tango.jcarousel-next-vertical
{
position   : absolute;
bottom : 5px;
left   : 53px;
width  : 32px;
height : 32px;
/*cursor : pointer;
background : transparent url(next-vertical.png) no-repeat 0 0;*/
}

.jcarousel-skin-tango.jcarousel-next-vertical:hover{ background-
position : 0 -32px; }

.jcarousel-skin-tango.jcarousel-next-vertical:active{ background-
position : 0 -64px; }

.jcarousel-skin-tango.jcarousel-next-disabled-vertical,
.jcarousel-skin-tango.jcarousel-next-disabled-vertical:hover,
.jcarousel-skin-tango.jcarousel-next-disabled-vertical:active
{

[jQuery] .load Ajax et Jtip ou ClueTip

2008-06-11 Thread Discret

Bonjour,

J'utilise .load pour charger l'id d'une page dans l'id d'une autre
page.

http://docs.jquery.com/Ajax/load

code

 script
  $(document).ready(function(){
  $(a.article).click( function (){
  $(#feeds).load(Pagedarticle.aspx #conteneur);})
  });
  /script



ul
lia href=# class=articleCharge la page et l'id conteneur dans
l'id feeds/a/li
/ul

div id=feeds/div

/code

Ok c'est rudimentaire mais ça marche, je souhaiterais pouvoir faire de
même avec un Plugin comme [Jtip-http://www.codylindley.com/blogstuff/
js/jtip/]., [Cluetip-http://plugins.learningjquery.com/cluetip/demo/]
ou autre.
C'est à dire charger l'élément id d'une page externe dans le div façon
Jtip au passage de la souris sur un lien ?

Auriez vous une idée pour m'aider ?

Merci

Discret


[jQuery] Re: class keyup() get id

2008-06-11 Thread iam_peter

thanks, this is the way out.


[jQuery] Is $(this) the first child?

2008-06-11 Thread warren.wessels

Hello,

I've just started using JQuery, and had a quick question that I don't
seem to be able to answer by reading the 1.2 API documentation.

I have a DOM snippet like:

ul
 lisomething/li
 lianother thing/li
 lia third/li
 lia final thing/li
/ul

And on mouseover, using the $(li).mouseover event, I am adding a
class to the li using $(this).addClass(...).  However, I don't want to
add the class if the li under the mouse is the first li in the ul...
The predicate:

 if( $(this).prev() ) { ... }

doesn't seem to work as I'd expect (i.e. if this has a previous
sibling), and neither does

 if( $(this).is(ul li:first) ) { ... }
or
 if( $(this).is(ul li:eq(0)) ) { ... }
or
 if( $(this).is($(this).parent().children()[0] ) { ... }

Can anyone give me some pointers on how to detect that the element
selected is in a certain position in the sibling chain?

Thank you!

Warren


[jQuery] Re: .load Ajax et Jtip ou ClueTip

2008-06-11 Thread Discret

I'm using .Load to load the id of a page in another id page.
http://docs.jquery.com/Ajax/load


code


 script
  $(document).ready(function(){
  $(a.article).click( function (){
  $(#feeds).load(Pagedarticle.aspx #conteneur);})
  });
  /script


ul
lia href=# class=articleCharge la page et l'id conteneur dans
l'id feeds/a/li
/ul


div id=feeds/div


/code

Ok is rudimentary but it works, I would like to be able to make even
with a Plugin as Jtip orCluetip
This means the load factor id of an external way in the div Jtip the
passage of the mouse over a link?


Would you an idea to help me?


Thank you


Discreet






[jQuery] Re: Tablesorter + Pager + AJAX = Problem

2008-06-11 Thread whistlerny

I delved into the pager code which is clear and highly readable and
probably should have been my first and last resort after not being
able to see a solution online.

Anyway

$(config.cssFirst,pager).unbind();
$(config.cssNext,pager).unbind();
$(config.cssPrev,pager).unbind();
$(config.cssLast,pager).unbind();

in the this.construct section of pager should do the trick. Just
unbind all the events. Or do it recursively in the callback from your
form plugin (my lack of jQfu did not allow for that but i know it has
to be a possibility)

Enjoy


On Jun 10, 12:00 pm, whistlerny [EMAIL PROTECTED] wrote:
 Hi, I'm using the form plugin to allow users to select a few search
 criteria, my app spits back new table rows which are 
 inserted.Tablesorterhandles this perfectly (with or without calling the update
 function mind you). My problem is thepagerplugin. I've chained on
 thepager, as you can see below in the trigger_update function.

 This causes the Prev/Next arrows to skip TWO pages instead of one. If
 I perform another search, then I jump forward or back THREE pages
 instead of one. It seems clear that a variable is incrementing that
 shouldn't be.

 Anyone have suggestions?

         script type=text/javascript
           $(document).ready(function(){
                 var options = {
                     target: '#results',
                         success: trigger_update
                 };
                 $('#search_form').ajaxForm(options);
         $(#results_table).tablesorter({widgets:
 ['zebra']}).tablesorterPager({container: $(#pager)});
           });
           function trigger_update() {
                 
 $(#results_table).trigger(update).tablesorterPager({container: $
 (#pager)});
           }
         /script


[jQuery] Re: .load Ajax et Jtip ou ClueTip

2008-06-11 Thread Discret

J'utilise .load pour charger l'id d'une page dans l'id d'une autre
page.

I'm using .Load to load the id of a page in another id page.

http://docs.jquery.com/Ajax/load


code


 script
  $(document).ready(function(){
  $(a.article).click( function (){
  $(#feeds).load(Pagedarticle.aspx #conteneur);})
  });
  /script


ul
lia href=# class=articleCharge la page et l'id conteneur dans
l'id feeds/a/li
/ul


div id=feeds/div


/code



Ok is rudimentary but it works, I would like to be able to make
even with a Plugin as Jtip or Cluetip or otherwise.

This means the load factor id of an external way in the div
Jtip the passage of the mouse over a link?

Would you an idea to help me?

Thank you


Discret



[jQuery] jCarousel :: no width/height set... error on window resize

2008-06-11 Thread V.Perepadya

Hello,

jCarousel 0.2.3, jQuery 1.2.6, FF 2.0.0.14 / IE6.0 (xpsp2)
Error message box appears on browser window resize or internal area
resize (for ex. FireBug panel show/hide).
jCarousel css has following strings to prevent error, but it seems not
works
.jcarousel-item {
float: left;
list-style: none;
/* We set the width/height explicitly. No width/height causes
infinite loops. */
width: 75px;
height: 100px;
}

What should be changed to fix this?


[jQuery] DOM traversal -- need both parent node and siblings

2008-06-11 Thread Kevin Major

Hello everyone,

I'm currently in a bit of a bind.  I have a checkbox that's within a
table cell.  I want it so when the input is clicked, the parent table
cell AND its siblings change their classes.  I can get to the parent
element, but how would I attach this functionality to its siblings?

Right now, I have:

$(document.forms[Grid].elements[grid[]]).toggle(function()
{
   $(this).parent().addClass(active);
},
function()
{
   $(this).parent().addClass(inactive);
});

(I'm not using toggleClass because I have formatting within the
inactive class that's different than some of the other elements)

Would adding something like:

.end().siblings().addClass(active);

To the end of my statements remedy the issue?


[jQuery] Re: treeview async - callback on completion? (or some other way to do temporary loading... text)

2008-06-11 Thread rolfsf

Max,
The animation, obviously, is just a an icon that, if I remember
correctly, was set up as a css background image for li.placeholder.
The script then adds the .placeholder class to unloaded branches, and
removes the class when they load.
That's from memory, so I could be wrong...

rolf


On Jun 11, 4:50 am, Max Williams (Brighton)
[EMAIL PROTECTED] wrote:
 I actually just solved this, not with some animation but with some
 text:  i modified the jquery.treeview.async.js file to send a custom
 event after the $.getJSON block (line 44):

 jQuery(document).trigger('treeviewLoaded');

 Then in my javascript code that calls the tree i add the text to the
 tree ul and then hide it when the above event occurs:

      //add some loading text:
      jQuery(#prop-tree).append(p id='loading-text'loading.../
 p);

      //set up call for the property tree, to get new branches as json
 when tree is expanded
       jQuery(#prop-tree).treeview({
         url: /tree/children?for=%= tree_name %random=%=
 rand(10)%%= extra_params.collect{|k,v| '' + k.to_s + '=' +
 v.to_s}.join('')%
       });

       //hide the loading text once the tree has loaded
       jQuery(document).bind('treeviewLoaded', function() {
         jQuery(#loading-text).hide();
       });

 It's not ideal as it's called every time a branch loads whereas it
 really only needs to be called the first time.  And it feels a bit
 dirty.  I'd still like to know how the animation works. :)

 thanks
 max

 On Jun 11, 10:29 am, Max Williams (Brighton)

 [EMAIL PROTECTED] wrote:
  Hi rolf

  yeah, that would do fine actually - i missed that.  Do you know how
  that is generated?

  thanks
  max

  On Jun 10, 5:41 pm, rolfsf [EMAIL PROTECTED] wrote:

   If you look at the async 
   demo:http://dev.jquery.com/view/trunk/plugins/treeview/demo/async.html

   in the first tree, click on item 3, and then on item 3.6 - you'll see
   a loading icon for a few seconds, then the branch will load. Is that
   what you're looking for?

   rolf

   On Jun 10, 9:10 am, Max Williams (Brighton)

   [EMAIL PROTECTED] wrote:
I'm using the async version of the treeview plugin to deal with a
rather large tree.  When the user first loads it there's nothing
there, and quite a delay before the main set of branches loads, and
i'd like to have some 'loading...' text there.

How can i get the treeview to signal when it's finished loading the
json, so i can remove the text?  Is there a simpler way to have some
loading... text displayed so that it will disappear when the tree
loads?

thanks
max


[jQuery] Re: Unbinding event for specific element after binding for entire document

2008-06-11 Thread Ariel Flesler

Hi

No, I mean that if you call bind() on the document, you only add the
event handler to the document. Not to every element in it.
The reason it reacts to a click everywhere is event bubbling (google
it).

I said that you should bind to the document, and then, inside the
function, figure out whether the clicked element is a textarea and if
it's not... then do w/e you need to do.

$(document).bind('click', function(e){
   if( e.target.nodeName == 'TEXTAREA' )
 return;
   // do stuff
});

Cheers

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

On 11 jun, 04:51, nandu [EMAIL PROTECTED] wrote:
 On Jun 10, 11:21 pm, Ariel Flesler [EMAIL PROTECTED] wrote:

  When you bind the document, you just bind the document, not all its
  elements. So you can't unbind afterwards.

  You need to use conditions (.is() to skip clicks on textareas from
  that handler.

  if( this.nodeName == 'TEXTAREA' ) // or $(this).is('textarea')
      return;

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

 Dear Ariel,

 Thank you for your reply but I do not quite understand. Do you mean to
 say that I can skip the click handler on selected elements
 while it is bound to the entire document because I cannot see anyway
 to do that.

 Alternatively do you mean that I should find every single element on
 the document and then bind the click handler to each one skipping
 textareas.

 Could you please enlighten me because I still feel a bit lost.

 Thanks,

 Nandu


[jQuery] [Tooltip] Display relative to element

2008-06-11 Thread Henry

It looks lie the tooltip plugin will display relative to the mouse,
but is there a way to have it displayed relative to the element that
you hover over and set x-y coordinates from it.  For example, I would
like to always display the tooltip with x coordinate of 15 and y-
coordinate of -15 relative to a link.

Thanks for your help


[jQuery] Re: $.map flattens results

2008-06-11 Thread Ariel Flesler

$.map is used a lot internally for everything. By the selectors
module, the manipulation/traversing methods, etc.
This was the desired functionality in order to simplify its internal
duties.

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

On 11 jun, 07:19, Marc Galera [EMAIL PROTECTED] wrote:
 Hi.

 I've recently been surprised with $.map. I've found that it flattens
 the result so I can't return an array in the callback. For example, on
 this code:

 $.map([1, 2, 3], function(n) {
    return [n, 'xxx'];

 });

 I get:

 [1, xxx, 2, xxx, 3, xxx]

 Instead of what I expected:

 [[1, xxx], [2, xxx], [3, xxx]]

 Looking on the source code is obvious that this is made on purpose,
 and there are workarounds, but I was curious on why this is happening.

 Marc.


[jQuery] Re: Is $(this) the first child?

2008-06-11 Thread Ariel Flesler

use:

if( $(this).prev()[0] )

or

if( $(this).prev().length )

or

if( !$(this).is('first-child') )

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

On 11 jun, 11:58, warren.wessels [EMAIL PROTECTED] wrote:
 Hello,

 I've just started using JQuery, and had a quick question that I don't
 seem to be able to answer by reading the 1.2 API documentation.

 I have a DOM snippet like:

 ul
  lisomething/li
  lianother thing/li
  lia third/li
  lia final thing/li
 /ul

 And on mouseover, using the $(li).mouseover event, I am adding a
 class to the li using $(this).addClass(...).  However, I don't want to
 add the class if the li under the mouse is the first li in the ul...
 The predicate:

  if( $(this).prev() ) { ... }

 doesn't seem to work as I'd expect (i.e. if this has a previous
 sibling), and neither does

  if( $(this).is(ul li:first) ) { ... }
 or
  if( $(this).is(ul li:eq(0)) ) { ... }
 or
  if( $(this).is($(this).parent().children()[0] ) { ... }

 Can anyone give me some pointers on how to detect that the element
 selected is in a certain position in the sibling chain?

 Thank you!

 Warren


[jQuery] Re: Is $(this) the first child?

2008-06-11 Thread a.roland

There are several methods ..just to mention three:

== 1 ==
$('ul li:first ~ li').mouseover(function(){
$(this).addClass('red');
});

== 2  ==
$('ul li:not(:first)').mouseover(function(){
$(this).addClass('yellow');
});

== 3 ==
just give the concerning element a class you can check like:
ul
 li class=firstsomething/li
 lianother thing/li
 lia third/li
 lia final thing/li
/ul

$('ul li').mouseover(function(){
if(!$(this).hasClass('first'))
{
$(this).addClass('green');
}
});


[jQuery] Re: jCarousel :: no width/height set... error on window resize

2008-06-11 Thread V.Perepadya

Hi again,

regarding the problem and author notices in parallel thread we can use
following fix

if (!this.options.isFixedSize) /* +++  */
$(window).unbind('resize', this.funcResize).bind('resize',
this.funcResize);

and use isFixedSize option to control jCarousel behaviour.


[jQuery] Finding the next element

2008-06-11 Thread yo2lux

I have more table row:

tr
   tddiv class=clickhereclick/div/td
/tr

tr  // I need to get this
   td1/td
   td2/td
   td3/td
/tr
tr
   td4/td
   td5/td
   td6/td
/tr

I set a click event listener on div inside td (first table row). The
other table rows don't act as an event listener. I need to obtain the
second table row after click. What I need to do ?

Thanks


[jQuery] Re: Finding the next element

2008-06-11 Thread Nathaniel Whiteinge

On Jun 11, 10:57 am, yo2lux [EMAIL PROTECTED] wrote:
 I set a click event listener on div inside td (first table row). The
 other table rows don't act as an event listener. I need to obtain the
 second table row after click. What I need to do ?

Something like the following should do it (untested)::

...click(function(){
$(this).parents('tr').next();
// or if that doesn't work
// $(this).parents('td').parent('tr').next();
});

I find the Firebug console is invaluable when trying to follow jQuery
selectors around the DOM. If you're not familiar with the console,
John Resig has a (fun) screencast [1] that show how to do it.

.. [1] http://ejohn.org/blog/hacking-digg-with-firebug-and-jquery/


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

2008-06-11 Thread Doug D

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 +new Date;
}


Is it the same as the following?

function now(){
return new Date();
}



[jQuery] Re: Weird Firefox error related to switching to jQuery

2008-06-11 Thread kghastie

So clearing the session via the Tools menu did not make the issue go
away for me, but restarting the browser WITHOUT restoring the session
seems to have done the trick.

On May 14, 2:58 am, Eric Ongerth [EMAIL PROTECTED] wrote:
 I'm busily switching all my page templates from Prototype to jQuery.
 I'm getting the following error I never saw before (seen via Firebug)
 on a page that has been entirely changed over to jQuery, with
 prototype all gone and no longer included/loaded.

 [Exception... Component is not available nsresult: 0x80040111
 (NS_ERROR_NOT_AVAILABLE) location: JS frame ::
 file:///H:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
 :: sss_saveState :: line 1753 data: no]
 [Break on this error] oState.session = { state: ((this._loadState ==
 STATE_RUNNING) ? STATE_RUNNIN...

 What could be causing this?  Is it just a Firefox bug?  (FF 2.0.0.14
 on winXP)

 I've seen only one component is not available error similar to this
 one (though not the identical error) before and it disappeared when I
 fixed a separate javascript error due to some mistake I had made.  But
 this time is not so easy because I have no other errors on this
 particular page that I'm aware of and it is otherwise working.

 Eric


[jQuery] Re: Expanding/collapsing tails of lists

2008-06-11 Thread EdMartin

Well, I solved it to my client's satisfaction.

It turns out that disappearing bullets were a side-effect of the fact
that they weren't genuine bullets. We're using graphical bullets
provided as background images to list-style-type:none unordered lists.
So I was able to get a handle on the almost independent bullet action
on IE6 and the disappearing bullets on FF by separating out my
treatment of slideUp and slideDown and in the latter case making using
of a callback function to reinstate the background images.

It's not the prettiest thing you ever saw, but it works on FF, IE67
and Opera 9.27. If you're interested, please take a look at

http://www.gogsat.com/Testimonials.htm

Ed

On Jun 10, 9:45 pm, EdMartin [EMAIL PROTECTED] wrote:
 I'm probably going about this all wrong. So I'm hopeful that sharper
 minds than mine can set me straight.

 I have a bunch of bulleted lists on a page. I want them to be
 displayed initially so that only the first two items of any list with
 more than two items are shown, with the remainder being replaced by a
 clickable link that will expand (and subsequently collapse) the
 remainder of that list.

 Here's what I have:

 CSS:
 style type=text/css
         li.more { cursor:pointer;display:none;list-style-type:none; }
         li.more:hover { text-decoration:underline; }
 /style

 JS:
 script type=text/javascript
 function initCollapse()
 {
         $( ul ).each(
                 function ()
                 {
                         var tailItems = $( li:not(.more):gt(1), this );
                         if ( tailItems.length  0 )
                         {
                                 tailItems.hide();
                                 $(this).find( .more ).show();
                         }
                 } );
         $( .more ).click(
                 function()
                 {
                         $(this).siblings( li:gt(1) ).slideToggle( slow );
                         if ( $(this).text().indexOf( More )  0 )
                                 $(this).text( More );
                         else
                                 $(this).text( Less );
                 } );

 }

 $(document).ready( function() { initCollapse(); } );
 /script

 HTML:
 ul
  liitem 00/li
  liitem 01/li
  li class=moreMore/li
 /ul
 ul
  liitem 10/li
  liitem 11/li
  liitem 12/li
  liitem 13/li
  !-- and so on --
  li class=moreMore/li
 /ul

 !-- and so on --

 In general terms, this does the job, but it's not pretty.

 On IE6 (WinXP), when expanding the additional bullets show first and
 then the item contents slide into view; and when collapsing the item
 contents slide up leaving a vertical line of bullets which then
 disappear.

 On FF3RC2 (WinXP), the item contents slide up and down as required
 (although when there's a large number of items, it's a bit of a mad
 scramble). BUT the bullets corresponding to those additional items are
 NOT displayed!

 Any suggestions that would both achieve the desired effect in a
 prettier and more cross-browser fashion would be greatly appreciated.

 Ed


[jQuery] Question: select/option to open a new webpage, howto?

2008-06-11 Thread [EMAIL PROTECTED]

Hi, folks:

I am trying to use select/option to open a new window and whenever I
click an item from the selection dropdown list... for example, the
following sample:

select name=test
  option value=/link/to/v1value-1/option
  option value=/link/to/v2value-2/option
  option value=/link/to/v3value-3/option
  option value=/link/to/v4value-4/option
/select

when I select value-3, a new window will be opened, and the content is
pointed to http://mysite.com/link/to/v3;. just like a href=/link/to/
v3 target=_blankvalue-3/a

How to handle this with jQuery?

I can do:

script type=text/javascript
  $('select[name=test] option').each(function(i) {
  $(this).click(function(){
  /* how to open a new link $(this).val() */
  });
  });
/script

many thanks,

lihao


[jQuery] Re: Is $(this) the first child?

2008-06-11 Thread warren.wessels

Worked like a charm... thank you, Ariel!
-Warren

On Jun 11, 9:04 am, Ariel Flesler [EMAIL PROTECTED] wrote:
 use:

 if( $(this).prev()[0] )

 or

 if( $(this).prev().length )

 or

 if( !$(this).is('first-child') )

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

 On 11 jun, 11:58, warren.wessels [EMAIL PROTECTED] wrote:

  Hello,

  I've just started using JQuery, and had a quick question that I don't
  seem to be able to answer by reading the 1.2 API documentation.

  I have a DOM snippet like:

  ul
   lisomething/li
   lianother thing/li
   lia third/li
   lia final thing/li
  /ul

  And on mouseover, using the $(li).mouseover event, I am adding a
  class to the li using $(this).addClass(...).  However, I don't want to
  add the class if the li under the mouse is the first li in the ul...
  The predicate:

   if( $(this).prev() ) { ... }

  doesn't seem to work as I'd expect (i.e. if this has a previous
  sibling), and neither does

   if( $(this).is(ul li:first) ) { ... }
  or
   if( $(this).is(ul li:eq(0)) ) { ... }
  or
   if( $(this).is($(this).parent().children()[0] ) { ... }

  Can anyone give me some pointers on how to detect that the element
  selected is in a certain position in the sibling chain?

  Thank you!

  Warren


[jQuery] Re: Is $(this) the first child?

2008-06-11 Thread warren.wessels

Thanks, these are great, too!
-w

On Jun 11, 8:58 am, a.roland [EMAIL PROTECTED] wrote:
 There are several methods ..just to mention three:

 == 1 ==
 $('ul li:first ~ li').mouseover(function(){
 $(this).addClass('red');
 });

 == 2  ==
 $('ul li:not(:first)').mouseover(function(){
 $(this).addClass('yellow');
 });

 == 3 ==
 just give the concerning element a class you can check like:
 ul
  li class=firstsomething/li
  lianother thing/li
  lia third/li
  lia final thing/li
 /ul
 
 $('ul li').mouseover(function(){
 if(!$(this).hasClass('first'))
 {
 $(this).addClass('green');
 }
 });


[jQuery] Re: DOM traversal -- need both parent node and siblings

2008-06-11 Thread Happy

No need for the .end() there.  Plus you can use .andSelf() to include
the first td and then run the addClass command just once.

function()
{
  $(this).parent().siblings().andSelf().addClass(inactive);
}


should do it.


On Jun 11, 10:26 am, Kevin Major [EMAIL PROTECTED] wrote:
 Hello everyone,

 I'm currently in a bit of a bind.  I have a checkbox that's within a
 table cell.  I want it so when the input is clicked, the parent table
 cell AND its siblings change their classes.  I can get to the parent
 element, but how would I attach this functionality to its siblings?

 Right now, I have:

 $(document.forms[Grid].elements[grid[]]).toggle(function()
 {
$(this).parent().addClass(active);},

 function()
 {
$(this).parent().addClass(inactive);

 });

 (I'm not using toggleClass because I have formatting within the
 inactive class that's different than some of the other elements)

 Would adding something like:

 .end().siblings().addClass(active);

 To the end of my statements remedy the issue?


[jQuery] Re: jScrollPane - White space at bottom of scrolling div

2008-06-11 Thread hubbs

Anyone?

On Jun 10, 9:51 am, hubbs [EMAIL PROTECTED] wrote:
 I am using jScrollPane to have a scrollable calendar.  It is made up
 of list items, and the height of each list item depends on how long
 the name of the calendar event is, so I cannot define a height for
 each list item.  This seems to cause a problem for jScrollPane, and it
 leaves a large amount of white space at the bottom of my scrolling
 div, which makes it look bad.  Giving the list items a specific height
 removes this problem.

 This is strange, because some of the examples on the jScrollPane site
 don't have a height.  Any help on this would be appreciated, as I am
 confused at why this is happening!


[jQuery] Re: datepicker setDate

2008-06-11 Thread mark

On Mon, Jun 9, 2008 at 4:20 AM, andrea varnier [EMAIL PROTECTED] wrote:

 On 8 Giu, 05:36, mark [EMAIL PROTECTED] wrote:
 but if i do this

  $('#date').datepicker(setDate, new Date ( January 6, 1972 ));

 try adding curly braces, to define an object, like this:

 $('#date').datepicker({defaultDate: new Date ( January 6, 1972 )});
that did the trick! thanks


[jQuery] load pre-rendered html

2008-06-11 Thread mark

hi
i want to have a set of pre-rendered html loaded into a div dynamically..
the .load() function gets it from a remote url. is it possible to load
from a javascript variable/ that is pre-rendered in to the current
html somehow?
thanks


[jQuery] Re: validate works in firefox 3, but not in IE 7

2008-06-11 Thread mark

OK, thanks.. that fixed the problem!!!

On Mon, Jun 9, 2008 at 2:40 PM, Jörn Zaefferer
[EMAIL PROTECTED] wrote:

 You've got a trailing comma error, see eg.
 http://www.pluralsight.com/blogs/fritz/archive/2007/06/19/47771.aspx

 Jörn

 On Sun, Jun 8, 2008 at 1:57 AM, mark [EMAIL PROTECTED] wrote:

 i meant validation does not work. form gets submitted even if the
 input fields are not valid and empty in IE7, but it works in firefox 3
 and 2...

 On Sat, Jun 7, 2008 at 4:54 PM, mark [EMAIL PROTECTED] wrote:
 hi,
 i have a simple form with validation that works really well in
 firefox3 / 2 but not in IE7.
 this is the html, how to debug or find what is wrong??
 thanks


 !doctype html public -//W3C//DTD HTML 4.01//EN
 http://www.w3.org/TR/html4/strict.dtd;
 html
 head

 title
 title
 /title
 script type=text/javascript
 src=http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js;/script
 script type=text/javascript 
 src=/static/jquery.validate.pack.js/script
  script type=text/javascript
$(document).ready(function(){

$(#signup).validate({
rules: {
username: required,
password: required,
email: {
   required:true,
   email:true,
}
},
messages: {
username: Please enter username,
password: Please enter password,
email: Please enter valid email address,
}
});
});
  /script

 /head
 body
  form id=signup action=/signup method=post
 enctype=multipart/form-data
  table
tbody
  tr
td Username /tdtd  input type=text size=16
 name=username value=  /  /td
  /tr
  tr
td New Password   /tdtd input type=password size=16
 name=password value= / /td
  /tr
  tr
td Email /tdtd input type=text size=16 name=email
 value= / /td
  /tr
  tr
td/tdtd  input type=submit style=font-size:2em;
 value=DONE //td

  /tr

/tbody
  /table
 /form

 /body
 /html





[jQuery] Advice on link usage (functions, livequery?)

2008-06-11 Thread [EMAIL PROTECTED]

Hi, I'm not very good with javascript, but here goes! Title might be
somewhat weird...


I'm building a map like thing and need some advice on how the links to
cities - mainly how to navigate the map - should be.



I'm currently just assigning the link via an ID like this;

a id=berlin class=move href=#To Berlin/a

This is inside an ajax loaded area, som I'm also using livequery to
make this work;

$('#map a.move').livequery('click', function(event) {
var whatarea = this.id;
$.ajax({
url: 'map.php',
data: { area: whatarea },
success: function(msg) {
$('#map').html(msg);
}
});
return false;
});


This works, but I'd like to pass on some more variables, not just
id=berlin.


I've tried with something like

function moveMap(whatarea,extravar,anothervar) {
// same ajax call as above
}

But then I'd have to use links like;

a href=javascript:moveMap('berlin','extra','somethingmore');To
Berlin/a


I really prefer the other way, and I don't really want the links to be
visible. I'd rather have it hidden, even if it's no important data.
Are there any disadvantages using the the above alternative? When
using livequery, I probably slows down a bit as it has to go through
the data (I think). But the above one? And is it possible to like,
make the links more subtle like with the ID-way?

Or do you recommend any other ways?

Thanks in advance =)


[jQuery] ajax delay to triggering callback

2008-06-11 Thread Pellow

Hi,

I think a cool feature for the jquery ajax functions would be to
specify a delay in milliseconds.

So that when the ajax response is received, jquery checks this timer
and waits before triggering the callback.

Why?

Because with ajax it is very common for people to use Loading...
messages or animated gifs.
In the event that the ajax response is really fast, this can lead to
the messages flickering in and out on the website / UI.

I believe that it can be annoying to the user to see messages
appearing and disappearing really fast. Perhaps the user wonders what
the message actually said.

I think it's better usability to actually force a delay of atleast 2
seconds, so the Loading.. message has a chance to register on the
users brain, rather than appearing and disappearing in an annoying
fashion before they can lock on to it.

Right now i'm coding this in myself where appropriate but I think it
would be a logical addition to the core because ajax and please wait
messages go hand in hand, and thus this feature is something
continually needed.


[jQuery] children().text problem on IE

2008-06-11 Thread Shaun

I have a line of jQuery that works fine for FF and Opera, but fails in
IE with the error 'Unexpected call to method or property access'

The specific line it chokes on is (similar to) this:
$('#Layer-3').children().text( 'some text' );

The exact line is line 93 of this page: 
http://psd2cssonline.com/tutorials/tooltips/index.html

It's strange because IE will allow me to do other things (css(...) for
example) over the children selector, just not text(...) or html(...).

What am I missing?
Thanks.

--
Shaun
[EMAIL PROTECTED]


[jQuery] Re: jScrollPane - White space at bottom of scrolling div

2008-06-11 Thread hubbs

I figured it out.  I was converting an ISO date after the scrollers
were added, so the height was calculated with the long iso date,
making the div higher.  So, moving the convert date script before
jScrollPane worked!

On Jun 11, 12:20 pm, hubbs [EMAIL PROTECTED] wrote:
 Anyone?

 On Jun 10, 9:51 am, hubbs [EMAIL PROTECTED] wrote:

  I am using jScrollPane to have a scrollable calendar.  It is made up
  of list items, and the height of each list item depends on how long
  the name of the calendar event is, so I cannot define a height for
  each list item.  This seems to cause a problem for jScrollPane, and it
  leaves a large amount of white space at the bottom of my scrolling
  div, which makes it look bad.  Giving the list items a specific height
  removes this problem.

  This is strange, because some of the examples on the jScrollPane site
  don't have a height.  Any help on this would be appreciated, as I am
  confused at why this is happening!


[jQuery] Superfish hover question

2008-06-11 Thread maine_pointe

Thanks for a really excellent plugin, Joel.  I've got it working just
great, with one small hitch.  In your example of a horizontally
aligned navbar with submenus, when one of the main navigation tabs is
hovered over, the background of the tab changes, and becomes the only
highlighted tab.  On my menu, the background of the tab does change,
but the background of the current pages tab remains constant.

You can see the page here, and notice that the home tab background
never changes, which it does in your example:

http://quarry.dougfelton.com/

Any suggestions would be greatly appreciated!  And thanks again for a
really nice plugin.


[jQuery] innerfade uses the UI 1.5 with Jq 1.2.6 problem

2008-06-11 Thread pedramphp

In would like to use some of the UI effects in my Innerfade Plugin I
did as below ...
but how could  I manually Edit the Innerfade Plugin to add an Effect
to it...
I've checked it with slideLeft effect
please help me on this


head
script type=text/JavaScript src=jquery.js/script
script type=text/JavaScript src=effects.core.js/script
script type=text/JavaScript src=effects.slide.js/script
script type=text/JavaScript src=innerfade.js/script
/head
body
div id=slideRight
  !-- SOME dATA --
/div

script
 // EXAMPLE ONE WORKS
  effect(#slideRight, slide, { direction: right });
  // this Works



  // EXAMPLE 2 DOSN'T WORK
$(#slideRight).innerfade({
  animationtype: slideRight,
  speed: 1300,
  timeout: WaitProd,
  type: 'sequence',
  containerheight: CntHeight+'px'
  });


/script


/body




  /*-- Part of  INNERFADE.JS   PLUGIN
  WE WANT TO USE THE EFFECT IN THIS PLUGIN
  ..
  
  .
$.innerfade.next = function(elements, settings, current, last) {
if (settings.animationtype == 'slide') {
$(elements[last]).slideUp(settings.speed);
$(elements[current]).slideDown(settings.speed);
} else if (settings.animationtype == 'fade') {
$(elements[last]).fadeOut(settings.speed);
$(elements[current]).fadeIn(settings.speed, function() {
removeFilter($(this)[0]);
});
}else if (settings.animationtype == 'slideRight') {
   effect(elements[last], slide, { direction: right });
   effect(elements[last], slide, { direction: left });

} else
alert('Innerfade-animationtype must either be \'slide\' or
\'fade\'');


.
.
...
--*/


[jQuery] jquery lightbox - balupton question

2008-06-11 Thread Matt

Hi guys,
I'm trying to add lightbox to my page, and i needed to change the
default directories because our static files can't fall directly under
our jsp/html files(it's a deploy thing). I changed my lightbox.js to
match the baseurl:

baseurl:'',

files: {
// If you are doing a repack with packer 
(http://dean.edwards.name/
packer/) then append .packed onto the js and css files before you
pack it.
js: {
lightbox:   
'javascript/curator/edit/jquery.lightbox.js'
},
css: {
lightbox:   
'css/curator/edit/jquery.lightbox.css'
},
images: {
prev:   
'images/curator/edit/lightbox/prev.gif',
next:   
'images/curator/edit/lightbox/next.gif',
blank:  
'images/curator/edit/lightbox/blank.gif',
loading:
'images/curator/edit/lightbox/loading.gif'
}
},

and I pass in the baseurl in my jsp:

script type=text/javascript src=/kb/javascript/curator/edit/
jquery.lightbox.js?baseurl=https://brilthor.ucsd.edu/kb/;/script

the behavior i'm seeing right now is the image is loading as if there
were no lightbox plugin at all, just a normal link.

i have only one image on the page, and i create the following tag for
it:

a rel=lightbox href=/kb/ark/20775/bb9796118z/1-3.jpg title=Test
Title!!!
img width=80 height=80 src=/arkcache/bb/97/96/11/8z/1-2.jpg/
/a

does anything look particularly wrong with my config? I'm kind of
drawing a blank at this point. i've gotten lightbox to work before,
but i've never tried altering the standard static file directory paths
in the lightbox.js file. Any help or advice would be great. thanks!



[jQuery] highlight and fade a row

2008-06-11 Thread rolfsf

I want to highlight some rows with a background color, then fade back
to original background color after 10 seconds. I've seen various
solutions (using the jquery.color.js plugin), but the issue I'm
stumbling on is that the rows in the table could have various
background colors or no background color (transparent) depending on
other factors (row striping, other event-based highlighting). By
default, they're transparent.

How do I determine the original background color setting, and return
it to that? Other than the default transparent, these colors are
typically set via a class (or multiple classes) on the TR

suggestions? Thanks!

rolf


[jQuery] Re: ajax delay to triggering callback

2008-06-11 Thread Hamish Campbell

That's not a bad idea. Maybe more suitable for a plugin than in the
core though.

I guess there are a couple of issues:

First of all, it might be tricky setting up a timed callback to an
annonymous function. You'd probably have to restrict it to named
callbacks.

Secondly, to do it right you'd probably need some kind of queue
management to prevent timeouts conflicting and making the problem even
worse (ie, user clicks several buttons in quick succession, loading
images trying to take precedence but ajax responses loading as they
arrive etc).

I guess the point is, you _could_ make it very rough and ready without
adding a lot of cruft, but it really needs to be user/programmer
friendly if it's going to part of the core functionality - and that
means bulk.

How are you doing it exactly? If you've already written the code you
should wrap it in a plugin and release it. :-)


On Jun 12, 7:12 am, Pellow [EMAIL PROTECTED] wrote:
 Hi,

 I think a cool feature for the jquery ajax functions would be to
 specify a delay in milliseconds.

 So that when the ajax response is received, jquery checks this timer
 and waits before triggering the callback.

 Why?

 Because with ajax it is very common for people to use Loading...
 messages or animated gifs.
 In the event that the ajax response is really fast, this can lead to
 the messages flickering in and out on the website / UI.

 I believe that it can be annoying to the user to see messages
 appearing and disappearing really fast. Perhaps the user wonders what
 the message actually said.

 I think it's better usability to actually force a delay of atleast 2
 seconds, so the Loading.. message has a chance to register on the
 users brain, rather than appearing and disappearing in an annoying
 fashion before they can lock on to it.

 Right now i'm coding this in myself where appropriate but I think it
 would be a logical addition to the core because ajax and please wait
 messages go hand in hand, and thus this feature is something
 continually needed.


[jQuery] Autocomplete behavior

2008-06-11 Thread Joe Tseng
I just figured out autocomplete today and I'm almost there  Right now I
have a form that has a text field; the autocomplete function is supposed to
talk to a URL that would return results even if q is contained as a
substring in the middle of a value.  I figure as I type more into my text
field the value of q passed to the URL would grow and the client form
would receive ever more specific resultsets.

I have a sample value that starts off with bd54861e...  The
autocomplete displays the suggestion when I type in 5, but the value
disappears when I type in 54.  My hunch is the matchSubset option is what
I need to set but it's already defaulted to 1.  As of right now I'm not
using any other options.

Pls clue me in...  Thx a bunch!!!

-- 
Joe Tseng
__

http://tinyurl.com/3kwx94


[jQuery] jQuery.each() or element event triggers?

2008-06-11 Thread Isaak Malik
Dear list,

I'm not really into the code of the jQuery core so I'm not sure of how
jQuery.each() works, but I'm wondering: since jQuery.each() loops through
every element that matches the given selector is my logics right that is it
better performance wise to use static element event trigger instead of using
the each() method on all the elements?

An example for the simple-minded:

$('div').each(function(){$(this).click(function(){alert('You clicked me: ' +
this.id + '!')})})

or

div id='blabla1' onclick=alert('You clicked me: ' + this.id + '!')/div
div id='blabla2' onclick=alert('You clicked me: ' + this.id + '!')/div
div id='blabla3' onclick=alert('You clicked me: ' + this.id + '!')/div

?

In most cases it does take more characters for the same functionality but
what are the differences in performance?

Kind regards,
-- 
Isaak Malik
Web Developer


[jQuery] Re: highlight and fade a row

2008-06-11 Thread rolfsf

ok - I partially solved this by setting my default rows in this
instance to be white, and then using the following:

$('#test').click(function() {
var theRow = $('#myRow td');
var origColor = $('#myRow td').css(backgroundColor);

$(theRow).css({backgroundColor: '#ff0'});
setTimeout(function() {
$(theRow).animate({backgroundColor: origColor}, 
1000);
}, 3000);
});

However, row hover effects get disabled on the affected row after this
is run. So now I need to remove the inline style for background color
that the script ends with

tr id=myRowtd style=background-color: #FFF should get set to
something like tr id=myRowtd style=




[jQuery] Re: Question: select/option to open a new webpage, howto?

2008-06-11 Thread Ariel Flesler

$('select[name=test]').change(function(){
   window.open( this.value );
});

http://www.quirksmode.org/js/popup.html

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

On 11 jun, 14:35, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi, folks:

 I am trying to use select/option to open a new window and whenever I
 click an item from the selection dropdown list... for example, the
 following sample:

 select name=test
   option value=/link/to/v1value-1/option
   option value=/link/to/v2value-2/option
   option value=/link/to/v3value-3/option
   option value=/link/to/v4value-4/option
 /select

 when I select value-3, a new window will be opened, and the content is
 pointed to http://mysite.com/link/to/v3;. just like a href=/link/to/
 v3 target=_blankvalue-3/a

 How to handle this with jQuery?

 I can do:

 script type=text/javascript
   $('select[name=test] option').each(function(i) {
       $(this).click(function(){
           /* how to open a new link $(this).val() */
       });
   });
 /script

 many thanks,

 lihao


[jQuery] Re: children().text problem on IE

2008-06-11 Thread Shaun

Ah hah!  I got it.

Actually, I might even classify this as IE doing things right and FF
making the mistake (somebody please point out to me why I'm wrong :) )

In my example there were 2 children - one an img tag, and one a div.
Calling text or html on an img tag doesn't make sense to IE and
probably shouldn't to FF either.  So just changing that line to
(something like):

$('#Layer-3').children('div').text( 'some text' );

solved the problem.

On Jun 11, 12:59 pm, Shaun [EMAIL PROTECTED] wrote:
 I have a line of jQuery that works fine for FF and Opera, but fails in
 IE with the error 'Unexpected call to method or property access'

 The specific line it chokes on is (similar to) this:
 $('#Layer-3').children().text( 'some text' );

 The exact line is line 93 of this 
 page:http://psd2cssonline.com/tutorials/tooltips/index.html

 It's strange because IE will allow me to do other things (css(...) for
 example) over the children selector, just not text(...) or html(...).

 What am I missing?
 Thanks.

 --
 Shaun
 [EMAIL PROTECTED]


[jQuery] Re: Question: select/option to open a new webpage, howto?

2008-06-11 Thread [EMAIL PROTECTED]

Never mind, I've found the solution

window.open($(this).val());

lihao

On Jun 11, 1:35 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi, folks:

 I am trying to use select/option to open a new window and whenever I
 click an item from the selection dropdown list... for example, the
 following sample:

 select name=test
   option value=/link/to/v1value-1/option
   option value=/link/to/v2value-2/option
   option value=/link/to/v3value-3/option
   option value=/link/to/v4value-4/option
 /select

 when I select value-3, a new window will be opened, and the content is
 pointed to http://mysite.com/link/to/v3;. just like a href=/link/to/
 v3 target=_blankvalue-3/a

 How to handle this with jQuery?

 I can do:

 script type=text/javascript
   $('select[name=test] option').each(function(i) {
   $(this).click(function(){
   /* how to open a new link $(this).val() */
   });
   });
 /script

 many thanks,

 lihao


[jQuery] Re: DOM traversal -- need both parent node and siblings

2008-06-11 Thread Kevin Major

Great, thanks a bunch!

On Jun 11, 3:05 pm, Happy [EMAIL PROTECTED] wrote:
 No need for the .end() there.  Plus you can use .andSelf() to include
 the first td and then run the addClass command just once.

 function()
 {
       $(this).parent().siblings().andSelf().addClass(inactive);

 }

 should do it.

 On Jun 11, 10:26 am, Kevin Major [EMAIL PROTECTED] wrote:



  Hello everyone,

  I'm currently in a bit of a bind.  I have a checkbox that's within a
  table cell.  I want it so when the input is clicked, the parent table
  cell AND its siblings change their classes.  I can get to the parent
  element, but how would I attach this functionality to its siblings?

  Right now, I have:

  $(document.forms[Grid].elements[grid[]]).toggle(function()
  {
     $(this).parent().addClass(active);},

  function()
  {
     $(this).parent().addClass(inactive);

  });

  (I'm not using toggleClass because I have formatting within the
  inactive class that's different than some of the other elements)

  Would adding something like:

  .end().siblings().addClass(active);

  To the end of my statements remedy the issue?- Hide quoted text -

 - Show quoted text -


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

2008-06-11 Thread Ariel Flesler

I actually added that, to save some bytes.
now() is a private function, that is reused 5 or 6 times along the
code.

1- new Date is the same as new Date().
2- +new Date casts the date object to number.
3- When dates are casted to numbers, they behave like new
Date().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 Flesler
http://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 +new Date;

 }

 Is it the same as the following?

 function now(){
     return new Date();



 }- Ocultar texto de la cita -

 - Mostrar texto de la cita -


[jQuery] Re: load pre-rendered html

2008-06-11 Thread Ariel Flesler

var $cache = $('div /').html( your_var );

// 

$cache.children().appendTo(  );

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

On 11 jun, 16:17, mark [EMAIL PROTECTED] wrote:
 hi
 i want to have a set of pre-rendered html loaded into a div dynamically..
 the .load() function gets it from a remote url. is it possible to load
 from a javascript variable/ that is pre-rendered in to the current
 html somehow?
 thanks


[jQuery] Re: jQuery.each() or element event triggers?

2008-06-11 Thread Ariel Flesler

Inline events handlers are a whole different way of doing that. A bad
and old one by the way.

The first approach you wrote, actually goes thru 2 iterations, while
one is enough:

$('div').click(function(){
   alert('You clicked me: ' + this.id + '!')
});

If you're REALLY worried about perfomance, you should google event
delegation.

Cheers

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

On 11 jun, 17:56, Isaak Malik [EMAIL PROTECTED] wrote:
 Dear list,

 I'm not really into the code of the jQuery core so I'm not sure of how
 jQuery.each() works, but I'm wondering: since jQuery.each() loops through
 every element that matches the given selector is my logics right that is it
 better performance wise to use static element event trigger instead of using
 the each() method on all the elements?

 An example for the simple-minded:

 $('div').each(function(){$(this).click(function(){alert('You clicked me: ' +
 this.id + '!')})})

 or

 div id='blabla1' onclick=alert('You clicked me: ' + this.id + '!')/div
 div id='blabla2' onclick=alert('You clicked me: ' + this.id + '!')/div
 div id='blabla3' onclick=alert('You clicked me: ' + this.id + '!')/div

 ?

 In most cases it does take more characters for the same functionality but
 what are the differences in performance?

 Kind regards,
 --
 Isaak Malik
 Web Developer


[jQuery] Re: jQuery.each() or element event triggers?

2008-06-11 Thread Josh Nathanson
You are sacrificing a small bit of performance for a world of easier code 
development and maintenance.  In nearly all cases it's a worthwhile trade.

If you had 1000 or more divs you'd probably not want to use each() to bind the 
handlers, but for any reasonably small number of elements, the performance hit 
is ok.  Plus, binding speed has been improved in jQuery 1.2.6.

-- Josh

  - Original Message - 
  From: Isaak Malik 
  To: jquery-en@googlegroups.com 
  Sent: Wednesday, June 11, 2008 1:56 PM
  Subject: [jQuery] jQuery.each() or element event triggers?


  Dear list,

  I'm not really into the code of the jQuery core so I'm not sure of how 
jQuery.each() works, but I'm wondering: since jQuery.each() loops through every 
element that matches the given selector is my logics right that is it better 
performance wise to use static element event trigger instead of using the 
each() method on all the elements?

  An example for the simple-minded:

  $('div').each(function(){$(this).click(function(){alert('You clicked me: ' + 
this.id + '!')})})

  or

  div id='blabla1' onclick=alert('You clicked me: ' + this.id + '!')/div
  div id='blabla2' onclick=alert('You clicked me: ' + this.id + '!')/div
  div id='blabla3' onclick=alert('You clicked me: ' + this.id + '!')/div

  ?

  In most cases it does take more characters for the same functionality but 
what are the differences in performance?

  Kind regards,
  -- 
  Isaak Malik
  Web Developer 

[jQuery] Re: $.map flattens results

2008-06-11 Thread Michael Geary

Marc, if you want a map function that works the way you expect, use the
standard JavaScript one.

Here's an implementation from the Gecko reference that provides a map
function for JavaScript engines that don't have it built in:

if( ! Array.prototype.map ) {
Array.prototype.map = function( fun /*, thisp*/ ) {
var len = this.length;
if( typeof fun != 'function' )
throw new TypeError();

var res = new Array( len );
var thisp = arguments[1];
for( var i = 0;  i  len;  ++i ) {
if( i in this )
res[i] = fun.call( thisp, this[i], i, this );
}

return res;
};
}

So now you can do:

[ 1, 2, 3 ].map( function(n) {
return [n, 'xxx'];
});

-Mike 

 From: Ariel Flesler
 
 $.map is used a lot internally for everything. By the 
 selectors module, the manipulation/traversing methods, etc.
 This was the desired functionality in order to simplify its 
 internal duties.

 On 11 jun, 07:19, Marc Galera [EMAIL PROTECTED] wrote:
  Hi.
 
  I've recently been surprised with $.map. I've found that it 
 flattens 
  the result so I can't return an array in the callback. For 
 example, on 
  this code:
 
  $.map([1, 2, 3], function(n) {
     return [n, 'xxx'];
 
  });
 
  I get:
 
  [1, xxx, 2, xxx, 3, xxx]
 
  Instead of what I expected:
 
  [[1, xxx], [2, xxx], [3, xxx]]
 
  Looking on the source code is obvious that this is made on purpose, 
  and there are workarounds, but I was curious on why this is 
 happening.
 
  Marc.
 



[jQuery] Re: jQuery.each() or element event triggers?

2008-06-11 Thread Michael Geary
But it's so easy to use event delegation that you may as well just do it -
then you don't sacrifice any performance, no matter how many elements you
have.
 
For example:
 
div id=outer
div class=clicker id=oneone/div
div class=clicker id=twotwo/div 
div class=clicker id=threethree/div
/div
 
$(function() {
$('#outer').click( function( event ) {
var target = event.target;
if( $(target).is('div.clicker') ) {
alert( 'You clicked me: ' + target.id + '!' );
}
});
});
 
Isaak, FYI, .each() is nothing fancy - it's simply an ordinary for loop that
calls your callback function in each iteration. But with event delegation
you don't even have to use it: a single event handler does any number of
elements.
 
-Mike


  _  

From: Josh Nathanson

You are sacrificing a small bit of performance for a world of easier code
development and maintenance.  In nearly all cases it's a worthwhile trade.
 
If you had 1000 or more divs you'd probably not want to use each() to bind
the handlers, but for any reasonably small number of elements, the
performance hit is ok.  Plus, binding speed has been improved in jQuery
1.2.6.
 
-- Josh
 

- Original Message - 
From: Isaak Malik mailto:[EMAIL PROTECTED]  
To: jquery-en@googlegroups.com 
Sent: Wednesday, June 11, 2008 1:56 PM
Subject: [jQuery] jQuery.each() or element event triggers?


Dear list,

I'm not really into the code of the jQuery core so I'm not sure of how
jQuery.each() works, but I'm wondering: since jQuery.each() loops through
every element that matches the given selector is my logics right that is it
better performance wise to use static element event trigger instead of using
the each() method on all the elements?

An example for the simple-minded:

$('div').each(function(){$(this).click(function(){alert('You clicked me: ' +
this.id + '!')})})

or

div id='blabla1' onclick=alert('You clicked me: ' + this.id + '!')/div
div id='blabla2' onclick=alert('You clicked me: ' + this.id + '!')/div
div id='blabla3' onclick=alert('You clicked me: ' + this.id + '!')/div

?

In most cases it does take more characters for the same functionality but
what are the differences in performance?

Kind regards,
-- 
Isaak Malik
Web Developer 



[jQuery] Re: [OT] Re: [jQuery] Re: anti IE6

2008-06-11 Thread timothytoe

I recently read a blog post (I think one of the Ajaxian guys) that
said maybe the first Monday of the month, we could point out that
modern browsers work better. I think an alert would be overkill,
unless the site really is unbearable in IE6. But maybe its is about
time for a little star or something pointing out that the browser
sucks. After all, if we can get the IE6 clients now to a negligible
level, a lot more time will go into real production work rather than
accommodating a browser that now sticks out like a pus-filled thumb.

Sure, a lot of time it's IT or some enterprise software holding back
the upgrades, but users are able to apply a bit of pressure sometimes.

On Jun 9, 1:29 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
 Any kind of public facing site has to support IE6, especially if it's 
 ecommerce.  It's not acceptable to tell potential customers to go download 
 another web browser.  Most people will just go shop somewhere else, and 
 probably never come back.  Nothing leaves a bad taste in people's mouths like 
 being told immediately they have to go download something.

 At least we have jQuery to help us with IE6 support.

 -- Josh

   - Original Message -
   From: Guy Fraser
   To: jquery-en@googlegroups.com
   Sent: Monday, June 09, 2008 1:04 PM
   Subject: [jQuery] [OT] Re: [jQuery] Re: anti IE6

   MorningZ wrote:

 Any many huge corporations and govt branches are slow to update as
 well  it's certainly not their fault, so why would you
 purposefully annoy them?
   Because if you don't annoy them, they keep using IE6, and we have to keep 
 putting up with the pain of supporting it.

   Many web developers still have the crazy notion that we should support IE6. 
 However, doing so only causes us more pain because people using IE6 
 mistakenly believe that they have a good browser and therefore never get rid 
 of it so the pain continues.

   The only feasible way to kill off IE6 is to simply stop supporting it. When 
 the customer or end-user complains, explain that their browser is broken and 
 that they should upgrade to a free, modern browser like Firefox, Opera or 
 Safari/Webkit.

   Think about it, if your car was broken would you expect all the roads in 
 the country to be modified to counter the broken car? No, it would be 
 ludicrous. The broken car would be fixed or destroyed for the good of 
 humanity.

   Yet, it seems, in the web world we continue this crazy self-destructive act 
 of supporting the most widespread and heavily broken browser the entire 
 planet has ever encountered. It has to stop.

   There's nothing stopping large organisations from installing a modern 
 browser alongside IE6 - IE6 can then still be used for their broken intranet, 
 the modern browser can be used for everything else.

   Visit:http://www.savethedevelopers.org


[jQuery] Re: jQuery + jCarousel data loading

2008-06-11 Thread Daniel MacDonald

You might want to try a href=http://www.projectatomic.com/2008/04/
jquery-flickr/jQuery Flickr/a. No server side code necessary, and
you can apply the Carousel function in a callback after all the Flickr
result have been returned.

On May 27, 7:27 am, Gary Homewood [EMAIL PROTECTED] wrote:
 I am looking at the jCarousel dynamic examples and I'm a bit confused.
 I'd like to load the carousel with a feed ofFlickrphotographs,
 without having to use a server-side file. Is there a way I can use
 $.getJSON directly?

 Thanks


[jQuery] Re: jQuery.each() or element event triggers?

2008-06-11 Thread Isaak Malik
Well, a (web) developer should give user experience priority to those two,
but as you mentioned in my case, which is about a smaller group of elements,
it probably won't make any difference. However, I'm grateful of the hints,
including the improvement in version 1.2.6 which I had no idea of, since
this might be of use in much larger projects of mine.

On Thu, Jun 12, 2008 at 12:41 AM, Josh Nathanson [EMAIL PROTECTED]
wrote:

  You are sacrificing a small bit of performance for a world of easier code
 development and maintenance.  In nearly all cases it's a worthwhile trade.

 If you had 1000 or more divs you'd probably not want to use each() to bind
 the handlers, but for any reasonably small number of elements, the
 performance hit is ok.  Plus, binding speed has been improved in jQuery
 1.2.6.

 -- Josh


 - Original Message -
 *From:* Isaak Malik [EMAIL PROTECTED]
 *To:* jquery-en@googlegroups.com
 *Sent:* Wednesday, June 11, 2008 1:56 PM
 *Subject:* [jQuery] jQuery.each() or element event triggers?

 Dear list,

 I'm not really into the code of the jQuery core so I'm not sure of how
 jQuery.each() works, but I'm wondering: since jQuery.each() loops through
 every element that matches the given selector is my logics right that is it
 better performance wise to use static element event trigger instead of using
 the each() method on all the elements?

 An example for the simple-minded:

 $('div').each(function(){$(this).click(function(){alert('You clicked me: '
 + this.id + '!')})})

 or

 div id='blabla1' onclick=alert('You clicked me: ' + this.id +
 '!')/div
 div id='blabla2' onclick=alert('You clicked me: ' + this.id +
 '!')/div
 div id='blabla3' onclick=alert('You clicked me: ' + this.id +
 '!')/div

 ?

 In most cases it does take more characters for the same functionality but
 what are the differences in performance?

 Kind regards,
 --
 Isaak Malik
 Web Developer




-- 
Isaak Malik
Web Developer


[jQuery] Customized iFrame scrollbars

2008-06-11 Thread BrotherEye

Hello all,

I'm a jQuery noob who is wondering if there is anyway to customize
scrollbars on an iFrame with jQuery.

Can one use jScrollPane for this purpose?

Thanks in advance for the info.
---
K


[jQuery] Re: jQuery.each() or element event triggers?

2008-06-11 Thread Isaak Malik
Thanks about the notice, I had no idea about the two iterations. And also
thanks for the tip, I'll be googling it right away.

On Wed, Jun 11, 2008 at 11:58 PM, Ariel Flesler [EMAIL PROTECTED] wrote:


 Inline events handlers are a whole different way of doing that. A bad
 and old one by the way.

 The first approach you wrote, actually goes thru 2 iterations, while
 one is enough:

 $('div').click(function(){
alert('You clicked me: ' + this.id + '!')
 });

 If you're REALLY worried about perfomance, you should google event
 delegation.

 Cheers

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

 On 11 jun, 17:56, Isaak Malik [EMAIL PROTECTED] wrote:
  Dear list,
 
  I'm not really into the code of the jQuery core so I'm not sure of how
  jQuery.each() works, but I'm wondering: since jQuery.each() loops through
  every element that matches the given selector is my logics right that is
 it
  better performance wise to use static element event trigger instead of
 using
  the each() method on all the elements?
 
  An example for the simple-minded:
 
  $('div').each(function(){$(this).click(function(){alert('You clicked me:
 ' +
  this.id + '!')})})
 
  or
 
  div id='blabla1' onclick=alert('You clicked me: ' + this.id +
 '!')/div
  div id='blabla2' onclick=alert('You clicked me: ' + this.id +
 '!')/div
  div id='blabla3' onclick=alert('You clicked me: ' + this.id +
 '!')/div
 
  ?
 
  In most cases it does take more characters for the same functionality but
  what are the differences in performance?
 
  Kind regards,
  --
  Isaak Malik
  Web Developer




-- 
Isaak Malik
Web Developer


[jQuery] Re: .load Ajax et Jtip ou ClueTip

2008-06-11 Thread FrenchiInLA


tu peux de la meme maniere travailler avec jtip par example. Make 
Handler.ashx?Action=totoetc=etc  essaye d'utilise un httphandler au lieu de
aspx, and pass tes parametre, et return htm, or juste textefile. si tu
loader une page avec des server controles tu aura des probleme avec 2 form
runat=server dans la page. autrement pour montrer des tooltips c'est tres
simple de realiser avec jtip. j'ai une page qui est fait avec ce que tu veux
check http://Soheyli.com/PersianTV.aspx 



Discret wrote:
 
 
 Bonjour,
 
 J'utilise .load pour charger l'id d'une page dans l'id d'une autre
 page.
 
 http://docs.jquery.com/Ajax/load
 
 code
 
  script
   $(document).ready(function(){
 $(a.article).click( function (){
 $(#feeds).load(Pagedarticle.aspx #conteneur);})
   });
   /script
 
 
 
 ul
 li # Charge la page et l'id conteneur dans
 l'id feeds /li
 /ul
 
 div id=feeds/div
 
 /code
 
 Ok c'est rudimentaire mais ça marche, je souhaiterais pouvoir faire de
 même avec un Plugin comme [Jtip-http://www.codylindley.com/blogstuff/
 js/jtip/]., [Cluetip-http://plugins.learningjquery.com/cluetip/demo/]
 ou autre.
 C'est à dire charger l'élément id d'une page externe dans le div façon
 Jtip au passage de la souris sur un lien ?
 
 Auriez vous une idée pour m'aider ?
 
 Merci
 
 Discret
 
 

-- 
View this message in context: 
http://www.nabble.com/.load-Ajax-et-Jtip-ou-ClueTip-tp17779291s27240p17788552.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Help with tabsLoad

2008-06-11 Thread keny

No one ?

I really need this to work but have no skill with js

Thanks

On 7 juin, 22:37, keny [EMAIL PROTECTED] wrote:
 Hi thanks for the answer

 I whant to load the link in the function in the current panel i dont
 whant every link to be loaded in panel so your first function was not
 for me, i try the next one that work but this function was reloaded
 the tab in the panel so i came whit
 this function that work :

 function loadTab(tab) {
 var tab ;

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

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

     }

 });
 }

 Ist work the link load but the problem is that no more panel work
 after. Any idea ?

 Thanks for helping

 On 7 juin, 03:16, Klaus Hartl [EMAIL PROTECTED] wrote:



  Forgot to mention that you need to use the latest version, from jQuery
  UI RC1 that is.

  --Klaus

  On 7 Jun., 09:15, Klaus Hartl [EMAIL PROTECTED] wrote:

   What exactly do you want to achieve? If you try to automatically load
   content from links inside a tab panel into the panel itself, replacing
   the content, try this:

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

   });

   If you're just want to reload the content of the given tab, try this:

   function loadTab(tab) {
       $('#example').tabs('load', tab);

   }

   Before you can use that you need to have initialized tabs once of
   course:

   $('#example').tabs();

   --Klaus

   On 5 Jun., 02:55, keny [EMAIL PROTECTED] wrote:

Hi thanks for reading

I am trying to load a link in a tab with this function with no
result :-(

function loadTab(tab){
var tab;
var $tabs = $('#container-8').tabs;
var selected = $tabs.tabsSelected();
            $tabs.tabsLoad(selected,tab);

}

/script

The tab variable contain the page to load but noting happen what wrong
with that ?

Thanks you very much !!!- 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: Help with tabsLoad

2008-06-11 Thread keny

Forget to mention that the var tab contain the page name ex :
mypage.html

Thanks

On 7 juin, 22:37, keny [EMAIL PROTECTED] wrote:
 Hi thanks for the answer

 I whant to load the link in the function in the current panel i dont
 whant every link to be loaded in panel so your first function was not
 for me, i try the next one that work but this function was reloaded
 the tab in the panel so i came whit
 this function that work :

 function loadTab(tab) {
 var tab ;

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

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

     }

 });
 }

 Ist work the link load but the problem is that no more panel work
 after. Any idea ?

 Thanks for helping

 On 7 juin, 03:16, Klaus Hartl [EMAIL PROTECTED] wrote:



  Forgot to mention that you need to use the latest version, from jQuery
  UI RC1 that is.

  --Klaus

  On 7 Jun., 09:15, Klaus Hartl [EMAIL PROTECTED] wrote:

   What exactly do you want to achieve? If you try to automatically load
   content from links inside a tab panel into the panel itself, replacing
   the content, try this:

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

   });

   If you're just want to reload the content of the given tab, try this:

   function loadTab(tab) {
       $('#example').tabs('load', tab);

   }

   Before you can use that you need to have initialized tabs once of
   course:

   $('#example').tabs();

   --Klaus

   On 5 Jun., 02:55, keny [EMAIL PROTECTED] wrote:

Hi thanks for reading

I am trying to load a link in a tab with this function with no
result :-(

function loadTab(tab){
var tab;
var $tabs = $('#container-8').tabs;
var selected = $tabs.tabsSelected();
            $tabs.tabsLoad(selected,tab);

}

/script

The tab variable contain the page to load but noting happen what wrong
with that ?

Thanks you very much !!!- 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] Working with text

2008-06-11 Thread yo2lux

path variable store the following: /themes/mytheme/images/logo.gif:

var path = $('img').attr('src');

is possible to obtain the image name without path ? I need logo.gif
I need a Javascript or jQuery function to solve this?

Thanks!


[jQuery] autocomplete plugin search help

2008-06-11 Thread Jaswinder

im a total noob to jquery but i wat to search feature like on facebook
ive found a plugin that says it does this but cant figure out how to
get it to work please help

start off as in the demo shown it is :
[code]
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
  script src=http://code.jquery.com/jquery-latest.js;/script
  link rel=stylesheet href=http://dev.jquery.com/view/trunk/
plugins/autocomplete/demo/main.css type=text/css /
  link rel=stylesheet href=http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.css type=text/css /
  script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.bgiframe.min.js/script
  script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.dimensions.js/script
  script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.js/script
  script
  $(document).ready(function(){
var data = Core Selectors Attributes Traversing Manipulation CSS
Events Effects Ajax Utilities.split( );
$(#example).autocomplete(data);
  });
  /script

/head
body
  API Reference: input id=example / (try C or E)
/body
/html
[/code]

and then i added the search feature (http://docs.jquery.com/Plugins/
Autocomplete#Search_Page_Replacement)
[code]
var data = [ {text:'Link A', url:'/page1'}, {text:'Link B', url: '/
page2'} ];
$(...).autocomplete(data, {
  formatItem: function(item) {
return item.text;
  }
}).result(function(event, item) {
  location.href = item.url;
});
[/code]

=

[code]
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
  script src=http://code.jquery.com/jquery-latest.js;/script
  link rel=stylesheet href=http://dev.jquery.com/view/trunk/
plugins/autocomplete/demo/main.css type=text/css /
  link rel=stylesheet href=http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.css type=text/css /
  script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.bgiframe.min.js/script
  script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.dimensions.js/script
  script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.js/script
  script
  $(document).ready(function(){
  var data = [ {text:'Link A', url:'http://www.jquery.com/'},
{text:'Link B', url: 'http://docs.jquery.com/Plugins/
Autocomplete#Search_Page_Replacement'} ];
$(#example).autocomplete(data);

  /script

/head
body
  API Reference: input id=example / (try C or E)
/body
/html
[/code]

but when i type  link or jquery nothing turns up
thanks in advance


[jQuery] Re: Working with text

2008-06-11 Thread Karl Swedberg


Hi there,

You could do it like this:

var path = $('img').attr('src');
var fileName = path.slice(path.lastIndexOf('/')+1);



--Karl

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




On Jun 11, 2008, at 7:36 PM, yo2lux wrote:



path variable store the following: /themes/mytheme/images/logo.gif:

var path = $('img').attr('src');

is possible to obtain the image name without path ? I need logo.gif
I need a Javascript or jQuery function to solve this?

Thanks!




[jQuery] Showing/Hiding Table Rows if One of Several Checkboxes is Checked?

2008-06-11 Thread Vik

I have a table in which each row contains 8 td cells. 7 of the td
cells contain a checkbox, for things like Breakfast, Lunch,
Dinner, etc.

The page has a dropdown menu that lets the user specify that he wants
to see only the items for which the Breakfast, or Lunch, or
Dinner, etc. checkbox is checked.

So let's say the user selects the Breakfast checkbox from the
dropdown menu.  How could I hide all the rows in which the
Breakfast
checkbox is not checked?

Here's sample HTML and (flawed) jQuery code:
table class=food_planner
tr
td
center
input type=checkbox name=food_id_5
value=9003 br
Delete
/center
/td
td
Apples, raw, with skinbr
 /td
td
center
input type=checkbox name=Breakfast_id_5
value=9003 br
Breakfast
/center
/td
td
center
input type=checkbox name=Lunch_id_5
value=9003 br
Lunch
/center
/td
td
center
input type=checkbox name=Dinner_id_5
value=9003 br
Dinner
/center
/td
td
center
input type=checkbox name=Snacks_id_5
value=9003 br
Snacks
/center
/td
td
center
input type=checkbox name=Fruit_id_5
value=9003 br
Fruit
/center
/td
td
center
input type=checkbox name=Veggies_id_5
value=9003 br
Veggies
/center
/td
/tr
/table


//All this jQuery code works, except for the marked line!
 $(#Filter_Dropdown).change(function () {
var str = ;
var orig_str = ;
orig_str = $(#Filter_Dropdown
option:selected).text();
str = '.' + orig_str;
$(.food_planner tbody tr).show();
if (str != '.Show All')
{
$(.food_planner tbody tr).hide();

//What is the correct version of the following
line?
$(.food_planner tbody tr:nth-child(2)).
(input:checked).parent().show();
}
});


  1   2   >