[jQuery] Re: php mysql

2008-05-06 Thread FreakDev
jQuer is a javascript framework and not a all a server side langage...

On Tue, May 6, 2008 at 2:57 AM, John [EMAIL PROTECTED] wrote:


 I have the same question. I have over 20k rows of data in mysql, and
 the idea is for there to be an update button beside each row. I don't
 see any examples of how to interact with the database here -- in php
 it's $sql = ...; in ruby/rails it's Thing.new[...], but what's up
 with jquery? I don't think an explanation would be voodoo - it'd be a
 lifesaver. I already understand the old ways - school me on the
 jquery.
 Thanks
 John


 
  This is a pretty big question. What you need to do is learn how to do
  it with regular HTTP interaction with the backend. Once you understand
  that you'll be able to adapt it to Ajax. A firm grounding in HTTP
  makes XHR pretty straightforward.
 
  Doing this right is not simple. You should probably read up on REST
  and understand which parts should GET and which parts should POST (or
  really even PUT/DELETE but that's often unused due to bad support and
  general lack of understanding).
 
  The take away point is that if you don't know how to do every part
  with regular forms and backend interaction already, doing it in Ajax
  will seem like insurmountable voodoo.
 
 




-- 
FreakDev

www.FreakDev.com


[jQuery] Re: Treeview async with animation

2008-05-06 Thread Jörn Zaefferer

The async tree simply doesn't support animations yet. Its all just
experimental stuff which should have gone into a branch...

Jörn

On Mon, May 5, 2008 at 8:43 PM, jayg [EMAIL PROTECTED] wrote:

  I am trying to figure out what I am doing wrong here, or where I need
  to put an updated hook.  I am using the animate option for the
  treeview widget with asynchronous data (lazy load).  When I open a new
  node that has to fetch data, it does not animate when opening.
  However, once the data has arrived at the browser, subsequent opening
  and closing of the node animate properly.  It seems that animation
  needs to be deferred until after the data has returned, but as the
  load call is in the toggle, I am not sure how to adjust this. Any
  thoughts?  Thanks,

  -j



[jQuery] event data ?

2008-05-06 Thread Adwin Wijaya

Hi


I got a problem ... I have more than 1 buttons and each buttons has
unique name.
I assign / bind the button with function like this :

$('.mybutton').bind('click',function(btn){ alert( btn.id); } );

every time i click on the buttons the alert always show undefined. How
to get the ID of button who clicked ? i want to get the id, change the
button to disabled ... how to do that one ...

and what is event.data actually is


thanks !


[jQuery] Re: Variable for Google Maps API

2008-05-06 Thread RalphM

Thnak you, Kan, that´s it.

RalphK

On 5 Mai, 18:48, Ken Robinson [EMAIL PROTECTED] wrote:
 On Mon, May 5, 2008 at 12:08 PM, RalphM [EMAIL PROTECTED] wrote:

   Two hours later ;-)

   When I set a variable like this

      var position = new Array(50.1678, -97.133);

   I can do this:

     map.setCenter(new GLatLng(position[0], position[1]),8);

   But when I try something like this:

     meta name=ICBM content=50.1678, -97.133185

   script

   
    var geopos = $(meta[name=ICBM]).attr(content);
    var position = new Array(geopos);
    map.setCenter(new GLatLng(position[0], position[1]),8);
   
   /script

 You need to turn the string into an array. The easiest way to do that
 is to use split():

 var geopos = $(meta[name=ICBM]).attr(content).split(',');
 map.setCenter(new GLatLng(geopos[0], geopos[1]),8);

 Ken


[jQuery] Problem using livequery jquery.form and simplemodal together

2008-05-06 Thread paulp75

Ok I have a set of results from a search, and for each record in the
result set, there is a form built.
When they click add to cart, i would like it to have a warning, to
check the measurements before ordering, to double check they are
ordering the right product, then when they click ok, it will add it to
the cart via jquery.form, when they click cancel it shouldnt add it.

but this is what actually occurs. when first clicking add to cart, the
confirmation modal pops up, click ok, and nothing happens. then if you
add another item, both the second and first items appear in the
shopping cart, but this occurs before clicking ok though. so the
confirmation essentially does not work.
if you click cancel then the product is still added.
this is the code for clicking the add button.

$(.ajaxadd).livequery('submit',function (e) {
e.preventDefault();

// example of calling the confirm function
// you must use a callback function to perform the yes action
confirm(Please check measurements, function (e) {


$('.ajaxadd').ajaxForm(options);
return false;
});


and this is the code for the function to pop up the modal, and make
the person confirm their product.

function confirm(message, callback) {
$('#confirm').modal({
close:false,
overlayId:'confirmModalOverlay',
containerId:'confirmModalContainer',
onShow: function (dialog) {
dialog.data.find('.message').append(message);

// if the user clicks yes
dialog.data.find('.yes').click(function () {
// call the callback
if ($.isFunction(callback)) {
callback.apply();
}
// close the dialog
$.modal.close();
});
}
});
}


any help on this would be great. thank you
});


[jQuery] jquery doesn't work after changing innerhtml

2008-05-06 Thread biggie_mac

I discovered this accidentaly today. I have an anchor like
div id=yya class=xx href=#click/a/div and a simple
jquery like

jQuery().ready(function() {
$(a.xx).click(function(event){
event.preventDefault();
alert('u clicked');
});
});

I run this, works fine, I get the alert when I click on the anchor.
Now I also have a button which when I click it changes the innerHTML
of the div with a class=xx href=#click again/a. basically it
changes an anchor with another which is the same but only has
different message. But it's still an anchor with xx class. Yet, when I
click on the second anchor, nothing happens. Anyone know why this
happens?Below the code I tried:

Js:
jQuery().ready(function() {
$(a.hide).click(function(event){
event.preventDefault();
alert('ai facut click pe un a cu class hide');
});
});

HTML:
div id=divba class=hide href=#click/a/div
input type=button value=click
onclick=document.getElementById('divb').innerHTML='a
class=quot;hidequot; href=quot;#quot;click2/a';;

10x


[jQuery] Re: TableSorter + Filtering + Ajax

2008-05-06 Thread Adwin Wijaya

I got the same problem with you, at the moment I use partition from
CI.
and if you want you can use ajax to get partitioned data. I have no
idea to get which one is sorted.

adwin

On May 6, 7:18 am, patrick davey [EMAIL PROTECTED] wrote:
 Hi,

 I am using the tablesorter pluginghttp://tablesorter.com/and it
 works fine for smallish tables.  However, I need to page through large
 result sets (and filter them) - so I am going to use AJAX to
 repopulate the table once the options have been selected.

 Now, if through filtering / whetever - less than 100 rows are
 returned, then I want tablesorter to just sort the table (without
 having to make an AJAX call)

 To do this I want to edit the tablesorter plugin to call a function
 which returns true/false depending on how many records there are to
 sort.

 So my question (there is one!) is how do I do that with tablesorter.
 I have tried using 'sortStart' and returning false but no joy.  I can
 edit the source of course - but if there is a simple way I'd love to
 know it.

 Better still, does anyone have an example of doing filteringsorting
 paging of large datasets using  JSON/AJAX and Jquery? :)

 Thanks,
 Patrick


[jQuery] Re: php mysql

2008-05-06 Thread Caffeneide

On May 6, 2:57 am, John [EMAIL PROTECTED] wrote:
 I have the same question. I have over 20k rows of data in mysql, and
 the idea is for there to be an update button beside each row. I don't
 see any examples of how to interact with the database here -- in php
 it's $sql = ...; in ruby/rails it's Thing.new[...], but what's up
 with jquery?

You should first learn how to write a simple php page that interact
whit the database. For example, this is a simple script that delete a
record:

mysql_connect(HOST,USER,PASS);
mysql_select_db(DB);

