[jQuery] Re: image preload problem (encore)

2007-09-26 Thread Mika Tuupola



On Sep 26, 2007, at 2:47 AM, dimitrisX wrote:


I am trying to preload some images using either one of the functions
below. They don't seem to load. I really could use your help here.


Something similar which works for me. Maybe you can find answer from  
there?


http://www.appelsiini.net/2007/6/sequentially-preloading-images





/// version 2 (not quite like the original)
jQuery.preloadImages2 = function(){
var args = arguments;
$(window).bind('load', function(){
   var preload = new Array();
   for(var i = 0; iargs.length; i++){
preload[i] = args[i];
}
   $(document.createElement('img')).bind('load', function(){
if(preload[0]){
this.src = preload.shift();
alert(this.src);
}
   }).trigger('load').appendTo('#imagePanel');
});

}



--
Mika Tuupola
http://www.appelsiini.net/





[jQuery] Re: Verizon Wireless website using jQuery?

2007-09-26 Thread Olmo Maldonado

@Michael: just do in the url address bar:
javascript:alert(MooTools.version);
@Erik: Hahaha. :D We are modular ;).

-Olmo Maldonado
MooTools Developer
http://mootools.net

On Sep 20, 4:31 pm, Erik Beeson [EMAIL PROTECTED] wrote:
 Those MooTools punks stole our filesize!

 --Erik

 On 9/20/07, Josh Nathanson [EMAIL PROTECTED] wrote:



  OK, sorry about that.  Weird though that it's also 27K packed.

  - Original Message -
  From: Michael Geary [EMAIL PROTECTED]
  To: jquery-en@googlegroups.com
  Sent: Thursday, September 20, 2007 4:05 PM
  Subject: [jQuery] Re: Verizon Wireless website using jQuery?

   From: Josh Nathanson

   Spotted in the wild?

   - Go tohttp://www.verizonwireless.com
   - Look at your Firebug Script tab, find the script gn_engine.js

   That packed script looks suspiciously familiar...and it's 27K

   ?

   As Erik mentioned, every script run through the old version of Packer
  (or
   the new version with base 62 encoding) looks more or less
   the same.

   Here's an easy way to tell what is inside a packed script.

   Open the script file directly in Firefox, in this case:

  http://cache.vzw.com/scripts/globalnav/gn_engine.js

   Do a Select All and Copy.

   Open the Firebug console.

   Paste the script into the Firebug command line.

   Go to the beginning of the line and change eval to alert.

   Hit Enter (or Ctrl+Enter if you have the multiline console command line
   open).

   -Mike



[jQuery] Parent Child Selectors + bind

2007-09-26 Thread Anjanesh

Hi

I cant get this seem to work