if ($_GET['id']) {
 if (mysql_query(DELETE FROM table WHERE id=' . $_GET['id'] .
')) {
   echo deleted ok;
 }
 else {
  echo deleted ko;
 }
}

Then you can call this page whit an jQuery Ajax request and if the
returned value is deleted ok perform the jQuery effect you want.
Hope it helps you!


[jQuery] use jQuery selector on IE5.5

2008-05-06 Thread Angus

I just know that in jQuery + IE5.5 most selectors return empty array.
After digging into source code I found that it will try to get the
nodeName and nodeType of document (nodeType=9) which IE 5.5's document
element doesn't have these two attributes.  As a quick fix I add the
following lines at the beginning of my HTML:

if (document) {
  if (!document.nodeType) document.nodeType = 9;
  if (!document.nodeName) document.nodeName = '#document';
}

and all of my selector works.  Of course there should be other cases
failed in IE 5.5 but at least simple selectors will work

Hope this help


[jQuery] jQuery AJAX Autocomplete with ASP .NET

2008-05-06 Thread Lokesh

Hi,

How can I use jQuery AJAX Autocomplete script to call my AJAX method
from ASP .NET instead of php.


[jQuery] Re: [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-06 Thread Quinode


little bug inthe last resize example : when resizing the top border
under FF 2 Mac, it comes over the text


[jQuery] Re: TableSorter + Filtering + Ajax

2008-05-06 Thread Kevin Kietel

Try Flexigrid!

http://webplicity.net/flexigrid/

This jQuery plugin is a Lightweight but rich data grid with resizable
columns and a scrolling data to match the headers, plus an ability to
connect to an json/xml based data source using Ajax to load the
content.

If you need any help implementing it, just contact me or take a look
at the Flexigrid discussion on CodeIgniter forums:
http://codeigniter.com/forums/viewthread/75326/
There are several examples that you can use.

Let me know if this is what you're looking for!

Bye,

Kevin



On May 6, 2:18 am, patrick davey [EMAIL PROTECTED] wrote:
 Hi,

 I am using the tablesorter pluginghttp://tablesorter.com/and it
 works fine for smallish tables.  However, I need to page through large
 result sets (and filter them) - so I am going to use AJAX to
 repopulate the table once the options have been selected.

 Now, if through filtering / whetever - less than 100 rows are
 returned, then I want tablesorter to just sort the table (without
 having to make an AJAX call)

 To do this I want to edit the tablesorter plugin to call a function
 which returns true/false depending on how many records there are to
 sort.

 So my question (there is one!) is how do I do that with tablesorter.
 I have tried using 'sortStart' and returning false but no joy.  I can
 edit the source of course - but if there is a simple way I'd love to
 know it.

 Better still, does anyone have an example of doing filteringsorting
 paging of large datasets using  JSON/AJAX and Jquery? :)

 Thanks,
 Patrick


[jQuery] Re: jQuery Trac unavailable

2008-05-06 Thread thatvetguy

I get that duplicate entry error a lot too. I'm not sure the ID is
always the same...


On 5 Mai, 14:41, Nick Fletcher [EMAIL PROTECTED] wrote:
 I'm trying to look through the tickets in the jQuery Trac but I'm
 faced with the following error:

 Trac detected an internal error:

 IntegrityError: (1062, Duplicate entry 'bf4f39c0467ab22-0-0' for key
 1)

 Hope you guys sort this out soon.

 Thanks,
 Nick Fletcher


[jQuery] Re: php mysql

2008-05-06 Thread darren

Yeah, you can use jquery to help you make ajax calls to your server,
but really, all of the database programming is done there.  you'd
still use php or python.  jquery just hlps you make things look good
from the client side.

On May 6, 1:58 am, FreakDev [EMAIL PROTECTED] wrote:
 jQuer is a javascript framework and not a all a server side langage...



 On Tue, May 6, 2008 at 2:57 AM, John [EMAIL PROTECTED] wrote:

  I have the same question. I have over 20k rows of data in mysql, and
  the idea is for there to be an update button beside each row. I don't
  see any examples of how to interact with the database here -- in php
  it's $sql = ...; in ruby/rails it's Thing.new[...], but what's up
  with jquery? I don't think an explanation would be voodoo - it'd be a
  lifesaver. I already understand the old ways - school me on the
  jquery.
  Thanks
  John

   This is a pretty big question. What you need to do is learn how to do
   it with regular HTTP interaction with the backend. Once you understand
   that you'll be able to adapt it to Ajax. A firm grounding in HTTP
   makes XHR pretty straightforward.

   Doing this right is not simple. You should probably read up on REST
   and understand which parts should GET and which parts should POST (or
   really even PUT/DELETE but that's often unused due to bad support and
   general lack of understanding).

   The take away point is that if you don't know how to do every part
   with regular forms and backend interaction already, doing it in Ajax
   will seem like insurmountable voodoo.

 --
 FreakDev

 www.FreakDev.com


[jQuery] Problem with IE6/7 show/hide and relative positioned elements below

2008-05-06 Thread kareneliot

I have a test page up at:
http://fox-land.co.uk/clients/test/test.html

In IE6/7 the relatively positioned elements do not stay in the overall
flow of the page when the elements above are hidden (the jquery code
uses .hide(1000), but the same happens if you use .hide() ). This must
be a problem others have experienced, but I can't find any obvious fix
for this. Ideally I'd like to find a fix for this that would not
require removing any show/hide effects or the relatively positioned
elements.

Any help here would be very very useful...?




[jQuery] Re: strange behaviour: multiple selectors responding

2008-05-06 Thread bobh

I'm afraid the behaviour is still there using your code. I've updated
my example page with it.

On May 6, 12:25 am, Wizzud [EMAIL PROTECTED] wrote:
 The problem is the context of 'this' within the ajaxStart() and
 ajaxStop() functions.

 try this instead...

 $(#contests ul li span a).toggle(
 function(){
   //store ref to toggling element for use in ajax callbacks...
   var lnk = $(this);
   var url_title = lnk.html();
   lnk.ajaxStart(function(){
   lnk.html(loading...);
 }).ajaxStop(function(){
   lnk.html(url_title);
 });
   $(.contest-form- + this.name).load(this.href).show();
   return false;
 },
 function(){
   $(.contest-form- + this.name).hide(fast);
   return false;
 }
 );

 On May 5, 2:26 pm, bobh [EMAIL PROTECTED] wrote:

  hi,

  I'm trying to change the innerHtml of an anchor to loading for the
  duration of an ajax load with this code:

  $(#contests ul li span a).toggle(
  function(){
  var url_title = $(this).html();
  $(this).ajaxStart(function(){$
  (this).html(loading...);}).ajaxStop(function(){$
  (this).html(url_title);});
  $(.contest-form- + this.name).load(this.href).show();
  return false;
  },
  function(){
  $(.contest-form- + this.name).hide(fast);
  return false;
  }
  );

  both the ajax load and the text replacing work fine. the problem
  however is that all links that have been clicked are getting the
  loading innerHtml. in stead of only the one that is clicked on. for
  clarification I've put an example page online 
  here:http://allnighters.net/jq/.
  try clicking a few different links.

  thanks


[jQuery] Re: php mysql

2008-05-06 Thread Brad Hile

I'm certainly not a jquery.guru but do use jquery for database update
(php/mysql)
I think from your post your thinking of jquery in the same league as
server side languages like php  ruby and its not.
Its client side javascript with all the restrictions that brings but a
much nicer way of dealing with it.

Ashley's mention of understanding how you would do it using standard
forms is really good as you are essentially enhancing not replacing
that.
jquery will still send information in much the same way as a form
would though with the benefit of extracting page info from the DOM not
just in form fields, not refreshing the page and hiding a lot of the
background work.

so for a very simplified psuedocode example in a row you want to
update.
Use jquery to grab the data in the row with something like $
(this).parent('td').text

then put into a post call and use the callback to check the response
from the php script which does the work with the database update

 $.post(, { name: data from row },
   function(data){
 if(data == 'crapped out') {
  alert(Damn it the script  + data);
} else {
 alert(Hey it worked, the database row is  + data);
}
   });

In your_script_that_works_with_the_sql.php you would check the post
values and work with them exactly as you would with a standard form
then just echo out the response to the update which gets sent back as
the callback data.

eg.
if($result) {
$return = 'updated';
} else {
$return = 'crapped out';
}

exit($return);




On May 6, 8:57 am, John [EMAIL PROTECTED] wrote:
 I have the same question. I have over 20k rows of data in mysql, and
 the idea is for there to be an update button beside each row. I don't
 see any examples of how to interact with the database here -- in php
 it's $sql = ...; in ruby/rails it's Thing.new[...], but what's up
 with jquery? I don't think an explanation would be voodoo - it'd be a
 lifesaver. I already understand the old ways - school me on the
 jquery.
 Thanks
 John



  This is a pretty big question. What you need to do is learn how to do
  it with regular HTTP interaction with the backend. Once you understand
  that you'll be able to adapt it to Ajax. A firm grounding in HTTP
  makes XHR pretty straightforward.

  Doing this right is not simple. You should probably read up on REST
  and understand which parts should GET and which parts should POST (or
  really even PUT/DELETE but that's often unused due to bad support and
  general lack of understanding).

  The take away point is that if you don't know how to do every part
  with regular forms and backend interaction already, doing it in Ajax
   will seem like insurmountable voodoo.


[jQuery] Re: jquery doesn't work after changing innerhtml

2008-05-06 Thread motob

When you use innerHtml it completely destroys the anchor tag and
replaces it with another one. Not sure if jQuery does this or the
browser, but when you destroy an element, all event listeners are
destroyed too. So you'll either have to re-initialize the click
listener when you use innerHtml, or just simply change the text of the
anchor tag like so:

$(a.xx).click(function(){
  var $this = $(this);
  event.preventDefault();
  if($this.text() == click) {
$this.text(click again);
  } else {
$this.text(click);
  }
});

By changing the text of an element allows for the event listener to
remain in place, since the element itself didn't actually get
destroyed.

Hope this helps

On May 6, 4:58 am, biggie_mac [EMAIL PROTECTED] wrote:
 I discovered this accidentaly today. I have an anchor like
 div id=yya class=xx href=#click/a/div and a simple
 jquery like

 jQuery().ready(function() {
 $(a.xx).click(function(event){
 event.preventDefault();
 alert('u clicked');
 });
 });

 I run this, works fine, I get the alert when I click on the anchor.
 Now I also have a button which when I click it changes the innerHTML
 of the div with a class=xx href=#click again/a. basically it
 changes an anchor with another which is the same but only has
 different message. But it's still an anchor with xx class. Yet, when I
 click on the second anchor, nothing happens. Anyone know why this
 happens?Below the code I tried:

 Js:
 jQuery().ready(function() {
 $(a.hide).click(function(event){
 event.preventDefault();
 alert('ai facut click pe un a cu class hide');
 });
 });

 HTML:
 div id=divba class=hide href=#click/a/div
 input type=button value=click
 onclick=document.getElementById('divb').innerHTML='a
 class=quot;hidequot; href=quot;#quot;click2/a';;

 10x


[jQuery] Re: event data ?

2008-05-06 Thread motob

$('.mybutton').click(function(){
  alert($(this).attr(id)); //get the id
  $(this).attr(disabled, disabled); //disable the clicked button
});



On May 6, 3:33 am, Adwin  Wijaya [EMAIL PROTECTED] wrote:
 Hi

 I got a problem ... I have more than 1 buttons and each buttons has
 unique name.
 I assign / bind the button with function like this :

 $('.mybutton').bind('click',function(btn){ alert( btn.id); } );

 every time i click on the buttons the alert always show undefined. How
 to get the ID of button who clicked ? i want to get the id, change the
 button to disabled ... how to do that one ...

 and what is event.data actually is

 thanks !


[jQuery] Get body from an XHTML document loaded using an HTTP request

2008-05-06 Thread Marco

Hi!

This code seems not to work:

$.get(pag, function (data) {
 alert( $(body, data).html() );
});

Could someone Please help me?

The page I am trying to manipulating is the following:

=

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;

html xmlns=http://www.w3.org/1999/xhtml;

head

 meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

 titleFAQ/title



link rel=stylesheet href=css/all.css media=all /

/head

body

!-- FAQ --

div id=faq

h1a name=faqFAQ/a/h1



pSome more text.../p


/div

!-- Fine FAQ --

/body

/html

=


[jQuery] Re: processing json object

2008-05-06 Thread Nicola Rizzo

ops!
for(var i = 0; i  records.length; i++){...

On Tue, May 6, 2008 at 5:16 AM, JP [EMAIL PROTECTED] wrote:

  thanks !

  I only had to add:
   ...   i  records.length; ...


  On May 4, 2:14 pm, Nicola Rizzo [EMAIL PROTECTED] wrote:
   success: function(json, status){
   var records = json.Records;
   var str = ;
   if(records){
   for(var i = 0; i  records; records++){
   for(var j in records[i]){
   str += j +  --  + records[i][j] + \n;
   }
   }
   window.alert(str);
   }
  
   }
  
   hth,
   Nicola
  


  On Sun, May 4, 2008 at 8:02 PM, JP [EMAIL PROTECTED] wrote:
  
 how can I process values from json object without having to use
 indivual reference names?
  
 using json:
  
 ( {Records: [ {firstname:Nancy,lastname:Davolio} ],
 RecordCount:1 } )
  
 instead of  :
  
 $.ajax({ ..
  
success: function(json, status) {
  if(json.Records){alert(Records=+json.Records[0].firstname );}
 ...
  
 is there a way to numerically reference values --something like :
  
 $.ajax({ ..
  
success: function(json, status) {
  if(json.Records){alert(Records=+json.Records[0].0);}
 ...
  
 only it should work :)
  
 thanks in advance



[jQuery] Re: newbie struggling with JSON

2008-05-06 Thread Stan McFarland

Josh,

It worked with a relative URL, but not the absolute URL.  Odd...

-stan


On May 5, 7:42 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
 Stan,

 I'd suggest using Firefox with the Firebug extension, and doing a
 console.log(code) in your callback.  This will give you better information
 than is provided by using the alert method.

 -- Josh



 - Original Message -
 From: Stan McFarland [EMAIL PROTECTED]
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Monday, May 05, 2008 2:07 PM
 Subject: [jQuery] newbie struggling with JSON

  Hi,  newbie here.   Hoping someone can help.  I'm able to successfully
  call $.get and then eval() a URL that returns a JSON object:

  $.get(myurl,
     function(code)  {  eval(code);  alert(code[0]); });

  But if I try to call $.getJSON on the same URL:

  $.getJSON (myurl,
    function(code) { alert(code[0]); });

  I always get back:    code has no properties

  Any suggestions?

  Thanks,

  Stan McFarland
  `- Hide quoted text -

 - Show quoted text -


[jQuery] Toggle(fn,fn1) not working as expected

2008-05-06 Thread noon

$(p.more a).click(function() {
$(this).parent().siblings(div.overflow).toggle();
$(this).toggle(
function() {$(this).html(laquo; Less); alert('1');},
function() {$(this).html(More raquo;); alert('2');}
);
});

I am referring to p.more a when mentioning a click. The first time I
click no alert is fired. The second time I click 1 is alerted. The
third time I click 2 is alerted then 1 is alerted. The fourth time I
click 2 is alerted, 1 is alerted, 2 is alerted.  And so on.  Every
time div.overflow is toggled correctly.

Why is it recursively operating like this?


[jQuery] Re: newbie struggling with JSON

2008-05-06 Thread Stan McFarland

Josh,   thanks for the tip.   console.log(code) outputs undefined.
Any other suggestions?

Thanks again,

Stan



On May 5, 7:42 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
 Stan,

 I'd suggest using Firefox with the Firebug extension, and doing a
 console.log(code) in your callback.  This will give you better information
 than is provided by using the alert method.

 -- Josh



 - Original Message -
 From: Stan McFarland [EMAIL PROTECTED]
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Monday, May 05, 2008 2:07 PM
 Subject: [jQuery] newbie struggling with JSON

  Hi,  newbie here.   Hoping someone can help.  I'm able to successfully
  call $.get and then eval() a URL that returns a JSON object:

  $.get(myurl,
     function(code)  {  eval(code);  alert(code[0]); });

  But if I try to call $.getJSON on the same URL:

  $.getJSON (myurl,
    function(code) { alert(code[0]); });

  I always get back:    code has no properties

  Any suggestions?

  Thanks,

  Stan McFarland
  `- Hide quoted text -

 - Show quoted text -


[jQuery] Re: jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-06 Thread Joe


The new website is slick...great work.

Nice to see the Liferay sponsorship as well.  I started a project
using Liferay.  What an intensely robust solution!

Joe

www.subprint.com


On May 5, 9:20 am, Rey Bango [EMAIL PROTECTED] wrote:
 jQuery UI v1.5b3, the jQuery project's UI  effects library, is now
 available for download. While still in beta, the library is feature
 frozen and the features are in excellent shape.

 The jQuery UI team is anxious for your feedback so please join them on
 the UI mailing list found here:

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

 Any assistance with testing is greatly appreciated as it will help in
 making UI rock-solid out of the gate.

 Also check out the new site for the jQuery UI project athttp://ui.jquery.com/

 Rey


[jQuery] Re: jquery doesn't work after changing innerhtml

2008-05-06 Thread Richard D. Worth
Here are a couple of other options as well:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F

- Richard

On Tue, May 6, 2008 at 7:25 AM, motob [EMAIL PROTECTED] wrote:


 When you use innerHtml it completely destroys the anchor tag and
 replaces it with another one. Not sure if jQuery does this or the
 browser, but when you destroy an element, all event listeners are
 destroyed too. So you'll either have to re-initialize the click
 listener when you use innerHtml, or just simply change the text of the
 anchor tag like so:

 $(a.xx).click(function(){
  var $this = $(this);
  event.preventDefault();
  if($this.text() == click) {
$this.text(click again);
  } else {
$this.text(click);
  }
 });

 By changing the text of an element allows for the event listener to
 remain in place, since the element itself didn't actually get
 destroyed.

 Hope this helps

 On May 6, 4:58 am, biggie_mac [EMAIL PROTECTED] wrote:
  I discovered this accidentaly today. I have an anchor like
  div id=yya class=xx href=#click/a/div and a simple
  jquery like
 
  jQuery().ready(function() {
  $(a.xx).click(function(event){
  event.preventDefault();
  alert('u clicked');
  });
  });
 
  I run this, works fine, I get the alert when I click on the anchor.
  Now I also have a button which when I click it changes the innerHTML
  of the div with a class=xx href=#click again/a. basically it
  changes an anchor with another which is the same but only has
  different message. But it's still an anchor with xx class. Yet, when I
  click on the second anchor, nothing happens. Anyone know why this
  happens?Below the code I tried:
 
  Js:
  jQuery().ready(function() {
  $(a.hide).click(function(event){
  event.preventDefault();
  alert('ai facut click pe un a cu class hide');
  });
  });
 
  HTML:
  div id=divba class=hide href=#click/a/div
  input type=button value=click
  onclick=document.getElementById('divb').innerHTML='a
  class=quot;hidequot; href=quot;#quot;click2/a';;
 
  10x



[jQuery] Re: jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-06 Thread [EMAIL PROTECTED]

It's an awesome job 

Congratulations from Belgium to all contributors !

On May 6, 2:47 pm, Joe [EMAIL PROTECTED] wrote:
 The new website is slick...great work.

 Nice to see the Liferay sponsorship as well.  I started a project
 using Liferay.  What an intensely robust solution!

 Joe

 www.subprint.com

 On May 5, 9:20 am, Rey Bango [EMAIL PROTECTED] wrote:



  jQuery UI v1.5b3, the jQuery project's UI  effects library, is now
  available for download. While still in beta, the library is feature
  frozen and the features are in excellent shape.

  The jQuery UI team is anxious for your feedback so please join them on
  the UI mailing list found here:

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

  Any assistance with testing is greatly appreciated as it will help in
  making UI rock-solid out of the gate.

  Also check out the new site for the jQuery UI project 
  athttp://ui.jquery.com/

  Rey- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Toggle(fn,fn1) not working as expected

2008-05-06 Thread Richard D. Worth
Here you go:

$(p.more a).toggle(
  function() {$(this).html(laquo; Less); alert('1');},
  function() {$(this).html(More raquo;); alert('2');}
).click(function() {
  $(this).parent().siblings(div.overflow).toggle();
});

You were adding new (more) toggle methods each time the link was clicked.
You just want to define them once, and the click will call them
automatically.

- Richard

On Tue, May 6, 2008 at 8:31 AM, noon [EMAIL PROTECTED] wrote:


 $(p.more a).click(function() {
$(this).parent().siblings(div.overflow).toggle();
$(this).toggle(
function() {$(this).html(laquo; Less); alert('1');},
function() {$(this).html(More raquo;); alert('2');}
);
 });

 I am referring to p.more a when mentioning a click. The first time I
 click no alert is fired. The second time I click 1 is alerted. The
 third time I click 2 is alerted then 1 is alerted. The fourth time I
 click 2 is alerted, 1 is alerted, 2 is alerted.  And so on.  Every
 time div.overflow is toggled correctly.

 Why is it recursively operating like this?



[jQuery] Re: use jQuery selector on IE5.5

2008-05-06 Thread Dan G. Switzer, II

Angus,

I just know that in jQuery + IE5.5 most selectors return empty array.
After digging into source code I found that it will try to get the
nodeName and nodeType of document (nodeType=9) which IE 5.5's document
element doesn't have these two attributes.  As a quick fix I add the
following lines at the beginning of my HTML:

if (document) {
  if (!document.nodeType) document.nodeType = 9;
  if (!document.nodeName) document.nodeName = '#document';
}

and all of my selector works.  Of course there should be other cases
failed in IE 5.5 but at least simple selectors will work

Hope this help

Just so you know IE 5.5 is not supported by jQuery. So while this fix may
work for what you needed it for, it's likely that you'll run into other
problems with various jQuery code or plug-ins.

-Dan



[jQuery] Re: Toggle(fn,fn1) not working as expected

2008-05-06 Thread noon

Thanks a lot !


[jQuery] Re: event data ?

2008-05-06 Thread Adwin Wijaya

Thanks .. but I still curious what is inside the variable that passed
through function callback (btn in my example) and how to have access
on it.

On May 6, 6:39 pm, motob [EMAIL PROTECTED] wrote:
 $('.mybutton').click(function(){
   alert($(this).attr(id)); //get the id
   $(this).attr(disabled, disabled); //disable the clicked button

 });

 On May 6, 3:33 am, Adwin  Wijaya [EMAIL PROTECTED] wrote:

  Hi

  I got a problem ... I have more than 1 buttons and each buttons has
  unique name.
  I assign / bind the button with function like this :

  $('.mybutton').bind('click',function(btn){ alert( btn.id); } );

  every time i click on the buttons the alert always show undefined. How
  to get the ID of button who clicked ? i want to get the id, change the
  button to disabled ... how to do that one ...

  and what is event.data actually is

  thanks !


[jQuery] Re: Problem using livequery jquery.form and simplemodal together

2008-05-06 Thread Eric Martin

The first thing that jumps out at me is $
('.ajaxadd').ajaxForm(options); Where is options defined?

On May 5, 10:02 pm, paulp75 [EMAIL PROTECTED] wrote:
 Ok I have a set of results from a search, and for each record in the
 result set, there is a form built.
 When they click add to cart, i would like it to have a warning, to
 check the measurements before ordering, to double check they are
 ordering the right product, then when they click ok, it will add it to
 the cart via jquery.form, when they click cancel it shouldnt add it.

 but this is what actually occurs. when first clicking add to cart, the
 confirmation modal pops up, click ok, and nothing happens. then if you
 add another item, both the second and first items appear in the
 shopping cart, but this occurs before clicking ok though. so the
 confirmation essentially does not work.
 if you click cancel then the product is still added.
 this is the code for clicking the add button.

                 $(.ajaxadd).livequery('submit',function (e) {
         e.preventDefault();

                 // example of calling the confirm function
                 // you must use a callback function to perform the yes 
 action
                 confirm(Please check measurements, function (e) {

 $('.ajaxadd').ajaxForm(options);
         return false;
                 });

 and this is the code for the function to pop up the modal, and make
 the person confirm their product.

 function confirm(message, callback) {
         $('#confirm').modal({
                 close:false,
                 overlayId:'confirmModalOverlay',
                 containerId:'confirmModalContainer',
                 onShow: function (dialog) {
                         dialog.data.find('.message').append(message);

                         // if the user clicks yes
                         dialog.data.find('.yes').click(function () {
                                 // call the callback
                                 if ($.isFunction(callback)) {
                                         callback.apply();
                                 }
                                 // close the dialog
                                 $.modal.close();
                         });
                 }
         });

 }

 any help on this would be great. thank you
         });


[jQuery] Re: Problem with IE6/7 show/hide and relative positioned elements below

2008-05-06 Thread kareneliot

http://fox-land.co.uk/clients/test/test.png shows the bug in IE6/7
after the elements have been hidden.


[jQuery] IE7 accordion bug with images

2008-05-06 Thread Philip

I've set up an accordion style interface featuring text and images
inside the collapsing content, this works fine in IE6, FF and Safari
but IE7 seems to have problems with it, if the content isn't set
to .hide() then it will display, but as soon as it's collapsed/
expanded again the problem arises. Any clues what kind of fix is
needed?

example of bug:
http://ppe.philipspence.com/?page=propertysubNav=rental

Any help is appreciated.


[jQuery] how do it?

2008-05-06 Thread Luciano

I have a input = search and a form = form-search,
well i need create action keypress on input search i do this:

$(document).ready(function() {
$('input #search')
.keypress(function(){
$('#inf').fadeIn('normal');
})
});

but no sucess,

so i try it:

$(document).ready(function() {
$('#search')
.keypress(function(){
$('#inf').fadeIn('normal');
})
});

it`s ok but i want especify input first, i have two more objects with
this id, no inputs normal divs..

exist ?
$('input #search') or
$('input  #search') or
$('input search')
?

tks



[jQuery] Reinitialization of css values

2008-05-06 Thread Gildas

Hello people!

I'm looking for a solution to put div properties to initial state.

Explanation :
$(div).toggle(function(){
$(this).animate({
width : 90%,
height : 90%,
left : 5%,
top : 5%
},500);
},function(){
 //Reinitialization of initial values which are
described in the CSS file
});

Thank you!


[jQuery] Re: jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-06 Thread Adwin Wijaya

I used 1.5b2 and it worked well.. but when I changed to 1.5b3 it
doesnt work .. like the datepicker ...

I use this class instead using one by one
jquery.ui-all-1.5b4.js

but using beta2 it work perfectly ...

here is the error :
$.effects has no properties
[Break on this error] $.effects.blind = function(o) {

jquery.ui-all-1.5... (line 2697)
$(#orderdate).datepicker is not a function


thx

adwin

   jQuery UI v1.5b3, the jQuery project's UI  effects library, is now
   available for download. While still in beta, the library is feature
   frozen and the features are in excellent shape.

   The jQuery UI team is anxious for your feedback so please join them on
   the UI mailing list found here:

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

   Any assistance with testing is greatly appreciated as it will help in
   making UI rock-solid out of the gate.

   Also check out the new site for the jQuery UI project 
   athttp://ui.jquery.com/

   Rey- Hide quoted text -

  - Show quoted text -


[jQuery] Autocompleter using a static dropdown

2008-05-06 Thread Pickledegg

I have a dropdown of countries that has already been output to the
browser. All the autocompleter examples I have seen use ajax to look
up the input data and return a SQL like match.

How do I make an autocompleter by just using the available option tags?


[jQuery] using variables with jquery

2008-05-06 Thread quirksmode

Hi,

I need to make a div slide across the screen using the animate
command. It works when I use the following:

$('#js_innerwrapper').animate({left:+=500}, 1000, 'easeOutSine');


However, i need to be able to change the 500 to be width of the div,
which i get using:

$.gamewidth = $('.gamewrapper').width();


I then need to combine the two which does not seem to work:

$('#js_innerwrapper').animate({left:+=$.gamewidth}, 1000,
'easeOutSine');

Any ideas?



[jQuery] Re: using variables with jquery

2008-05-06 Thread Carl Von Stetten

quirksmode,

Try this:

$('#js_innerwrapper').animate({left:+=+$.gamewidth}, 1000,
'easeOutSine');

HTH,
Carl

quirksmode wrote:
 Hi,

 I need to make a div slide across the screen using the animate
 command. It works when I use the following:

 $('#js_innerwrapper').animate({left:+=500}, 1000, 'easeOutSine');


 However, i need to be able to change the 500 to be width of the div,
 which i get using:

 $.gamewidth = $('.gamewrapper').width();


 I then need to combine the two which does not seem to work:

 $('#js_innerwrapper').animate({left:+=$.gamewidth}, 1000,
 'easeOutSine');

 Any ideas?



   


[jQuery] extending objects with jquery

2008-05-06 Thread Javier Martinez

I'm moving from mootools to jquery and trying to port my UI framework
to jquery.
Some of my widgets are extending from another widget. For example a
datagrid and a dataview objects extends from view object
(because both uses same methods from view).
With Mootools I have something like this

Class View()

Class DataGrid ({
extends: View
})

Class DataView({
extends: View
})

What is the equivalent on jQuery?

Thanks!


[jQuery] Re: how do it?

2008-05-06 Thread Alexandre Plennevaux
first, get your markup correct: if you need to use several times the same
ID, then use a CLASS instead. ID are for UNIQUE entities.

besides that, this

$('input #search')


should be

$('input#search')



Hope this helps!

alex


On Tue, May 6, 2008 at 3:46 PM, Luciano [EMAIL PROTECTED] wrote:


 I have a input = search and a form = form-search,
 well i need create action keypress on input search i do this:

$(document).ready(function() {
$('input #search')
.keypress(function(){
$('#inf').fadeIn('normal');
})
});

 but no sucess,

 so i try it:

$(document).ready(function() {
$('#search')
.keypress(function(){
$('#inf').fadeIn('normal');
})
});

 it`s ok but i want especify input first, i have two more objects with
 this id, no inputs normal divs..

 exist ?
 $('input #search') or
 $('input  #search') or
 $('input search')
 ?

 tks




-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-06 Thread Rey Bango


Please post this error on the jQuery UI mailing list.

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

Rey...

Adwin Wijaya wrote:

I used 1.5b2 and it worked well.. but when I changed to 1.5b3 it
doesnt work .. like the datepicker ...

I use this class instead using one by one
jquery.ui-all-1.5b4.js

but using beta2 it work perfectly ...

here is the error :
$.effects has no properties
[Break on this error] $.effects.blind = function(o) {

jquery.ui-all-1.5... (line 2697)
$(#orderdate).datepicker is not a function


thx

adwin


jQuery UI v1.5b3, the jQuery project's UI  effects library, is now
available for download. While still in beta, the library is feature
frozen and the features are in excellent shape.
The jQuery UI team is anxious for your feedback so please join them on
the UI mailing list found here:
http://groups.google.com/group/jquery-ui?hl=en
Any assistance with testing is greatly appreciated as it will help in
making UI rock-solid out of the gate.
Also check out the new site for the jQuery UI project athttp://ui.jquery.com/
Rey- Hide quoted text -

- Show quoted text -




[jQuery] jQuery UI Bug Reporting Discussion - PLEASE READ

2008-05-06 Thread Rey Bango


Please post any issues with jQuery UI on the jQuery UI mailing list.

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

Rey...


[jQuery] Re: need some help with selecting text nodes

2008-05-06 Thread Glen Lipka
I tried to cut corners by skimming your html.  I see it now.  The divs close
and the text is after the div.
This is really strange HTML to me.  Why not just put the text inside the
div?  Or just wrap the text inside a span?
If you wrap the text inside spans, then the jQuery is pretty simple.  I
whipped up a sample.

http://commadot.com/jquery/findTextElements.php

$(#tln21).next(span).addClass(highlight)

Sometimes, fancy JS is not as good as clean html.

Glen

On Mon, May 5, 2008 at 6:51 PM, darren [EMAIL PROTECTED] wrote:


 hi glen, thanks for replying.

 That still wouldn't work. With that you are looking for the text
 inside div elements which are descendants of of the id'd element.
 What i want to select are certain text elements of the id'd element.
 I figured something out, but this is surprisinlgy difficult:

 div id=21
 div
 text node
 div
 text node
 ...
 /div

 I had to use .contains() and [nodeType=3] to pick text nodes.  not
 pretty.

 On May 5, 4:23 pm, Glen Lipka [EMAIL PROTECTED] wrote:
  $(#tln21 div).text();
 
  Like that?  By the way, firebug is very helpful to test our selectors and
  see what they come up with.
  Hmm, it would be nice to have a tutorial on how to do this.  I can try
 and
  whip one up.
 
  Glen
 
  On Mon, May 5, 2008 at 2:47 PM, darren [EMAIL PROTECTED] wrote:
 
   hi Joe, thanks for your comment
 
   If you look closer, you can see that the text is not actually in the
   div element.  i basically need to select the text after that node:
 
   div
 div tln=xxx/div
 Some text
 div tln=xxx/div
 some more text
 div tln=xxx3/div
 even more text
   /div
 
   So that wouldnt work
 
   On May 5, 2:06 pm, Joe [EMAIL PROTECTED] wrote:
$(#tln21').text();
 
This will return the text associated with id=tln21.
 
   http://docs.jquery.com/Attributes/text
 
Joe
 
   www.subprint.com
 
On May 5, 2:34 pm, darren [EMAIL PROTECTED] wrote:
 
 Hi everybody, new member here.
 
 I have a project with the following snipped of code:
 
 =start html=
 div class=line
   div name=tln4 id=tln4 class=ln
 tln
  !
   /divAs I remember, Adam, it was
 upon
 this fashion
   div name=tln5 id=tln5 class=ln
 tln5/divbequeathed me by will but poor a thousand
   div name=tln6 id=tln6 class=ln
 tln
  !
   /divcrowns, and, as thou say'st,
 charged my brother,
   div name=tln7 id=tln7 class=ln
 tln
  !
   /divon his blessing, to breed me
 well;
 and
   div name=tln8 id=tln8 class=ln
 tln
  !
   /divthere begins my sadness. My
 brother Jaques he keeps
   div name=tln9 id=tln9 class=ln
 tln
  !
   /divat school, and report speaks
 goldenly of his profit.
   div name=tln10 id=tln10
 class=ln
 tln10/divFor my part, he keeps me rustically at home, or, to
 speak
   div name=tln11 id=tln11
 class=ln
 tln
  !
   /divmore properly, stays me here at
 home unkept; for call
   div name=tln12 id=tln12
 class=ln
 tln
  !
   /divyou that keeping for a
 gentleman
 of my birth that differs
   div name=tln13 id=tln13
 class=ln
 tln
  !
   /divnot from the stalling of an ox?
 His horses are bred
   div name=tln14 id=tln14
 class=ln
 tln
  !
   /divbetter, for, besides that they
 are
 fair with their feeding,
   div name=tln15 id=tln15
 class=ln
 tln15/divthey are taught their man�ge, and to that end riders
   div name=tln16 id=tln16
 class=ln
 tln
  !
   /divdearly hired; but I, his
 brother,
 gain nothing under
   div name=tln17 id=tln17
 class=ln
 tln
  !
   /divhim but growth, for the which
 his
 animals on his
   div name=tln18 id=tln18
 class=ln
 tln
  !
   

[jQuery] Re: [ANNOUNCE] jQuery UI v1.5b3 is Now Available for Download plus New Site

2008-05-06 Thread Rey Bango


Please post this bug on the jQuery UI mailing list.

Thanks,

Rey

Quinode wrote:


little bug inthe last resize example : when resizing the top border
under FF 2 Mac, it comes over the text



[jQuery] Re: newbie struggling with JSON

2008-05-06 Thread Josh Nathanson


That sounds like something could be going astray on the server.  You can 
check your ajax call in Firebug by opening the console, then clicking the 
Net tab, then click XHR - you should see the url that is being 
requested, plus request and response tabs.  Check the response tab and make 
sure what you expect is being returned from the ajax call.


-- Josh


- Original Message - 
From: Stan McFarland [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Tuesday, May 06, 2008 4:55 AM
Subject: [jQuery] Re: newbie struggling with JSON



Josh,   thanks for the tip.   console.log(code) outputs undefined.
Any other suggestions?

Thanks again,

Stan



On May 5, 7:42 pm, Josh Nathanson [EMAIL PROTECTED] wrote:

Stan,

I'd suggest using Firefox with the Firebug extension, and doing a
console.log(code) in your callback. This will give you better information
than is provided by using the alert method.

-- Josh



- Original Message -
From: Stan McFarland [EMAIL PROTECTED]
To: jQuery (English) jquery-en@googlegroups.com
Sent: Monday, May 05, 2008 2:07 PM
Subject: [jQuery] newbie struggling with JSON

 Hi, newbie here. Hoping someone can help. I'm able to successfully
 call $.get and then eval() a URL that returns a JSON object:

 $.get(myurl,
 function(code) { eval(code); alert(code[0]); });

 But if I try to call $.getJSON on the same URL:

 $.getJSON (myurl,
 function(code) { alert(code[0]); });

 I always get back: code has no properties

 Any suggestions?

 Thanks,

 Stan McFarland
 `- Hide quoted text -

- Show quoted text - 




[jQuery] Re: the dropdown menu flashes on the screen on page load.

2008-05-06 Thread all4one

style=display:none worked great! thanks

On May 2, 2:33 am, yabado [EMAIL PROTECTED] wrote:
 You may want to specifically tell the menu dive to not display, hard
 coded.

 div id=menuitems style=display:none;/div

 On May 1, 6:04 pm, Theodore Ni [EMAIL PROTECTED] wrote:



  You'll need to give us more information, a demo or at least some code,
  before we can help you diagnose.

  On Thu, May 1, 2008 at 5:18 PM, all4one [EMAIL PROTECTED] wrote:

   I have two drop-down lists in the main menu at the top of the page.
   When you click on link items in the top menu (different menu) which
   is below the main menu the drop-down menu flashs then disapears as
   the rest of the page loads.

  --
  Ted- Hide quoted text -

 - Show quoted text -


[jQuery] $ is not defined

2008-05-06 Thread mdg583

Hi, I don't know where this problem is coming from, but I find that
over the course of a few jquery AJAX operations and a ajaxForm submit,
for a little while I find that $ is not defined. Basically, I am
loading a form into the current document using the jquery load
function, and then setting up ajaxForm to submit this form and put the
results into another div. This content that is finally loaded into
this next div div has a javascript function near the beginning, and at
the point in time when this script is reached, I find that $ is not
defined.

This happened once before and I just worked around it, but that is
getting difficult.

Does anyone know why this would be?

I have jquery.form that says it requires jQuery v1.1 or later, and I
have jQuery 1.2.1.


[jQuery] Modal Dialog in blockUI

2008-05-06 Thread Adam

Is it possible to show an external webpage inside of a blockUI modal
dialog?  I'd like to call another page via ajax and populate the
dialog instead of using a reference to a hidden div, etc.


[jQuery] Contributors to jQuery and GPL license

2008-05-06 Thread Simon

The company I work for is interested in using jQuery in a software
project. However in order to do so we have to perform due dilergence
checks that the code in jQuery meets the terms of its license. I
realise that jQuery is offered under dual MIT and GPL licenses which
is great.

However, is any review performed of contributions made to the code to
understand whether the contributor has the right to redistribute the
code or does the maintainer accept contributions without asking these
types of questions?

Also, are contributors required to accept/sign any kind of
contributor’s statement?  If yes could someone provide a copy?


[jQuery] Re: $ is not defined

2008-05-06 Thread Jake McGraw

Could you provide an example of this online?

- jake

On Tue, May 6, 2008 at 12:33 PM, mdg583 [EMAIL PROTECTED] wrote:

  Hi, I don't know where this problem is coming from, but I find that
  over the course of a few jquery AJAX operations and a ajaxForm submit,
  for a little while I find that $ is not defined. Basically, I am
  loading a form into the current document using the jquery load
  function, and then setting up ajaxForm to submit this form and put the
  results into another div. This content that is finally loaded into
  this next div div has a javascript function near the beginning, and at
  the point in time when this script is reached, I find that $ is not
  defined.

  This happened once before and I just worked around it, but that is
  getting difficult.

  Does anyone know why this would be?

  I have jquery.form that says it requires jQuery v1.1 or later, and I
  have jQuery 1.2.1.



[jQuery] Re: extending objects with jquery

2008-05-06 Thread motob

jQuery isn't really a javascript framework, so any extending and
inheritance issues need to be dealt with using JavaScript's prototype
chain. So you could do something like this:

function View(){
  ...
}

function DataGrid(){
  ...
}

DataGrid.prototype = new View(); //here is your inheritance

Now DataGrid has all of the methods that View has.

Maybe someone else has some other ideas, or an alternative way to
achieve a class-like structure.

On May 6, 11:13 am, Javier Martinez [EMAIL PROTECTED] wrote:
 I'm moving from mootools to jquery and trying to port my UI framework
 to jquery.
 Some of my widgets are extending from another widget. For example a
 datagrid and a dataview objects extends from view object
 (because both uses same methods from view).
 With Mootools I have something like this

 Class View()

 Class DataGrid ({
 extends: View

 })

 Class DataView({
 extends: View

 })

 What is the equivalent on jQuery?

 Thanks!


[jQuery] Re: Reinitialization of css values

2008-05-06 Thread Richard D. Worth
$(this).attr('style', );

-or-

$(this).removeAttr('style');

- Richard

On Tue, May 6, 2008 at 9:51 AM, Gildas [EMAIL PROTECTED] wrote:


 Hello people!

 I'm looking for a solution to put div properties to initial state.

 Explanation :
 $(div).toggle(function(){
$(this).animate({
width : 90%,
height : 90%,
left : 5%,
top : 5%
},500);
},function(){
 //Reinitialization of initial values which are
 described in the CSS file
});

 Thank you!



[jQuery] Re: $ is not defined

2008-05-06 Thread motob

When ever I get the $ not defined error, its because my core jQuery
library is not there, for example when I switch from jquery.pack to
jquery.min and I forget to change the script tag reference in the
head.

Just double check that its properly referenced and that jQuery is
listed above jquery.form.

On May 6, 12:45 pm, Jake McGraw [EMAIL PROTECTED] wrote:
 Could you provide an example of this online?

 - jake

 On Tue, May 6, 2008 at 12:33 PM, mdg583 [EMAIL PROTECTED] wrote:

   Hi, I don't know where this problem is coming from, but I find that
   over the course of a few jquery AJAX operations and a ajaxForm submit,
   for a little while I find that $ is not defined. Basically, I am
   loading a form into the current document using the jquery load
   function, and then setting up ajaxForm to submit this form and put the
   results into another div. This content that is finally loaded into
   this next div div has a javascript function near the beginning, and at
   the point in time when this script is reached, I find that $ is not
   defined.

   This happened once before and I just worked around it, but that is
   getting difficult.

   Does anyone know why this would be?

   I have jquery.form that says it requires jQuery v1.1 or later, and I
   have jQuery 1.2.1.


[jQuery] Re: Contributors to jQuery and GPL license

2008-05-06 Thread Rey Bango


Simon,

Your best bet is to contact John Resign directly as he can answer your 
questions. I've cc'd him in this email.


Rey...

Simon wrote:

The company I work for is interested in using jQuery in a software
project. However in order to do so we have to perform due dilergence
checks that the code in jQuery meets the terms of its license. I
realise that jQuery is offered under dual MIT and GPL licenses which
is great.

However, is any review performed of contributions made to the code to
understand whether the contributor has the right to redistribute the
code or does the maintainer accept contributions without asking these
types of questions?

Also, are contributors required to accept/sign any kind of
contributor’s statement?  If yes could someone provide a copy?



[jQuery] error with $(this).val(value) in IE 6.x

2008-05-06 Thread code_berzerker

for some empty select elements inside form and table I've done
something like that:

$.each(
$('#form_table .mt_type'),
function()
{
  elemId = $(this).attr('id');
  //alert(elemId);
  $(this).html('\
  option value=0-- wybierz --/option\
  option value=1val1/option\
  option value=2val2/option\
  option value=3val3/option\
  option value=4val4/option\
  ');

// both of following give me error in IE6, FF and Opera report
no problem.
$(this).val(0);
$('#'+elemId).val(0);
   }
);

I set the val to 0 coz in FF it shows 5th ('4') option as selected.


[jQuery] Re: addUnique

2008-05-06 Thread Iconico

On May 1, 7:42 pm, Dave Methvin [EMAIL PROTECTED] wrote:
 That actually sounds like a bug. What version ofjQueryare you using?
 AFAICT,jQuery().add() is supposed to usejQuery.merge to avoid
 duplicates. Can you create a test case and post a bug report?

I'm using 1.2.3, the latest. I don't think it's a bug, it's more
subtle than that.

There's a thread here that details the issue pretty well:
http://groups.google.com/group/jquery-en/browse_thread/thread/f08ee3387b7522b/46b61b9fe4e7d4b6

If you still don't follow I can mock up a test for you, just let me
know.


[jQuery] Re: hover and fadin and fade out need help...

2008-05-06 Thread Aaron

I also want to add in I am making a javascript file meaning
myscode.js  and I included it in my website which is in html.

once I do that would it run the js  or do I have to do a special
call using script tags to call functions or var again from the
script to run any javascript on the html doc??

On May 4, 5:42 pm, Aaron [EMAIL PROTECTED] wrote:
 No not a drop down. I want it just like a table or look how a tool tip
 looks but I want the stuff inside the table area to be clickable.
 Like I have a photo of a person and I want that person to be able to
 put the mouse over the photo to fade in their photo album  with other
 photos in a sqaure window.

 the li is the list of photos of the user.

 Here is a somewhat 
 example:http://www.tamingthebeast.net/articles6/tooltip-scripts-uses.htm

 I want somthing like a tooltip but I want it to show photos where a
 user can scroll and see a whole photo album.

 On May 4, 1:43 pm, Eddie [EMAIL PROTECTED] wrote:



  Is it like dropdown menu? Your markup is made of nested lists, right?

  On 4 maio, 11:25, Liam Byrne [EMAIL PROTECTED] wrote:

   What's li meant to be - in that code it's not assigned at all

   If it's meant to be every list item on the page, then it should be
   $(li), and you'll also need to check whether or not the outer ul or
   ol for the li is visible.

   Liam

   Aaron wrote:
well I don't plan using a class I am trying to use an id.  in css I
have stuff declared like #image{css stuff here;}
here is the code I have.

$(#image).hover(
    function(){
        $(li).fadeIn(slow);
    },
    function(){
        $(li).fadeOut(slow);
    },
);

what I want to do is  when the mouse goes over the image I want a
window not a popup window but a window that fades in on the right or
left of the image where it would have a list of other images and if
the mouse goes off the image and is not on that list area then it
would fade out.

---­­-
On May 3, 8:15 pm, Eddie [EMAIL PROTECTED] wrote:

Hi Aaron,

Try this:

$(.elementClass).hover(
    function(){
        $(this).fadeIn(normal);
    },
    function(){
        $(this).fadeOut(normal);
    },
);

If it's not what you expected, post your code.

On 3 maio, 17:50, Aaron [EMAIL PROTECTED] wrote:

Hi I am somewhat new here and to jquery I learned javascript and have
a previous knowledge of programming.

I am having trouble using the hover and the fadein and fadeout
functions.

I made a script to fade in a list when the mouse is over an image but
it dosen't work at all.

I want to make an action where when the users put the mouse over the
image a window fades in it could be a window/or table/ ect somthing
that will look like a photo album which allows the user to look at
other pics the users has then if the users mouse goes off the picture
and it's not on that fadeded in table/or window  then it would fade
out.

I am trying to play with my css elements I already defined all html
elements to css properties ect.- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] error with $(this).val(value) in IE 6.x

2008-05-06 Thread code_berzerker

for some empty select elements inside form and table I've done
something like that:

$.each(
$('#form_table .mt_type'),
function()
{
  elemId = $(this).attr('id');
  //alert(elemId);
  $(this).html('\
  option value=0-- wybierz --/option\
  option value=1val1/option\
  option value=2val2/option\
  option value=3val3/option\
  option value=4val4/option\
  ');

// both of following give me error in IE6, FF and Opera report
no problem.
$(this).val(0);
$('#'+elemId).val(0);
   }
);

I set the val to 0 coz in FF it shows 5th ('4') option as selected.


[jQuery] Re: event data ?

2008-05-06 Thread motob

The best way to see what the btn object is all about is to download
and install firebug. Then use the console to output that object. for
example:

$('.mybutton').bind('click',function(btn){ console.log( btn); } );


Then on the console panel of firebug, you'll see the btn object, which
is clickable. If clicked, firebug will show you the DOM representation
of that object and all of its properties that are accessible.

On May 6, 9:22 am, Adwin  Wijaya [EMAIL PROTECTED] wrote:
 Thanks .. but I still curious what is inside the variable that passed
 through function callback (btn in my example) and how to have access
 on it.

 On May 6, 6:39 pm, motob [EMAIL PROTECTED] wrote:

  $('.mybutton').click(function(){
alert($(this).attr(id)); //get the id
$(this).attr(disabled, disabled); //disable the clicked button

  });

  On May 6, 3:33 am, Adwin  Wijaya [EMAIL PROTECTED] wrote:

   Hi

   I got a problem ... I have more than 1 buttons and each buttons has
   unique name.
   I assign / bind the button with function like this :

   $('.mybutton').bind('click',function(btn){ alert( btn.id); } );

   every time i click on the buttons the alert always show undefined. How
   to get the ID of button who clicked ? i want to get the id, change the
   button to disabled ... how to do that one ...

   and what is event.data actually is

   thanks !


[jQuery] Re: Photo Crop proposal

2008-05-06 Thread Richard D. Worth
On Mon, May 5, 2008 at 11:21 AM, LTG [EMAIL PROTECTED] wrote:

 Please see the video of my prototype here:

 http://www.hdgreetings.com/view.aspx?name=JQuery%20Crop%20Prototypevideo=http://download.hdgreetings.com/crop.flv


Funny story. At 0:45 in your video, the picture of the family sitting on the
bench/porch swing -  that's my brother's family (I waited to check with him
before I posted, and he's cool with it). #1 google image search for 'family'
when filtered for Extra Large images

http://images.google.com/images?q=familyum=1hl=ensa=Nimgsz=huge

I'm curious. Is that how you found it? It's a great picture for what you're
demonstrating.

- Richard


[jQuery] slide down animation jumps at the end

2008-05-06 Thread Yann

I got a smilingly simple problem but I have spent way to much time
trying to fix it unsuccessfully already... Hoping some jQuery guru can
figure this one out for me...

The javascript is pretty basic:

// set defaults
$('.news_content').hide();
$('.news_item_bg div:first').show();
$('#latest_news a:first').addClass('selected');
// set news links behavior
$('#latest_news a').click(function () {
$('#latest_news a').removeClass('selected');
$(this).addClass('selected');

var target = $(this).attr('href');

 $(.news_content:visible).animate({color: '#fff'},
500).slideUp(1000, function() {
$(target).slideDown(1000).animate({color: '#fff'}, 
1000);
});
return false;
});

But when it slides down, the end of the animation is choppy, more
accurately, it seems that the height is calculated wrong during the
animation and readjusted at the end...

Anyone else has experienced this problem before? I must be doing
something wrong since Google search didn't turn anything up...

Thanks!


[jQuery] [ANNOUNCE] Spaz Twitter Client uses jQuery

2008-05-06 Thread Rey Bango


If you've ever been interested in learning how develop AIR apps w/ 
jQuery then take a look at the Spaz Twitter client 
http://funkatron.com/spaz. It's a OSS project where you can download the 
 source and see how things are done.


It's also a pretty neat Twitter client as well. :)

Many thanks to Ed Finkler for starting this project up and using jQuery 
under the hood.


Rey


[jQuery] how to redirect an Ajax loaded page to another page...

2008-05-06 Thread aldomatic

How do I redirect an Ajax loaded page to another page? The Meta
refresh does not work. Anyone?

Thanks.


[jQuery] Re: how do it?

2008-05-06 Thread Luciano Mazzetto
sorry, i do this it and return ERROR no function..
$('input#search').toUpperCase();




On Tue, May 6, 2008 at 4:10 PM, Luciano Mazzetto [EMAIL PROTECTED]
wrote:

 sure!, but i need do it ?

 $('input#search').toUpperCase();  // ???



 On Tue, May 6, 2008 at 12:27 PM, Alexandre Plennevaux 
 [EMAIL PROTECTED] wrote:

  first, get your markup correct: if you need to use several times the
  same ID, then use a CLASS instead. ID are for UNIQUE entities.
 
  besides that, this
 
  $('input #search')
 
 
  should be
 
  $('input#search')
 
 
 
  Hope this helps!
 
  alex
 
 
 
  On Tue, May 6, 2008 at 3:46 PM, Luciano [EMAIL PROTECTED] wrote:
 
  
   I have a input = search and a form = form-search,
   well i need create action keypress on input search i do this:
  
  $(document).ready(function() {
  $('input #search')
  .keypress(function(){
  $('#inf').fadeIn('normal');
  })
  });
  
   but no sucess,
  
   so i try it:
  
  $(document).ready(function() {
  $('#search')
  .keypress(function(){
  $('#inf').fadeIn('normal');
  })
  });
  
   it`s ok but i want especify input first, i have two more objects with
   this id, no inputs normal divs..
  
   exist ?
   $('input #search') or
   $('input  #search') or
   $('input search')
   ?
  
   tks
  
  
 
 
  --
  Alexandre Plennevaux
  LAb[au]
 
  http://www.lab-au.com




 --
 att.
 Luciano M.
 www.m2t.com.br




-- 
att.
Luciano M.
www.m2t.com.br


[jQuery] Re: suggestions for a hover zoom on text...

2008-05-06 Thread gr00vy0ne

Thanks, I changed the code and it is running better especially when
running Firefox and Safari are working very well. IE 6/7 still remains
a problem.

I've narrowed it down to where the layer popup is showing up. For
instance, if I make the layer pop-up render above (y-axis not z) the
hover point then it's very fast. If I make the layer pop-up render
exactly over the hover point then it's very slow.

So, if you hover over something and then pop-up a layer under it (i.e.
where the mouse is), should the performance under IE6/7 be as bad as
I'm seeing?

-v

On May 5, 10:53 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
 In your code, it looks like you use many calls to $(this) and
 $(#times_zoom).  You'll get much better performance if you set variables
 and use those instead, i.e in your mouseover function:

 var th = $(this), tz = $(#times_zoom);

 Then you would use those references like so:

 // change the contents
 tz.html(th.html());

 This will improve performance because you are not calling the jQuery
 function as many times.

 -- Josh

 - Original Message -
 From: gr00vy0ne [EMAIL PROTECTED]
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Monday, May 05, 2008 6:15 PM
 Subject: [jQuery] suggestions for a hover zoom on text...

  I'm trying to come up with a technique for expanding text when you
  hover over it. I built a real quick and dirty demo to help explain the
  affect I'm trying to achieve:

 http://imlocking.com/projects/zoom_text.html

  So, in the list of times, I'd like to make them pop when you hover
  over. Of course, it would be easy to change the style of the element
  directly but then the list would move which I'm trying to avoid.

  What I'm doing now is creating a hidden positionable container that
  moves to the correct location and shows a copy of the hovered element
  (with a different style applied). It works but I've noticed on an
  actual page with other content, the performance can get horrendous.
  Safari is blazing fast. Both Firefox and IE can both go up to 100% CPU
  usage.

  All the code (HTML/CSS/JS) is inline. So, please take a look and let
  me know if there's a better more efficient way to do this. Any
  suggestions, tips, comments, etc. are welcome.

  Another alternative we've tried is putting hidden spans in the page
  that show up on hover (requires little-to-no scripting) but it ends up
  marking the markup unnecessarily large.

  Many thanks,
  victor


[jQuery] Re: how do it?

2008-05-06 Thread Luciano Mazzetto
sure!, but i need do it ?

$('input#search').toUpperCase();  // ???


On Tue, May 6, 2008 at 12:27 PM, Alexandre Plennevaux [EMAIL PROTECTED]
wrote:

 first, get your markup correct: if you need to use several times the same
 ID, then use a CLASS instead. ID are for UNIQUE entities.

 besides that, this

 $('input #search')


 should be

 $('input#search')



 Hope this helps!

 alex



 On Tue, May 6, 2008 at 3:46 PM, Luciano [EMAIL PROTECTED] wrote:

 
  I have a input = search and a form = form-search,
  well i need create action keypress on input search i do this:
 
 $(document).ready(function() {
 $('input #search')
 .keypress(function(){
 $('#inf').fadeIn('normal');
 })
 });
 
  but no sucess,
 
  so i try it:
 
 $(document).ready(function() {
 $('#search')
 .keypress(function(){
 $('#inf').fadeIn('normal');
 })
 });
 
  it`s ok but i want especify input first, i have two more objects with
  this id, no inputs normal divs..
 
  exist ?
  $('input #search') or
  $('input  #search') or
  $('input search')
  ?
 
  tks
 
 


 --
 Alexandre Plennevaux
 LAb[au]

 http://www.lab-au.com




-- 
att.
Luciano M.
www.m2t.com.br


[jQuery] Re: jQuery Trac unavailable

2008-05-06 Thread Nick Fletcher

On May 6, 2:47 am, thatvetguy [EMAIL PROTECTED] wrote:
 I get that duplicate entry error a lot too. I'm not sure the ID is
 always the same...

I think they just need to upgrade Trac. I have to hold my nose just
right to navigate the site. Not very professional IMO.


[jQuery] Re: [ANNOUNCE] Spaz Twitter Client uses jQuery

2008-05-06 Thread Andy Matthews

Same thing with Snitter. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rey Bango
Sent: Tuesday, May 06, 2008 1:53 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] [ANNOUNCE] Spaz Twitter Client uses jQuery


If you've ever been interested in learning how develop AIR apps w/ jQuery
then take a look at the Spaz Twitter client http://funkatron.com/spaz. It's
a OSS project where you can download the
  source and see how things are done.

It's also a pretty neat Twitter client as well. :)

Many thanks to Ed Finkler for starting this project up and using jQuery
under the hood.

Rey




[jQuery] Re: [ANNOUNCE] Spaz Twitter Client uses jQuery

2008-05-06 Thread Rey Bango


Yep. The only reason I didn't mention it in this context is because 
Snitter is not a OSS project and the code cannot be used to create your 
own client.


I actually use Snitter and it's great!

Rey

Andy Matthews wrote:
Same thing with Snitter. 


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rey Bango
Sent: Tuesday, May 06, 2008 1:53 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] [ANNOUNCE] Spaz Twitter Client uses jQuery


If you've ever been interested in learning how develop AIR apps w/ jQuery
then take a look at the Spaz Twitter client http://funkatron.com/spaz. It's
a OSS project where you can download the
  source and see how things are done.

It's also a pretty neat Twitter client as well. :)

Many thanks to Ed Finkler for starting this project up and using jQuery
under the hood.

Rey





[jQuery] Re: slide down animation jumps at the end

2008-05-06 Thread Scott Trudeau
IIRC this can be caused by padding and/or margin being other than 0.

On Tue, May 6, 2008 at 2:10 PM, Yann [EMAIL PROTECTED] wrote:


 I got a smilingly simple problem but I have spent way to much time
 trying to fix it unsuccessfully already... Hoping some jQuery guru can
 figure this one out for me...

 The javascript is pretty basic:

// set defaults
$('.news_content').hide();
$('.news_item_bg div:first').show();
$('#latest_news a:first').addClass('selected');
// set news links behavior
$('#latest_news a').click(function () {
$('#latest_news a').removeClass('selected');
$(this).addClass('selected');

var target = $(this).attr('href');

 $(.news_content:visible).animate({color: '#fff'},
 500).slideUp(1000, function() {
$(target).slideDown(1000).animate({color: '#fff'},
 1000);
});
return false;
});

 But when it slides down, the end of the animation is choppy, more
 accurately, it seems that the height is calculated wrong during the
 animation and readjusted at the end...

 Anyone else has experienced this problem before? I must be doing
 something wrong since Google search didn't turn anything up...

 Thanks!




-- 
--
Scott Trudeau
scott.trudeau AT gmail DOT com
http://sstrudeau.com/
AIM: sodthestreets


[jQuery] Re: how to redirect an Ajax loaded page to another page...

2008-05-06 Thread Christoph Haas
On Dienstag, 6. Mai 2008, aldomatic wrote:
 How do I redirect an Ajax loaded page to another page? The Meta
 refresh does not work. Anyone?

You are expecting too much magic to happen. Unless you handle redirections 
yourself it won't work. Just fetch the correct URl and you don't need any 
redirects.

Cheers
 Christoph (yes, I have a real name)
-- 
When you do things right people won't be sure you've done anything at all.


signature.asc
Description: This is a digitally signed message part.


[jQuery] validating dynamically generated data

2008-05-06 Thread jpl80


I need to validate some dynamically generated form data to ensure clients
can't order more of something than we have in stock. I can't set static
comparisons. Here is my html:

form action=addtocart.php method=post
input type=submit class=addtocart value=add selected items to cart /


div class=instock
  h4manual 1/h4
  div class=qty title=9090/div
  input name=150 type=text id=150 class=order-qty /label
for=150Qty:/label
/div

div class=instock
  h4manual 2/h4
  div class=qty title=4848/div
  input name=151 type=text id=151 class=order-qty /label
for=151Qty:/label
/div

/form

I want to validate on keyup(). In rough pseudocode, something like this:

$(document).keyup(function(event){
  if (($this.getValue(input))  ($this.getValue(span.qty))) {
addText(Not enough in stock);
  }
});

I know that's not even close. Could someone help me?
-- 
View this message in context: 
http://www.nabble.com/validating-dynamically-generated-data-tp17091060s27240p17091060.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jQuery AJAX Autocomplete with ASP .NET

2008-05-06 Thread MorningZ

Use a generic handler (ashx file) to spit out the needed list as plain
text





On May 6, 5:33 am, Lokesh [EMAIL PROTECTED] wrote:
 Hi,

 How can I use jQuery AJAX Autocomplete script to call my AJAX method
 from ASP .NET instead of php.


[jQuery] Re: strange behaviour: multiple selectors responding

2008-05-06 Thread Karl Swedberg


Hi Bob,

I'd probably just do this without the ajaxStart and ajaxStop methods.  
Try this:


$(#contests ul li span a).toggle(
   function(){
 //store ref to toggling element for use in ajax callbacks...
 var lnk = $(this);
 var url_title = lnk.html();
 lnk.html(loading...); // just before the stuff is loaded
 $(.contest-form- + this.name).load(this.href, function() {
 lnk.html(url_title); // after the stuff is loaded
 }).show();
 return false;
   },
   function(){
 $(.contest-form- + this.name).hide(fast);
 return false;
   }
);

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 6, 2008, at 6:34 AM, bobh wrote:



I'm afraid the behaviour is still there using your code. I've updated
my example page with it.

On May 6, 12:25 am, Wizzud [EMAIL PROTECTED] wrote:

The problem is the context of 'this' within the ajaxStart() and
ajaxStop() functions.

try this instead...

$(#contests ul li span a).toggle(
   function(){
 //store ref to toggling element for use in ajax callbacks...
 var lnk = $(this);
 var url_title = lnk.html();
 lnk.ajaxStart(function(){
 lnk.html(loading...);
   }).ajaxStop(function(){
 lnk.html(url_title);
   });
 $(.contest-form- + this.name).load(this.href).show();
 return false;
   },
   function(){
 $(.contest-form- + this.name).hide(fast);
 return false;
   }
);

On May 5, 2:26 pm, bobh [EMAIL PROTECTED] wrote:


hi,



I'm trying to change the innerHtml of an anchor to loading for the
duration of an ajax load with this code:



$(#contests ul li span a).toggle(
   function(){
   var url_title = $(this).html();
   $(this).ajaxStart(function(){$
(this).html(loading...);}).ajaxStop(function(){$
(this).html(url_title);});
   $(.contest-form- +  
this.name).load(this.href).show();

   return false;
   },
   function(){
   $(.contest-form- + this.name).hide(fast);
   return false;
   }
);



both the ajax load and the text replacing work fine. the problem
however is that all links that have been clicked are getting the
loading innerHtml. in stead of only the one that is clicked on.  
for
clarification I've put an example page online here:http://allnighters.net/jq/ 
.

try clicking a few different links.



thanks




[jQuery] Re: how do it?

2008-05-06 Thread Karl Swedberg

Luciano,

If you're trying to get the value of an element with an ID of  
search, and make it upper-case, do this:


$('#search').val().toUpperCase();


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 6, 2008, at 3:10 PM, Luciano Mazzetto wrote:


sure!, but i need do it ?

$('input#search').toUpperCase();  // ???


On Tue, May 6, 2008 at 12:27 PM, Alexandre Plennevaux [EMAIL PROTECTED] 
 wrote:
first, get your markup correct: if you need to use several times the  
same ID, then use a CLASS instead. ID are for UNIQUE entities.


besides that, this

$('input #search')


should be

$('input#search')



Hope this helps!

alex



On Tue, May 6, 2008 at 3:46 PM, Luciano [EMAIL PROTECTED] wrote:

I have a input = search and a form = form-search,
well i need create action keypress on input search i do this:

   $(document).ready(function() {
   $('input #search')
   .keypress(function(){
   $('#inf').fadeIn('normal');
   })
   });

but no sucess,

so i try it:

   $(document).ready(function() {
   $('#search')
   .keypress(function(){
   $('#inf').fadeIn('normal');
   })
   });

it`s ok but i want especify input first, i have two more objects with
this id, no inputs normal divs..

exist ?
$('input #search') or
$('input  #search') or
$('input search')
?

tks




--
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com



--
att.
Luciano M.
www.m2t.com.br




[jQuery] Re: how to redirect an Ajax loaded page to another page...

2008-05-06 Thread aldomatic

I found a work around, yes I was asking for some magic :)

Thanks though.

On May 6, 2:51 pm, Christoph Haas [EMAIL PROTECTED] wrote:
 On Dienstag, 6. Mai 2008, aldomatic wrote:

  How do I redirect an Ajax loaded page to another page? The Meta
  refresh does not work. Anyone?

 You are expecting too much magic to happen. Unless you handle redirections
 yourself it won't work. Just fetch the correct URl and you don't need any
 redirects.

 Cheers
  Christoph (yes, I have a real name)
 --
 When you do things right people won't be sure you've done anything at all.

  signature.asc
 1KDownload


[jQuery] [clueTip plugin 0.9.6] The CSS will not show at the first time of mouse over

2008-05-06 Thread [EMAIL PROTECTED]

Hi pros!

(Sorry for my bad english. I'm from Germany.)

This is my first project with jQuery. It's cool but hard to understand
for me. I'm (just) a designer.
The problem is that nothing happens when I move over the images with
the mouse. At the second time the clueTip appears. BUT somtimes with
the correct stylesheet and sometimes without the style. Just the text
appears over the content. It locks very unprofessional :-( -- Has
anyone a good idea?

You will find the site here: 
http://bizlernsol.com/business_learning_solution.php

Thank you so much!!!
Kind regards Andreas

And in german:
Hi Profis!
Das ist mein erstes Projekt mit jQuery. Es ist cool, aber für mich
schwer zu verstehen. Ich bin (nur) ein Designer.
Das Problem ist, dass nichts erscheint, wenn ich mit der Maus das
erste Mal über die Bilder fahre. Beim zweiten Mal geht es. ABER
manchmal mit dem korrekten Stylesheet und manchmal nicht. Dann liegt
der geladene Text einfach nur über dem Inhalt. Das sieht sehr
unprofessionell aus :-( -- Hat jemand eine gute Idee?

Die Site findet Ihr unter: http://bizlernsol.com/business_learning_solution.php

Vielen, vielen Dank!!
Viele Grüße Andreas



[jQuery] Re: TableSorter + Filtering + Ajax

2008-05-06 Thread patrick davey

Hi Kevin,

That looks like a really excellent plugin - might have to give it a
try.  The one thing it doesn't do that I need it to - is *filtering*.
That is, say I am returning rows and one of the columns is a city -
and there may be multiple rows with the same city data.  I want to be
able to choose 'Dublin' and then only have rows which have dublin as a
city returned.

And then... I want to be able to continue sorting and paging through
my ajax'd data!  Fun eh ;)  When I get something working I'll try to
post it up somewhere... as long as I can make it readable etc!

Thanks,
Patrick

On May 6, 9:47 pm, Kevin Kietel [EMAIL PROTECTED] wrote:
 Try Flexigrid!

 http://webplicity.net/flexigrid/

 This jQuery plugin is a Lightweight but rich data grid with resizable
 columns and a scrolling data to match the headers, plus an ability to
 connect to an json/xml based data source using Ajax to load the
 content.

 If you need any help implementing it, just contact me or take a look
 at the Flexigrid discussion on CodeIgniter 
 forums:http://codeigniter.com/forums/viewthread/75326/
 There are several examples that you can use.

 Let me know if this is what you're looking for!

 Bye,

 Kevin

 On May 6, 2:18 am, patrick davey [EMAIL PROTECTED] wrote:

  Hi,

  I am using the tablesorter pluginghttp://tablesorter.com/andit
  works fine for smallish tables.  However, I need to page through large
  result sets (and filter them) - so I am going to use AJAX to
  repopulate the table once the options have been selected.

  Now, if through filtering / whetever - less than 100 rows are
  returned, then I want tablesorter to just sort the table (without
  having to make an AJAX call)

  To do this I want to edit the tablesorter plugin to call a function
  which returns true/false depending on how many records there are to
  sort.

  So my question (there is one!) is how do I do that with tablesorter.
  I have tried using 'sortStart' and returning false but no joy.  I can
  edit the source of course - but if there is a simple way I'd love to
  know it.

  Better still, does anyone have an example of doing filteringsorting
  paging of large datasets using  JSON/AJAX and Jquery? :)

  Thanks,
  Patrick


[jQuery] append div trouble

2008-05-06 Thread flipthekid

hey folks,
brand new here. been fiddling with jquery for a little bit now, but
this one has me stumped.

the goal is to de-link the links on a navigation system depending on
what you've clicked on.
but i need a restore function which i'm trying to do with append

the functions work fine without the append, but then i can't restore
the links i've taken off.
and after i do the append the html looks fine, but it doesn't seem to
be part of the DOM anymore.
since it won't respond to the functions anymore.

i've tried so many things and got no where.
i believe it to be NOT appending to the DOM

but again i'm new to the more complex stuff.

thanks in advance for any help.
gary.


[code DOM ready]

// get all the html in the navigation div
var hex = $(#navigation).clone().html();

// my trigger
// all links with an anchor tag inside of navigation
$('#navigation  [EMAIL PROTECTED]#]').click(function() {

// set a variable to what i clicked on
var clickedMe = $(this);

// restoring state of navigation div
$('#navigation').empty().append(hex);

// here i do all my style changes using the clickedMe variable
// including replacing the link i clicked on with just text
// omitted for clarity

});

[/code]


[jQuery] Re: [ANNOUNCE] Spaz Twitter Client uses jQuery

2008-05-06 Thread Joe

Nice, will definitely look into it.  Just started building apps in AIR
and the first thing that came to mind was using jQuery.

Joe

www.subprint.com



On May 6, 2:46 pm, Rey Bango [EMAIL PROTECTED] wrote:
 Yep. The only reason I didn't mention it in this context is because
 Snitter is not a OSS project and the code cannot be used to create your
 own client.

 I actually use Snitter and it's great!

 Rey

 Andy Matthews wrote:
  Same thing with Snitter.

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of Rey Bango
  Sent: Tuesday, May 06, 2008 1:53 PM
  To: jquery-en@googlegroups.com
  Subject: [jQuery] [ANNOUNCE] Spaz Twitter Client uses jQuery

  If you've ever been interested in learning how develop AIR apps w/ jQuery
  then take a look at the Spaz Twitter clienthttp://funkatron.com/spaz. It's
  a OSS project where you can download the
source and see how things are done.

  It's also a pretty neat Twitter client as well. :)

  Many thanks to Ed Finkler for starting this project up and using jQuery
  under the hood.

  Rey


[jQuery] [ANNOUNCE] Unobtrusive JavaScript with jQuery

2008-05-06 Thread Klaus Hartl

Unobtrusive JavaScript with jQuery, XTech 2008 presentation by Simon
Willison - slides:
http://simonwillison.net/static/2008/xtech/


--Klaus


[jQuery] Re: validating dynamically generated data

2008-05-06 Thread pedalpete

Have you checked out the validate plugin?
http://plugins.jquery.com/project/validate

Their is a method they have where you can actually run an ajax call to
your server to check for a valid input, or you could use it with your
statically set value as you have already done.



On May 6, 1:01 pm, jpl80 [EMAIL PROTECTED] wrote:
 I need to validate some dynamically generated form data to ensure clients
 can't order more of something than we have in stock. I can't set static
 comparisons. Here is my html:

 form action=addtocart.php method=post
 input type=submit class=addtocart value=add selected items to cart /

 div class=instock
   h4manual 1/h4
   div class=qty title=9090/div
   input name=150 type=text id=150 class=order-qty /label
 for=150Qty:/label
 /div

 div class=instock
   h4manual 2/h4
   div class=qty title=4848/div
   input name=151 type=text id=151 class=order-qty /label
 for=151Qty:/label
 /div

 /form

 I want to validate on keyup(). In rough pseudocode, something like this:

 $(document).keyup(function(event){
   if (($this.getValue(input))  ($this.getValue(span.qty))) {
 addText(Not enough in stock);
   }

 });

 I know that's not even close. Could someone help me?
 --
 View this message in 
 context:http://www.nabble.com/validating-dynamically-generated-data-tp1709106...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: The CSS will not show at the first time of mouse over

2008-05-06 Thread [EMAIL PROTECTED]

Hi!

It's me again. I think I solved the problem: The link for the tiny
print-stylesheet (in the content-files) was incorrect. :-(

Kind regards Andreas



[jQuery] Re: The CSS will not show at the first time of mouse over

2008-05-06 Thread flipthekid

hi andreas,

i'm brand new to this board, but have been trying out the jquery for a
while now.
i can't seem to get the same results you're describing, on a mac
anyway.

but you should preload those roll over images for the icons.
or better yet, use the css 'sprite' method.
basically you have both the off and on state in one image.
then move the image with css when you roll over it.
you define the height, width, overflow:hidden, etc in css.
you'll be able to find alot of info on that on the web.

there's some load time when you roll over your icons, that might be
effecting the clueTip?
hope that helps a little.

gary.


[jQuery] Re: extending objects with jquery

2008-05-06 Thread real

You might want to check this out:
http://ejohn.org/blog/simple-javascript-inheritance/

On May 6, 11:13 am, Javier Martinez [EMAIL PROTECTED] wrote:
 I'm moving from mootools to jquery and trying to port my UI framework
 to jquery.
 Some of my widgets are extending from another widget. For example a
 datagrid and a dataview objects extends from view object
 (because both uses same methods from view).
 With Mootools I have something like this

 Class View()

 Class DataGrid ({
 extends: View

 })

 Class DataView({
 extends: View

 })

 What is the equivalent on jQuery?

 Thanks!


[jQuery] Re: slide down animation jumps at the end

2008-05-06 Thread Yann

I removed all the margin/padding of the element that's being modified
to no avail... I should have mentioned that.
Thanks for the feedback!


[jQuery] Re: async treeview - still have problems re-initializing the tree

2008-05-06 Thread Jörn Zaefferer

Created a ticket out of this, not solved yet, but not forgotten
either: http://dev.jquery.com/ticket/2810

Jörn

On Fri, May 2, 2008 at 4:52 PM, rolfsf [EMAIL PROTECTED] wrote:

  We're still having problems implementing a 'refresh' button for a
  treeview tree. We need to be able to re-initialize the tree, clearing
  out the current version completely, and reloading with data fresh from
  the server.

  we're clearing out the current tree with:
  $('#openExistingTree').empty();

  and then re-initializing with
  $('#openExistingTree').treeview({ url:
  CalcBldrOpenExisting.ashx });

  Each time we hit 'refresh', we're getting a duplicate set of 'hitarea'
  divs

  The initial json returned is:
  [{'text': 'Private Drafts','id': 3, 'hasChildren': true},{'text':
  'Shared Drafts','id': 4, 'hasChildren': true},{'text': 'Published
  Calculations','id': 5, 'hasChildren': true}]

  Any help would be appreciated. I realize my previous posts came out a
  bit unreadable...

  thanks
  rolf



[jQuery] jQuery keeping tabs on the election

2008-05-06 Thread Shaun Kester

I noticed jQuery and ui.tabs being used today to track the election on
a href=http://www.indystar.com/apps/pbcs.dll/article?AID=//
NEWS05/80326049indystar.com/a. It is, as always, great to see
jQuery out in the wild.


[jQuery] using.attr('type') returns undefined

2008-05-06 Thread JP

if i have input id=fname name=fname type=text value= /

 if I do:

$('#fname').attr('type') - it returns undefined

how can I get the type ?



[jQuery] jQuery AJAX IE Error

2008-05-06 Thread MediaJunkie

The offending jQuery code:

$.ajax({
type: POST,
url: /?ct=ratingrt_v=rrrt_rk= + 
markerObject.number,
dataType: html,
success: function(dataSet) {
var status = $(status, 
dataSet).text();
if (status == ERROR) {

The error IE gives:

Line: 173
Character: 6
Code: 0
Error Message: 'undefined' is null or not an object

Line 173 is:

 if (status == ERROR) {

This code works just fine in FF and Safari.

Any suggestions would be greatly appreciated.

- Brad


[jQuery] Re: [ANNOUNCE] Unobtrusive JavaScript with jQuery

2008-05-06 Thread Richard D. Worth
I just thumbed through those slides. What a fantastic presentation! Highly
recommended to new or old jQuery users.

- Richard

Richard D. Worth
http://rdworth.org/

On Tue, May 6, 2008 at 5:33 PM, Klaus Hartl [EMAIL PROTECTED]
wrote:


 Unobtrusive JavaScript with jQuery, XTech 2008 presentation by Simon
 Willison - slides:
 http://simonwillison.net/static/2008/xtech/


 --Klaus



[jQuery] Re: using.attr('type') returns undefined

2008-05-06 Thread Richard D. Worth
Worked fine for me:

http://paste.pocoo.org/show/48200/

Maybe you forgot to put your code in a document.ready?

- Richard

Richard D. Worth
http://rdworth.org/

On Tue, May 6, 2008 at 6:12 PM, JP [EMAIL PROTECTED] wrote:


 if i have input id=fname name=fname type=text value= /

  if I do:

 $('#fname').attr('type') - it returns undefined

 how can I get the type ?




[jQuery] Re: append div trouble

2008-05-06 Thread Richard D. Worth
When you do

$('#navigation').empty().append(hex);

you're adding brand spanking new links to the DOM from straight html. They
have no special click-handler applied. Maybe hide them instead of removing
them? Then just show to restore? Otherwise, hopefully this will be of some
help:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F

- Richard

Richard D. Worth
http://rdworth.org/

On Tue, May 6, 2008 at 5:01 PM, flipthekid [EMAIL PROTECTED] wrote:


 hey folks,
 brand new here. been fiddling with jquery for a little bit now, but
 this one has me stumped.

 the goal is to de-link the links on a navigation system depending on
 what you've clicked on.
 but i need a restore function which i'm trying to do with append

 the functions work fine without the append, but then i can't restore
 the links i've taken off.
 and after i do the append the html looks fine, but it doesn't seem to
 be part of the DOM anymore.
 since it won't respond to the functions anymore.

 i've tried so many things and got no where.
 i believe it to be NOT appending to the DOM

 but again i'm new to the more complex stuff.

 thanks in advance for any help.
 gary.


 [code DOM ready]

 // get all the html in the navigation div
 var hex = $(#navigation).clone().html();

 // my trigger
 // all links with an anchor tag inside of navigation
 $('#navigation  [EMAIL PROTECTED]#]').click(function() {

 // set a variable to what i clicked on
 var clickedMe = $(this);

 // restoring state of navigation div
 $('#navigation').empty().append(hex);

 // here i do all my style changes using the clickedMe variable
 // including replacing the link i clicked on with just text
 // omitted for clarity

 });

 [/code]



[jQuery] Re: addUnique

2008-05-06 Thread Ariel Flesler

This is actually a bug, I opened a ticket and added a diff, will be
fixed soon.

http://dev.jquery.com/ticket/2811

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

On 6 mayo, 13:50, Iconico [EMAIL PROTECTED] wrote:
 On May 1, 7:42 pm, Dave Methvin [EMAIL PROTECTED] wrote:

  That actually sounds like a bug. What version ofjQueryare you using?
  AFAICT,jQuery().add() is supposed to usejQuery.merge to avoid
  duplicates. Can you create a test case and post a bug report?

 I'm using 1.2.3, the latest. I don't think it's a bug, it's more
 subtle than that.

 There's a thread here that details the issue pretty 
 well:http://groups.google.com/group/jquery-en/browse_thread/thread/f08ee33...

 If you still don't follow I can mock up a test for you, just let me
 know.


[jQuery] Re: pass multiple form fields to the $.ajaxFileUpload fileElementId

2008-05-06 Thread Shane

As far as I can tell you have to manually add the desired extra
variables to the url query string, like so:

$.ajaxFileUpload
(
{
url:'ajax_fileUpload.cfm?createpoloroid=' + $
(#createpoloroid).val() + 'createmedium=' + $
(#createmedium).val(),
secureuri:false,
fileElementId:fileToUpload
dataType: 'json',
success: function (data, status)


Good luck...


On Apr 17, 6:27 am, Chris Davies [EMAIL PROTECTED] wrote:
 Hi, I am trying to pass multiple form fields to the ajax_fileUpload.cfm page
 with no success.  Is it possible to send a list of form ID's as I am trying
 below?

 $.ajaxFileUpload
 (
 {
 url:'ajax_fileUpload.cfm',
 secureuri:false,
 fileElementId:*'fileToUpload,createpoloroid,createmedium',*
 dataType: 'json',
 success: function (data, status)

 Thanks!


[jQuery] Re: $ is not defined

2008-05-06 Thread Adwin Wijaya

It can be becaused the $ was used by another library like in wordpress
admin (if i am not wrong), $ is assigned to their own lib.

so try to use this : jQuery('#yourid').val(); :)

On May 6, 11:57 pm, motob [EMAIL PROTECTED] wrote:
 When ever I get the $ not defined error, its because my core jQuery
 library is not there, for example when I switch from jquery.pack to
 jquery.min and I forget to change the script tag reference in the
 head.

 Just double check that its properly referenced and that jQuery is
 listed above jquery.form.

 On May 6, 12:45 pm, Jake McGraw [EMAIL PROTECTED] wrote:

  Could you provide an example of this online?

  - jake

  On Tue, May 6, 2008 at 12:33 PM, mdg583 [EMAIL PROTECTED] wrote:

Hi, I don't know where this problem is coming from, but I find that
over the course of a few jquery AJAX operations and a ajaxForm submit,
for a little while I find that $ is not defined. Basically, I am
loading a form into the current document using the jquery load
function, and then setting up ajaxForm to submit this form and put the
results into another div. This content that is finally loaded into
this next div div has a javascript function near the beginning, and at
the point in time when this script is reached, I find that $ is not
defined.

This happened once before and I just worked around it, but that is
getting difficult.

Does anyone know why this would be?

I have jquery.form that says it requires jQuery v1.1 or later, and I
have jQuery 1.2.1.


[jQuery] Superfish question

2008-05-06 Thread Double D

I love the superfish menu and associated Java. I have modified a page
that now has the menu drop to the left instead of the right, but I
lose the delay for the left submenu. I cannot figure out how to make
this work.

Thanks,

Darryl


[jQuery] Attaching Events with Live Query

2008-05-06 Thread Adam Weis

Hello,

I'm having an issue attaching some events to a simple accordion that
is loaded via ajax.  I've tried moving the accordion script into the
head with Live Query and also putting the accordion script after the
html that is loaded from the ajax for it to no avail.

The ajax content is loaded by a non-jQuery ajax call, could that be
causing the problem?

You can see the page at, http://efodev.thewonderlabs.com/about/company
and then clicking Timeline in left nav.

Am I going about this entirely wrong?

Any help would be appreciated.

-Adam


  1   2   >