$(#id1  [EMAIL PROTECTED]).bind(onfocus, foo);

Is there something wrong with the argument ?

Thanks



[jQuery] Using .children recursively

2007-09-26 Thread voltron

I am trying to get all the children of a node, apart from adding
.children() for every generation, is there one call that gets all
recursively?

this is what I´m doing at the moment

$(this).children().children().removeAttr(name);



[jQuery] Re: from builtwith.com, with love: jquery leads ahead

2007-09-26 Thread Olmo Maldonado

Cool 0.78%.
Now it's 1.21% ... Nice.

Weird jQuery is now 1.83%?
Must be a mistake?

-Olmo Maldonado
MooTools Developer
http://mootools.net/

schnuck wrote:
 i know... but still not bad at all:

 MooTools
 MooTools is a compact, modular, Object-Oriented JavaScript framework
 designed for the intermediate to advanced JavaScript developer. It
 allows you to write powerful, flexible, and cross-browser code with
 its elegant, well documented, and coherent API.

 0.78% of all profiled sites use MooTools.

 JQuery
 Query is a fast, concise, JavaScript Library that simplifies how you
 traverse HTML documents, handle events, perform animations, and add
 Ajax interactions to your web pages. jQuery is designed to change the
 way that you write JavaScript.

 2.33% of all profiled sites use JQuery.



[jQuery] Attribute renaming

2007-09-26 Thread voltron

I have tags like this:
select id=academic_from_month-0 
select id=academic_till_month-0 

since the ids are variable in length, I would have to find out where
the lastindex() of - is remove that and replace it it with the new
value. My problem is the syntax, is there some kind of Jquery way to
do this?


Thanks



[jQuery] Re: UI tabs - find unique

2007-09-26 Thread Dmitrii 'Mamut' Dimandt

Richard D. Worth wrote:
 Please ask on the jQuery UI list:

 http://groups.google.com/group/jquery-ui

Sorry, didn't realize there was one :)


[jQuery] Re: Jquery Vs. Prototype

2007-09-26 Thread Olmo Maldonado

You're making MooTools sound like it's a fork from Prototype.

I'd argue that there's fundamental and code differences between the
two.

Mitchell, I believe the impressions MooTools leave should be
experienced rather than explained :-\.

-Olmo Maldonado
MooTools Developer
http://mootools.net/


On Aug 4, 10:46 pm, Ganeshji Marwaha [EMAIL PROTECTED] wrote:
 brook,

 I am not sure if i will add substantially to what others have said above.
 Still, i wanted to post this mail anyways because you might be more
 comfortable making a decision if you hear an opinion from a normal user as
 opposed to a core developer.

 My background in javascript follows the pattern, javascript - prototype -
 mootools - jquery, and in that order. I have also played with libraries
 like YUI, Ext, Rico and GWT just to get a feel for them, but the first 3
 libraries are where i have good expertise in...

 I started using prototype because, that seemed to be the best solution then.
 It was a well thought out library as opposed to other DHTML gimmicks out
 there. It was backed by a thorough and beautiful scriptaculous effects
 library. Although prototype had zero documentation, i still chose them for
 the quality of the library itself. I sincerely started decoding the source
 night after night and a week later, i had a comprehensive personal
 documentation(which ofcourse only i could understand). I used them for a
 while - Until one day when i found mootools.

 I was jumping for joy, not because mootools had a radically different
 approach(coz they don't) and not because they had clear documentation(coz
 they didn't), but because it was so small in size. This was a welcome gift,
 and i took it - after all it is free. They had a few bells and whistles as
 in, new and improved inheritance support etc etc etc., but the best of all,
 the syntax they offered was almost similar to prototype. I was very happy
 with them, and will continue to be. I still use both prototype and mootools
 in different projects and i love them both.

 But, one fine morning my feed reader was forcing me to read a blog about
 jquery. I initially resisted, coz, i thought it was related to database.
 Then for some odd reason, i read it. It was someones blog ( i don't remember
 who), and i had mixed feelings. Being the experimenter i am, i started
 playing with it, and trust me, within one day, i felt like an expert. It
 sure was a radically different approach to modern javascript and the
 documentation was clean and simple. Then i subscribed to the mailing list
 and started talking to people here, and man trust me, i haven't been in such
 a helpful community.

 Although my initial impressions were that it might not be as extensive as
 the other 2, those doubts subsided when i realized the simplicity of the
 plugin architecture. There are plugins for almost everything and every
 plugin is so darn small and inviting. In the rare case where fellow
 community members didn't find a plugin for their needs, i have seen plugin
 authors write a plugin in a matter of hours and throw it in for them to use.
 With jQuery it is that easy. Everything seems so simple. I now can't
 remember why i used to hate javascript so much.

 Now, from time to time, when i go back to prototype or mootools to support
 my existing projects i really do feel that the code base looks complex.
 After using jquery every other library looks complex to me. So be warned. If
 you were to lose one thing by choosing jquery it is that, you might forget
 plain javascript and other libraries sooner rather than later. Then don't
 blame, coz i am no different than you then.

 If you made this far, i am sorry for such a long email, but i just couldn't
 help telling you my story for your benefit. My best wishes.

 -GTG

 On 8/4/07, Dragan Krstic [EMAIL PROTECTED] wrote:



  BMHO, jquery is easier to learn and doesn't extends native JS objects. jQ
  people is more enthusiatsic about library they use. Also, jQuery put
  standards in speed, documentation and support. By introducing jQuery, John
  forced other folks to improve their libraries.  And comunity is very
  devoted, too.

  2007/8/5, John Resig [EMAIL PROTECTED]:

I can see the benefit of this being that you only include the methods
   you need and there is no bloat.

   That's precisely why. Here's examples of everything that you mentioned:

   disable:
   $(input).attr(disabled,disabled);

   enable:
   $(input).attr(disabled,);

   findFirstElement:
   $(form :input:first)

   focusFirstElement:
   $(form :input:first).focus();

   getElements:
   $(form :input)

   getInputs:
   $(form :input)

   request:
   (via Form plugin)
   $(form).ajaxSubmit()

   reset:
   $(form).reset()

   serialize:
   $(form :input).serialize()

   serializeElements:
   $(form :input).serialize()

   Obviously there are philosophical differences at play - but the fact
   all of these things exist (or are easily accessed via a plugin) just
   shows how powerful and 

[jQuery] Re: Attribute renaming

2007-09-26 Thread voltron

I am trying to rename the ids and name attributes

On Sep 26, 10:06 am, Erik Beeson [EMAIL PROTECTED] wrote:
 What are you trying to accomplish?

 --Erik

 On 9/26/07, voltron [EMAIL PROTECTED] wrote:



  I have tags like this:
  select id=academic_from_month-0 
  select id=academic_till_month-0 

  since the ids are variable in length, I would have to find out where
  the lastindex() of - is remove that and replace it it with the new
  value. My problem is the syntax, is there some kind of Jquery way to
  do this?

  Thanks



[jQuery] Re: New Plugin: Picklists

2007-09-26 Thread Enrique Meléndez Estrada


I think the pattern would be: both multiselectors side by side, and 
arrows to left and right indicating moving options from left selector to 
the right and viceversa (instead of add and remove buttons).


Also its better to physically remove options from selector From, 
instead of greying them, once they are moved tho selector To.


--
Enrique Meléndez Estrada (2367)
Servicios Informáticos
Organización y Servicios Internos
Instituto Tecnológico de Aragón



[jQuery] Re: Using .children recursively

2007-09-26 Thread george.gsgd

You don't need to use children, that's for if you only want the
children...

Try this:

$('[name]', this).removeAttr(name);

http://docs.jquery.com/Selectors for more info

That'll do what you're attempting

On Sep 26, 8:35 am, voltron [EMAIL PROTECTED] wrote:
 I am trying to get all the children of a node, apart from adding
 .children() for every generation, is there one call that gets all
 recursively?

 this is what I´m doing at the moment

 $(this).children().children().removeAttr(name);



[jQuery] cannot retrieve elements with xpath

2007-09-26 Thread julio

Hi,

I have this simple html page:

html
headtitleA test page/title/head
script type=text/javascript src=jquery.js/script
body
script
$(//[EMAIL PROTECTED]'2']).hide();
$(//[EMAIL PROTECTED]'3']).hide();
/script
h1 myattr=1test-row1/h1
another row
h1 myattr=1test-row2/h1
img myattr=2 src=pic1.png /
img myattr=2 src=pic2.png /
table myattr=3
tr myattr=4
td myattr=5test/td
/tr
tr myattr=4
td myattr=5test/td
/tr
/table
/body
/html

and I would like hide elements retrieved via xpath like in script/.

But it doesn't work

Why? Have you any idea?

Thanks,
Julio



[jQuery] Re: Attribute renaming

2007-09-26 Thread Erik Beeson
Rename them from what to what? To change the id of all selects, you can do:

$('select').each(function() {
  var oldId = $(this).attr('id');
  $(this).attr('id', oldId.substring(0, oldId.lastIndexOf('-')));
});

I'm still not sure what you actually want to do though.

--Erik


On 9/26/07, voltron [EMAIL PROTECTED] wrote:


 I am trying to rename the ids and name attributes

 On Sep 26, 10:06 am, Erik Beeson [EMAIL PROTECTED] wrote:
  What are you trying to accomplish?
 
  --Erik
 
  On 9/26/07, voltron [EMAIL PROTECTED] wrote:
 
 
 
   I have tags like this:
   select id=academic_from_month-0 
   select id=academic_till_month-0 
 
   since the ids are variable in length, I would have to find out where
   the lastindex() of - is remove that and replace it it with the new
   value. My problem is the syntax, is there some kind of Jquery way to
   do this?
 
   Thanks




[jQuery] Re: Attribute renaming

2007-09-26 Thread voltron

Hi Erik,

I am cloning a DIV container full of elements( selects, inputs and
buttons), they all inherit the name of the original element, but to
differentiate between all, I want to rename all the clones attributes
sequentially, example

div name= container
input name=color
input name=house
/dv

if I clone the whole container, the names should be:

div name= container
input name=color
input name=house
/dv

div name= container1
input name=color1
input name=house1
/dv


ans so forth


Thanks

On Sep 26, 12:57 pm, Erik Beeson [EMAIL PROTECTED] wrote:
 Rename them from what to what? To change the id of all selects, you can do:

 $('select').each(function() {
   var oldId = $(this).attr('id');
   $(this).attr('id', oldId.substring(0, oldId.lastIndexOf('-')));

 });

 I'm still not sure what you actually want to do though.

 --Erik

 On 9/26/07, voltron [EMAIL PROTECTED] wrote:



  I am trying to rename the ids and name attributes

  On Sep 26, 10:06 am, Erik Beeson [EMAIL PROTECTED] wrote:
   What are you trying to accomplish?

   --Erik

   On 9/26/07, voltron [EMAIL PROTECTED] wrote:

I have tags like this:
select id=academic_from_month-0 
select id=academic_till_month-0 

since the ids are variable in length, I would have to find out where
the lastindex() of - is remove that and replace it it with the new
value. My problem is the syntax, is there some kind of Jquery way to
do this?

Thanks



[jQuery] Re: Validate plugin limited? with line error

2007-09-26 Thread Jean

Yes, thanks for help!

http://www.interalfa.com.br/questionarios/questionario.php?cod=31

On 9/25/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:

 Jean schrieb:
  Sorry for my previous email talking about the limitation of Validate
  plugin with 50 or more elements to validade. Is not an error but the
  script stops in this line
 
 Can you post a test page for that issue?

 -- Jörn



-- 

[]´s Jean
www.suissa.info

   Ethereal Agency
www.etherealagency.com


[jQuery] Re: Attribute renaming

2007-09-26 Thread Erik Beeson
How about something like (untested):

$('#container').clone().attr('id',
'container'+idx).find('*').each(function() {
  this.name += idx;
  this.id += idx
}).end().appendTo(...);

How you deal with 'idx' is up to you. So that's: select the element with ID
'container', clone it, update the clone's id, select all of the clone's
descendant elements, update their names and IDs, go back to the clone and
append it to where ever you want it to show up.

--Erik


On 9/26/07, voltron [EMAIL PROTECTED] wrote:


 Hi Erik,

 I am cloning a DIV container full of elements( selects, inputs and
 buttons), they all inherit the name of the original element, but to
 differentiate between all, I want to rename all the clones attributes
 sequentially, example

 div name= container
 input name=color
 input name=house
 /dv

 if I clone the whole container, the names should be:

 div name= container
 input name=color
 input name=house
 /dv

 div name= container1
 input name=color1
 input name=house1
 /dv


 ans so forth


 Thanks

 On Sep 26, 12:57 pm, Erik Beeson [EMAIL PROTECTED] wrote:
  Rename them from what to what? To change the id of all selects, you can
 do:
 
  $('select').each(function() {
var oldId = $(this).attr('id');
$(this).attr('id', oldId.substring(0, oldId.lastIndexOf('-')));
 
  });
 
  I'm still not sure what you actually want to do though.
 
  --Erik
 
  On 9/26/07, voltron [EMAIL PROTECTED] wrote:
 
 
 
   I am trying to rename the ids and name attributes
 
   On Sep 26, 10:06 am, Erik Beeson [EMAIL PROTECTED] wrote:
What are you trying to accomplish?
 
--Erik
 
On 9/26/07, voltron [EMAIL PROTECTED] wrote:
 
 I have tags like this:
 select id=academic_from_month-0 
 select id=academic_till_month-0 
 
 since the ids are variable in length, I would have to find out
 where
 the lastindex() of - is remove that and replace it it with the
 new
 value. My problem is the syntax, is there some kind of Jquery way
 to
 do this?
 
 Thanks




[jQuery] tablefilter preview

2007-09-26 Thread James Dempster

Hi Group,

I've been writing a tablefilter plugin to sit along side tablesorter
from Christian Bach. It will supply multi column filtering. Have
support for different filter types, e.g. text (case sensitive/
insensitive), numeric, regex + any more people might add.

It will be optional on wether to add the UI or not, allowing people to
create there own is they so wish. Utilising the filter events which
are bound to each thead th allowing you to trigger these events from
your own UI.

I'm releasing a preview, to get some feedback on the UI.

One of the things I'm struggling with is where and how I should go
about adding support for table level filtering, the column level
filtering seems fine. Should I simply add another filter icon just
above the table?

The other thing, thanks to some feedback from Christian I added multi
language support for the UI, but currently the filterBox UI is only
created the once, then is simple shown and hidden with the form values
being change. This means if the user changes the language after the
initial creation of the filterBox the language change is ignored. What
are people thoughts on this? Should I recreate the filterBox UI,
change the wording to the new language?

This is a preview release to get some feedback, it's still a work in
progress. Any feedback welcome.

Link: 
http://code.jdempster.com/jquery/trunk/tablefilter/jquery.tablefilter.example.html



[jQuery] Re: Events not attaching; jquery 1.2.1 and interface elements 1.2

2007-09-26 Thread kalath

I noticed this too except it has to do with the slider widget from
interface. It would seem that there's a javascript error being thrown
that has to do with the jquery xpath plugin that is required once you
upgrade to 1.2.

I have not yet found a solution though...

Ryan

On Sep 19, 2:41 am, hiddenhippo [EMAIL PROTECTED] wrote:
 Having upgraded from jquery version 1.1.3.1 to 1.2.1 I've noticed a
 problem within internet explorer whilst using interface elements.
 This may be interface elements specific, though I have my doubts, or
 it may be something with the latest release of jquery.. either way I'm
 not really qualified to say one way or the other.  So here's a small
 test case that I've put together;

 jquery 1.2.1
 interface elements 1.2 using draggable and droppables

 A html page with two divs (though 1 div is fine for testing)

 div id='main' style=height:50px;width:50px;background-color:red;/
 div
 div class='drg' style=top:100px;left:100px;height:50px;width:
 50px;background-color:blue;/div

 Another js file with;
 $(document).ready(function()
 {
 $('.drg').Draggable({zIndex:1000,ghosting:true,opacity:
 0.7,revert:true,onStart: function(){},onDrag:   function(x,y){},onStop:
 function(){}});

 });

 The page loads fine with no errors.  When I click the blue div (2nd
 div in the above) and attempt to move it about I've no problems.  When
 I release the mouse; no problems.  However, when I attempt to remove
 the div it's as if all my events have been removed because I can no
 longer move the div.  If I place a click event like so;

 $('.drg').mousedown(function(){alert('pop');});

 then it'll fire fine... but as soon as the div is moved it also
 fails.  Note that this weird functionality only happens in IE (my
 version is IE7 on XP) and not FireFox.

 Any help would be greatly appreciated.  All the above worked fine when
 using jquery 1.1.3.1



[jQuery] Re: Using interface for tooltips: tips appear under form dropdowns?

2007-09-26 Thread jsandppr

Yes, I should have said.  IE only.  Firefox is fine.  I'll try this
plug-in tomorrow!  Thanks!

On Sep 25, 9:00 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 is that happening in Internet Explorer only? If so, the bgiframe
 plugin can help.

 http://blog.brandonaaron.net/my-jquery-plugins/background-iframe/

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 25, 2007, at 2:20 PM, jsandppr wrote:



  I'm using the latest jQuery and Interface.  When I hover over an area
  with a ToolTip function assigned -- which works great -- the tooltip
  appears over most of the page, but under any dropdown lists on the
  form.

  Is there a good way around this?  I've searched the archives, and only
  found one mention of a different plug-in that has fixing this problem
  on their to-do list.

  Thanks!

  jsandppr



[jQuery] jCorner plugin not working as expected

2007-09-26 Thread Mark

Hello, I am having issues with Internet Explorer browsers and the
jCorner plugin.  As a refrence, lets use www.augustine.com/vacation/index.php
- but there are many other pages on this site using corners where it
breaks also.

You can break the corners by having your mouse corner IN the browser
window when the page loads, or when you refresh and the cursor is in
the window, which is very odd behavior.  I have validated with W3C and
still experienced the same problem.

The corner calls are stored in http://www.augustine.com/inc/swap.js
lines 310-317 (depending on page) the jquery library is in
http://www.augustine.com/inc/jquery.js and the jCorner is in
http://www.augustine.com/inc/corner.js

Please let me know if you need more information as I am very hopeful
to solve this problem.

Mark
augustine.com



[jQuery] newb: How to get google groups like layout

2007-09-26 Thread crybaby

All the boxes, background colors, and rounded corners done using
javaScript or css?  Can I do similar layout, look and feel, with
jQuery alone(without images) or combination of jQuery and CSS?

thanks



[jQuery] Re: $.load() POSTing instead of GETing

2007-09-26 Thread ZAP

I also ran into this problem, and it was truly vexing. I was trying to
POST
to an XML file (dynamically generated by PHP), and the server didn't
allow
that so no POST vars were being received. Very glad I stumbled across
this
post, since otherwise I'd probably be hacking together a GET version
or
using the ajax call with a success function or some other difficult
kludge
like that right now.

On Aug 18, 5:15 pm, Stephan Beal [EMAIL PROTECTED] wrote:
 One of the negative side-effects is, however, thatPOSTisnot
 configured consistently across servers. For example, i had the example
 same problem as the OP... i was trying to load() an HTML file and it
 worked onmylocal system. When, however, i uploaded it tomyhoster
 the code suddenly failed.FirebugrevealedthatPOSTwaserroringout
 onmyhosterbecausePOSTwasnotallowedfor HTML files on that
 server. So i had to rework the code to use get(). i remember trying to
 set GET as the default ajax behaviour and that load() ignored that.



[jQuery] Re: Odd Ajax problem:

2007-09-26 Thread sgrover

Thanks Pops.

I ended up generating the HTML in my PHP code, then just doing a 
.load().  (yeah, lazy way out, I know, but... :)

I'll keep your tip in mind though.  I'll be doing a lot of Ajax with 
this app and will likely see this again soon.

Shawn

Pops wrote:
 Note, in my example url: json-data.wct  it is my equivalent to your
 PHP for our web server.  In this case, json-data-wct, is simply a
 dump of:
 
 MyJSON({items: [
{ id: 111, organization: open2space,
  start: new Date(2007-09-24 20:13:00),
  end: new Date(2007-09-24 16:13:00),
  duration: 2, work_type: Programming,
  project: simpleTracker,
  description: Test 8 },
{ id: 112, organization: open2space,
  start: new Date(2007-09-24 19:14:00),
  end: new Date(2007-09-24 22:14:00), duration: 3,
  work_type: Programming, project: simpleTracker,
  description: Test 9 },
{ id: 113, organization: open2space,
  start: new Date(2007-09-24 19:14:00),
  end: new Date(2007-09-24 22:14:00),
  duration: 3,
  work_type: Programming,
  project: simpleTracker,
  description: Test 9 },
{ id: 114,
  organization: open2space,
  start: new Date(2007-09-24 18:14:00),
  end: new Date(2007-09-24 22:14:00),
  duration: 4,
  work_type: Programming,
  project: simpleTracker,
  description: Tst 10 }
 ]});
 
 jsonp (note the p) works by you creating a function (in this case
 MyJSON) that will handle the data.  The response is essentially a
 javascript that jQuery Ajax will eval-uate.  The javascript is a
 callback to this function with the parameter being your actual JSON
 data.
 
 --
 HLS
 
 On Sep 25, 9:20 am, Pops [EMAIL PROTECTED] wrote:
 I did the following to make it work:

 I wrapped the data as such:

 MyJSON({
 items: [
  your items here
 ]

 });

 then I created a function:

 Function MyJSON(data)
 {
   var json = data.items;
   var tbl = table border='1' class=\tblTimeCards\;
   tbl += theadtr;
   tbl += thId/th;
   tbl += thClient/th;
   tbl += thProject/th;
   tbl += thStart/th;
   tbl += thEnd/th;
   tbl += thDuration/th;
   tbl += thDescription/th;
   tbl += /tr/thead;
   tbl += tbody;
   for (var x = 0; x  json.length; x++) {
 tbl += tr;
 tbl += td class=\tcID\ + json[x].id + /td;
 tbl += td class=\tcClient\ + json[x].organization + /td;
 tbl += td class=\tcProject\ + json[x].project + /td;
 tbl += td class=\tcStart\ + json[x].start + /td;
 tbl += td class=\tcEnd\ + json[x].end + /td;
 tbl += td class=\tcDuration\ + json[x].duration + /td;
 tbl += td class=\tcDesc\ + json[x].description + /td;
 tbl += /tr;
   }
   tbl += tbody;
   $(.tcList).html(tbl);

 }

 then I changed the ajax call to this:

var xhr = $.ajax({
type: get,
url: json-data.wct,
dataType: jsonp,
error: function (a,b,c) {
  alert(Error retrieving recent records\n\nstatus:  +
 a.status +\n\n + a.responseText);
}
  });

 Note the jsonp.

 This worked.

 --
 HLS

 On Sep 25, 1:38 am, sgrover [EMAIL PROTECTED] wrote:

 I'm dong an Ajax call to retrieve some JSON and build a table from this.
(code posted below.)  The Ajax call is never firing the success
 function, but if I include an error function, that is called.  Yet in
 that error function, checking the status code shows a 200 and the
 response text is my JSON code.  The page in question loads just fine on
 it's own and the JSON looks fine.  So I'm not sure why the error
 condition is being called.  I'm sure it's something stupid, but I can't
 see it.  Any tips?  I've tried both jQuery 1.1.4 and 1.2.1.
 Shawn
 CODE:
$.ajax({
  type: get,
  url: xhr/tc_recent.php,
  dataType: json,
  success: function (json) {
alert(json.length);
var tbl = table class=\tblTimeCards\;
tbl += theadtr;
tbl += thId/th;
tbl += thClient/th;
tbl += thProject/th;
tbl += thStart/th;
tbl += thEnd/th;
tbl += thDuration/th;
tbl += thDescription/th;
tbl += /tr/thead;
tbl += tbody;
for (var x = 0; x  json.length; x++) {
  tbl += tr;
  tbl += td class=\tcID\ + json[x].id + /td;
  tbl += td class=\tcClient\ + json[x].organization + /td;
  tbl += td class=\tcProject\ + json[x].project + /td;
  tbl += td class=\tcStart\ + json[x].start + /td;
  tbl += td class=\tcEnd\ + json[x].end + /td;
  tbl += td class=\tcDuration\ + json[x].duration + /td;
  tbl += td class=\tcDesc\ + json[x].description + /td;
  tbl += /tr;
}
tbl += tbody;
$(.tcList).html(tbl);
  },
  error: function (a,b,c) {
alert(Error retrieving recent records\n\nstatus:  + a.status +
 \n\n + a.responseText);
  }
});
 SAMPLE OF RETRIEVED JSON
 [
{ id: 111, organization: open2space, start: new Date(2007-09-24
 20:13:00), end: new Date(2007-09-24 16:13:00), duration: 2,
 

[jQuery] Re: Using .children recursively

2007-09-26 Thread meisen2002

不懂你的意思

On 9月26日, 下午3时35分, voltron [EMAIL PROTECTED] wrote:
 I am trying to get all the children of a node, apart from adding
 .children() for every generation, is there one call that gets all
 recursively?

 this is what I m doing at the moment

 $(this).children().children().removeAttr(name);



[jQuery] Change background based of time of day using jquery

2007-09-26 Thread bsuttis

I'm curious if I could use jquery to change my body's background based
on time of day. I'm not looking to do this server-side with php, I
would like the background to change based on the visitor's time, not
the server's.

I've found this code, just wondering if I can jquery-ize:
script
var now = new Date();
var hours = now.getHours();
var psj=0;

//18-19 night
if (hours  17  hours  20){
document.write('body bgcolor=orange text=#FF')
}

//20-21 night
if (hours  19  hours  22){
document.write('body bgcolor=orangered text=#FF')
}

//22-4 night
if (hours  21 || hours  5){
document.write('body bgcolor=black text=#FF')
}

//9-17 day
if (hours  8  hours  18){
document.write('body bgcolor=deepskyblue text=#FF')
}

//7-8 day
if (hours  6  hours  9){
document.write('body bgcolor=skyblue text=#FF')
}

//5-6 day
if (hours  4  hours  7){
document.write('body bgcolor=steelblue text=#FF')
}
/script



[jQuery] Re: Jquery Vs. Prototype

2007-09-26 Thread meisen2002

[jQuery] Unexcpected Quantifier in IE6 (1.2.1 SVN)

2007-09-26 Thread [EMAIL PROTECTED]

The problem is occurring on line 822 (from the current SVN code),

/^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('??)(.*?)\4 *\]/i,

It only throws the error in IE6, I have been led to believe it is
something to do with *, but I am unfortunately totally regexp
retarded. Any insight would be appreciated.



[jQuery] Error .ajax and etc in jQuery

2007-09-26 Thread jkeks

I tryed to do .ajax call:
{alert(reg_email);
$.ajax
({url:register.php,
type:GET,
data:
{reg_email:reg_email ,reg_pass1:reg_pass1,reg_fio:reg_fio,reg_tel:reg_tel},
success:function(data){$(#reg_agree).val(Готово);$
(#reg_agree).remove();alert(data);}
})
}

Problem in:
FireFox last work ok
Opera last  work ok
IE 6: BAD
in IE call done, and PHP script executing, but answer not complete..
and function(data){$(#reg_agree).val(Готово);$
(#reg_agree).remove();alert(data);}
NOT executing, but in FF  Opera all ok.

same with .post

sometime IE wrote: g - is null or not object with toggle function
maybe thats glich?



[jQuery] Re: Event Delegation and this question

2007-09-26 Thread Matt81

Hi. Thanks for the replies guys. I'll try what you've suggested when I
get into work today... will hopefully be what I'm looking for.

Again, many thanks.

On 25 Sep, 22:55, Michael Geary [EMAIL PROTECTED] wrote:
 I think event.target is what you're looking for all around, does that sound 
 right?

 //PAGINATION
 var $target = $(event.target);
 if ($target.is(a.pagination))
 {
 $target.parent().load($target.attr(href));
 return false;
 }

 -Mike

  From: Matt81

  I'm currently working on a site where I load in a series of
  links (in a list) with some pagination links underneath
  (a.pagination) into a div via an ajax request.

  In order to bind click events to the anchors with a class
  pagination, I've used the technique outlined on the jQuery
  website, whereby I attach a click to the body, and then test
  the event.target. Like so...

  $(body).click
  (
  function(event)
  {
  //PAGINATION
  if ($(event.target).is(a.pagination))
  {
  $(this).parent().load($(this).attr(href));
  return false;
  }
  }
  );

  This code does not work, and I believe the problem lies with
  the use of the this keyword - could it be I'm referring to
  the body element.
  As the content is loaded into the parent of the links, I need
  a solution based along these lines... so any help would be
  very much appreciated.



[jQuery] Re: Tablesorter dd/mm/YYY date problem

2007-09-26 Thread Kia Niskavaara


A suggestion is that all parsers (except the basic ones) are removed from the 
plugin, and selectable 
from an archive. This is very useful for custom date sorters etc, and will make 
the plugin even smaller.

Jean wrote:
   Have i write my parser for dd/mm/ date format? The plugin use mm/dd/
 either i changing in plugin configs
 


[jQuery] Re: weird problem with remove or toggle Class

2007-09-26 Thread kamiseq


ok the problem was that i forgot about return false, and as it was   elements
they redirect me to no existing address. Ech how i could forgot about such a
thing:-)

Glen Lipka wrote:
 
 Can you post this example online?
 
 Glen
 
 On 9/25/07, kamiseq [EMAIL PROTECTED] wrote:



 I ve just downloaded new version of jquery 1.2.1 and i tried to do sth
 like
 that

 menu
 div class=submenu hidden
  div
   zamknij
  login.html?form_action=logout wyloguj
  start.html start
 !-- trzeba zadbac aby przy relodowaniu nie
 ubic
 sesji --
  /div
  div
   kontrahent
   zamowienie
   produkt
   dokumenty
   wynik wyszukiwania
  /div
 /div
 and my simple code in JQ is
 $(function(){
 $('#open_menu').click(function(){
 var $r = $(this).next().filter('div');
 $r.removeClass('hidden');
 });
 });

 result is that i dont have any errors or warning in js console, the sub
 menu
 is showing itself and suddenly after that page reloads itself due to
 something i really don't know.

 if I change code to something like that:
 $(function(){
 $('#open_menu').click(function(){
 $(this).next().filter('div').removeClass('hidden');
 });
 });

 then I have this:

 FIREBUG WARNING: [Exception... Component returned failure code:
 0x8000
 (NS_ERROR_UNEXPECTED) [nsIScriptableUnicodeConverter.ConvertToUnicode]
 nsresult: 0x8000 (NS_ERROR_UNEXPECTED)  location: JS frame ::
 chrome://firebug/content/lib.js :: anonymous :: line 191  data: no]

 Warning: Element referenced by ID/NAME in the global scope. Use W3C
 standard
 document.getElementById() instead.
 Source File:
 Line: 1

 Warning: Element referenced by ID/NAME in the global scope. Use W3C
 standard
 document.getElementById() instead.
 Source File: javascript: with (__scope__.vars) { with (__scope__.api) {
 with
 (__scope__.userVars) { with (window) {try
 {__scope__.callback(eval(__scope__.expr));} catch (exc)
 {__scope__.callback(exc, true);}
 Line: 1

 come one, what is wrong with my code or with that lib
 --
 View this message in context:
 http://www.nabble.com/weird-problem-with-remove-or-toggle-Class-tf4517184s15494.html#a12885125
 Sent from the JQuery mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://www.nabble.com/weird-problem-with-remove-or-toggle-Class-tf4517184s15494.html#a12891471
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Attribute renaming

2007-09-26 Thread [EMAIL PROTECTED]

 I have tags like this:
 select id=academic_from_month-0 
 select id=academic_till_month-0 

 since the ids are variable in length, I would have to find out where
 the lastindex() of - is remove that and replace it it with the new
 value. My problem is the syntax, is there some kind of Jquery way to
 do this?

$('select).each(function() {
id=$(this).attr('id');
//number after '-', useless if you dont need number
number=id.substring(id.lastIndexOf('-')+1);
//new value that you want to put after '-'
newvalue='1234567';
changed=id.substring(0,lastIndexOf('-')+1)+newvalue;
}

or something like that (I didnt check that) :)

Regards
Michael



[jQuery] Re: Jquery Vs. Prototype

2007-09-26 Thread meisen2002
顶一下


[jQuery] Selector that works in Firefox but not IE and Opera

2007-09-26 Thread Nachenko

Hi everyone.

I'm using the round plugin, latest jQuery recommended version and this
piece of code to get things done. It works fine in Firefox, but fails
in IE and Opera. I used this:

$(document).ready(
function() {
$(div.round-container).corner(round 15px);
}
);

Opera console tells me Statement on line 8: Type mismatch (usually a
non-object value used where an object is required)

Failure in IE is, well, no surprise, but when Opera also fails, that's
a different story.

I can't see what's wrong in my code. I can't understand why it works
on Firefox but not on the others. Need help.

This is the page that gets me in trouble.

http://www.anince.es/modules/news/

Thanks in advance.



[jQuery] Re: Avoid enter keypress to submit form

2007-09-26 Thread [EMAIL PROTECTED]

 1. remove the type=submit button. you need to also use javascript to
 submit form.
Really?

Try this:
form action=#test method=post
input /
/form

'Enter' works for me in FF (I didnt check on other browsers)

Michael



[jQuery] Re: cannot retrieve elements with xpath

2007-09-26 Thread Remy Sharp

You need to wrap the jQuery in a 'ready' method - otherwise your JS is
running before the DOM is ready:

$(function () {
  $(//[EMAIL PROTECTED]'2']).hide();
  $(//[EMAIL PROTECTED]'3']).hide();
});

Making this change works.

On Sep 26, 10:45 am, julio [EMAIL PROTECTED] wrote:
 Hi,

 I have this simple html page:

 html
 headtitleA test page/title/head
 script type=text/javascript src=jquery.js/script
 body
 script
 $(//[EMAIL PROTECTED]'2']).hide();
 $(//[EMAIL PROTECTED]'3']).hide();
 /script
 h1 myattr=1test-row1/h1
 another row
 h1 myattr=1test-row2/h1
 img myattr=2 src=pic1.png /
 img myattr=2 src=pic2.png /
 table myattr=3
 tr myattr=4
 td myattr=5test/td
 /tr
 tr myattr=4
 td myattr=5test/td
 /tr
 /table
 /body
 /html

 and I would like hide elements retrieved via xpath like in script/.

 But it doesn't work

 Why? Have you any idea?

 Thanks,
 Julio



[jQuery] Time Entry restrictions

2007-09-26 Thread sgrover

I'm using the time entry plugin at 
http://home.iprimus.com.au/kbwood/jquery/timeEntry.html.  (BTW, this 
plugin is a GODSEND - Great work!)

I have set the timeSteps parameter like so:  timeSteps: [1,15,0]

this works great, except I'm defaulting the input box to the current 
time.  This results in something like 08:34.  Now when I change the 
minutes, I'm seeing 08:49, 08:19, etc. - 15 minute changes from the 
shown time.  Which makes sense.

Does anyone know if there is a way to show the current time, but have 
the minutes restricted to 0, 15, 30, or 45 when the any change happens? 
  Or do I have to write code to show the closest 15 minute interval when 
showing the default time?  (any samples to save me time?)  I can't set a 
min/max time - entries can happen for anytime through the day.

I know this plugin will default to the current time with the correct 
restrictions if no values are available in the text box.  But I need to 
see that default time.

Thanks for any tips.

Shawn


[jQuery] Re: Tablesorter dd/mm/YYY date problem

2007-09-26 Thread Christian Bach
I like the idea!

I don't have the time to put together such a solutions, is anyone interested
in helping out?

/christian



2007/9/26, Kia Niskavaara [EMAIL PROTECTED]:



 A suggestion is that all parsers (except the basic ones) are removed from
 the plugin, and selectable
 from an archive. This is very useful for custom date sorters etc, and will
 make the plugin even smaller.

 Jean wrote:
Have i write my parser for dd/mm/ date format? The plugin use
 mm/dd/
  either i changing in plugin configs
 



[jQuery] nonsecure items

2007-09-26 Thread Dimitris

Hi,

I am using thickbox in an SSL enviroment. This thickbox uses JQeury,
but when the page loads I get a message in IE7 that there are
nonsecure items on the page. When I exclude following tag from my page

script type=text/javascript src=../Js/jquery.js/script

everything works fine so I guess its a JQeury problem.  (offcourse,
whitout this tag the thickbox won't work)
Can anyone help me with this problem?



[jQuery] Re: Parent Child Selectors + bind

2007-09-26 Thread Remy Sharp

You're binding to 'onfocus' when it should be 'focus':

$(#id1  [EMAIL PROTECTED]).bind(focus, foo);

On Sep 26, 8:35 am, Anjanesh [EMAIL PROTECTED] wrote:
 Hi

 I cant get this seem to work

 $(#id1  [EMAIL PROTECTED]).bind(onfocus, foo);

 Is there something wrong with the argument ?

 Thanks



[jQuery] Re: Using .children recursively

2007-09-26 Thread Erik Beeson
This will find all descendants: $(this).find('*');

--Erik

On 9/26/07, voltron [EMAIL PROTECTED] wrote:


 I am trying to get all the children of a node, apart from adding
 .children() for every generation, is there one call that gets all
 recursively?

 this is what I´m doing at the moment

 $(this).children().children().removeAttr(name);




[jQuery] Re: cannot retrieve elements with xpath

2007-09-26 Thread julio

it doesn't work for me. I have used

$(function() {

and

$(document).ready(function() {

but nothing works

I'm using firefox 2.0.6

On 26 Set, 13:33, Remy Sharp [EMAIL PROTECTED] wrote:
 You need to wrap the jQuery in a 'ready' method - otherwise your JS is
 running before the DOM is ready:

 $(function () {
   $(//[EMAIL PROTECTED]'2']).hide();
   $(//[EMAIL PROTECTED]'3']).hide();

 });

 Making this change works.

 On Sep 26, 10:45 am, julio [EMAIL PROTECTED] wrote:

  Hi,

  I have this simple html page:

  html
  headtitleA test page/title/head
  script type=text/javascript src=jquery.js/script
  body
  script
  $(//[EMAIL PROTECTED]'2']).hide();
  $(//[EMAIL PROTECTED]'3']).hide();
  /script
  h1 myattr=1test-row1/h1
  another row
  h1 myattr=1test-row2/h1
  img myattr=2 src=pic1.png /
  img myattr=2 src=pic2.png /
  table myattr=3
  tr myattr=4
  td myattr=5test/td
  /tr
  tr myattr=4
  td myattr=5test/td
  /tr
  /table
  /body
  /html

  and I would like hide elements retrieved via xpath like in script/.

  But it doesn't work

  Why? Have you any idea?

  Thanks,
  Julio



[jQuery] Re: Parent Child Selectors + bind

2007-09-26 Thread Erik Beeson
Also, your initial selector can be simplified to: $(#id1  :text)

--Erik


On 9/26/07, Remy Sharp [EMAIL PROTECTED] wrote:


 You're binding to 'onfocus' when it should be 'focus':

 $(#id1  [EMAIL PROTECTED]).bind(focus, foo);

 On Sep 26, 8:35 am, Anjanesh [EMAIL PROTECTED] wrote:
  Hi
 
  I cant get this seem to work
 
  $(#id1  [EMAIL PROTECTED]).bind(onfocus, foo);
 
  Is there something wrong with the argument ?
 
  Thanks




[jQuery] Re: Tablesorter dd/mm/YYY date problem

2007-09-26 Thread Jean

Unfortunally i´m a jquery noob =/

On 9/26/07, Christian Bach [EMAIL PROTECTED] wrote:
 I like the idea!

 I don't have the time to put together such a solutions, is anyone interested
 in helping out?

 /christian



 2007/9/26, Kia Niskavaara  [EMAIL PROTECTED]:
 
 
  A suggestion is that all parsers (except the basic ones) are removed from
 the plugin, and selectable
  from an archive. This is very useful for custom date sorters etc, and will
 make the plugin even smaller.
 
  Jean wrote:
 Have i write my parser for dd/mm/ date format? The plugin use
 mm/dd/
   either i changing in plugin configs
  
 




-- 

[]´s Jean
www.suissa.info

   Ethereal Agency
www.etherealagency.com


[jQuery] Re: cannot retrieve elements with xpath

2007-09-26 Thread Erik Beeson
If you're using jQuery 1.2 or later, you need the XPath plugin. See here:
http://docs.jquery.com/Release:jQuery_1.2#XPath_Compatibility_Plugin

--Erik


On 9/26/07, julio [EMAIL PROTECTED] wrote:


 it doesn't work for me. I have used

 $(function() {

 and

 $(document).ready(function() {

 but nothing works

 I'm using firefox 2.0.6

 On 26 Set, 13:33, Remy Sharp [EMAIL PROTECTED] wrote:
  You need to wrap the jQuery in a 'ready' method - otherwise your JS is
  running before the DOM is ready:
 
  $(function () {
$(//[EMAIL PROTECTED]'2']).hide();
$(//[EMAIL PROTECTED]'3']).hide();
 
  });
 
  Making this change works.
 
  On Sep 26, 10:45 am, julio [EMAIL PROTECTED] wrote:
 
   Hi,
 
   I have this simple html page:
 
   html
   headtitleA test page/title/head
   script type=text/javascript src=jquery.js/script
   body
   script
   $(//[EMAIL PROTECTED]'2']).hide();
   $(//[EMAIL PROTECTED]'3']).hide();
   /script
   h1 myattr=1test-row1/h1
   another row
   h1 myattr=1test-row2/h1
   img myattr=2 src=pic1.png /
   img myattr=2 src=pic2.png /
   table myattr=3
   tr myattr=4
   td myattr=5test/td
   /tr
   tr myattr=4
   td myattr=5test/td
   /tr
   /table
   /body
   /html
 
   and I would like hide elements retrieved via xpath like in script/.
 
   But it doesn't work
 
   Why? Have you any idea?
 
   Thanks,
   Julio




[jQuery] Re: Unexcpected Quantifier in IE6 (1.2.1 SVN)

2007-09-26 Thread John Resig

Could you bring this up on the dev list, along with a case where it
occurs? Thanks!

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

--John

On 9/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 The problem is occurring on line 822 (from the current SVN code),

 /^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('??)(.*?)\4 *\]/i,

 It only throws the error in IE6, I have been led to believe it is
 something to do with *, but I am unfortunately totally regexp
 retarded. Any insight would be appreciated.




[jQuery] Re: image preload problem (encore)

2007-09-26 Thread dimitrisX

Thanks for your reply.
I want to present a series of images (70k each) as a slideshow when
the page loads. I am currently using the innerfade plugin for that
purpose.
So, to be unobstrusive I include an image in my html so that in case
js is disabled in the browser the client sees only that image. The
other images I create them with jquery, and then append them to the
slideshow div. I currently call the image creation function in $
(document).ready(). Should I do this differently?
Thank you.


On 26 Σεπτ, 03:34, Erik Beeson [EMAIL PROTECTED] wrote:
 There are a lot of things that seem very strange about what you're doing.
 Basic preloading can be a simple as:

 function loadImages() {
 $.each(arguments, function(i, url) {
 var image = new Image();
 image.onload = function() {
 // do something with the image now that it's loaded
 };
 image.src = url;
 });

 };

 $(window).load(function() {
 loadImages('foo.jpg', 'bar.jpg', 'far.jpg');

 });

 If you want something a little more multi-purpose, you could do something
 like:

 function loadImages(urls, onLoad, onFinished) {
 var loaded = 0;
 urls = (url.constructor == Array) ? urls : [urls];
 $.each(urls, function(i, url) {
 var image = new Image();
 image.onload = function() {
 loaded++;
 if($.isFunction(onLoad)) {
 onLoad.call(this);
 }
 if(loadedCount == urls.length 
 $.isFunction(onFinished)) {
 onFinished.call(this)
 }
 };
 image.src = url;
 });

 };

 $(window).load(function() {
 loadImages(['foo.jpg', 'bar.jpg', 'far.jpg'], function() {
 $('#images').append(this);
 }, function() {
 $('#images').show();
 });

 });

 It kind of depends on your application. But like I said, you're doing a lot
 of strange things in your current code. Maybe you should describe how
 exactly you want to it work.

 --Erik

 On 9/25/07, dimitrisX  [EMAIL PROTECTED] wrote:



  Hello,
  I am trying to preload some images using either one of the functions
  below. They don't seem to load. I really could use your help here.

  /// version 1
  jQuery.preloadImages = function()
  {
  for(var i = 0; iarguments.length; i++)
  {
  $('img').attr('src', arguments[i]);
  }

  }

  /// version 2 (not quite like the original)
  jQuery.preloadImages2 = function(){
  var args = arguments;
  $(window).bind('load', function(){
 var preload = new Array();
 for(var i = 0; iargs.length; i++){
  preload[i] = args[i];
  }
 $(document.createElement('img')).bind('load', function(){
  if(preload[0]){
  this.src = preload.shift();
  alert(this.src);
  }
 }).trigger('load').appendTo('#imagePanel');
  });

  }

  I then call one of those functions before the document loads, passing
  the desired image pathnames as arguments:

  $.preloadImages(
  img/cedefop.jpg,
  img/cedefop5.jpg,
  img/sap.jpg,
  img/igme5.jpg,
  img/naxm.jpg,
  img/olymp.jpg
  );

  ...and then i try to append the preloaded images to a div element:

  $(document).ready( function(){
  images = $('img');
  $('#imagePanel').append(images)

  });

  The images will not load. What is wrong here?
  Thank you,



[jQuery] Re: cannot retrieve elements with xpath

2007-09-26 Thread julio

I'm using (compressed) jquery version 1.2.1
I have downloaded plugin and renamed it

I have transformed my test page like this:

html
head
titleA test page/title
script type=text/javascript src=jquery.js/script
script type=text/javascript src=jquery.xpath.js/script
/head
body
script
$(document).ready(function() {
$(//[EMAIL PROTECTED]'2']).hide();
$(//[EMAIL PROTECTED]'3']).hide();
});
/script
h1 myattr=1test-row1/h1
another row
h1 myattr=1test-row2/h1
img myattr=2 src=pic1.png /
img myattr=2 src=pic2.png /
table myattr=3
tr myattr=4
td myattr=5test/td
/tr
tr myattr=4
td myattr=5test/td
/tr
/table
/body
/html

but it doesn't work again

this is plugin I have downloaded:

http://jquery.com/plugins/files/jquery.xpath.js.txt

On 26 Set, 13:45, Erik Beeson [EMAIL PROTECTED] wrote:
 If you're using jQuery 1.2 or later, you need the XPath plugin. See 
 here:http://docs.jquery.com/Release:jQuery_1.2#XPath_Compatibility_Plugin

 --Erik

 On 9/26/07, julio [EMAIL PROTECTED] wrote:



  it doesn't work for me. I have used

  $(function() {

  and

  $(document).ready(function() {

  but nothing works

  I'm using firefox 2.0.6

  On 26 Set, 13:33, Remy Sharp [EMAIL PROTECTED] wrote:
   You need to wrap the jQuery in a 'ready' method - otherwise your JS is
   running before the DOM is ready:

   $(function () {
 $(//[EMAIL PROTECTED]'2']).hide();
 $(//[EMAIL PROTECTED]'3']).hide();

   });

   Making this change works.

   On Sep 26, 10:45 am, julio [EMAIL PROTECTED] wrote:

Hi,

I have this simple html page:

html
headtitleA test page/title/head
script type=text/javascript src=jquery.js/script
body
script
$(//[EMAIL PROTECTED]'2']).hide();
$(//[EMAIL PROTECTED]'3']).hide();
/script
h1 myattr=1test-row1/h1
another row
h1 myattr=1test-row2/h1
img myattr=2 src=pic1.png /
img myattr=2 src=pic2.png /
table myattr=3
tr myattr=4
td myattr=5test/td
/tr
tr myattr=4
td myattr=5test/td
/tr
/table
/body
/html

and I would like hide elements retrieved via xpath like in script/.

But it doesn't work

Why? Have you any idea?

Thanks,
Julio



[jQuery] Re: $(function()

2007-09-26 Thread Danjojo

Cool. I found the anonymous function on wikipedia
http://en.wikipedia.org/wiki/Anonymous_function


On Sep 25, 5:49 pm, Matt Stith [EMAIL PROTECTED] wrote:
 Using a function like that is called an anonymous function, and in this
 case you are passing the anonymous function to the jQuery object, which
 stores it and calls on it when the DOM is finished loading.

 On 9/25/07, Danjojo [EMAIL PROTECTED] wrote:





  2 Questions.

  1. are there the correct number of parenthesis in this code. Is there
  a syntax error? It runs fine..

  2. What is this idea of wrapping the code in like a blank function()
  with no name? The one the looks like $function() ? I don't understand
  it and I want to. Being a noob javascript coder I understand functions
  like:

  function myCall() {
  // etc
  }

  $(function() {
  $(#languages).bind('change', function() {
  var country = $(this).val();
  if(country) {
  $('#countryFlag').attr(src, images/ + country
  + .gif);
  $.cookie('language', country, {expires: 7}); //
  set cookie
  }
  });
  });- Hide quoted text -

 - Show quoted text -



[jQuery] Re: $(function()

2007-09-26 Thread Danjojo

Thank you. I commented my code and also altered my code to use $
(document).ready(function() { etc..

Totally helps me understand we are just initiating the Jquery code
again to do something new, whe I see it in long form :)

On Sep 25, 9:03 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 That function is also shorthand for this in jQuery:
 $(document).ready(function() {
   // do something when the DOM is ready

 });

 Some people like the shorthand. I prefer the longer form because it's  
 more clear about what it is doing. Ultimate, it's a matter of  
 personal taste.

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 25, 2007, at 5:49 PM, Matt Stith wrote:



  Using a function like that is called an anonymous function, and  
  in this case you are passing the anonymous function to the jQuery  
  object, which stores it and calls on it when the DOM is finished  
  loading.

  On 9/25/07, Danjojo [EMAIL PROTECTED] wrote:

  2 Questions.

  1. are there the correct number of parenthesis in this code. Is there
  a syntax error? It runs fine..

  2. What is this idea of wrapping the code in like a blank function()
  with no name? The one the looks like $function() ? I don't understand
  it and I want to. Being a noob javascript coder I understand functions
  like:

  function myCall() {
  // etc
  }

  $(function() {
  $(#languages).bind('change', function() {
  var country = $(this).val();
  if(country) {
  $('#countryFlag').attr(src, images/ +  
  country + .gif);
  $.cookie('language', country, {expires:  
  7}); // set cookie
  }
  });
  });- Hide quoted text -

 - Show quoted text -



[jQuery] Re: Tablesorter dd/mm/YYY date problem

2007-09-26 Thread Christian Bach
To change the date-format to the one you requested just pass the dateFormat
options like this:

$(table).tablesorter({dateFormat: 'uk'});

/christian

2007/9/26, Jean [EMAIL PROTECTED]:


 Unfortunally i´m a jquery noob =/

 On 9/26/07, Christian Bach [EMAIL PROTECTED] wrote:
  I like the idea!
 
  I don't have the time to put together such a solutions, is anyone
 interested
  in helping out?
 
  /christian
 
 
 
  2007/9/26, Kia Niskavaara  [EMAIL PROTECTED]:
  
  
   A suggestion is that all parsers (except the basic ones) are removed
 from
  the plugin, and selectable
   from an archive. This is very useful for custom date sorters etc, and
 will
  make the plugin even smaller.
  
   Jean wrote:
  Have i write my parser for dd/mm/ date format? The plugin use
  mm/dd/
either i changing in plugin configs
   
  
 
 


 --

 []´s Jean
 www.suissa.info

Ethereal Agency
 www.etherealagency.com



[jQuery] Re: nonsecure items

2007-09-26 Thread Brandon Aaron
Did you try removing any plugins first? It might actually be the plugins
causing the problem and since you remove jquery.js it just looks like the
problem is solved. However, the plugins just aren't running either.

--
Brandon Aaron

On 9/26/07, Dimitris [EMAIL PROTECTED] wrote:


 Hi,

 I am using thickbox in an SSL enviroment. This thickbox uses JQeury,
 but when the page loads I get a message in IE7 that there are
 nonsecure items on the page. When I exclude following tag from my page

 script type=text/javascript src=../Js/jquery.js/script

 everything works fine so I guess its a JQeury problem.  (offcourse,
 whitout this tag the thickbox won't work)
 Can anyone help me with this problem?




[jQuery] Re: Tablesorter dd/mm/YYY date problem

2007-09-26 Thread Jean

Unfortunally dont works, it is sorting like mm/dd/ =/
Ow i forgot to say some cells have text like no prevision where dont
have a date.


On 9/26/07, Christian Bach [EMAIL PROTECTED] wrote:
 To change the date-format to the one you requested just pass the dateFormat
 options like this:

 $(table).tablesorter({dateFormat: 'uk'});

 /christian

 2007/9/26, Jean  [EMAIL PROTECTED]:
 
  Unfortunally i´m a jquery noob =/
 
  On 9/26/07, Christian Bach [EMAIL PROTECTED] wrote:
   I like the idea!
  
   I don't have the time to put together such a solutions, is anyone
 interested
   in helping out?
  
   /christian
  
  
  
   2007/9/26, Kia Niskavaara  [EMAIL PROTECTED]:
   
   
A suggestion is that all parsers (except the basic ones) are removed
 from
   the plugin, and selectable
from an archive. This is very useful for custom date sorters etc, and
 will
   make the plugin even smaller.
   
Jean wrote:
   Have i write my parser for dd/mm/ date format? The plugin use
   mm/dd/
 either i changing in plugin configs

   
  
  
 
 
  --
 
  []´s Jean
  www.suissa.info
 
 Ethereal Agency
  www.etherealagency.com
 




-- 

[]´s Jean
www.suissa.info

   Ethereal Agency
www.etherealagency.com


[jQuery] Re: Focusfields

2007-09-26 Thread Sam Collett

I can replicate the error:
http://www.texotela.co.uk/code/jquery/focusfields/?jqver=1.2.1

I will see what is causing the problem.

On Sep 25, 4:31 pm, Charles Sheehan-Miles [EMAIL PROTECTED]
wrote:
 Hello all,

 I'm new to jquery, so forgive me if I'm asking questions which have
 been asked a thousand times.  I've searched through the list archives
 and not had much luck with this one.

 I'm using the focusfields plugin, which I found here:

 http://www.texotela.co.uk/code/jquery/focusfields/

 It works great on Firefox, Camino, etc., and the demo works fine on
 IE.  But in my test setup, I get this error:

 'this.parentNode.borderCss.off' is null or not an object

 Error comes up as soon as the page loads.

 I'm using jQuery 1.2 on my server, which is the one difference I
 found from the demo page (which seems to be calling
 jquery-1.1.2.pack.js).  If this possibly a version difference, and
 the newer version doesn't deal as well with IE?

 Hope someone has some ideas,

 Charles



[jQuery] Re: newb: How to get google groups like layout

2007-09-26 Thread george.gsgd

Oh dear, I think you've completely misunderstood what jQuery is for.

Think of a webpage as three separate elements that make up the
finished product:

1. Content (the HTML)
2. Presentation (the CSS)
3. Behaviour (the javascript, in this case jQuery)

First port of call would be HTML Dog to learn about HTML and CSS:
http://www.htmldog.com/

Then learn a bit of javascript, then jQuery.

Once that's done, come back and your question will have mysteriously
been answered for you.

On Sep 26, 12:38 am, crybaby [EMAIL PROTECTED] wrote:
 All the boxes, background colors, and rounded corners done using
 javaScript or css?  Can I do similar layout, look and feel, with
 jQuery alone(without images) or combination of jQuery and CSS?

 thanks



[jQuery] Re: dimensions issue?

2007-09-26 Thread Eridius


I though if a selector return nothing and i tried to call a method, it would
just fail by saying that the method i called is not a function.


Brandon Aaron wrote:
 
 The jQuery collection is empty ... meaning it didn't match any any
 elements.
 Which means my_element.length == 0
 
 --
 Brandon Aaron
 
 On 9/25/07, Eridius [EMAIL PROTECTED] wrote:



 [Exception... 'Dimensions: jQuery collection is empty' when calling
 method:
 [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e
 (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no]

 anyone know why this would happen?  here is that this happens on:

 $('.input:eq(' + index + ')').livequery('click', function()
 {
 if($('#' + indexs[index] + '_list').css('display') === 'none' 
 $('#' + indexs[index] + '_list').text() != '')
 {
 //alert('start');
 var my_element = $('[EMAIL PROTECTED]' + indexs[index]
 +']').parent('div');
 var offset = my_element.offset();
 var height = my_element.height();

 var top = offset.top + height;
 var left = offset.left;

 $('#' + indexs[index] + '_list').css({'display': 'block',
'top': top,
'left': left,
'z-index': 2,
'border': '2px solid black'});
 //alert('end');
 }
 else
 {
 $('#' + indexs[index] + '_list').css({'display': 'none'});
 }
 });
 --
 View this message in context:
 http://www.nabble.com/dimensions-issue--tf4518540s15494.html#a12889201
 Sent from the JQuery mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://www.nabble.com/dimensions-issue--tf4518540s15494.html#a12900442
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: nonsecure items

2007-09-26 Thread Weaver, Scott

9 times out of 10 this caused by an iframe that has no src attribute
defined.  I usually fix this by adding src=javascript:void(0).  I have
heard that others have encountered issues using this workaround however;
I have never had any problems with it.

-scott

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dimitris
Sent: Wednesday, September 26, 2007 3:45 AM
To: jQuery (English)
Subject: [jQuery] nonsecure items


Hi,

I am using thickbox in an SSL enviroment. This thickbox uses JQeury,
but when the page loads I get a message in IE7 that there are
nonsecure items on the page. When I exclude following tag from my page

script type=text/javascript src=../Js/jquery.js/script

everything works fine so I guess its a JQeury problem.  (offcourse,
whitout this tag the thickbox won't work)
Can anyone help me with this problem?



[jQuery] g has no properties?

2007-09-26 Thread Danjojo

I am doing a simple imageChange onLinkHover...

I get the following error in Firebug everytime I hover over a link.
But the image swaps work GREAT in all browsers.
Except for the fact I see the error getting thrown in the browsers I
am fine.

g has no properties
handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line
11)
e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11)
e()jquery-svn.js (line 11)
[Break on this error] eval(function(p,a,c,k,e,r){e=function(c)
{return(ca?'':e(parseInt(c/a)))+((c=c%a...


The jQuery code to swap images is:

$(.showPic).hover(function() {
$(#imgLinkAct).attr(src, images/cylinder.jpg);
});
$(.showPic2).hover(function() {
$(#imgLinkAct).attr(src, images/mgp_swap.jpg);
});
$(.showPic3).hover(function() {
$(#imgLinkAct).attr(src, images/mhc_swap.jpg);
});
$(.showPic4).hover(function() {
$(#imgLinkAct).attr(src, images/shock_swap.jpg);
});
$(.showPic5).hover(function() {
$(#imgLinkAct).attr(src, images/emy2_swap.jpg);
});
$(.showPic6).hover(function() {
$(#imgLinkAct).attr(src, images/ncy2_swap.jpg);
});
$(.showPic7).hover(function() {
$(#imgLinkAct).attr(src, images/crq_swap.jpg);
});
$(.showPic8).hover(function() {
$(#imgLinkAct).attr(src, images/clean_room_swap.jpg);
});

});



[jQuery] Re: input type text toUpperCase() jquery question

2007-09-26 Thread Andy Matthews
Why would you even want to use Javascript for this? Just use CSS:
 
input {
text-decoration: uppercase;
}

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Frank Tudor
Sent: Tuesday, September 25, 2007 12:30 PM
To: jQuery (English)
Subject: [jQuery] Re: input type text toUpperCase() jquery question


Anybody?


On 9/25/07, FrankTudor [EMAIL PROTECTED] wrote: 

As a user types in content to this this text field I would like tho
force the text to uppercase to as keys are pressed.

How would this be done?

and is toUpperCase a real jquery function?  if not wbhat would be a 
simple way to hndle this with either CSS or someother method...


Here is what I have and obviously I am stuck...

script type=text/javascript
$(document).ready(function() 
{
$('.highball').keypress( function()
{
$('.highball').toUpperCase()
} 
);
}
);
/script


input type=text style= class=ac_input highball
autocomplete=off id=CityLocal value= type=text 


Frank






[jQuery] Re: $.ajax ?

2007-09-26 Thread Andy Matthews

The .ajax() method is built into jQuery. So as long as you have the jQuery
library, you're good to go. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Danjojo
Sent: Tuesday, September 25, 2007 6:52 AM
To: jQuery (English)
Subject: [jQuery] $.ajax ?


Before I use the $.ajax function, do I need to install a codebase for it?

I notice it is similar to Klaus Hartl cookie plugin, where I install his
codebase, then use it later like var country = $.cookie('language');

When I start to use this code it seems almost like the rest of the working
jQuery portions of the web page stop working.
$.ajax({
url: language_sheet_en.xml,
dataType: xml;
success: function(xmlDocument){
$(xmlDocument).find(...).dosomeThing(...);
}
});

Do I need to install an ajax library or is it allready available in my
jQuery build:  * jQuery 1.1.3.1


Thank you.




[jQuery] Re: newb: How to get google groups like layout

2007-09-26 Thread Danjojo

Yes with a combination of jQuery and CSS you can do it...

Rounded corners are still a tricky artform... in my oppinion.

http://www.google.com/search?source=ighl=enq=jquery+rounded+corners



On Sep 25, 7:38 pm, crybaby [EMAIL PROTECTED] wrote:
 All the boxes, background colors, and rounded corners done using
 javaScript or css?  Can I do similar layout, look and feel, with
 jQuery alone(without images) or combination of jQuery and CSS?

 thanks



[jQuery] ui slider plugin

2007-09-26 Thread Christof Donat

Hi

I am having problems with the UI slider plugin. I have this HTML structure 
(bulilt with DOM):

div id=hue style=float: right; margin-top: 5px; 
background-image: url(img/hue.png); width: 18px; height: 
186px;
img id=hueSlider src=img/handle.gif style=left: 232px;/
/div

Then I try to make a slider for the hue:

$('#hue').slider({
minValue:0,
maxValue:360,
axis:'vertical',
handle:'#hueSlider',
startValue:360-h,
start:function(){}
});

It works fine, but the slider always begins at the top of the page instead of 
the top of the containig div (selectColor_hueSlider). How can I convince 
slider() to work correctly?

Christof


[jQuery] Re: g has no properties?

2007-09-26 Thread Andy Matthews

As an aside, you might consider streamlining your code a little. Instead of
having one method for each image, just do something like this:

img src=images/originalimage.jpg rel=images/cylinder.jpg
class=swapImages /
img src=images/originalimage_02.jpg rel=images/mgp_swap.jpg
class=swapImages /

Then your jQuery code can look like this:

$(.swapImages).hover(function() {
var newSRC = $(this).attr(rel);
$(this).attr(src,newSRC);
});

That new method covers ALL the images, as long as you've got the new src set
inside the rel attribute of the image tag.


Just something to consider. It's always a good thing when you can condense
code.


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Danjojo
Sent: Wednesday, September 26, 2007 8:17 AM
To: jQuery (English)
Subject: [jQuery] g has no properties?


I am doing a simple imageChange onLinkHover...

I get the following error in Firebug everytime I hover over a link.
But the image swaps work GREAT in all browsers.
Except for the fact I see the error getting thrown in the browsers I am
fine.

g has no properties
handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line
11)
e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11)
e()jquery-svn.js (line 11) [Break on this error]
eval(function(p,a,c,k,e,r){e=function(c)
{return(ca?'':e(parseInt(c/a)))+((c=c%a...


The jQuery code to swap images is:

$(.showPic).hover(function() {
$(#imgLinkAct).attr(src, images/cylinder.jpg);
});
$(.showPic2).hover(function() {
$(#imgLinkAct).attr(src, images/mgp_swap.jpg);
});
$(.showPic3).hover(function() {
$(#imgLinkAct).attr(src, images/mhc_swap.jpg);
});
$(.showPic4).hover(function() {
$(#imgLinkAct).attr(src, images/shock_swap.jpg);
});
$(.showPic5).hover(function() {
$(#imgLinkAct).attr(src, images/emy2_swap.jpg);
});
$(.showPic6).hover(function() {
$(#imgLinkAct).attr(src, images/ncy2_swap.jpg);
});
$(.showPic7).hover(function() {
$(#imgLinkAct).attr(src, images/crq_swap.jpg);
});
$(.showPic8).hover(function() {
$(#imgLinkAct).attr(src, images/clean_room_swap.jpg);
});

});




[jQuery] Re: cannot retrieve elements with xpath

2007-09-26 Thread julio

Using develop version of jquery 1.2.1 it doesn't work

but using version 1.1.4 (and so without plugin) it works

can be it considered a jquery 1.2.1 bug?

On 26 Set, 14:01, julio [EMAIL PROTECTED] wrote:
 I'm using (compressed) jquery version 1.2.1
 I have downloaded plugin and renamed it

 I have transformed my test page like this:

 html
 head
 titleA test page/title
 script type=text/javascript src=jquery.js/script
 script type=text/javascript src=jquery.xpath.js/script
 /head
 body
 script
 $(document).ready(function() {
 $(//[EMAIL PROTECTED]'2']).hide();
 $(//[EMAIL PROTECTED]'3']).hide();});

 /script
 h1 myattr=1test-row1/h1
 another row
 h1 myattr=1test-row2/h1
 img myattr=2 src=pic1.png /
 img myattr=2 src=pic2.png /
 table myattr=3
 tr myattr=4
 td myattr=5test/td
 /tr
 tr myattr=4
 td myattr=5test/td
 /tr
 /table
 /body
 /html

 but it doesn't work again

 this is plugin I have downloaded:

 http://jquery.com/plugins/files/jquery.xpath.js.txt

 On 26 Set, 13:45, Erik Beeson [EMAIL PROTECTED] wrote:

  If you're using jQuery 1.2 or later, you need the XPath plugin. See 
  here:http://docs.jquery.com/Release:jQuery_1.2#XPath_Compatibility_Plugin

  --Erik

  On 9/26/07, julio [EMAIL PROTECTED] wrote:

   it doesn't work for me. I have used

   $(function() {

   and

   $(document).ready(function() {

   but nothing works

   I'm using firefox 2.0.6

   On 26 Set, 13:33, Remy Sharp [EMAIL PROTECTED] wrote:
You need to wrap the jQuery in a 'ready' method - otherwise your JS is
running before the DOM is ready:

$(function () {
  $(//[EMAIL PROTECTED]'2']).hide();
  $(//[EMAIL PROTECTED]'3']).hide();

});

Making this change works.

On Sep 26, 10:45 am, julio [EMAIL PROTECTED] wrote:

 Hi,

 I have this simple html page:

 html
 headtitleA test page/title/head
 script type=text/javascript src=jquery.js/script
 body
 script
 $(//[EMAIL PROTECTED]'2']).hide();
 $(//[EMAIL PROTECTED]'3']).hide();
 /script
 h1 myattr=1test-row1/h1
 another row
 h1 myattr=1test-row2/h1
 img myattr=2 src=pic1.png /
 img myattr=2 src=pic2.png /
 table myattr=3
 tr myattr=4
 td myattr=5test/td
 /tr
 tr myattr=4
 td myattr=5test/td
 /tr
 /table
 /body
 /html

 and I would like hide elements retrieved via xpath like in script/.

 But it doesn't work

 Why? Have you any idea?

 Thanks,
 Julio



[jQuery] Re: g has no properties?

2007-09-26 Thread Andy Matthews

Oh...

I just thought of something. The hover method is actually supposed to have
two functions built into it. One for over, and the other for out. I wonder
if that's why you're getting the error. Should look like this:

$(.swapImages).hover(function() {
var newSRC = $(this).attr(rel);
$(this).attr(src,newSRC);
},function(){
// something else goes here
});

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Danjojo
Sent: Wednesday, September 26, 2007 8:17 AM
To: jQuery (English)
Subject: [jQuery] g has no properties?


I am doing a simple imageChange onLinkHover...

I get the following error in Firebug everytime I hover over a link.
But the image swaps work GREAT in all browsers.
Except for the fact I see the error getting thrown in the browsers I am
fine.

g has no properties
handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line
11)
e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11)
e()jquery-svn.js (line 11) [Break on this error]
eval(function(p,a,c,k,e,r){e=function(c)
{return(ca?'':e(parseInt(c/a)))+((c=c%a...


The jQuery code to swap images is:

$(.showPic).hover(function() {
$(#imgLinkAct).attr(src, images/cylinder.jpg);
});
$(.showPic2).hover(function() {
$(#imgLinkAct).attr(src, images/mgp_swap.jpg);
});
$(.showPic3).hover(function() {
$(#imgLinkAct).attr(src, images/mhc_swap.jpg);
});
$(.showPic4).hover(function() {
$(#imgLinkAct).attr(src, images/shock_swap.jpg);
});
$(.showPic5).hover(function() {
$(#imgLinkAct).attr(src, images/emy2_swap.jpg);
});
$(.showPic6).hover(function() {
$(#imgLinkAct).attr(src, images/ncy2_swap.jpg);
});
$(.showPic7).hover(function() {
$(#imgLinkAct).attr(src, images/crq_swap.jpg);
});
$(.showPic8).hover(function() {
$(#imgLinkAct).attr(src, images/clean_room_swap.jpg);
});

});




[jQuery] Re: input type text toUpperCase() jquery question

2007-09-26 Thread Danjojo

omgosh.. I did not even know CSS could do that!

Is that CSS-2? or -3?


On Sep 26, 9:18 am, Andy Matthews [EMAIL PROTECTED] wrote:
 Why would you even want to use Javascript for this? Just use CSS:

 input {
 text-decoration: uppercase;

 }

   _  

 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Frank Tudor
 Sent: Tuesday, September 25, 2007 12:30 PM
 To: jQuery (English)
 Subject: [jQuery] Re: input type text toUpperCase() jquery question

 Anybody?

 On 9/25/07, FrankTudor [EMAIL PROTECTED] wrote:

 As a user types in content to this this text field I would like tho
 force the text to uppercase to as keys are pressed.

 How would this be done?

 and is toUpperCase a real jquery function?  if not wbhat would be a
 simple way to hndle this with either CSS or someother method...

 Here is what I have and obviously I am stuck...

 script type=text/javascript
 $(document).ready(function()
 {
 $('.highball').keypress( function()
 {
 $('.highball').toUpperCase()
 }
 );
 }
 );
 /script

 input type=text style= class=ac_input highball
 autocomplete=off id=CityLocal value= type=text

 Frank


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: g has no properties?

2007-09-26 Thread Karl Swedberg
The problem here is that .hover() takes two arguments, one for  
mouseover and one for mouseout.


So it should look like this:

.hover(function() {
  // Stuff to do when the mouse enters the element;
}, function() {
  // Stuff to do when the mouse leaves the element;
});

If you just want to do something on mouseover, use the (appropriately  
named) .mouseover() method instead:


.mouseover(function() {
  // Stuff to do when the mouse enters the element
})


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



On Sep 26, 2007, at 9:17 AM, Danjojo wrote:



I am doing a simple imageChange onLinkHover...

I get the following error in Firebug everytime I hover over a link.
But the image swaps work GREAT in all browsers.
Except for the fact I see the error getting thrown in the browsers I
am fine.

g has no properties
handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line
11)
e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11)
e()jquery-svn.js (line 11)
[Break on this error] eval(function(p,a,c,k,e,r){e=function(c)
{return(ca?'':e(parseInt(c/a)))+((c=c%a...


The jQuery code to swap images is:

$(.showPic).hover(function() {
$(#imgLinkAct).attr(src, images/cylinder.jpg);
});
$(.showPic2).hover(function() {
$(#imgLinkAct).attr(src, images/mgp_swap.jpg);
});
$(.showPic3).hover(function() {
$(#imgLinkAct).attr(src, images/mhc_swap.jpg);
});
$(.showPic4).hover(function() {
$(#imgLinkAct).attr(src, images/shock_swap.jpg);
});
$(.showPic5).hover(function() {
$(#imgLinkAct).attr(src, images/emy2_swap.jpg);
});
$(.showPic6).hover(function() {
$(#imgLinkAct).attr(src, images/ncy2_swap.jpg);
});
$(.showPic7).hover(function() {
$(#imgLinkAct).attr(src, images/crq_swap.jpg);
});
$(.showPic8).hover(function() {
$(#imgLinkAct).attr(src, images/clean_room_swap.jpg);
});

});





[jQuery] Re: g has no properties?

2007-09-26 Thread Danjojo

Hmmm.. well that would kill 2 birds with one stone...

My boss was thinking on hover off it should go back to the original
image.. I guess...

I don't know... where I land on that UI issue


On Sep 26, 9:29 am, Andy Matthews [EMAIL PROTECTED] wrote:
 Oh...

 I just thought of something. The hover method is actually supposed to have
 two functions built into it. One for over, and the other for out. I wonder
 if that's why you're getting the error. Should look like this:

 $(.swapImages).hover(function() {
 var newSRC = $(this).attr(rel);
 $(this).attr(src,newSRC);},function(){

 // something else goes here



 });
 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of Danjojo
 Sent: Wednesday, September 26, 2007 8:17 AM
 To: jQuery (English)
 Subject: [jQuery] g has no properties?

 I am doing a simple imageChange onLinkHover...

 I get the following error in Firebug everytime I hover over a link.
 But the image swaps work GREAT in all browsers.
 Except for the fact I see the error getting thrown in the browsers I am
 fine.

 g has no properties
 handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line
 11)
 e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11)
 e()jquery-svn.js (line 11) [Break on this error]
 eval(function(p,a,c,k,e,r){e=function(c)
 {return(ca?'':e(parseInt(c/a)))+((c=c%a...

 The jQuery code to swap images is:

 $(.showPic).hover(function() {
 $(#imgLinkAct).attr(src, images/cylinder.jpg);
 });
 $(.showPic2).hover(function() {
 $(#imgLinkAct).attr(src, images/mgp_swap.jpg);
 });
 $(.showPic3).hover(function() {
 $(#imgLinkAct).attr(src, images/mhc_swap.jpg);
 });
 $(.showPic4).hover(function() {
 $(#imgLinkAct).attr(src, images/shock_swap.jpg);
 });
 $(.showPic5).hover(function() {
 $(#imgLinkAct).attr(src, images/emy2_swap.jpg);
 });
 $(.showPic6).hover(function() {
 $(#imgLinkAct).attr(src, images/ncy2_swap.jpg);
 });
 $(.showPic7).hover(function() {
 $(#imgLinkAct).attr(src, images/crq_swap.jpg);
 });
 $(.showPic8).hover(function() {
 $(#imgLinkAct).attr(src, images/clean_room_swap.jpg);
 });

 });- Hide quoted text -

 - Show quoted text -



[jQuery] Re: input type text toUpperCase() jquery question

2007-09-26 Thread Karl Swedberg
It's CSS 2. But it should be this:

input {
  text-transform: uppercase;
}

However, that will only change the way the text is displayed, not the  
actual case of the text itself.

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



On Sep 26, 2007, at 9:32 AM, Danjojo wrote:


 omgosh.. I did not even know CSS could do that!

 Is that CSS-2? or -3?


 On Sep 26, 9:18 am, Andy Matthews [EMAIL PROTECTED] wrote:
 Why would you even want to use Javascript for this? Just use CSS:

 input {
 text-decoration: uppercase;

 }

   _

 From: jquery-en@googlegroups.com [mailto:jquery- 
 [EMAIL PROTECTED] On
 Behalf Of Frank Tudor
 Sent: Tuesday, September 25, 2007 12:30 PM
 To: jQuery (English)
 Subject: [jQuery] Re: input type text toUpperCase() jquery question

 Anybody?

 On 9/25/07, FrankTudor [EMAIL PROTECTED] wrote:

 As a user types in content to this this text field I would like tho
 force the text to uppercase to as keys are pressed.

 How would this be done?

 and is toUpperCase a real jquery function?  if not wbhat would be a
 simple way to hndle this with either CSS or someother method...

 Here is what I have and obviously I am stuck...

 script type=text/javascript
 $(document).ready(function()
 {
 $('.highball').keypress( function()
 {
 $('.highball').toUpperCase()
 }
 );
 }
 );
 /script

 input type=text style= class=ac_input highball
 autocomplete=off id=CityLocal value= type=text

 Frank


 



[jQuery] Re: Focusfields

2007-09-26 Thread Sam Collett

Found out the cause, but not sure how to work around it at the moment:
http://www.texotela.co.uk/wrapexpandos.php

On Sep 26, 1:47 pm, Sam Collett [EMAIL PROTECTED] wrote:
 I can replicate the 
 error:http://www.texotela.co.uk/code/jquery/focusfields/?jqver=1.2.1

 I will see what is causing the problem.

 On Sep 25, 4:31 pm, Charles Sheehan-Miles [EMAIL PROTECTED]
 wrote:

  Hello all,

  I'm new to jquery, so forgive me if I'm asking questions which have
  been asked a thousand times.  I've searched through the list archives
  and not had much luck with this one.

  I'm using the focusfields plugin, which I found here:

 http://www.texotela.co.uk/code/jquery/focusfields/

  It works great on Firefox, Camino, etc., and the demo works fine on
  IE.  But in my test setup, I get this error:

  'this.parentNode.borderCss.off' is null or not an object

  Error comes up as soon as the page loads.

  I'm using jQuery 1.2 on my server, which is the one difference I
  found from the demo page (which seems to be calling
  jquery-1.1.2.pack.js).  If this possibly a version difference, and
  the newer version doesn't deal as well with IE?

  Hope someone has some ideas,

  Charles



[jQuery] Building my own datepicket - limting clicks to only two?

2007-09-26 Thread Andy Matthews
I'm building a datepicker which will only display the last 2 complete
months. I'd like the user to be able to click to select any two days in two
calendars and load a date range. The catch is that I want to limit it to two
clicks only. Once the second click has been made, you either have to
unselect one of the days, or load the date range.
 
How might I go about doing this?
 

 
Andy Matthews
Senior ColdFusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com http://www.dealerskins.com/ 
 
dealerskinslogo.bmp

[jQuery] Re: dimensions issue?

2007-09-26 Thread Brandon Aaron
Most jQuery methods will work on 0 or more elements. However some methods
require at least one element. These methods usually return some value
related to the element. The only time you would see an error like method i
called is not found is if you don't include a plugin's script file before
using it.

--
Brandon Aaron

On 9/26/07, Eridius [EMAIL PROTECTED] wrote:



 I though if a selector return nothing and i tried to call a method, it
 would
 just fail by saying that the method i called is not a function.


 Brandon Aaron wrote:
 
  The jQuery collection is empty ... meaning it didn't match any any
  elements.
  Which means my_element.length == 0
 
  --
  Brandon Aaron
 
  On 9/25/07, Eridius [EMAIL PROTECTED] wrote:
 
 
 
  [Exception... 'Dimensions: jQuery collection is empty' when calling
  method:
  [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e
  (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no]
 
  anyone know why this would happen?  here is that this happens on:
 
  $('.input:eq(' + index + ')').livequery('click', function()
  {
  if($('#' + indexs[index] + '_list').css('display') === 'none'
 
  $('#' + indexs[index] + '_list').text() != '')
  {
  //alert('start');
  var my_element = $('[EMAIL PROTECTED]' + indexs[index]
  +']').parent('div');
  var offset = my_element.offset();
  var height = my_element.height();
 
  var top = offset.top + height;
  var left = offset.left;
 
  $('#' + indexs[index] + '_list').css({'display': 'block',
 'top': top,
 'left': left,
 'z-index': 2,
 'border': '2px solid black'});
  //alert('end');
  }
  else
  {
  $('#' + indexs[index] + '_list').css({'display': 'none'});
  }
  });
  --
  View this message in context:
  http://www.nabble.com/dimensions-issue--tf4518540s15494.html#a12889201
  Sent from the JQuery mailing list archive at Nabble.com.
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/dimensions-issue--tf4518540s15494.html#a12900442
 Sent from the JQuery mailing list archive at Nabble.com.




[jQuery] Re: input type text toUpperCase() jquery question

2007-09-26 Thread Danjojo

thats the same thing I was wondering.. if you submitted the form field
via server-side code would it also see the text as uppercase...

something to watch out for Frank.

On Sep 26, 9:38 am, Karl Swedberg [EMAIL PROTECTED] wrote:
 It's CSS 2. But it should be this:

 input {
   text-transform: uppercase;

 }

 However, that will only change the way the text is displayed, not the  
 actual case of the text itself.

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 26, 2007, at 9:32 AM, Danjojo wrote:





  omgosh.. I did not even know CSS could do that!

  Is that CSS-2? or -3?

  On Sep 26, 9:18 am, Andy Matthews [EMAIL PROTECTED] wrote:
  Why would you even want to use Javascript for this? Just use CSS:

  input {
  text-decoration: uppercase;

  }

_

  From: jquery-en@googlegroups.com [mailto:jquery-
  [EMAIL PROTECTED] On
  Behalf Of Frank Tudor
  Sent: Tuesday, September 25, 2007 12:30 PM
  To: jQuery (English)
  Subject: [jQuery] Re: input type text toUpperCase() jquery question

  Anybody?

  On 9/25/07, FrankTudor [EMAIL PROTECTED] wrote:

  As a user types in content to this this text field I would like tho
  force the text to uppercase to as keys are pressed.

  How would this be done?

  and is toUpperCase a real jquery function?  if not wbhat would be a
  simple way to hndle this with either CSS or someother method...

  Here is what I have and obviously I am stuck...

  script type=text/javascript
  $(document).ready(function()
  {
  $('.highball').keypress( function()
  {
  $('.highball').toUpperCase()
  }
  );
  }
  );
  /script

  input type=text style= class=ac_input highball
  autocomplete=off id=CityLocal value= type=text

  Frank- Hide quoted text -

 - Show quoted text -



[jQuery] Re: input type text toUpperCase() jquery question

2007-09-26 Thread Andy Matthews

2

Just apply that rule to your input field in whatever manner you choose. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Danjojo
Sent: Wednesday, September 26, 2007 8:32 AM
To: jQuery (English)
Subject: [jQuery] Re: input type text toUpperCase() jquery question


omgosh.. I did not even know CSS could do that!

Is that CSS-2? or -3?


On Sep 26, 9:18 am, Andy Matthews [EMAIL PROTECTED] wrote:
 Why would you even want to use Javascript for this? Just use CSS:

 input {
 text-decoration: uppercase;

 }

   _

 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] 
 On Behalf Of Frank Tudor
 Sent: Tuesday, September 25, 2007 12:30 PM
 To: jQuery (English)
 Subject: [jQuery] Re: input type text toUpperCase() jquery question

 Anybody?

 On 9/25/07, FrankTudor [EMAIL PROTECTED] wrote:

 As a user types in content to this this text field I would like tho 
 force the text to uppercase to as keys are pressed.

 How would this be done?

 and is toUpperCase a real jquery function?  if not wbhat would be a 
 simple way to hndle this with either CSS or someother method...

 Here is what I have and obviously I am stuck...

 script type=text/javascript
 $(document).ready(function()
 {
 $('.highball').keypress( function()
 {
 $('.highball').toUpperCase()
 }
 );
 }
 );
 /script

 input type=text style= class=ac_input highball
 autocomplete=off id=CityLocal value= type=text

 Frank






[jQuery] Re: input type text toUpperCase() jquery question

2007-09-26 Thread Andy Matthews
Ooops...sorry about that. I don't use that property all that often Knew I
should have checked it. Thanks for correcting me Karl.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Karl Swedberg
Sent: Wednesday, September 26, 2007 8:39 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: input type text toUpperCase() jquery question


It's CSS 2. But it should be this: 

input {
text-transform: uppercase;
}


However, that will only change the way the text is displayed, not the actual
case of the text itself. 


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



On Sep 26, 2007, at 9:32 AM, Danjojo wrote:



omgosh.. I did not even know CSS could do that!

Is that CSS-2? or -3?


On Sep 26, 9:18 am, Andy Matthews [EMAIL PROTECTED] wrote:

Why would you even want to use Javascript for this? Just use CSS:

input {
text-decoration: uppercase;

}

_ 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Frank Tudor
Sent: Tuesday, September 25, 2007 12:30 PM
To: jQuery (English)
Subject: [jQuery] Re: input type text toUpperCase() jquery question

Anybody?

On 9/25/07, FrankTudor [EMAIL PROTECTED] wrote:

As a user types in content to this this text field I would like tho
force the text to uppercase to as keys are pressed.

How would this be done?

and is toUpperCase a real jquery function? if not wbhat would be a
simple way to hndle this with either CSS or someother method...

Here is what I have and obviously I am stuck...

script type=text/javascript
$(document).ready(function()
{
$('.highball').keypress( function()
{
$('.highball').toUpperCase()
}
);
}
);
/script

input type=text style= class=ac_input highball
autocomplete=off id=CityLocal value= type=text

Frank







[jQuery] Re: g has no properties?

2007-09-26 Thread Danjojo

I think I am starting to get lost...

The links are supposed to be triggering the jQuery function...

what class or id do they use?

div class=MenuContent style=background: #FFF; height: 210px;
p class=centered style=height: 80px;

img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
height=75/

img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
cylinder.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
mgp_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
mhc_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
shock_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
emy2_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
ncy2_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
crq_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
clean_room_swap.jpg class=swapImages/

/p
p style=margin-left: 2%;
a href=linear_actuators.html class=showPicLinear Actuators/
abr/
a href=# class=showPic2Guided Actuators/abr/
a href=# class=showPic3Grippers amp; Escapements/abr/
a href=# class=showPic4Actuator Accessories/abr/
a href=# class=showPic5Electric Actuators/abr/
a href=# class=showPic6Rodless Actuators/abr/
a href=# class=showPic7Rotary Actuators/abr/
a href=# class=showPic8Specialty Actuators/abr//p
/div


On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote:
 The problem here is that .hover() takes two arguments, one for  
 mouseover and one for mouseout.

 So it should look like this:

 .hover(function() {
// Stuff to do when the mouse enters the element;}, function() {

// Stuff to do when the mouse leaves the element;

 });

 If you just want to do something on mouseover, use the (appropriately  
 named) .mouseover() method instead:

 .mouseover(function() {
// Stuff to do when the mouse enters the element

 })

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 26, 2007, at 9:17 AM, Danjojo wrote:





  I am doing a simple imageChange onLinkHover...

  I get the following error in Firebug everytime I hover over a link.
  But the image swaps work GREAT in all browsers.
  Except for the fact I see the error getting thrown in the browsers I
  am fine.

  g has no properties
  handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line
  11)
  e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11)
  e()jquery-svn.js (line 11)
  [Break on this error] eval(function(p,a,c,k,e,r){e=function(c)
  {return(ca?'':e(parseInt(c/a)))+((c=c%a...

  The jQuery code to swap images is:

 $(.showPic).hover(function() {
 $(#imgLinkAct).attr(src, images/cylinder.jpg);
 });
 $(.showPic2).hover(function() {
 $(#imgLinkAct).attr(src, images/mgp_swap.jpg);
 });
 $(.showPic3).hover(function() {
 $(#imgLinkAct).attr(src, images/mhc_swap.jpg);
 });
 $(.showPic4).hover(function() {
 $(#imgLinkAct).attr(src, images/shock_swap.jpg);
 });
 $(.showPic5).hover(function() {
 $(#imgLinkAct).attr(src, images/emy2_swap.jpg);
 });
 $(.showPic6).hover(function() {
 $(#imgLinkAct).attr(src, images/ncy2_swap.jpg);
 });
 $(.showPic7).hover(function() {
 $(#imgLinkAct).attr(src, images/crq_swap.jpg);
 });
 $(.showPic8).hover(function() {
 $(#imgLinkAct).attr(src, images/clean_room_swap.jpg);
 });

  });- Hide quoted text -

 - Show quoted text -



[jQuery] Forms with asp.net

2007-09-26 Thread Sharique

Hi,
Did anybody has tried jquery forms with asp.net?
--
Sharique



[jQuery] Re: Forms with asp.net

2007-09-26 Thread Danjojo

What do you mean by jQuery forms?

On Sep 26, 10:49 am, Sharique [EMAIL PROTECTED] wrote:
 Hi,
 Did anybody has tried jquery forms with asp.net?
 --
 Sharique



[jQuery] Re: Change background based of time of day using jquery

2007-09-26 Thread Glen Lipka
Instead of document.write('body bgcolor=orange text=#FF')
Use $(body).css(background-color,blue)
or
$(body).addClass(noon)

I think the time part could potentially be a switch, but that's just
readability.

Glen


On 9/25/07, bsuttis [EMAIL PROTECTED] wrote:


 I'm curious if I could use jquery to change my body's background based
 on time of day. I'm not looking to do this server-side with php, I
 would like the background to change based on the visitor's time, not
 the server's.

 I've found this code, just wondering if I can jquery-ize:
 script
 var now = new Date();
 var hours = now.getHours();
 var psj=0;

 //18-19 night
 if (hours  17  hours  20){
 document.write('body bgcolor=orange text=#FF')
 }

 //20-21 night
 if (hours  19  hours  22){
 document.write('body bgcolor=orangered text=#FF')
 }

 //22-4 night
 if (hours  21 || hours  5){
 document.write('body bgcolor=black text=#FF')
 }

 //9-17 day
 if (hours  8  hours  18){
 document.write('body bgcolor=deepskyblue text=#FF')
 }

 //7-8 day
 if (hours  6  hours  9){
 document.write('body bgcolor=skyblue text=#FF')
 }

 //5-6 day
 if (hours  4  hours  7){
 document.write('body bgcolor=steelblue text=#FF')
 }
 /script




[jQuery] Re: Using .children recursively

2007-09-26 Thread voltron

Thanks Erik!

On Sep 26, 1:40 pm, Erik Beeson [EMAIL PROTECTED] wrote:
 This will find all descendants: $(this).find('*');

 --Erik

 On 9/26/07, voltron [EMAIL PROTECTED] wrote:



  I am trying to get all the children of a node, apart from adding
  .children() for every generation, is there one call that gets all
  recursively?

  this is what I´m doing at the moment

  $(this).children().children().removeAttr(name);



[jQuery] Re: g has no properties?

2007-09-26 Thread Danjojo

What I am trying now should work shouldn't it?

$(.swapImages).hover(function(){
var newSRC = $(this).attr(rel);
$(#imgLinkAct).attr(src,newSRC);
}

p class=centered style=height: 80px;
img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
height=75/
/p
p style=margin-left: 2%;
a href=linear_actuators.html rel=images/cylinder.jpg
class=swapImagesLinear Actuators/abr/
a href=# rel=images/mgp_swap.jpg class=swapImagesGuided
Actuators/abr/
a href=# rel=images/mhc_swap.jpg 
class=swapImagesGrippers
amp; Escapements/abr/
a href=# rel=images/shock_swap.jpg 
class=swapImagesActuator
Accessories/abr/
a href=# rel=images/emy2_swap.jpg 
class=swapImagesElectric
Actuators/abr/
a href=# rel=images/ncy2_swap.jpg 
class=swapImagesRodless
Actuators/abr/
a href=# rel=images/crq_swap.jpg class=swapImagesRotary
Actuators/abr/
a href=# rel=images/clean_room_swap.jpg
class=swapImagesSpecialty Actuators/abr/
/p

On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote:
 I think I am starting to get lost...

 The links are supposed to be triggering the jQuery function...

 what class or id do they use?

 div class=MenuContent style=background: #FFF; height: 210px;
 p class=centered style=height: 80px;

 img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
 height=75/

 img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
 cylinder.jpg class=swapImages/
 img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
 mgp_swap.jpg class=swapImages/
 img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
 mhc_swap.jpg class=swapImages/
 img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
 shock_swap.jpg class=swapImages/
 img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
 emy2_swap.jpg class=swapImages/
 img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
 ncy2_swap.jpg class=swapImages/
 img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
 crq_swap.jpg class=swapImages/
 img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
 clean_room_swap.jpg class=swapImages/

 /p
 p style=margin-left: 2%;
 a href=linear_actuators.html class=showPicLinear Actuators/
 abr/
 a href=# class=showPic2Guided Actuators/abr/
 a href=# class=showPic3Grippers amp; Escapements/abr/
 a href=# class=showPic4Actuator Accessories/abr/
 a href=# class=showPic5Electric Actuators/abr/
 a href=# class=showPic6Rodless Actuators/abr/
 a href=# class=showPic7Rotary Actuators/abr/
 a href=# class=showPic8Specialty Actuators/abr//p
 /div

 On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote:



  The problem here is that .hover() takes two arguments, one for  
  mouseover and one for mouseout.

  So it should look like this:

  .hover(function() {
 // Stuff to do when the mouse enters the element;}, function() {

 // Stuff to do when the mouse leaves the element;

  });

  If you just want to do something on mouseover, use the (appropriately  
  named) .mouseover() method instead:

  .mouseover(function() {
 // Stuff to do when the mouse enters the element

  })

  --Karl
  _
  Karl Swedbergwww.englishrules.comwww.learningjquery.com

  On Sep 26, 2007, at 9:17 AM, Danjojo wrote:

   I am doing a simple imageChange onLinkHover...

   I get the following error in Firebug everytime I hover over a link.
   But the image swaps work GREAT in all browsers.
   Except for the fact I see the error getting thrown in the browsers I
   am fine.

   g has no properties
   handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line
   11)
   e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11)
   e()jquery-svn.js (line 11)
   [Break on this error] eval(function(p,a,c,k,e,r){e=function(c)
   {return(ca?'':e(parseInt(c/a)))+((c=c%a...

   The jQuery code to swap images is:

  $(.showPic).hover(function() {
  $(#imgLinkAct).attr(src, images/cylinder.jpg);
  });
  $(.showPic2).hover(function() {
  $(#imgLinkAct).attr(src, images/mgp_swap.jpg);
  });
  $(.showPic3).hover(function() {
  $(#imgLinkAct).attr(src, images/mhc_swap.jpg);
  });
  $(.showPic4).hover(function() {
  $(#imgLinkAct).attr(src, images/shock_swap.jpg);
  });
  $(.showPic5).hover(function() {
  $(#imgLinkAct).attr(src, images/emy2_swap.jpg);
  });
  $(.showPic6).hover(function() {
  $(#imgLinkAct).attr(src, images/ncy2_swap.jpg);
  });
  $(.showPic7).hover(function() {
  $(#imgLinkAct).attr(src, images/crq_swap.jpg);
  });
  $(.showPic8).hover(function() {
  $(#imgLinkAct).attr(src, images/clean_room_swap.jpg);
  });

   });- 

[jQuery] Re: g has no properties?

2007-09-26 Thread Danjojo

So I should be using onMouseOver instead of onHover?

Thank you.

On Sep 26, 11:06 am, Danjojo [EMAIL PROTECTED] wrote:
 What I am trying now should work shouldn't it?

 $(.swapImages).hover(function(){
 var newSRC = $(this).attr(rel);
 $(#imgLinkAct).attr(src,newSRC);
 }

 p class=centered style=height: 80px;
 img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
 height=75/
 /p
 p style=margin-left: 2%;
 a href=linear_actuators.html rel=images/cylinder.jpg
 class=swapImagesLinear Actuators/abr/
 a href=# rel=images/mgp_swap.jpg 
 class=swapImagesGuided
 Actuators/abr/
 a href=# rel=images/mhc_swap.jpg 
 class=swapImagesGrippers
 amp; Escapements/abr/
 a href=# rel=images/shock_swap.jpg 
 class=swapImagesActuator
 Accessories/abr/
 a href=# rel=images/emy2_swap.jpg 
 class=swapImagesElectric
 Actuators/abr/
 a href=# rel=images/ncy2_swap.jpg 
 class=swapImagesRodless
 Actuators/abr/
 a href=# rel=images/crq_swap.jpg 
 class=swapImagesRotary
 Actuators/abr/
 a href=# rel=images/clean_room_swap.jpg
 class=swapImagesSpecialty Actuators/abr/
 /p

 On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote:



  I think I am starting to get lost...

  The links are supposed to be triggering the jQuery function...

  what class or id do they use?

  div class=MenuContent style=background: #FFF; height: 210px;
  p class=centered style=height: 80px;

  img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
  height=75/

  img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
  cylinder.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
  mgp_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
  mhc_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
  shock_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
  emy2_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
  ncy2_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
  crq_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
  clean_room_swap.jpg class=swapImages/

  /p
  p style=margin-left: 2%;
  a href=linear_actuators.html class=showPicLinear Actuators/
  abr/
  a href=# class=showPic2Guided Actuators/abr/
  a href=# class=showPic3Grippers amp; Escapements/abr/
  a href=# class=showPic4Actuator Accessories/abr/
  a href=# class=showPic5Electric Actuators/abr/
  a href=# class=showPic6Rodless Actuators/abr/
  a href=# class=showPic7Rotary Actuators/abr/
  a href=# class=showPic8Specialty Actuators/abr//p
  /div

  On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote:

   The problem here is that .hover() takes two arguments, one for  
   mouseover and one for mouseout.

   So it should look like this:

   .hover(function() {
  // Stuff to do when the mouse enters the element;}, function() {

  // Stuff to do when the mouse leaves the element;

   });

   If you just want to do something on mouseover, use the (appropriately  
   named) .mouseover() method instead:

   .mouseover(function() {
  // Stuff to do when the mouse enters the element

   })

   --Karl
   _
   Karl Swedbergwww.englishrules.comwww.learningjquery.com

   On Sep 26, 2007, at 9:17 AM, Danjojo wrote:

I am doing a simple imageChange onLinkHover...

I get the following error in Firebug everytime I hover over a link.
But the image swaps work GREAT in all browsers.
Except for the fact I see the error getting thrown in the browsers I
am fine.

g has no properties
handleHover(Object type=mouseout target=a.showPic)jquery-svn.js (line
11)
e(Object type=mouseout target=a.showPic)jquery-svn.js (line 11)
e()jquery-svn.js (line 11)
[Break on this error] eval(function(p,a,c,k,e,r){e=function(c)
{return(ca?'':e(parseInt(c/a)))+((c=c%a...

The jQuery code to swap images is:

   $(.showPic).hover(function() {
   $(#imgLinkAct).attr(src, images/cylinder.jpg);
   });
   $(.showPic2).hover(function() {
   $(#imgLinkAct).attr(src, images/mgp_swap.jpg);
   });
   $(.showPic3).hover(function() {
   $(#imgLinkAct).attr(src, images/mhc_swap.jpg);
   });
   $(.showPic4).hover(function() {
   $(#imgLinkAct).attr(src, images/shock_swap.jpg);
   });
   $(.showPic5).hover(function() {
   $(#imgLinkAct).attr(src, images/emy2_swap.jpg);
   });
   $(.showPic6).hover(function() {
   $(#imgLinkAct).attr(src, images/ncy2_swap.jpg);
   

[jQuery] Re: g has no properties?

2007-09-26 Thread Danjojo

Sorry.. I can't go back and edit my own messages on google groups...

I understand now.

If only want mouseover behaviour then use it.

If I want more mouseover and mouseout use hover.


Although in trying to proserve the #id's original source value I
cannot get it to work

//method
$(.swapImages).hover(function(){
var orgSRC = $(#imgLinkAct).attr(src);
var newSRC = $(this).attr(rel);
$(#imgLinkAct).attr(src,newSRC);
},function(){
$(#imgLinkAct).attr(src,orgSRC);
})

but if I hard code it which I dont want to do, I have a working demo.
//method
$(.swapImages).hover(function(){
//var orgSRC = $(#imgLinkAct).attr(src);
var newSRC = $(this).attr(rel);
$(#imgLinkAct).attr(src,newSRC);
},function(){
$(#imgLinkAct).attr(src,images/NCQ8_swap.jpg);
})

On Sep 26, 11:15 am, Danjojo [EMAIL PROTECTED] wrote:
 So I should be using onMouseOver instead of onHover?

 Thank you.

 On Sep 26, 11:06 am, Danjojo [EMAIL PROTECTED] wrote:



  What I am trying now should work shouldn't it?

  $(.swapImages).hover(function(){
  var newSRC = $(this).attr(rel);
  $(#imgLinkAct).attr(src,newSRC);
  }

  p class=centered style=height: 80px;
  img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
  height=75/
  /p
  p style=margin-left: 2%;
  a href=linear_actuators.html rel=images/cylinder.jpg
  class=swapImagesLinear Actuators/abr/
  a href=# rel=images/mgp_swap.jpg 
  class=swapImagesGuided
  Actuators/abr/
  a href=# rel=images/mhc_swap.jpg 
  class=swapImagesGrippers
  amp; Escapements/abr/
  a href=# rel=images/shock_swap.jpg 
  class=swapImagesActuator
  Accessories/abr/
  a href=# rel=images/emy2_swap.jpg 
  class=swapImagesElectric
  Actuators/abr/
  a href=# rel=images/ncy2_swap.jpg 
  class=swapImagesRodless
  Actuators/abr/
  a href=# rel=images/crq_swap.jpg 
  class=swapImagesRotary
  Actuators/abr/
  a href=# rel=images/clean_room_swap.jpg
  class=swapImagesSpecialty Actuators/abr/
  /p

  On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote:

   I think I am starting to get lost...

   The links are supposed to be triggering the jQuery function...

   what class or id do they use?

   div class=MenuContent style=background: #FFF; height: 210px;
   p class=centered style=height: 80px;

   img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
   height=75/

   img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
   cylinder.jpg class=swapImages/
   img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
   mgp_swap.jpg class=swapImages/
   img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
   mhc_swap.jpg class=swapImages/
   img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
   shock_swap.jpg class=swapImages/
   img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
   emy2_swap.jpg class=swapImages/
   img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
   ncy2_swap.jpg class=swapImages/
   img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
   crq_swap.jpg class=swapImages/
   img id=imgLinkAct src=images/NCQ8_swap.jpg rel=images/
   clean_room_swap.jpg class=swapImages/

   /p
   p style=margin-left: 2%;
   a href=linear_actuators.html class=showPicLinear Actuators/
   abr/
   a href=# class=showPic2Guided Actuators/abr/
   a href=# class=showPic3Grippers amp; Escapements/abr/
   a href=# class=showPic4Actuator Accessories/abr/
   a href=# class=showPic5Electric Actuators/abr/
   a href=# class=showPic6Rodless Actuators/abr/
   a href=# class=showPic7Rotary Actuators/abr/
   a href=# class=showPic8Specialty Actuators/abr//p
   /div

   On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote:

The problem here is that .hover() takes two arguments, one for  
mouseover and one for mouseout.

So it should look like this:

.hover(function() {
   // Stuff to do when the mouse enters the element;}, function() {

   // Stuff to do when the mouse leaves the element;

});

If you just want to do something on mouseover, use the (appropriately  
named) .mouseover() method instead:

.mouseover(function() {
   // Stuff to do when the mouse enters the element

})

--Karl
_
Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Sep 26, 2007, at 9:17 AM, Danjojo wrote:

 I am doing a simple imageChange onLinkHover...

 I get the following error in Firebug everytime I hover over a link.
 But the image swaps work GREAT in all browsers.
 Except for the 

[jQuery] Re: Change background based of time of day using jquery

2007-09-26 Thread Danjojo

Fun idea.. I might try that for the world of warcraft guild site I am
building.

On Sep 26, 10:51 am, Glen Lipka [EMAIL PROTECTED] wrote:
 Instead of document.write('body bgcolor=orange text=#FF')
 Use $(body).css(background-color,blue)
 or
 $(body).addClass(noon)

 I think the time part could potentially be a switch, but that's just
 readability.

 Glen

 On 9/25/07, bsuttis [EMAIL PROTECTED] wrote:





  I'm curious if I could use jquery to change my body's background based
  on time of day. I'm not looking to do this server-side with php, I
  would like the background to change based on the visitor's time, not
  the server's.

  I've found this code, just wondering if I can jquery-ize:
  script
  var now = new Date();
  var hours = now.getHours();
  var psj=0;

  //18-19 night
  if (hours  17  hours  20){
  document.write('body bgcolor=orange text=#FF')
  }

  //20-21 night
  if (hours  19  hours  22){
  document.write('body bgcolor=orangered text=#FF')
  }

  //22-4 night
  if (hours  21 || hours  5){
  document.write('body bgcolor=black text=#FF')
  }

  //9-17 day
  if (hours  8  hours  18){
  document.write('body bgcolor=deepskyblue text=#FF')
  }

  //7-8 day
  if (hours  6  hours  9){
  document.write('body bgcolor=skyblue text=#FF')
  }

  //5-6 day
  if (hours  4  hours  7){
  document.write('body bgcolor=steelblue text=#FF')
  }
  /script- Hide quoted text -

 - Show quoted text -



[jQuery] Re: Attribute renaming

2007-09-26 Thread voltron

Thanks guys, I used a mixture of both your suggestions:


var ident = String(this.name);
 changed= ident.substring(0 ,ident.lastIndexOf('-')+1) + suffix;
 $(this).removeAttr(id);
 $(this).removeAttr(name);
 this.name += changed;
this.id += changed;
$(this).attr(clone, changed);


On Sep 26, 11:06 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I have tags like this:
  select id=academic_from_month-0 
  select id=academic_till_month-0 

  since the ids are variable in length, I would have to find out where
  the lastindex() of - is remove that and replace it it with the new
  value. My problem is the syntax, is there some kind of Jquery way to
  do this?

 $('select).each(function() {
 id=$(this).attr('id');
 //number after '-', useless if you dont need number
 number=id.substring(id.lastIndexOf('-')+1);
 //new value that you want to put after '-'
 newvalue='1234567';
 changed=id.substring(0,lastIndexOf('-')+1)+newvalue;

 }

 or something like that (I didnt check that) :)

 Regards
 Michael



[jQuery] Re: Replace XPath Selectors and Removed DOM Traversal Methods

2007-09-26 Thread Muescha

maybe

but i think it would be better to extract all selectors in external
selectors pligins - so i can include the selector methods i need

i dont like the css selectors - so i dont need it.


On Sep 25, 8:37 pm, Danjojo [EMAIL PROTECTED] wrote:
 Was the main reason for the removal ofXPathfrom the jQuery library
 to keep the core library small?



[jQuery] Re: g has no properties?

2007-09-26 Thread Karl Swedberg

Hi,

You're getting close. I  think it'll work if you put the var orgSRC  
line above the .hover() method. That way, on mouseout you're always  
returning the src attribute to the same value:


var orgSRC = $(#imgLinkAct).attr(src);
//method
$(.swapImages).hover(function(){
var newSRC = $(this).attr(rel);
$(#imgLinkAct).attr(src,newSRC);
},function(){
$(#imgLinkAct).attr(src,orgSRC);
});

-- Karl

On Sep 26, 2007, at 11:28 AM, Danjojo wrote:



Sorry.. I can't go back and edit my own messages on google groups...

I understand now.

If only want mouseover behaviour then use it.

If I want more mouseover and mouseout use hover.


Although in trying to proserve the #id's original source value I
cannot get it to work

//method
$(.swapImages).hover(function(){
var orgSRC = $(#imgLinkAct).attr(src);
var newSRC = $(this).attr(rel);
$(#imgLinkAct).attr(src,newSRC);
},function(){
$(#imgLinkAct).attr(src,orgSRC);
})

but if I hard code it which I dont want to do, I have a working demo.
//method
$(.swapImages).hover(function(){
//var orgSRC = $(#imgLinkAct).attr(src);
var newSRC = $(this).attr(rel);
$(#imgLinkAct).attr(src,newSRC);
},function(){
$(#imgLinkAct).attr(src,images/NCQ8_swap.jpg);
})

On Sep 26, 11:15 am, Danjojo [EMAIL PROTECTED] wrote:

So I should be using onMouseOver instead of onHover?

Thank you.

On Sep 26, 11:06 am, Danjojo [EMAIL PROTECTED] wrote:




What I am trying now should work shouldn't it?



$(.swapImages).hover(function(){
var newSRC = $(this).attr(rel);
$(#imgLinkAct).attr(src,newSRC);
}



p class=centered style=height: 80px;
img id=imgLinkAct src=images/NCQ8_swap.jpg  
width=97

height=75/
/p
p style=margin-left: 2%;
a href=linear_actuators.html rel=images/ 
cylinder.jpg

class=swapImagesLinear Actuators/abr/
a href=# rel=images/mgp_swap.jpg  
class=swapImagesGuided

Actuators/abr/
a href=# rel=images/mhc_swap.jpg  
class=swapImagesGrippers

amp; Escapements/abr/
a href=# rel=images/shock_swap.jpg  
class=swapImagesActuator

Accessories/abr/
a href=# rel=images/emy2_swap.jpg  
class=swapImagesElectric

Actuators/abr/
a href=# rel=images/ncy2_swap.jpg  
class=swapImagesRodless

Actuators/abr/
a href=# rel=images/crq_swap.jpg  
class=swapImagesRotary

Actuators/abr/
a href=# rel=images/clean_room_swap.jpg
class=swapImagesSpecialty Actuators/abr/
/p



On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote:



I think I am starting to get lost...



The links are supposed to be triggering the jQuery function...



what class or id do they use?



div class=MenuContent style=background: #FFF; height: 210px;
p class=centered style=height: 80px;



img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
height=75/


img id=imgLinkAct src=images/NCQ8_swap.jpg  
rel=images/

cylinder.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg  
rel=images/

mgp_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg  
rel=images/

mhc_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg  
rel=images/

shock_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg  
rel=images/

emy2_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg  
rel=images/

ncy2_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg  
rel=images/

crq_swap.jpg class=swapImages/
img id=imgLinkAct src=images/NCQ8_swap.jpg  
rel=images/

clean_room_swap.jpg class=swapImages/



/p
p style=margin-left: 2%;
a href=linear_actuators.html class=showPicLinear  
Actuators/

abr/
a href=# class=showPic2Guided Actuators/abr/
a href=# class=showPic3Grippers amp; Escapements/ 
abr/

a href=# class=showPic4Actuator Accessories/abr/
a href=# class=showPic5Electric Actuators/abr/
a href=# class=showPic6Rodless Actuators/abr/
a href=# class=showPic7Rotary Actuators/abr/
a href=# class=showPic8Specialty Actuators/abr/ 
/p

/div



On Sep 26, 9:34 am, Karl Swedberg [EMAIL PROTECTED] wrote:



The problem here is that .hover() takes two arguments, one for
mouseover and one for mouseout.



So it should look like this:



.hover(function() {
   // Stuff to do when the mouse enters the element;}, function 
() {



   // Stuff to do when the mouse leaves the element;



});


If you just want to do something on mouseover, use the  
(appropriately

named) .mouseover() method instead:



.mouseover(function() {
   

[jQuery] Re: Replace XPath Selectors and Removed DOM Traversal Methods

2007-09-26 Thread seedy


but a lot of plugins like css selectors.  
having multiple selector plugins could cause a dependency nightmare.


Muescha wrote:
 
 
 maybe
 
 but i think it would be better to extract all selectors in external
 selectors pligins - so i can include the selector methods i need
 
 i dont like the css selectors - so i dont need it.
 
 
 On Sep 25, 8:37 pm, Danjojo [EMAIL PROTECTED] wrote:
 Was the main reason for the removal ofXPathfrom the jQuery library
 to keep the core library small?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Replace-XPath-Selectors-and-Removed-DOM-Traversal-Methods-tf4518656s15494.html#a12904288
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: New Plugin: Picklists

2007-09-26 Thread Chris W. Parker

On Wednesday, September 26, 2007 1:58 AM Enrique Meléndez Estrada said:

 I think the pattern would be: both multiselectors side by side, and
 arrows to left and right indicating moving options from left selector
 to the right and viceversa (instead of add and remove buttons).
 
 Also its better to physically remove options from selector From,
 instead of greying them, once they are moved tho selector To.

+1


[jQuery] for selector: XPath to CSS converter?

2007-09-26 Thread Muescha

is there a handy XPath to CSS converter available?

i like to past to the converter a XPath from the FireFox Plugin
XPather and get the CSS selector syntax.



[jQuery] catch events after dynamic insert/json

2007-09-26 Thread Aljosa Mohorovic

i have:
$(a.delete).click(function() { alert(test) });

after i fetch some json data and append new html:
// on json load
$(div.items).append(a href='#' class='delete'test/a);

click events on items inserted after json data is loaded are not
working, how can i tell jquery to inspect DOM again and attach actions
on new elements?

Aljosa



[jQuery] for selector: XPath to CSS converter?

2007-09-26 Thread Muescha

is there a handy XPath to CSS converter available?

i like to past to the converter a XPath from the FireFox Plugin
XPather and get the CSS selector syntax.



[jQuery] Re: Time Entry restrictions

2007-09-26 Thread Josh Nathanson


Hey Shawn,

Have a look at my plugin ClockPick - you can set the time intervals as you 
describe:

http://www.oakcitygraphics.com/jquery/clockpick/trunk/ClockPick.cfm

-- Josh


- Original Message - 
From: sgrover [EMAIL PROTECTED]

To: jquery-en@googlegroups.com
Sent: Tuesday, September 25, 2007 9:20 PM
Subject: [jQuery] Time Entry restrictions




I'm using the time entry plugin at
http://home.iprimus.com.au/kbwood/jquery/timeEntry.html.  (BTW, this
plugin is a GODSEND - Great work!)

I have set the timeSteps parameter like so:  timeSteps: [1,15,0]

this works great, except I'm defaulting the input box to the current
time.  This results in something like 08:34.  Now when I change the
minutes, I'm seeing 08:49, 08:19, etc. - 15 minute changes from the
shown time.  Which makes sense.

Does anyone know if there is a way to show the current time, but have
the minutes restricted to 0, 15, 30, or 45 when the any change happens?
 Or do I have to write code to show the closest 15 minute interval when
showing the default time?  (any samples to save me time?)  I can't set a
min/max time - entries can happen for anytime through the day.

I know this plugin will default to the current time with the correct
restrictions if no values are available in the text box.  But I need to
see that default time.

Thanks for any tips.

Shawn 




[jQuery] Re: for selector: XPath to CSS converter?

2007-09-26 Thread Benjamin Sterling
If open you xml doc in firefox and then use firebug to inspect an element
it will give you the full path to that element and that can be used at the
selector.

On 9/26/07, Muescha [EMAIL PROTECTED] wrote:


 is there a handy XPath to CSS converter available?

 i like to past to the converter a XPath from the FireFox Plugin
 XPather and get the CSS selector syntax.




-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Building my own datepicket - limting clicks to only two?

2007-09-26 Thread Josh Nathanson
Andy, on the click event I think you would have to:
- check to see if they are toggling from off to on
- if they are, and there are already two on days, return false

You can do this by checking the size of the jQuery object that is returned when 
selecting all on days (pseudo code follows):

if ( clicked day is off  $(.onclass).size() = 2 ) {
return false;
}

-- Josh
  - Original Message - 
  From: Andy Matthews 
  To: [jQuery] 
  Sent: Wednesday, September 26, 2007 6:46 AM
  Subject: [jQuery] Building my own datepicket - limting clicks to only two?


  I'm building a datepicker which will only display the last 2 complete months. 
I'd like the user to be able to click to select any two days in two calendars 
and load a date range. The catch is that I want to limit it to two clicks only. 
Once the second click has been made, you either have to unselect one of the 
days, or load the date range.

  How might I go about doing this?

  

  Andy Matthews
  Senior ColdFusion Developer

  Office:  877.707.5467 x747
  Direct:  615.627.9747
  Fax:  615.467.6249
  [EMAIL PROTECTED]
  www.dealerskins.com
dealerskinslogo.bmp

[jQuery] Re: Building my own datepicket - limting clicks to only two?

2007-09-26 Thread Andy Matthews
Ah...
 
That's a good idea...hadn't thought about that route.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Nathanson
Sent: Wednesday, September 26, 2007 11:40 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Building my own datepicket - limting clicks to only
two?


Andy, on the click event I think you would have to:
- check to see if they are toggling from off to on
- if they are, and there are already two on days, return false
 
You can do this by checking the size of the jQuery object that is returned
when selecting all on days (pseudo code follows):
 
if ( clicked day is off  $(.onclass).size() = 2 ) {
return false;
}
 
-- Josh

- Original Message - 
From: Andy Matthews mailto:[EMAIL PROTECTED]  
To: [jQuery] mailto:jquery-en@googlegroups.com  
Sent: Wednesday, September 26, 2007 6:46 AM
Subject: [jQuery] Building my own datepicket - limting clicks to only two?

I'm building a datepicker which will only display the last 2 complete
months. I'd like the user to be able to click to select any two days in two
calendars and load a date range. The catch is that I want to limit it to two
clicks only. Once the second click has been made, you either have to
unselect one of the days, or load the date range.
 
How might I go about doing this?
 

 
Andy Matthews
Senior ColdFusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com http://www.dealerskins.com/ 
 

dealerskinslogo.bmp

[jQuery] Re: changing the $

2007-09-26 Thread Wizzud


You probably need to look at this ...
http://docs.jquery.com/Using_jQuery_with_Other_Libraries
http://docs.jquery.com/Using_jQuery_with_Other_Libraries 


Tom Burns wrote:
 
 Hi,
 
 Using the $ in jQuery causes problems for my setup.  Our template engine
 uses $ as its token to start paying attention to the input stream (it
 ignores everything outside matching $).  We have tens of thousands of
 files already in this templating system...so I don't think changing it for
 the templates is practical.  Is there a way to use another character in
 jQuery?
 

-- 
View this message in context: 
http://www.nabble.com/changing-the-%24-tf4523095s15494.html#a12905374
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: changing the $

2007-09-26 Thread Benjamin Sterling
Ultimately you can use jQuery as in jQuery('selector')


On 9/26/07, Wizzud [EMAIL PROTECTED] wrote:



 You probably need to look at this ...
 http://docs.jquery.com/Using_jQuery_with_Other_Libraries
 http://docs.jquery.com/Using_jQuery_with_Other_Libraries


 Tom Burns wrote:
 
  Hi,
 
  Using the $ in jQuery causes problems for my setup.  Our template engine
  uses $ as its token to start paying attention to the input stream (it
  ignores everything outside matching $).  We have tens of thousands of
  files already in this templating system...so I don't think changing it
 for
  the templates is practical.  Is there a way to use another character in
  jQuery?
 

 --
 View this message in context:
 http://www.nabble.com/changing-the-%24-tf4523095s15494.html#a12905374
 Sent from the JQuery mailing list archive at Nabble.com.




-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: g has no properties?

2007-09-26 Thread Danjojo

Cool.. works nicely.

The only downside is that I had 9 panels or categories that each had
their own set of links and rollover images. And now the code would not
be resusable.

Weird how functions will not recognize a variable set in another
function, is there really no way around it?

Oh I bet I would have to set up functions that past arguments?

Could I somehow pass the orgSrc value to the 2nd function?

//method
$(.swapImages).hover(function(){
var orgSRC = $(#imgLinkAct).attr(src);
var newSRC = $(this).attr(rel);
$(#imgLinkAct).attr(src,newSRC);
},function(orgSrc){
$(#imgLinkAct).attr(src,orgSRC);
})


On Sep 26, 12:10 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 Hi,

 You're getting close. I  think it'll work if you put the var orgSRC  
 line above the .hover() method. That way, on mouseout you're always  
 returning the src attribute to the same value:

 var orgSRC = $(#imgLinkAct).attr(src);
 //method
 $(.swapImages).hover(function(){
 var newSRC = $(this).attr(rel);
 $(#imgLinkAct).attr(src,newSRC);
 },function(){
 $(#imgLinkAct).attr(src,orgSRC);
 });

 -- Karl

 On Sep 26, 2007, at 11:28 AM, Danjojo wrote:





  Sorry.. I can't go back and edit my own messages on google groups...

  I understand now.

  If only want mouseover behaviour then use it.

  If I want more mouseover and mouseout use hover.

  Although in trying to proserve the #id's original source value I
  cannot get it to work

 //method
 $(.swapImages).hover(function(){
 var orgSRC = $(#imgLinkAct).attr(src);
 var newSRC = $(this).attr(rel);
 $(#imgLinkAct).attr(src,newSRC);
 },function(){
 $(#imgLinkAct).attr(src,orgSRC);
 })

  but if I hard code it which I dont want to do, I have a working demo.
 //method
 $(.swapImages).hover(function(){
 //var orgSRC = $(#imgLinkAct).attr(src);
 var newSRC = $(this).attr(rel);
 $(#imgLinkAct).attr(src,newSRC);
 },function(){
 $(#imgLinkAct).attr(src,images/NCQ8_swap.jpg);
 })

  On Sep 26, 11:15 am, Danjojo [EMAIL PROTECTED] wrote:
  So I should be using onMouseOver instead of onHover?

  Thank you.

  On Sep 26, 11:06 am, Danjojo [EMAIL PROTECTED] wrote:

  What I am trying now should work shouldn't it?

  $(.swapImages).hover(function(){
  var newSRC = $(this).attr(rel);
  $(#imgLinkAct).attr(src,newSRC);
  }

  p class=centered style=height: 80px;
  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  width=97
  height=75/
  /p
  p style=margin-left: 2%;
  a href=linear_actuators.html rel=images/
  cylinder.jpg
  class=swapImagesLinear Actuators/abr/
  a href=# rel=images/mgp_swap.jpg  
  class=swapImagesGuided
  Actuators/abr/
  a href=# rel=images/mhc_swap.jpg  
  class=swapImagesGrippers
  amp; Escapements/abr/
  a href=# rel=images/shock_swap.jpg  
  class=swapImagesActuator
  Accessories/abr/
  a href=# rel=images/emy2_swap.jpg  
  class=swapImagesElectric
  Actuators/abr/
  a href=# rel=images/ncy2_swap.jpg  
  class=swapImagesRodless
  Actuators/abr/
  a href=# rel=images/crq_swap.jpg  
  class=swapImagesRotary
  Actuators/abr/
  a href=# rel=images/clean_room_swap.jpg
  class=swapImagesSpecialty Actuators/abr/
  /p

  On Sep 26, 10:24 am, Danjojo [EMAIL PROTECTED] wrote:

  I think I am starting to get lost...

  The links are supposed to be triggering the jQuery function...

  what class or id do they use?

  div class=MenuContent style=background: #FFF; height: 210px;
  p class=centered style=height: 80px;

  img id=imgLinkAct src=images/NCQ8_swap.jpg width=97
  height=75/

  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  rel=images/
  cylinder.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  rel=images/
  mgp_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  rel=images/
  mhc_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  rel=images/
  shock_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  rel=images/
  emy2_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  rel=images/
  ncy2_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  rel=images/
  crq_swap.jpg class=swapImages/
  img id=imgLinkAct src=images/NCQ8_swap.jpg  
  rel=images/
  clean_room_swap.jpg class=swapImages/

  /p
  p style=margin-left: 2%;
  a href=linear_actuators.html class=showPicLinear  
  Actuators/
  abr/
  a href=# 

[jQuery] Re: nonsecure items

2007-09-26 Thread Dimitris

I fixed it by downloading the latest JQuery.js file.

Thx for the replies though

On 26 sep, 15:06, Weaver, Scott [EMAIL PROTECTED] wrote:
 9 times out of 10 this caused by an iframe that has no src attribute
 defined.  I usually fix this by adding src=javascript:void(0).  I have
 heard that others have encountered issues using this workaround however;
 I have never had any problems with it.

 -scott



 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of Dimitris
 Sent: Wednesday, September 26, 2007 3:45 AM
 To: jQuery (English)
 Subject: [jQuery] nonsecure items

 Hi,

 I am using thickbox in an SSL enviroment. This thickbox uses JQeury,
 but when the page loads I get a message in IE7 that there are
 nonsecure items on the page. When I exclude following tag from my page

 script type=text/javascript src=../Js/jquery.js/script

 everything works fine so I guess its a JQeury problem.  (offcourse,
 whitout this tag the thickbox won't work)
 Can anyone help me with this problem?- Tekst uit oorspronkelijk bericht niet 
 weergeven -

 - Tekst uit oorspronkelijk bericht weergeven -



  1   2   >