[jQuery] Re: jquery website broken?

2009-03-19 Thread JimD

On Mar 18, 3:56 pm, David Meiser dmei...@gmail.com wrote:
 When I was developing our company's website, I had a coworker who kept
 complaining about how terrible it looked.  He complained that half the
 images were missing, half the text was unstyled, blah blah blah.  I asked
 him what browser he was using: Firefox 3.0.1.  I was using 3.0.1 as my
 primary browser.  He said he had another coworker that had the same
 problems.

 It took me two weeks of off and on troubleshooting to finally locate the
 problem.  I had placed all the images and CSS in a folder labeled with the
 company acronym: ADS.  The real problem? He had Adblocker Plus installed,
 which was blocking the images and CSS...

This is so true. I have had a few cases with our company site where
some customer would complain things arent displying right or that they
cant login. 99% of the time its due to something the user either had
installed on their computer (antivirus, spyware adware blocker, virus
etc) that caused the problem. I see people with multiple antivirus
programs installed, mulitple ad blockers etc. I had one guy call
frantically demanding that our site was not compatible with firefox
3.05. I looked into everything until I finally asked him if he was
running any plugins. The guy had an insane number of plugins installed
but the clincher: he had the noscript plugin. I assumed someone using
noscript and that adamant about things running in Firefox understood
how noscript worked. Obviously he did not.

And by the way regarding the jquery site displaying correctly. I am
currently using and testing IE8 RC1. The site has always displayed
fine in IE7, and it displays and works fine in IE8 RC1 but only in
compatability mode (like IE7). It does have issues in IE8 standards
mode. Never a problem in Firefox, Chrome, Opera or Safari 4 beta.


[jQuery] Re: jquery website broken?

2009-03-19 Thread JimD


Actually regarding my statement about IE8 standards mode. it seems
only the Documentation section is a bit broke. Rest of the site
displays fine



[jQuery] Re: EZPZ Tooltip

2009-03-19 Thread JimD

Nice. I like the simplicity and the stayOnContent option.


[jQuery] Re: draggable/droppable pick some

2009-03-19 Thread CTek

Hi Richard

Thank you for your answer, but the example you showed was exactly what
I've accomplished myself.
What's missing is that I want the original box (draggable) to move
into the droppable, and leave an empty spot among the draggables.
I also want that draggable to return to its original location whenever
another draggable is dropped in the same droppable.
Coming with this is also that I don't want to let the user drop the
same draggable in two droppables.

/Stefan

On 18 Mar, 16:20, Richard D. Worth rdwo...@gmail.com wrote:
 This should get you started:

 http://jsbin.com/ixeca

 - Richard

 On Wed, Mar 18, 2009 at 7:38 AM, CTek stefan.bergfe...@ctek.se wrote:

  I'm having a headache because I'm trying to make an on-line test.
  The graphics department wanted to make it all flash, but I said jQuery
  would do the trick, so please help me prove them wrong.

  I have a question, with six options, represented as six draggables.
  I expect three answers, represented as three droppables.

  The user is supposed to drag three draggables into the three
  droppables, and then click a button to check answers.

  What I want is for the draggable to be placed in the middle of the
  droppable when dropped.

  I also want the draggable to return to its original position when (if)
  another draggable is dropped in the same droppable. It'd also be nice
  if I could drop the draggable outside the droppables and have it
  returned to its original position.

  I also need to know which draggables are currently dropped, so I can
  check if the answer is correct. That's not a problem yet, but I'm
  afraid it will be.


[jQuery] Re: 1.3.2 broke fade and slide

2009-03-19 Thread andreacfm

Any suggestion??

andreacfm ha scritto:

 Hi Guyes,

 noone noted that 1.3.2 broke down fading and sliding.

 Simple code like this:

   $('.showSignIn').click(function(){
   $('#passwordPanel').fadeOut(function(){
   $('#signinPanel').fadeIn();
   });
   return false;
   });

 Is not working anymore. Callback fadeIn but first call do not slide
 out. Same for slide up and down...

 At least on FF3.

 Any suggestion??

 Andrea


[jQuery] [autocomplete] Fire up on field focus

2009-03-19 Thread Mr.Rech

Hi,
on the autocomplete demo-page I've noticed many examples that set
minChars option to 0, giving the impression that they will fire up
as soon as each input field gets the focus. However, they don't, and I
have to type in at least one character to get the autocompletion
working. Now, since I'd really need to autocomplete fields when they
get focus, I'm wondering if I can get this in any way. Is autocomplete
expected to support this feature at any time in the future? If
autocomplete doesn't support this at all, how can I get a similar
result?

TIA,
 Andrea


[jQuery] Re: Fire up on field focus

2009-03-19 Thread bart

Isn't the entire idea behind auto_complete_ that it actually needs
input before it can complete anything for you?

On Mar 19, 10:37 am, Mr.Rech andrea.ricip...@gmail.com wrote:
 Hi,
 on the autocomplete demo-page I've noticed many examples that set
 minChars option to 0, giving the impression that they will fire up
 as soon as each input field gets the focus. However, they don't, and I
 have to type in at least one character to get the autocompletion
 working. Now, since I'd really need to autocomplete fields when they
 get focus, I'm wondering if I can get this in any way. Is autocomplete
 expected to support this feature at any time in the future? If
 autocomplete doesn't support this at all, how can I get a similar
 result?

 TIA,
  Andrea


[jQuery] Re: Using 1.3 this: [class!=whatever] doesn't work.

2009-03-19 Thread T.J. Crowder

Hi Ricardo,

My guess is that he's using multiple class names and that's why it
wasn't working originally (false positives); see my post a couple
back.
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Mar 19, 12:54 am, ricardobeat ricardob...@gmail.com wrote:
 Your example is working fine for me with 1.3.2 - $('a[class!
 =whatever]'). $('a[className!=whatever]') should also work.

 cheers,
 - ricardo

 On Mar 18, 9:26 am, will mac.tas...@gmail.com wrote:

  Hi,
  Using :not() worked great.
  Cheers
  Will

  On Mar 18, 11:09 am, T.J. Crowder t...@crowdersoftware.com wrote:

   Hi again,

   *blush* Those same docs tell us that != is also supported by Sizzle.
   Note, though, that:

       a[class!=whatever]

   ...is the same as

       a:not([class=whatever])

   ...which is *not* the same as

       a:not(.whatever)

   ...because of multiple class names.  Example:  With these links:

   a id='a' href='#'one/a
   a id='b' href='#' class='whatever'two/a
   a id='c' href='#' class='whatever blarg'three/a
   a id='d' href='#' class'blarg'one/a

   a:not(.whatever) gives you a,d, but a[class!=whatever] and a:not
   ([class=whatever]) give you a,c,d.  c is on the list because its
   value (whatever blarg) does not *exactly* match whatever.

   Perhaps that relates to why your 1.2.6 code doesn't quite work in 1.3?

   HTH, sorry for missing != support earlier.
   --
   T.J. Crowder
   tj / crowder software / com
   Independent Software Engineer, consulting services available

   On Mar 18, 10:59 am, T.J. Crowder t...@crowdersoftware.com wrote:

Hi,

Is there a != attribute operator?  I don't see it in either the CSS2
or CSS3 specs.[1][2]  So I'm thinking that since jQuery 1.3 completely
replaced the selector engine[3], there was a non-standard (but
useful!) extension to the syntax in v1.2 that didn't get carried
forward.

The good news is that the docs[4] for the new selector engine, Sizzle,
tell us it supports the :not pseudo-class, so you can use:

$('a:not(.whatever)').click(...);

...to get the same effect that (I assume, never having used v1.2) the !
= used to give you.

[1]http://www.w3.org/TR/CSS2/selector.html
[2]http://www.w3.org/TR/css3-selectors
[3]http://docs.jquery.com/Release:jQuery_1.3
[4]http://wiki.github.com/jeresig/sizzle

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Mar 18, 10:21 am, will mac.tas...@gmail.com wrote:

 I'm working on a project at the moment and this [class!=whatever] has
 stopped working.
 In 1.2.6 I could use this fine, but in 1.3 it doesn't work.

 For example, if I have two links:

 a href=#Link/a

 and

 a href=# class=whateverLink/a

 Using a click function like this:

 $('a[class!=whatever]').click(function(){ //do something });

 Doesn't work. The function wont fire on either.

 Is this just a slip up or is it for an actual reason?

 Cheers,
 Will




[jQuery] Re: Ajax call problem with Firefox

2009-03-19 Thread Steven Yang
I think its a browser behaviorif you use get, browser's default behavior
is usually cache it. Unless you set no cache in browser setting.
So I always use post and to be on the save side use cache : false as well

correct me if i am wrong


[jQuery] Re: Fire up on field focus

2009-03-19 Thread Mr.Rech

You are right, but sometimes it's nice to have a list of options
rolled down as soon as the field gets the focus. Especially when that
list is quite short (maybe as a consequence of some filtering based on
already filled in fields). In these cases, it'd be nice to have
autocomplete working without any input from the user. Using the same
widget for all the (text) input fields instead of many different ones
will end in a better user experience (IMHO).

Any hints?

Andrea

On Mar 19, 10:48 am, bart b...@ivwd.nl wrote:
 Isn't the entire idea behind auto_complete_ that it actually needs
 input before it can complete anything for you?

 On Mar 19, 10:37 am, Mr.Rech andrea.ricip...@gmail.com wrote:

  Hi,
  on the autocomplete demo-page I've noticed many examples that set
  minChars option to 0, giving the impression that they will fire up
  as soon as each input field gets the focus. However, they don't, and I
  have to type in at least one character to get the autocompletion
  working. Now, since I'd really need to autocomplete fields when they
  get focus, I'm wondering if I can get this in any way. Is autocomplete
  expected to support this feature at any time in the future? If
  autocomplete doesn't support this at all, how can I get a similar
  result?

  TIA,
   Andrea


[jQuery] Re: ajaxForm File Upload Issue

2009-03-19 Thread Mike Alsup

 I'm using jQuery 1.3.2 and v2.24 of the form plugin, and I can provide
 access to the pages it's happening on if requested.

Yes, that would be helpful.  Otherwise I don't have any suggestions
other than to set Firebug to 'break on all errors' and see if you hit
an error.


[jQuery] Re: Do you need authorization for SVN import???

2009-03-19 Thread Walther

Do you want to 'download' the code onto your computer? Then you need
to use checkout, not import.

On Mar 18, 10:01 pm, J.V. servicefol...@gmail.com wrote:
 I am using Eclipse SVN subclipse plugin.
 I can browse all code on:http://jqueryjs.googlecode.com/svn

 but when I need to import it locally it asks me for credentials:
 I tried to leave it blank or use  guest,  but it throws the error:
 -
 import -m  D:/SANDBOX/zxyhttp://jqueryjs.googlecode.com/svn/trunk/jquery
     Authorization failed
 svn: MKACTIVITY of '/svn/!svn/act/d0b979c6-50ec-0449-
 ae92-35a848b66c9a': authorization failed (http://
 jqueryjs.googlecode.com)

     The operation was interrupted
 svn: Operation canceled
 --
 How can I import it? Of what client are you using?

 Thanks for help,
 Jan


[jQuery] Re: jCarousel Re-load

2009-03-19 Thread LiliwoL

Hi alex,

i do have same problem. Can't find how to call a reload method to
jcarousel.

When i create another one on the precedent, jcarousel become crazy.

Someone have an idea?

thanks a lot


[jQuery] findValue

2009-03-19 Thread Bright Dadson
Hi Experts,

i have been working on this since monday and still i dont seem to have a
clue what is stopping it from working.

What i am trying to do:
I have an autocomplete inputbox which displays matching results from the
database as soon as the user starts typing.

My problem is:
If a user start typing a characters into the autocomplete inputbox and
there's no matching result from backend,
i want a message We donot have anything matching this search to be
displayed.


Currently i am using this code:

function findValue(li) {
var $Suggest = $(#operator)[0].autocompleter.findValue();
if($Suggest == null){
alert(we donot have any matching result);
}
return false;
}

$(document).ready(function(){
$(#input).autocomplete(auto.php,
{
delay:10,
lineSeparator: ^,
cacheLength: 10,
matchSubset:1,
matchContains:1,
onFindValue:findValue,
formatItem:formatItem,
autoFill:true
});

return false;
)};

I am currently totally lost as i have tried everything but doesn't seems
work. Can anyone help?

Ta!

B


[jQuery] Re: Sortable problems

2009-03-19 Thread Richard D. Worth
There's a dedicated list for help with jQuery UI:

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

- Richard

On Wed, Mar 18, 2009 at 10:16 AM, err_ok jack.regn...@googlemail.comwrote:


 I am having some problems with the sortable plugin, most annoyingly in
 firefox instead of drag and drop functionality it seems to be click
 once then click again to drop.. but it doesn't seem to work at
 consistently, this problem isn't apparent in other demo's I have tried
 to I am assuming it is a problem on my end, also I can't get scrolling
 while dragging to work on any browser that I have tried. Any help
 would be great!

 JQuery code as follows;

$(document).ready(function() {
$(#library-table).sortable({
items  : '.library-item',
cursor : 'move',
handle : '.handle',
scroll : true,
update : function () {
$.post('/libraries/sort',
 '_method=putauthenticity_token='+AUTH_TOKEN+''+$(this).sortable
 ('serialize'));
}
});
});

 an HTML Example;

 div id=library-table class=ui-sortable
div class=library-item id=listItem-1
%= image_tag '/images/pdf.png', :height = '40px',
 :class
 = :handle%
h3%= library.title %/h3
p%= library.desc %/p
ul
li%= link_to Download,
 library.doc.url(), :target = :blank
 %/li
li%= link_to 'Delete', library, :confirm
 = 'Are you
 sure?', :method = :delete % | /li
li%= link_to Edit,
 edit_library_path(library.permalink), :rel
 = 'facebox' % | /li
/ul
/div2
div class=library-item id=listItem-2
%= image_tag '/images/pdf.png', :height = '40px',
 :class
 = :handle%
h3%= library.title %/h3
p%= library.desc %/p
ul
li%= link_to Download,
 library.doc.url(), :target = :blank
 %/li
li%= link_to 'Delete', library, :confirm
 = 'Are you
 sure?', :method = :delete % | /li
li%= link_to Edit,
 edit_library_path(library.permalink), :rel
 = 'facebox' % | /li
/ul
/div
/div

 I do not get any errors in firebug, I am quite stumped. Any help would
 be much appreciated!

 Jack

 



[jQuery] Re: Problems whith the variables for a click function

2009-03-19 Thread Steven Yang
did you get an error if no value was given?
because it seems like your parsing an empty string into an int

and it looks like your value after the first calculation will always be the
original value.
because you never set pris except when the page loaded


[jQuery] LEGAL SELECTION CONTEXT

2009-03-19 Thread DBJDBJ

Sample is here: http://jsbin.com/avowu/edit

Core of the issue is here :

// context is correctly reported by jQ
$([name], document.getElementById(people)).formula( log ) ;

// context is reported by jQ as HTMLDocument ?
// selector is prefixed with context
$([name], #people).formula( log ) ;

Is this by design ?




[jQuery] Unbind by Function Reference

2009-03-19 Thread bart

I've followed Karl Swedberg's article on rebinding events at
learningjquery.com. The theory behind this technique is clear to me
and I've got a working example.

function addItemFinal()
{
var $href = $('table caption a').attr('href');
var $rawmaandjaar = $href.split('');
var $maand = $rawmaandjaar[0].split('=');
var $jaar = $rawmaandjaar[1].split('=');

$.get('includes/inc/ajax/fetchtable.php', { maand: $maand[1], jaar:
$jaar[1] }, function(data)
{
$('div#agendawrapper').html(data);
$('table caption a').unbind('click', addItemFinal).bind('click',
addItemFinal);
});
return false;
}

$('table caption a').bind('click', addItemFinal);

The code in the function is pretty simple, it takes the href attribute
and extracts some variables from it. With the variables it makes a GET
request and in the callback it rebinds again.

However is there more than one anchor in the caption and with the
current code it just takes table caption a whereas this should be
the actual link you clicked. I guess I should pass something to the
function but it's used as a reference so I'm not sure how to achieve
this...

Someone who can help out?


[jQuery] [validate] Problem of minimizeing window on PC

2009-03-19 Thread AntoineO

Hello,

I've installd the jQuery validation script on a website and it works
really well, but I have a kinda serious problem with PC users (IE7 as
well as some version of Firefox):

If you go on http://www.gomze.be  on either pages 
http://www.gomze.be/devenir-membre.php
or http://www.gomze.be/reservations-green-fee.php

the page minimizes in the Windows taskbar, and I can't explain this :(



I really need to fix this quickly but don't know how :(



Any ideas please?



Thanks a lot !!


[jQuery] Trying to animate the .before()/.after() dom action

2009-03-19 Thread ragsyboy

Hi,

I'm trying to add animation to the .before()/.after() action on some
dom nodes and getting visual glitches which get seriously worse on
html 'heavy' pages.

I've put together a quick n' dirty example here: http://jsbin.com/ahupa/edit
If you click the down button in the first div you'll see them swap
round with animation, then the change is reflected in the DOM.

i'm getting the offsets of the clicked div and it's adjacent div,
animating the difference so they slide past each other, then it
removes the leftover styles applied by the animation, then fires
the .before() or .after() depending on the required direction.
But no matter what order i do this (remove styles before/after dom
change) I always see for a split second the dom nodes swapped round
but with the style remnants from the animation still there - meaning
their all over the place for a second. This gets worse the heavier the
page is.

This is kinda hard to explain but hopefully your browser/machine is
slow enough to show the problem in the example :S

Any ideas? am i tackling this the wrong way?

Thanks in advance,

James


[jQuery] Re: show hide random rows

2009-03-19 Thread Sean O


Scott, Ricardo, great thoughts and great code. It is an interesting issue
with many attack vectors; I hope the OP is getting something out of all
this...

I will expect at least as much code and analysis for my next posted problem!
;)


SEAN O
_
http://www.sean-o.com
http://twitter.com/seanodotcom




Scott Sauyet-3 wrote:
 
 
 ricardobeat wrote:
 If you need performance, this should be it:
 
 http://jsbin.com/uvuzi/edit
 
 It sorts the rows using the Fisher-Yates shuffling algorithm.
 Despite throwing elements around in an array, it's faster than the
 pure mathematical solution because you don't need to filter out
 duplicate random numbers. An even greater improvement can be made by
 using the style.display property directly.
 
 First of all, thanks for your code.  I learned something new today.  I 
 never realized that I could reassign the elements of a jQuery collection 
 in that manner.
 
 I don't know why I brought up performance for a client-side JavaScript 
 issue!  It's probably not at all relevant to the OP's problem.  But I 
 think both your technique and mine should have similar performance.  The 
 key factor in either of ours is the number of calls to Math.random(), 
 and both of us call that $rows.length times.
 
 Sean O's technique has a worst-case time that is infinite, but it, or a 
 slight modification of it [1], has an expected time much shorter than 
 either of ours.  In the ten-out-of-fifty case we were working with, our 
 techniques require 50 iterations, where in his the expected number of 
 iterations is 11.033.  In your ten-out-of-one-thousand example, ours 
 would be 1000, and his expected number is below 10.05.  With the 
 modification [1], the worst case would be if the number to be selected 
 were half of the total rows, and then the number of iterations seems to 
 be about ln(2) * $rows.length, although I haven't attempted to prove this.
 
 This is related to the Coupon Collector's Problem [2].  I'm pretty sure 
 the exact expected number of iterations of Sean's technique is
 
  sum_{i=1}^{SELECTED} {TOTAL / (TOTAL - i + 1)}
 
 But hey, let's get back to jQuery!  :-)
 
-- Scott
 
 
 [1] The modification would be, when the requested number of rows is 
 greater than half the total number of rows, to switch to running the 
 same algorithm to choose the number of *unselected* rows.
 
 [2] http://www.google.com/search?q=coupon+collector+problem
 
 

-- 
View this message in context: 
http://www.nabble.com/show-hide-random-rows-tp22570300s27240p22599424.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Problems whith the variables for a click function

2009-03-19 Thread Patrik

Not what I know but i shouldn't be empty.
pris is ex. 340,50:-
and pris2 should then be 340.50 when i tried with the variables
inside.

I want pris to be the same and when you press the link the $
('#productPrices').html(); get 25% smaller and when you press again it
get it original value back.
when I but both var in the function it get 25% smaller for every click

On 19 Mar, 11:26, Steven Yang kenshin...@gmail.com wrote:
 did you get an error if no value was given?
 because it seems like your parsing an empty string into an int

 and it looks like your value after the first calculation will always be the
 original value.
 because you never set pris except when the page loaded


[jQuery] Can't select link in custom xml in firefox

2009-03-19 Thread rossallan

I'm trying to select the text in the link element in the xml below:

press_releases
  press_release
titletitle text/title
teaserteaser text/teaser
publication_datepublication date/publication_date
linkhttp://www.linkgoeshere.com/link
link_typeexternal/link_type
  /press_release
press_releases

Using the following code:

$(xml).find('press_release').each(function() {

var linkText = $(this).children(link).text();

});

This works in IE, however Firefox returns nothing (I can select all
the other elements)

If I alert:

$(this).text()

I can see the entire object including the link text. However If I
alert:

$(this).children().text()

I can see the everything but the link element text.

I presume the fact that link is an HTML tag that only contains
attributes is causing a conflict here, I *might* be able to get the
xml changed but would rather not if there's an easy solution.


[jQuery] iCal browser

2009-03-19 Thread cool.imps

This application allows a user to interactively browse the contents of
any ical (.ics,.vcs) formatted files available in the net

http://coolimps.brinkster.net

I would appreciate comments and feedback


[jQuery] ajaxForm File Upload Issue

2009-03-19 Thread Pascal Zajac

Hi guys (and probably Mike directly given how quickly he answers
these),

I've been a long time user of the ajaxForm plugin but as of right now
I cannot get file uploads happening. It's the same story you can read
on here a tonne of times - the form submits fine over POST as AJAX but
as soon as you fill in the file upload field, it bombs. The catch is,
I don't have any fields with the name/ID of 'submit' in the form - the
submit button is id=submit_button and name=sbmt_button (because
recently you were just matching whether the name started with submit
at all so I changed it). I've also tried changing the ID to
sbmt_button with no change.

I'm using jQuery 1.3.2 and v2.24 of the form plugin, and I can provide
access to the pages it's happening on if requested.

Thanks in advance.


[jQuery] Do you figure out how to do this?

2009-03-19 Thread Adrian Grigoras

I have the same question. I want to load some external file, for
example: http://www.google.com.

This is my code:
html
head
titlejQuery - Ajax dynamic content loading/title
script src=http://code.jquery.com/jquery-latest.js; type=text/
javascript/script
script type=text/javascript
function loadContent(id) {
$.ajax({
url: http://www.google.com;,
cache: false,
success: function(html){
$(#contentArea).append(html);
  }
});
}
/script
/head
body onLoad=loadContent();


div id=contentArea style=margin: 20px 0px 10px 10px; border: 1px
solid #CCC; width: 780px; height: 250px; float: left;
nbsp;
/div



/body
/html


[jQuery] Superfish animation when hiding menus?

2009-03-19 Thread TommyB

Hello,

Does Superfish support hiding menus with animation as well as when
showing them?

Thanks,

TommyB


[jQuery] Re: Help about how to use the jquery.kiketable.colsizable

2009-03-19 Thread Enrique Meléndez Estrada

Hi,
The problem is that, in (my own) code for the first example (tab API), 
COLs tags are missing, as it is explained in the correct HTML for 
TABLEs tab :

http://www.ita.es/jquery/jquery.kiketable.colsizable.htm#section-3

I have changed 
http://www.ita.es/jquery/jquery.kiketable.colsizable-1.1.js; in order 
to ignore those tables without colgroup defined.


If you have a table of this kind (no colgroup/col explicitly written), 
you must  first append the corresponding colgroup/cols tags ( 
$('table').prepend('colgroupcol /...col //colgroup')) and then 
apply this plugin.

greetings,
El 18/03/2009 19:45, ManKuZo escribió:

Hello,

I'm trying to create a very simple exemple with the the
jquery.kiketable.colsizable pluging. But, It's not working, can you
help me with this. The part of the code is bellow :


IN THE HEADER
script type=text/javascript src=jquery-1.3.2.js/script
 script type=text/javascript
src=jquery.kiketable.colsizable-1.1.js/script
 script type=text/javascript src=jquery.event.drag-1.4.min.js/
script
 link type=text/css rel=stylesheet
href=jquery.kiketable.colsizable.css

script type=text/javascript
 $(document).ready(function(){
  $(table).kiketable_colsizable()
  });
/script

IN THE BODY

table class=api
  tbody
tr class=first
  td width=100strongPROPERTY/strong/td
  td width=200strongDEFAULT VALUE/strong/td
  tdstrongDESCRIPTION (Other values)/strong/td
  /tr
tr
  tddragCells/td
  tdquot;tr:firstgt;*quot;/td
  tdSelection of cells to be applied column resizable
handlerbr/quot;tr:firstgt;*quot; : select all cells (td,th) from
first row of tablebr/quot;tr:firstgt;*:not(:first)quot; : select
all cells, but the first, from table's first row/td
  /tr
tr
  tddragMove/td
  tdtrue/td
  td
ptrue : Column visually changes width while
dragging;br / false : Column changes its width at stop dragging/p
/td
  /tr
 /tbody
  /table


Thanks

  



--
Enrique Meléndez Estrada (976 01 0083)
Dpto. Servicios Informáticos
Área Organización y Servicios Internos
INSTITUTO TECNOLÓGICO DE ARAGÓN
c/ María de Luna 8, 50018, Zaragoza (Spain)
emelen...@ita.es - http://www.ita.es

begin:vcard
fn;quoted-printable:Enrique Mel=C3=A9ndez Estrada
n;quoted-printable:Mel=C3=A9ndez Estrada;Enrique
org;quoted-printable;quoted-printable:Instituto Tecnol=C3=B3gico Arag=C3=B3n;Servicios Inform=C3=A1ticos
adr;quoted-printable;quoted-printable:;;c/ Mar=C3=ADa de Luna, 8;Zaragoza;Zaragoza;50018;Espa=C3=B1a
email;internet:emelen...@ita.es
tel;work:976 01 0083
x-mozilla-html:TRUE
url:http://www.ita.es
version:2.1
end:vcard



[jQuery] iCal Calendar format file browser

2009-03-19 Thread coolimps

This web application browses .ics and .vcs iCal Calendar files

http://coolimps.brinkster.net


[jQuery] Re: Problems whith the variables for a click function

2009-03-19 Thread Patrik

When I press #tax a nothing happens but if I put the variables inside
it works but then the pris var changes every time i press #tax a

On 19 Mar, 00:44, James james.gp@gmail.com wrote:
 Could you explain what exactly that's not working?

 On Mar 18, 7:41 am, Patrik patrik.spat...@gmail.com wrote:

  Hi!

  I try to make a script to change the prize between with tax and
  without but I cant get it to work whats wrong?

  var sant = 'no';
  var pris = $('#productPrices').html();
  $('#tax a').click(function(){
      if(sant == 'no'){
          var pris2 = pris.replace(/[^0-9.,]+/g, '').replace(/[,]+/g,
  '.');
          pris2 = parseInt(pris2)*.75;
          $('#productPrices').html(pris2 + ':-');
          sant = 'yes';
      }else{
          $('#productPrices').html(pris);
      }
      return false;

  });


[jQuery] How to prevent default action of *blur* event?

2009-03-19 Thread ScottD

I have a code block like the following:

$(document).ready(function(event) {
$('#txtField').blur(function() {
if (invalid(this.value))
{
event.preventDefault();
//display error message
}
});
});

My purpose is to check for the input the users key-in and keep the
focus at the current text field if the input is invalid. But when I
jump to other fields by TAB or by mouse clicking, everything happens
as normal. Do you suggest any way to prevent the changing focus
action?
Indeed, the W3C DOM Event Specification states that *blur* event is
not cancelable, so I can understand why its default action cannot be
prevented. But how come when I try to view event.cancelable in
Firefox, it shows *true*?!
If I replace event.preventDefault() with $(this).focus(), it works in
IE, but not in Firefox.


[jQuery] jQuery checkbox checked attribute only enters in IE

2009-03-19 Thread Greg Kass

I have the following code (this is a minimized version of the actual 
code to demonstrate what is happening).  The code inserts form fields 
from data contained in an object:


   jQuery(document).ready(function() {
   var fieldName = optin;
   var attrib = {
   type:checkbox, className:checked, 
checked:checked, value:1, name:promo-optin, id:promo-optin
   }
   var inputType = attrib.type;
   var inputHTML = 
(inputType===select)?select/select:input type='+inputType+' 
/;
   inputHTML = 
jQuery(div+inputHTML+/div).find(input,select).each(function(){
   jQuery(this).attr(id,fieldName);
   for (x in attrib) {
   if (x!==type) {
   jQuery(this).attr(x,attrib[x]);
   }
   }
   }).end().html();
   jQuery(body).append(inputHTML);
   })

Every attribute in the attrib object is added to the input tag correctly 
in IE6.  In FF2, Safari, and Chrome, the checked attribute is not 
added to the tag, and therefore the checkbox is not checked.  (I haven't 
bothered to check IE7 and FF3 yet)  Here is the actual tag from FF, 
retrieved via Firebug:

input type=checkbox id=promo-optin class=checked value=1 
name=promo-optin/

Changing the value of checked from checked to true or true doesn't 
make a difference, either.  How do I get the checked attribute to add 
properly?



[jQuery] Offset changing event

2009-03-19 Thread John Smith

Hi everyone

I have outer div #outer with overflow hidden and absolutely positioned
bigger container #inner inside it. Outerdiv is cutting off innerdiv.
So i desided append #inner to body and set its position depending of
#outer offset. Now how do i get event if outerdiv offset is changed so
i can set new position to #inner. Is there any plugin for that


[jQuery] iCal Calendar format file browser

2009-03-19 Thread cool.imps

With this application you can interactively browse the contents of
any .ics .vcs format Calendar files


[jQuery] remove classes when select option is not selected

2009-03-19 Thread jjsanders

Hello,

When i select something from a selectbox it adds a class to the
selected option this way:

$('div#tabs input[type=text], select option:selected, input:checked,
textarea').addClass('takethis');

But  when i select a different option it doesn't remove the class
'takethis' from the option which I first selected.
How can I force this?

Thanks in advance.


[jQuery] Is there anyway to grab the Children of an Element?

2009-03-19 Thread Martin

Hello,

I am trying to grab the child of element in my html (see below)

th class=name colspan=4

b class='add'nbsp;/b
/th

I am trying to use this Jquery Code to grab the b child element of
th.  I want to change the class element for b from add to
subtraction

var $selected = $(this).children(th.name);

console.log($selected); /*  returns Object length=0 prevObject=Object
context=th.name */
console.log($selected.find(b).length);  /* returns 0 */

When I try to select b, for obvious reasons the remove and add class
doesnt work

$selected.find(b).removeClass().addClass(subtraction);

Does anyone have a solution to this problem?

Regards

Martin Ikediashi


[jQuery] remove classes when select option is not selected

2009-03-19 Thread jjsanders

Hello,

When i select something from a selectbox it adds a class to the
selected option this way:

$('div#tabs input[type=text], select option:selected, input:checked,
textarea').addClass('takethis');

But  when i select a different option it doesn't remove the class
'takethis' from the option which I first selected.
How can I force this?

Thanks in advance.


[jQuery] Re: Is there anyway to grab the Children of an Element?

2009-03-19 Thread T.J. Crowder

Hi Martin,

(Disclaimer:  I'm really new at jQuery, though not at DOM scripting.)

It sounds like you're saying that this line:

 var $selected = $(this).children(th.name);

...isn't finding any matching elements and that that's why you can't
find the b child of the th.  What's the context in which you're
executing that line?  Some event handler?  If so, on what element?  It
would have to be the immediate parent of the th (e.g., a tr) for
it to find it, since recall that #children finds only _direct_
children of the context.

With a bit more context (no pun!) we can probably figure it out, if
the above isn't helpful.

FWIW,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Mar 19, 1:20 pm, Martin martin.ikedia...@gmail.com wrote:
 Hello,

 I am trying to grab the child of element in my html (see below)

 th class=name colspan=4
                                                                               
           b class='add'nbsp;/b
 /th

 I am trying to use this Jquery Code to grab the b child element of
 th.  I want to change the class element for b from add to
 subtraction

 var $selected = $(this).children(th.name);

 console.log($selected); /*  returns Object length=0 prevObject=Object
 context=th.name */
 console.log($selected.find(b).length);  /* returns 0 */

 When I try to select b, for obvious reasons the remove and add class
 doesnt work

 $selected.find(b).removeClass().addClass(subtraction);

 Does anyone have a solution to this problem?

 Regards

 Martin Ikediashi


[jQuery] Re: Is there anyway to grab the Children of an Element?

2009-03-19 Thread MorningZ

I'd take a guess that $(this) isn't what you think it is, hence it
doesn't work

but without more code, it's hard to know for sure



On Mar 19, 9:20 am, Martin martin.ikedia...@gmail.com wrote:
 Hello,

 I am trying to grab the child of element in my html (see below)

 th class=name colspan=4
                                                                               
           b class='add'nbsp;/b
 /th

 I am trying to use this Jquery Code to grab the b child element of
 th.  I want to change the class element for b from add to
 subtraction

 var $selected = $(this).children(th.name);

 console.log($selected); /*  returns Object length=0 prevObject=Object
 context=th.name */
 console.log($selected.find(b).length);  /* returns 0 */

 When I try to select b, for obvious reasons the remove and add class
 doesnt work

 $selected.find(b).removeClass().addClass(subtraction);

 Does anyone have a solution to this problem?

 Regards

 Martin Ikediashi


[jQuery] Re: Do you figure out how to do this?

2009-03-19 Thread MorningZ

I'm not sure who you are replying to, but regardless, the $.ajax code
cannot call another domain

you'll have to use an iframe tag or work out something on your
server side code to call the remote domain and then call that code
from your javascript  (pretty much using your server/code as a proxy)


On Mar 19, 5:46 am, Adrian Grigoras adrianc.grigo...@gmail.com
wrote:
 I have the same question. I want to load some external file, for
 example:http://www.google.com.

 This is my code:
 html
 head
         titlejQuery - Ajax dynamic content loading/title
         script src=http://code.jquery.com/jquery-latest.js; type=text/
 javascript/script
         script type=text/javascript
                 function loadContent(id) {
                         $.ajax({
                                 url: http://www.google.com;,
                                 cache: false,
                                 success: function(html){
                                 $(#contentArea).append(html);
   }});

                 }
         /script
 /head
 body onLoad=loadContent();

         div id=contentArea style=margin: 20px 0px 10px 10px; border: 1px
 solid #CCC; width: 780px; height: 250px; float: left;
                 nbsp;
         /div

 /body
 /html


[jQuery] Re: Is there anyway to grab the Children of an Element?

2009-03-19 Thread Martin

The code looks like this

$(th.name ).livequery('click', function() {
var $selected = $(this).children(th.name);

if($selected.is(:hidden)){
console.log($selected);
console.log($selected.find(b).length);

$selected.find(b).removeClass().addClass(subtraction);

$selected.find(a).hide().end
().slideDown(slow, function(){
$selected.find(a).fadeIn();
}, easeOutCubic);

} else {
$selected.find(b).removeClass().addClass(add);
$selected.find(a).fadeOut(function(){
$selected.slideUp(slow, easeInQuart);
});
}

};



On Mar 19, 1:31 pm, T.J. Crowder t...@crowdersoftware.com wrote:
 Hi Martin,

 (Disclaimer:  I'm really new at jQuery, though not at DOM scripting.)

 It sounds like you're saying that this line:

  var $selected = $(this).children(th.name);

 ...isn't finding any matching elements and that that's why you can't
 find the b child of the th.  What's the context in which you're
 executing that line?  Some event handler?  If so, on what element?  It
 would have to be the immediate parent of the th (e.g., a tr) for
 it to find it, since recall that #children finds only _direct_
 children of the context.

 With a bit more context (no pun!) we can probably figure it out, if
 the above isn't helpful.

 FWIW,
 --
 T.J. Crowder
 tj / crowder software / com
 Independent Software Engineer, consulting services available

 On Mar 19, 1:20 pm, Martin martin.ikedia...@gmail.com wrote:



  Hello,

  I am trying to grab the child of element in my html (see below)

  th class=name colspan=4
                                                                              
              b class='add'nbsp;/b
  /th

  I am trying to use this Jquery Code to grab the b child element of
  th.  I want to change the class element for b from add to
  subtraction

  var $selected = $(this).children(th.name);

  console.log($selected); /*  returns Object length=0 prevObject=Object
  context=th.name */
  console.log($selected.find(b).length);  /* returns 0 */

  When I try to select b, for obvious reasons the remove and add class
  doesnt work

  $selected.find(b).removeClass().addClass(subtraction);

  Does anyone have a solution to this problem?

  Regards

  Martin Ikediashi- Hide quoted text -

 - Show quoted text -


[jQuery] Re: jquery website broken?

2009-03-19 Thread iain.wa...@googlemail.com

I'm not sure if someones been tweaking, but i can confirm its now
rendering correctly for me :)

Cheers


[jQuery] Best way to select dom element ? (find or children ?)

2009-03-19 Thread Jsbeginner


Hello,

I'm trying to get the value of an option in a select list contained in a 
different li item...


Here is the html code :

ul
lipselect class=test1
option value=1 selected=selectedOption 1/option
option value=2Option 2/option
/select/p/li
lipselect class=test2
option value=3Option 3/option
option value=4  selected=selectedOption 4/option
/select/p/li
/ul

ul
lipselect class=test1
option value=1 selected=selectedOption 1/option
option value=2Option 2/option
/select/p/li
lipselect class=test2
option value=3 selected=selectedOption 3/option
option value=4 Option 4/option
/select/p/li
/ul

I would like to be able to get the text of .test2 option:selected when I 
change the value of .test1 option selected ...


Here is the JS code I've written .:

$(.test1).change(function(){
var test1 = $(option:selected, this).val();
var test2 = $(this).closest(ul).find(li  p  .test2 
option:selected).val();

alert(Test1 : +test1+ and Test2 :+test2);
});

Is this the best way? or is there a better way to achieve the same result ?


Thankyou.




[jQuery] Re: Cluetip, opening tip via code

2009-03-19 Thread batuj

Awesome idea, I tried that however the problem is, in order to make it
work, the cluetip I bind to component should be activated with a user
click before the trigger mechanism become able to work. That means, if
I run trigger('click') before clicking the element by hand, It doesn't
work. But after clicking,trigger works.

The thing I'm trying to accomplish is, binding cluetip with json data
to a link and opening it at the user click but both should be
completed in one click. However I can only fetch the data at the first
click and I can show the cluetip  at the second click.

Also it seems like the trigger click I wrote below doesn'T work, I'm
triggering with another buttons click in my comp, however this is how
it should be.

I'm pasting my code below,

$('.class2').click(function(){

if($(this).attr('clicked')==false){
var id=$(this).attr('tel');
c=$(this).attr('id');

$(#c+id).attr({clicked : true});

$.getJSON(editProfileReturn.php?eid=+$(this).attr
('name') ,{}, function(data){
var html=bla bla;
$(#disclosure).html(html);

$(#a+id).cluetip({  cluetipClass:
'jtip',activation:'click',
width: 400, local: true, cursor:
'pointer',hoverClass: 'highlight', hideLocal: true});
})
}
},function(){
$('#a160').trigger('click')

 })

Thanks a lot,








On Mar 18, 3:39 pm, Karl Swedberg k...@englishrules.com wrote:
 You could trigger the activation event. Something like this, maybe:

 $('#mytip').cluetip({activation: 'click'});

 And then later, when you want to show it:

 $('#mytip').triggerHandler('click');

 Or if you don't have activation: 'click', you could just do this:

 $('#mytip').trigger('mouseover')

 Hope that helps.

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Mar 18, 2009, at 7:26 AM, batuj wrote:



  I couldn't manage to get anything with : hoverClass: 'highlight'
  option.

  thanks anyway..

  any other ideas?

  On Mar 18, 12:52 pm, ryan.j ryan.joyce...@googlemail.com wrote:
  have a look at the hoverClass option

  On Mar 18, 9:50 am, batuj batuh...@gmail.com wrote:

  Hi,

  Does anyone have a clue about how to open the tipbox within the  
  code,
  I tried to meant without user clicking or activating anything when I
  bind cluetip to a component, I do want the tip box to be open.

  Thanks...


[jQuery] Re: Unbind by Function Reference

2009-03-19 Thread ricardobeat

Since jQuery 1.3 you can use the live() function, so you don't need to
rebind the events.

Just set $('table caption a').live('click', addItemFinal) once in $
(document).ready() and all anchors added to the doc afterwards that
match this selector will fire the function on click.

live() uses what is called 'event delegation':
http://www.robertnyman.com/2008/05/04/event-delegation-with-javascript/

In your code, you could simply use $('table caption a').unbind
('click') if there are no other event listeners you want to preserve.

cheers,
- ricardo

On Mar 19, 9:33 am, bart b...@ivwd.nl wrote:
 I've followed Karl Swedberg's article on rebinding events at
 learningjquery.com. The theory behind this technique is clear to me
 and I've got a working example.

 function addItemFinal()
 {
         var $href = $('table caption a').attr('href');
         var $rawmaandjaar = $href.split('');
         var $maand = $rawmaandjaar[0].split('=');
         var $jaar = $rawmaandjaar[1].split('=');

         $.get('includes/inc/ajax/fetchtable.php', { maand: $maand[1], jaar:
 $jaar[1] }, function(data)
         {
                 $('div#agendawrapper').html(data);
                 $('table caption a').unbind('click', 
 addItemFinal).bind('click',
 addItemFinal);
         });
         return false;

 }

 $('table caption a').bind('click', addItemFinal);

 The code in the function is pretty simple, it takes the href attribute
 and extracts some variables from it. With the variables it makes a GET
 request and in the callback it rebinds again.

 However is there more than one anchor in the caption and with the
 current code it just takes table caption a whereas this should be
 the actual link you clicked. I guess I should pass something to the
 function but it's used as a reference so I'm not sure how to achieve
 this...

 Someone who can help out?


[jQuery] Re: Is there anyway to grab the Children of an Element?

2009-03-19 Thread Vincent Robert

In your livequery callback, this is the DOM object that received the
event so your th.name.

$(this) builds a jQuery around this DOM element, a jQuery around your
th.name.

$(this).children(th.name) returns a jQuery containing the children
of th.name that are th elements and have a class name, so
nothing.

If you want the child b element, just do $(this).children(b). You
can also use $(this).find(b).if you are not sure that b is a
direct children of your th.name.

You may have misunderstood what the children method is doing, just
recheck the jQuery documentation.

On Mar 19, 2:45 pm, Martin martin.ikedia...@gmail.com wrote:
 The code looks like this

 $(th.name ).livequery('click', function() {
                 var $selected = $(this).children(th.name);

                 if($selected.is(:hidden)){
                         console.log($selected);
                         console.log($selected.find(b).length);
                         
 $selected.find(b).removeClass().addClass(subtraction);

                                 $selected.find(a).hide().end
 ().slideDown(slow, function(){
                         $selected.find(a).fadeIn();
                 }, easeOutCubic);

                                 } else {
                         $selected.find(b).removeClass().addClass(add);
                         $selected.find(a).fadeOut(function(){
                                 $selected.slideUp(slow, easeInQuart);
                         });
                 }

 };

 On Mar 19, 1:31 pm, T.J. Crowder t...@crowdersoftware.com wrote:



  Hi Martin,

  (Disclaimer:  I'm really new at jQuery, though not at DOM scripting.)

  It sounds like you're saying that this line:

   var $selected = $(this).children(th.name);

  ...isn't finding any matching elements and that that's why you can't
  find the b child of the th.  What's the context in which you're
  executing that line?  Some event handler?  If so, on what element?  It
  would have to be the immediate parent of the th (e.g., a tr) for
  it to find it, since recall that #children finds only _direct_
  children of the context.

  With a bit more context (no pun!) we can probably figure it out, if
  the above isn't helpful.

  FWIW,
  --
  T.J. Crowder
  tj / crowder software / com
  Independent Software Engineer, consulting services available

  On Mar 19, 1:20 pm, Martin martin.ikedia...@gmail.com wrote:

   Hello,

   I am trying to grab the child of element in my html (see below)

   th class=name colspan=4
                                                                             
                 b class='add'nbsp;/b
   /th

   I am trying to use this Jquery Code to grab the b child element of
   th.  I want to change the class element for b from add to
   subtraction

   var $selected = $(this).children(th.name);

   console.log($selected); /*  returns Object length=0 prevObject=Object
   context=th.name */
   console.log($selected.find(b).length);  /* returns 0 */

   When I try to select b, for obvious reasons the remove and add class
   doesnt work

   $selected.find(b).removeClass().addClass(subtraction);

   Does anyone have a solution to this problem?

   Regards

   Martin Ikediashi- Hide quoted text -

  - Show quoted text -


[jQuery] Re: Do you figure out how to do this?

2009-03-19 Thread Adrian Grigoras

If the call in in the same domain, but on another machine, it will
work?

For example, call example1.mydomain.com from example2.mydomain.com

Thanks

On Mar 19, 3:36 pm, MorningZ morni...@gmail.com wrote:
 I'm not sure who you are replying to, but regardless, the $.ajax code
 cannot call another domain

 you'll have to use an iframe tag or work out something on your
 server side code to call the remote domain and then call that code
 from your javascript  (pretty much using your server/code as a proxy)

 On Mar 19, 5:46 am, Adrian Grigoras adrianc.grigo...@gmail.com
 wrote:

  I have the same question. I want to load some external file, for
  example:http://www.google.com.

  This is my code:
  html
  head
          titlejQuery - Ajax dynamic content loading/title
          script src=http://code.jquery.com/jquery-latest.js; type=text/
  javascript/script
          script type=text/javascript
                  function loadContent(id) {
                          $.ajax({
                                  url: http://www.google.com;,
                                  cache: false,
                                  success: function(html){
                                  $(#contentArea).append(html);
    }});

                  }
          /script
  /head
  body onLoad=loadContent();

          div id=contentArea style=margin: 20px 0px 10px 10px; border: 1px
  solid #CCC; width: 780px; height: 250px; float: left;
                  nbsp;
          /div

  /body
  /html


[jQuery] Re: Javascript city state zipcode country component

2009-03-19 Thread ricardobeat

I'm using Maxmind's GeoLite City open-source database. It's free and
has surprising accuracy. They also have paid webservice plans with
more precise data.

http://www.maxmind.com/app/geolitecity

cheers,
- ricardo

On Mar 19, 12:06 am, Vijay Balakrishnan bvija...@gmail.com wrote:
 Hi,

 Has anyone used a stable Javascript component for city, state,zip,country ?
 Doesn't matter if it costs money as long as it is usable off the shelf and
 has the US Military Area codes too.

 I have found a few by Googling but wanted to know if PJUG users had any good
 experience with any of these components ?

 http://www.google.com/search?hl=enq=javascript+zipcode+city+state+co...

 TIA,
 Vijay


[jQuery] pseudo-class animation :: select options disappear in ie7

2009-03-19 Thread kenny

Hello,

I am using this script:
http://sheetup.com/menusmooth.php

When I use in my form the class in a select, it dows the animtion
nice on hover but as soon as I go over the options tehy disappear.
All this in ie7.

I am searching the web to find a solution...

If ther is one already available please let me know

Thanx!


[jQuery] Re: findValue

2009-03-19 Thread brightdad...@googlemail.com


I have tried this too and doesn't seem to work:

$(#operator).autocomplete(auto.php,
{
delay:10,
lineSeparator: ^,
cacheLength: 10,
matchSubset:1,
matchContains:1,
onFindValue:function(){
alert(am here);
var ac = $(#operator)[0].autocompleter.findValue();
if(ac.val()==null){
$(#mesage).append(We do not have operator matching
this name);
}
},
autoFill:true
});


[jQuery] Re: Look for UL

2009-03-19 Thread so.phis.ti.kat

Thanks for all your input.

Here's a look at what I have so far: 
http://www.marlonvalenzuela.net/apps/cms/thechickenplace.html

Since we are talking about best-practice, here is how i am switching
between the + and - characters

var pm = $(this).children(.plusminus);
switch (pm.html()) {
 case -:
 pm.html(+)
 break;
 case +:
 pm.html(-)
 break;
}

which is inside...

$(a.toUpperCase).click(function (event) {
 var p = $(this).parent();
 var secondList = ul.categories;
 if ($(p).find(secondList).length  0) {
  $(p).children(secondList).slideToggle(slow);
  var pm = $(this).children(.plusminus);
  switch (pm.html()) {
case -:
pm.html(+)
break;
case +:
pm.html(-)
break;
  }
 }
});

Would you do it a different way? I look through the docs this morning
but couldn't find a shortcut to using the switch statement

On Mar 18, 9:10 pm, ricardobeat ricardob...@gmail.com wrote:
 It's not faster, it actually adds a bit of overhead. From jQuery
 source code:

 // HANDLE: $(expr, $(...))
         } else if ( !context || context.jquery ) {
         return (context || rootjQuery).find( selector );

 that means everytime you type $('.someclass', this) it's effectively
 being translated to $(this).find('.someclass').

 cheers,
 - ricardo

 On Mar 17, 10:02 pm, Eric Garside gars...@gmail.com wrote:

  As an aside, you can use a different syntax for .find() which last I
  knew was a bit faster and less characters:

  $(this).find('.someclass')

  is equivilent to:

  $('.someclass', $(this))

  On Mar 17, 8:58 pm, so.phis.ti.kat see.marlon@gmail.com wrote:

   Thanks for the tip. I started to use FF's console to see more details
   of the object(s)
   Here's my code:

   $(document).ready(function (){
            $(li.page).click(function (event) {
                     var secondList = ul.categories;
                     if ($(this).find(secondList).length  0) {
                                   
   $(this).children(secondList).slideToggle(slow);
                     }
            });

   });

   On Mar 17, 12:18 pm, mkmanning michaell...@gmail.com wrote:

 if ($(this).find(ul)) { ...

will always return a jQuery object and so evaluate to true; you need
to check the length:

 if ($(this).find(ul).length0) { ...

On Mar 17, 8:57 am, so.phis.ti.kat see.marlon@gmail.com wrote:

 Hello Everyone,
 I tried doing a search and found some possible solutions but was not
 able to get it working for my markup so I am wondering if the
 following can be done and how.

 Markup
 ul class=pages
      li class=page
           a class=current title=Edit index href=# index/a
      /li
      li class=page
           a title=Edit menu href=# menu/a
           ul id=menu class=categories.../ul
      /li
      li class=page
           a title=Edit menu href=# catering/a
           ul id=catering class=categories.../ul
      /li
 /ul

 So I want to say, when you click on any li class=page/li, look
 to see if that li has a child ul... thats it for now. I later want
 to use the effects to show and hide the contents of that li.

 jQuery
 $(document).ready(function (){
          $(li.page).click(function (event) {
                   if ($(this).find(ul)) {
                                 alert(yes);
                   } else {
                                 alert(no);
                   }
          });

 });

 Thoughts? Is there a better way or better functions to use?
 I tried find and children.


[jQuery] superfish: highlight the font of entire path

2009-03-19 Thread Yaron

Hi,
I'm using super fish and attempting to modify the style.  How would I
go about highlighting the text of each node in the path (as the
background does).

Thanks,


[jQuery] Email Validation Dies with 1.3 Upgrade

2009-03-19 Thread Brad

I wrote this function to check an input field. I can fire it when the
field blurs or when the form is submitted. If an .error is visible
when the submit button is clicked, it won't be submitted until they
are all gone.

When I try to update to 1.3 this function no longer works.


jQuery.fn.form_realemail = function () {
return this.each(function (){
if ($(this).attr('value') != ) {
error2 = 0;
if ($(this).is([...@value$='@hotmail.com'])) 
{ error2 = 1; }
if ($(this).is([...@value$='@gmail.com'])) { 
error2 = 1; }
if ($(this).is([...@value$='@yahoo.com'])) { 
error2 = 1; }
if ($(this).is([...@value$='@msn.com'])) { 
error2 = 1; }
if ($(this).is([...@value*='@'])) { } else { 
error2 = 2; }
if ($(this).is([...@value*='.'])) { } else { 
error2 = 2; }

if (error2 == 0) {
$(this).parent().find('.error').hide();
}
if (error2 == 1) {
$(this).parent().find('.error').show();

$(this).parent().find('.error').text(Company Emails Only.);
}
if (error2 == 2) {
$(this).parent().find('.error').show();

$(this).parent().find('.error').text(Enter A Valid Email
Address.);
}
}
if ($(this).attr('value') == ) {
$(this).parent().find('.error').show();
$(this).parent().find('.error').text(Email Address is 
Required.);
}
});
}


[jQuery] Re: findValue

2009-03-19 Thread Lauri B.

Didn't try it, but maybe you should use

if($Suggest == ''){
alert(we donot have any matching result);
}


[jQuery] Re: findValue

2009-03-19 Thread brightdad...@googlemail.com

Thanks for the suggestion Lauri.

I have tried as asuggested and still dont see anything happening.


[jQuery] Re: Do you figure out how to do this?

2009-03-19 Thread MorningZ

The only thing the browsers care about is the domain name


On Mar 19, 10:47 am, Adrian Grigoras adrianc.grigo...@gmail.com
wrote:
 If the call in in the same domain, but on another machine, it will
 work?

 For example, call example1.mydomain.com from example2.mydomain.com

 Thanks

 On Mar 19, 3:36 pm, MorningZ morni...@gmail.com wrote:

  I'm not sure who you are replying to, but regardless, the $.ajax code
  cannot call another domain

  you'll have to use an iframe tag or work out something on your
  server side code to call the remote domain and then call that code
  from your javascript  (pretty much using your server/code as a proxy)

  On Mar 19, 5:46 am, Adrian Grigoras adrianc.grigo...@gmail.com
  wrote:

   I have the same question. I want to load some external file, for
   example:http://www.google.com.

   This is my code:
   html
   head
           titlejQuery - Ajax dynamic content loading/title
           script src=http://code.jquery.com/jquery-latest.js; type=text/
   javascript/script
           script type=text/javascript
                   function loadContent(id) {
                           $.ajax({
                                   url: http://www.google.com;,
                                   cache: false,
                                   success: function(html){
                                   $(#contentArea).append(html);
     }});

                   }
           /script
   /head
   body onLoad=loadContent();

           div id=contentArea style=margin: 20px 0px 10px 10px; border: 
   1px
   solid #CCC; width: 780px; height: 250px; float: left;
                   nbsp;
           /div

   /body
   /html


[jQuery] Re: Email Validation Dies with 1.3 Upgrade

2009-03-19 Thread Jörn Zaefferer
Remove the @ symbol in the attribute selector, it was deprecated in
1.2 and removed in 1.3

Jörn

On Thu, Mar 19, 2009 at 3:06 PM, Brad brad.es...@gmail.com wrote:

 I wrote this function to check an input field. I can fire it when the
 field blurs or when the form is submitted. If an .error is visible
 when the submit button is clicked, it won't be submitted until they
 are all gone.

 When I try to update to 1.3 this function no longer works.


 jQuery.fn.form_realemail = function () {
        return this.each(function (){
                if ($(this).attr('value') != ) {
                                error2 = 0;
                                if ($(this).is([...@value$='@hotmail.com'])) 
 { error2 = 1; }
                                if ($(this).is([...@value$='@gmail.com'])) { 
 error2 = 1; }
                                if ($(this).is([...@value$='@yahoo.com'])) { 
 error2 = 1; }
                                if ($(this).is([...@value$='@msn.com'])) { 
 error2 = 1; }
                                if ($(this).is([...@value*='@'])) { } else { 
 error2 = 2; }
                                if ($(this).is([...@value*='.'])) { } else { 
 error2 = 2; }

                                if (error2 == 0) {
                                        $(this).parent().find('.error').hide();
                                }
                                if (error2 == 1) {
                                        $(this).parent().find('.error').show();
                                        
 $(this).parent().find('.error').text(Company Emails Only.);
                                }
                                if (error2 == 2) {
                                        $(this).parent().find('.error').show();
                                        
 $(this).parent().find('.error').text(Enter A Valid Email
 Address.);
                                }
                }
                if ($(this).attr('value') == ) {
                        $(this).parent().find('.error').show();
                        $(this).parent().find('.error').text(Email Address is 
 Required.);
                }
        });
 }



[jQuery] Re: Javascript city state zipcode country component

2009-03-19 Thread MorningZ

Another option to possible look at

http://bassistance.de/2009/03/03/jquery-snippet-autocomplete-city-based-on-zip-code/

although i have idea if it applies to PJUG since I have no idea what
it is


On Mar 19, 10:47 am, ricardobeat ricardob...@gmail.com wrote:
 I'm using Maxmind's GeoLite City open-source database. It's free and
 has surprising accuracy. They also have paid webservice plans with
 more precise data.

 http://www.maxmind.com/app/geolitecity

 cheers,
 - ricardo

 On Mar 19, 12:06 am, Vijay Balakrishnan bvija...@gmail.com wrote:

  Hi,

  Has anyone used a stable Javascript component for city, state,zip,country ?
  Doesn't matter if it costs money as long as it is usable off the shelf and
  has the US Military Area codes too.

  I have found a few by Googling but wanted to know if PJUG users had any good
  experience with any of these components ?

 http://www.google.com/search?hl=enq=javascript+zipcode+city+state+co...

  TIA,
  Vijay


[jQuery] HTML annotation techniques.

2009-03-19 Thread Bryan Larsen

I'm looking for a good HTML annotation method so that I can pass
metadata for html tags to jQuery scripts.

I found this page http://www.1729.com/blog/HtmlAnnotations.html which
surveys 9 different mechanisms.

So far, I've tried the first mechanism (JSON in a script tag before
the element to be annotated), which fails because of
http://groups.google.com/group/jquery-en/browse_thread/thread/7d25002ada8d15f7/33317d9c68f1b154.

Then I found the article, and tried the last mechanism (HTML
comments).  However, jQuery appears to have no mechanism for selecting
comments.  I've worked around this by using the native DOM traversal
functions.  However, I'm sure my code would be more robust if this was
supported within jQuery.

Will jQuery support comment extraction in the future?  Does anybody
have any other nice HTML annotation techniques?

thanks,
Bryan



[jQuery] Re: Email Validation Dies with 1.3 Upgrade

2009-03-19 Thread Brad

Tried it, still doesn't work. I went through the 1.3 change log and
can't find what change could have effected it.

On Mar 19, 11:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Remove the @ symbol in the attribute selector, it was deprecated in
 1.2 and removed in 1.3

 Jörn



 On Thu, Mar 19, 2009 at 3:06 PM, Brad brad.es...@gmail.com wrote:

  I wrote this function to check an input field. I can fire it when the
  field blurs or when the form is submitted. If an .error is visible
  when the submit button is clicked, it won't be submitted until they
  are all gone.

  When I try to update to 1.3 this function no longer works.

  jQuery.fn.form_realemail = function () {
         return this.each(function (){
                 if ($(this).attr('value') != ) {
                                 error2 = 0;
                                 if 
  ($(this).is([...@value...@hotmail.com'])) { error2 = 1; }
                                 if ($(this).is([...@value...@gmail.com'])) 
  { error2 = 1; }
                                 if ($(this).is([...@value...@yahoo.com'])) 
  { error2 = 1; }
                                 if ($(this).is([...@value...@msn.com'])) { 
  error2 = 1; }
                                 if ($(this).is([...@value*='@'])) { } else 
  { error2 = 2; }
                                 if ($(this).is([...@value*='.'])) { } else 
  { error2 = 2; }

                                 if (error2 == 0) {
                                         
  $(this).parent().find('.error').hide();
                                 }
                                 if (error2 == 1) {
                                         
  $(this).parent().find('.error').show();
                                         
  $(this).parent().find('.error').text(Company Emails Only.);
                                 }
                                 if (error2 == 2) {
                                         
  $(this).parent().find('.error').show();
                                         
  $(this).parent().find('.error').text(Enter A Valid Email
  Address.);
                                 }
                 }
                 if ($(this).attr('value') == ) {
                         $(this).parent().find('.error').show();
                         $(this).parent().find('.error').text(Email Address 
  is Required.);
                 }
         });
  }


[jQuery] jquery.dates

2009-03-19 Thread RyanEv

All,
I'm having an issue with the jquery.dates plug-in (http://
grover.open2space.com/jquery.dates/home).  What is strange is that the
error only happens in IE and not in FF.  Everything plays nice in FF.
The error I am getting in IE is the the object does not support this
property or method on line 29.

27:  script type=text/javascript
28:$(document).ready( function () {
29:  $(#sample1).datePicker();
30:  $(#sample2).datePicker({format: .mm.dd});
31:  $(#anchorSample3).datePicker({parent: $(#sample3)[0]});


Not sure why the datePicker() function would work in FF but not IE.
Do you guys think it has somethign to do with $(document).ready
( function () { on line 28?   Is there an issue with jquery, IE and
this function?  I am using jquery 1.3.

Ryan


[jQuery] Re: HTML annotation techniques.

2009-03-19 Thread David Decraene

depending on the purpose, you could use :

RDfa: http://www.w3.org/TR/xhtml-rdfa-primer/

or perhaps start using html 5 data attributes, see post from john:
http://ejohn.org/blog/html-5-data-attributes/

Greetings,
David

http://ontologyonline.org
jowl semantic javascript library: http://jowl.ontologyonline.org

On 19 mrt, 17:06, Bryan Larsen bryan.lar...@gmail.com wrote:
 I'm looking for a good HTML annotation method so that I can pass
 metadata for html tags to jQuery scripts.

 I found this pagehttp://www.1729.com/blog/HtmlAnnotations.htmlwhich
 surveys 9 different mechanisms.

 So far, I've tried the first mechanism (JSON in a script tag before
 the element to be annotated), which fails because 
 ofhttp://groups.google.com/group/jquery-en/browse_thread/thread/7d25002

 Then I found the article, and tried the last mechanism (HTML
 comments).  However, jQuery appears to have no mechanism for selecting
 comments.  I've worked around this by using the native DOM traversal
 functions.  However, I'm sure my code would be more robust if this was
 supported within jQuery.

 Will jQuery support comment extraction in the future?  Does anybody
 have any other nice HTML annotation techniques?

 thanks,
 Bryan


[jQuery] Re: Using PHP templates and jQuery, browser load problems

2009-03-19 Thread Christoph

Brian,

Thank you!

I dumped the website comps onto my personal server and it works
flawlessly.  Seems like the setup here at work must have a bug on the
server side somewhere.

Hmm, guess it is time to have the developer look at the server code.
This could be a nightmare now.

Thanks for the help though.

-Christoph



On Mar 18, 6:06 pm, brian bally.z...@gmail.com wrote:
 On Wed, Mar 18, 2009 at 8:30 PM, Christoph sbch...@gmail.com wrote:

  Hi guys,

  I have a quick problem I stumbled upon.

  Here is the background on the situation.  I'm creating a website that
  uses templates for the header, body, and footer.  In a sense it is a
  modular website with all .php extensions being called in the body
  document using ?php include(header.php); ? for the header and ?
  php include(footer.php); ? being called for the footer.

  Here is the problem.

  When any browser renders the page, the page loads the php first and
  then it pauses and gets hung up loading the jQuery and CSS for around
  10-15 seconds.  Glitchy is the best description.  I tried the document
  ready tag on the jQuery code being called and it does not do a thing
  to improve the problem.  When the document is first loaded, all the
  hidden elements from a jQuery cycle plug are visible, the nav images
  are missing, and depending upon which browser is viewing the page the
  specific css style is missing for 10-15 seconds.

  I converted the page back into a .html extension file and it works
  perfectly like it should with the document ready tag.

  Does anyone have any ideas or help?  If possible I'd like to stick
  with the .php templates.

 The browser does not load the php bits first. PHP parses scripts and
 outputs a single page (HTML, in this case) to the browser. The only
 way in which it would load the php parts first is if you were using JS
 to fetch them somehow (which doesn't even make sense).

 The problem you're seeing is probably due to some nasty PHP issue,
 you're using jquery incorrectly, or you've got very broken HTML.

 Also, Firebug can cause jquery pages to load extremely slowly. I've
 experienced much longer than 10 to 15 second load times so I'd check
 that if you have it installed.


[jQuery] Re: Using PHP templates and jQuery, browser load problems

2009-03-19 Thread Eric Garside

Also, for reference, this is how your request are processed.

1. HTTP request from user for page.php
2. PHP parses the page
3. PHP includes header.php, PHP parses that page
4. PHP includes lets say content.php, PHP parses that page
5. PHP includes footer.php, PHP parses that page
6. The final HTML is returned
7. The CSS is included asynchronously, along with any images
8. The Javascript is included synchronously, then executed
9. Images are included
9. DomReady is fired


On Mar 19, 12:36 pm, Christoph sbch...@gmail.com wrote:
 Brian,

 Thank you!

 I dumped the website comps onto my personal server and it works
 flawlessly.  Seems like the setup here at work must have a bug on the
 server side somewhere.

 Hmm, guess it is time to have the developer look at the server code.
 This could be a nightmare now.

 Thanks for the help though.

 -Christoph

 On Mar 18, 6:06 pm, brian bally.z...@gmail.com wrote:

  On Wed, Mar 18, 2009 at 8:30 PM, Christoph sbch...@gmail.com wrote:

   Hi guys,

   I have a quick problem I stumbled upon.

   Here is the background on the situation.  I'm creating a website that
   uses templates for the header, body, and footer.  In a sense it is a
   modular website with all .php extensions being called in the body
   document using ?php include(header.php); ? for the header and ?
   php include(footer.php); ? being called for the footer.

   Here is the problem.

   When any browser renders the page, the page loads the php first and
   then it pauses and gets hung up loading the jQuery and CSS for around
   10-15 seconds.  Glitchy is the best description.  I tried the document
   ready tag on the jQuery code being called and it does not do a thing
   to improve the problem.  When the document is first loaded, all the
   hidden elements from a jQuery cycle plug are visible, the nav images
   are missing, and depending upon which browser is viewing the page the
   specific css style is missing for 10-15 seconds.

   I converted the page back into a .html extension file and it works
   perfectly like it should with the document ready tag.

   Does anyone have any ideas or help?  If possible I'd like to stick
   with the .php templates.

  The browser does not load the php bits first. PHP parses scripts and
  outputs a single page (HTML, in this case) to the browser. The only
  way in which it would load the php parts first is if you were using JS
  to fetch them somehow (which doesn't even make sense).

  The problem you're seeing is probably due to some nasty PHP issue,
  you're using jquery incorrectly, or you've got very broken HTML.

  Also, Firebug can cause jquery pages to load extremely slowly. I've
  experienced much longer than 10 to 15 second load times so I'd check
  that if you have it installed.


[jQuery] Re: jquery.dates

2009-03-19 Thread Jack Killpatrick


IIRC I had a similar issue with datePicker in IE and doing something 
like this resolved it:


$(document).ready(function(){
   setTimeout(function(){
  $('#sample1').datePicker();
   }, 50);
});

worth a quick try, at least. I've also had to use a setTimeout like that 
for IE when there was Flash on the page.


- Jack

RyanEv wrote:

All,
I'm having an issue with the jquery.dates plug-in (http://
grover.open2space.com/jquery.dates/home).  What is strange is that the
error only happens in IE and not in FF.  Everything plays nice in FF.
The error I am getting in IE is the the object does not support this
property or method on line 29.

27:  script type=text/javascript
28:$(document).ready( function () {
29:  $(#sample1).datePicker();
30:  $(#sample2).datePicker({format: .mm.dd});
31:  $(#anchorSample3).datePicker({parent: $(#sample3)[0]});


Not sure why the datePicker() function would work in FF but not IE.
Do you guys think it has somethign to do with $(document).ready
( function () { on line 28?   Is there an issue with jquery, IE and
this function?  I am using jquery 1.3.

Ryan

  





[jQuery] jQuery-UI / Hide thanks to slide / effects details

2009-03-19 Thread jeancharles amey
i looked at the jQuery Docs (http://docs.jquery.com/UI/Effects/Slide) but
nothing solve my question

is it possible to hide the half, or x pixels of the div with the id 

something like :
$('#').hide(  'slide', {direction: 'down', height: x} );


If there's anyone who can help me I would be extremely grateful.


[jQuery] Re: Email Validation Dies with 1.3 Upgrade

2009-03-19 Thread MorningZ

Why so complex with jQuery objects?   simple JavaScript makes much
more sense, plus the fact that ultimately all the ends with and
contains selectors use basic JavaScript in the end anyways


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





On Mar 19, 12:07 pm, Brad brad.es...@gmail.com wrote:
 Tried it, still doesn't work. I went through the 1.3 change log and
 can't find what change could have effected it.

 On Mar 19, 11:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:

  Remove the @ symbol in the attribute selector, it was deprecated in
  1.2 and removed in 1.3

  Jörn

  On Thu, Mar 19, 2009 at 3:06 PM, Brad brad.es...@gmail.com wrote:

   I wrote this function to check an input field. I can fire it when the
   field blurs or when the form is submitted. If an .error is visible
   when the submit button is clicked, it won't be submitted until they
   are all gone.

   When I try to update to 1.3 this function no longer works.

   jQuery.fn.form_realemail = function () {
          return this.each(function (){
                  if ($(this).attr('value') != ) {
                                  error2 = 0;
                                  if 
   ($(this).is([...@value...@hotmail.com'])) { error2 = 1; }
                                  if 
   ($(this).is([...@value...@gmail.com'])) { error2 = 1; }
                                  if 
   ($(this).is([...@value...@yahoo.com'])) { error2 = 1; }
                                  if ($(this).is([...@value...@msn.com'])) 
   { error2 = 1; }
                                  if ($(this).is([...@value*='@'])) { } 
   else { error2 = 2; }
                                  if ($(this).is([...@value*='.'])) { } 
   else { error2 = 2; }

                                  if (error2 == 0) {
                                          
   $(this).parent().find('.error').hide();
                                  }
                                  if (error2 == 1) {
                                          
   $(this).parent().find('.error').show();
                                          
   $(this).parent().find('.error').text(Company Emails Only.);
                                  }
                                  if (error2 == 2) {
                                          
   $(this).parent().find('.error').show();
                                          
   $(this).parent().find('.error').text(Enter A Valid Email
   Address.);
                                  }
                  }
                  if ($(this).attr('value') == ) {
                          $(this).parent().find('.error').show();
                          $(this).parent().find('.error').text(Email 
   Address is Required.);
                  }
          });
   }


[jQuery] Re: Email Validation Dies with 1.3 Upgrade

2009-03-19 Thread Brad

There's a lot more code wrapped around this, I just pulled out the
area I know isn't working correctly.

On Mar 19, 2:00 pm, MorningZ morni...@gmail.com wrote:
 Why so complex with jQuery objects?   simple JavaScript makes much
 more sense, plus the fact that ultimately all the ends with and
 contains selectors use basic JavaScript in the end anyways

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

 On Mar 19, 12:07 pm, Brad brad.es...@gmail.com wrote:



  Tried it, still doesn't work. I went through the 1.3 change log and
  can't find what change could have effected it.

  On Mar 19, 11:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
  wrote:

   Remove the @ symbol in the attribute selector, it was deprecated in
   1.2 and removed in 1.3

   Jörn

   On Thu, Mar 19, 2009 at 3:06 PM, Brad brad.es...@gmail.com wrote:

I wrote this function to check an input field. I can fire it when the
field blurs or when the form is submitted. If an .error is visible
when the submit button is clicked, it won't be submitted until they
are all gone.

When I try to update to 1.3 this function no longer works.

jQuery.fn.form_realemail = function () {
       return this.each(function (){
               if ($(this).attr('value') != ) {
                               error2 = 0;
                               if 
($(this).is([...@value...@hotmail.com'])) { error2 = 1; }
                               if 
($(this).is([...@value...@gmail.com'])) { error2 = 1; }
                               if 
($(this).is([...@value...@yahoo.com'])) { error2 = 1; }
                               if 
($(this).is([...@value...@msn.com'])) { error2 = 1; }
                               if ($(this).is([...@value*='@'])) { } 
else { error2 = 2; }
                               if ($(this).is([...@value*='.'])) { } 
else { error2 = 2; }

                               if (error2 == 0) {
                                       
$(this).parent().find('.error').hide();
                               }
                               if (error2 == 1) {
                                       
$(this).parent().find('.error').show();
                                       
$(this).parent().find('.error').text(Company Emails Only.);
                               }
                               if (error2 == 2) {
                                       
$(this).parent().find('.error').show();
                                       
$(this).parent().find('.error').text(Enter A Valid Email
Address.);
                               }
               }
               if ($(this).attr('value') == ) {
                       $(this).parent().find('.error').show();
                       $(this).parent().find('.error').text(Email 
Address is Required.);
               }
       });
}


[jQuery] Make Superfish smaller

2009-03-19 Thread oware

Hi, I am trying to make the superfish menu bar smaller, I changed
the .sf-menu a padding from .75em to .30em and the arrows padding,
That worked fine but when showing the first level menu, it appears
very far from the menu bar, how can I move it a little bit to the
top?? I haven't found a defined style to make it, do I have to make a
new style or what??

Thanks a lot!


[jQuery] jumpy navigation slides (possibly due to hide, animation order)

2009-03-19 Thread pedalpete

I've spent the last few days creating a mobile/iphone optimized
version of my site.

I looked at jqTouch  iUI, but I thought it would mean a bunch of
configuring of new pages, and I wanted to just be able to use my own
API and a bunch of code I had already written in order to accomplish
this.

It actually came together rather well, and i've got something very
similar to native UI (sliding left/right on selections, scrolling,
etc).

On the iPhone, the animations run smooth (i'm using css transitions),
but the content hides, then slides, even though the .hide() is far
down the page from the slide.

I think it would look much better if it slid first and then hid.
However, the difference is that the bits that hide, and the bits that
slide, are not the same div, so I can't just chain them.

If you want to check out a url, go to
http://zifimusic.com/v2/mobile

Here's the animation code i'm using (note the actually transitions are
in the css, but are triggered with the addClass

[code]
 $('li.show').livequery('click', function(){

var targetOffset=$(window).scrollTop();

 $('a.back').click(function(){
$('li.selectedShow').remove();
$('div#selectedShow').hide();
$('div#holdForecast').show();
window.scroll(0,targetOffset);
$('div#header').addClass('holdForecastBack').removeClass
('holdForecastMove');
});


var showid=$(this).attr('id');
$('div#header').addClass('holdForecastMove');

var getShowid=$(this).attr('id');
var selectedShow=$(this).html();
  var artist=$('span.artist',this).text();
var htmlThis = 'li class=show id='+showid+''+selectedShow
+'div id=media/divspan class=holdMap/span\/li';
$('div#selectedShow').append(htmlThis).show();
$('div#selectedShow li.show').addClass
('selectedShow').removeClass('show');

$('div#holdForecast').hide();

[/code]

thanks,
pete



[jQuery] Re: Offset changing event

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/19/09, John Smith master9...@gmail.com wrote:


 Hi everyone

 I have outer div #outer with overflow hidden and absolutely positioned
 bigger container #inner inside it. Outerdiv is cutting off innerdiv.
 So i desided append #inner to body and set its position depending of
 #outer offset. Now how do i get event if outerdiv offset is changed so
 i can set new position to #inner. Is there any plugin for that



[jQuery] Re: iCal browser

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/19/09, cool.imps cool.i...@gmail.com wrote:


 This application allows a user to interactively browse the contents of
 any ical (.ics,.vcs) formatted files available in the net

 http://coolimps.brinkster.net

 I would appreciate comments and feedback



[jQuery] Re: ajaxForm File Upload Issue

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/19/09, Pascal Zajac eaglereloa...@gmail.com wrote:


 Hi guys (and probably Mike directly given how quickly he answers
 these),

 I've been a long time user of the ajaxForm plugin but as of right now
 I cannot get file uploads happening. It's the same story you can read
 on here a tonne of times - the form submits fine over POST as AJAX but
 as soon as you fill in the file upload field, it bombs. The catch is,
 I don't have any fields with the name/ID of 'submit' in the form - the
 submit button is id=submit_button and name=sbmt_button (because
 recently you were just matching whether the name started with submit
 at all so I changed it). I've also tried changing the ID to
 sbmt_button with no change.

 I'm using jQuery 1.3.2 and v2.24 of the form plugin, and I can provide
 access to the pages it's happening on if requested.

 Thanks in advance.



[jQuery] Re: Superfish animation when hiding menus?

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/18/09, TommyB m...@tommyb.com wrote:


 Hello,

 Does Superfish support hiding menus with animation as well as when
 showing them?

 Thanks,

 TommyB



[jQuery] Re: iCal Calendar format file browser

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/19/09, cool.imps cool.i...@gmail.com wrote:


 With this application you can interactively browse the contents of
 any .ics .vcs format Calendar files



[jQuery] Re: Do you need authorization for SVN import???

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/18/09, J.V. servicefol...@gmail.com wrote:


 I am using Eclipse SVN subclipse plugin.
 I can browse all code on:
 http://jqueryjs.googlecode.com/svn

 but when I need to import it locally it asks me for credentials:
 I tried to leave it blank or use  guest,  but it throws the error:
 -
 import -m  D:/SANDBOX/zxy
 http://jqueryjs.googlecode.com/svn/trunk/jquery
Authorization failed
 svn: MKACTIVITY of '/svn/!svn/act/d0b979c6-50ec-0449-
 ae92-35a848b66c9a': authorization failed (http://
 jqueryjs.googlecode.com)

The operation was interrupted
 svn: Operation canceled
 --
 How can I import it? Of what client are you using?

 Thanks for help,
 Jan



[jQuery] Can't get ActiveX custom event in IE using jQuery

2009-03-19 Thread Mark Priest

Hello,

I have a handler for a custom ActiveX control event that I can
successfully register for in IE using the following code:

this.activeXObj.attachEvent(PlayerInitialized, this.handlerFunc);

When I use the code above I get the event in my handler.  I am now
trying to use jQuery to attach the event handler like this:

$(this.activeXObj).bind(PlayerInitialized, this.handlerFunc);

With the jQuery code I never receive the event.

Can anyone tell me what I am doing wrong?

Thanks,
Mark


[jQuery] Re: Can't select link in custom xml in firefox

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/19/09, rossallan rossal...@gmail.com wrote:


 I'm trying to select the text in the link element in the xml below:

 press_releases
 press_release
titletitle text/title
teaserteaser text/teaser
publication_datepublication date/publication_date
linkhttp://www.linkgoeshere.com/link
link_typeexternal/link_type
 /press_release
 press_releases

 Using the following code:

 $(xml).find('press_release').each(function() {

var linkText = $(this).children(link).text();

 });

 This works in IE, however Firefox returns nothing (I can select all
 the other elements)

 If I alert:

 $(this).text()

 I can see the entire object including the link text. However If I
 alert:

 $(this).children().text()

 I can see the everything but the link element text.

 I presume the fact that link is an HTML tag that only contains
 attributes is causing a conflict here, I *might* be able to get the
 xml changed but would rather not if there's an easy solution.



[jQuery] Re: jQuery checkbox checked attribute only enters in IE

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/18/09, Greg Kass greg.k...@ardishealth.com wrote:


 I have the following code (this is a minimized version of the actual code
 to demonstrate what is happening).  The code inserts form fields from data
 contained in an object:


jQuery(document).ready(function() {
var fieldName = optin;
var attrib = {
type:checkbox, className:checked,
 checked:checked, value:1, name:promo-optin, id:promo-optin
}
var inputType = attrib.type;
var inputHTML =
 (inputType===select)?select/select:input type='+inputType+' /;

inputHTML =
 jQuery(div+inputHTML+/div).find(input,select).each(function(){
jQuery(this).attr(id,fieldName);
for (x in attrib) {
if (x!==type) {
jQuery(this).attr(x,attrib[x]);
}
}
}).end().html();
jQuery(body).append(inputHTML);
})

 Every attribute in the attrib object is added to the input tag correctly in
 IE6.  In FF2, Safari, and Chrome, the checked attribute is not added to
 the tag, and therefore the checkbox is not checked.  (I haven't bothered to
 check IE7 and FF3 yet)  Here is the actual tag from FF, retrieved via
 Firebug:

 input type=checkbox id=promo-optin class=checked value=1
 name=promo-optin/

 Changing the value of checked from checked to true or true doesn't
 make a difference, either.  How do I get the checked attribute to add
 properly?





[jQuery] Re: How to prevent default action of *blur* event?

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/19/09, ScottD ads...@gmail.com wrote:


 I have a code block like the following:

 $(document).ready(function(event) {
$('#txtField').blur(function() {
if (invalid(this.value))
{
event.preventDefault();
//display error message
}
});
 });

 My purpose is to check for the input the users key-in and keep the
 focus at the current text field if the input is invalid. But when I
 jump to other fields by TAB or by mouse clicking, everything happens
 as normal. Do you suggest any way to prevent the changing focus
 action?
 Indeed, the W3C DOM Event Specification states that *blur* event is
 not cancelable, so I can understand why its default action cannot be
 prevented. But how come when I try to view event.cancelable in
 Firefox, it shows *true*?!
 If I replace event.preventDefault() with $(this).focus(), it works in
 IE, but not in Firefox.



[jQuery] Clickable dropdown lists

2009-03-19 Thread christopher.m.t...@gmail.com

Hi everyone!

I'm trying to work out a drop down list and can't seem to figure this
thing out.  So, here's my code:

var menuclicked = 0;

$('#dropDown1').click( function() {
if( menuclicked == 1) {
menuclicked = 0;
$(this).find('ul').css('visibility', 'hidden');
}else{
$(this).find('ul').css('visibility', 'visible');
menuclicked = 1;}
});

and my html

ul id=dropDown1 class=dropDown
   lia href=# class=selectLinkSelect from the list/a
  ul id=dropDown1sub
 lia href=Leukemia/a/li
 lia href=Breast Cancer/a/li
 lia href=Lung Cancer/a/li
 lia href=Colon Cancer/a/li
 lia href=Prostate Cancer/a/li
 li class=lastLista href=View more Topics/a/
li
  /ul
/li
/ul


This works fine, but I need two things to occur.  First, hide the
nested ul if the user clicks on the document while it's open.  Second,
behave like multiple lists on a page wherein it closes if another list
is accessed.

Can I get a little help?


[jQuery] Re: Sortable problems

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/18/09, err_ok jack.regn...@googlemail.com wrote:


 I am having some problems with the sortable plugin, most annoyingly in
 firefox instead of drag and drop functionality it seems to be click
 once then click again to drop.. but it doesn't seem to work at
 consistently, this problem isn't apparent in other demo's I have tried
 to I am assuming it is a problem on my end, also I can't get scrolling
 while dragging to work on any browser that I have tried. Any help
 would be great!

 JQuery code as follows;

$(document).ready(function() {
$(#library-table).sortable({
items  : '.library-item',
cursor : 'move',
handle : '.handle',
scroll : true,
update : function () {
$.post('/libraries/sort',
 '_method=putauthenticity_token='+AUTH_TOKEN+''+$(this).sortable
 ('serialize'));
}
});
});

 an HTML Example;

 div id=library-table class=ui-sortable
div class=library-item id=listItem-1
%= image_tag '/images/pdf.png', :height = '40px',
 :class
 = :handle%
h3%= library.title %/h3
p%= library.desc %/p
ul
li%= link_to Download,
 library.doc.url(), :target = :blank
 %/li
li%= link_to 'Delete', library, :confirm
 = 'Are you
 sure?', :method = :delete % | /li
li%= link_to Edit,
 edit_library_path(library.permalink), :rel
 = 'facebox' % | /li
/ul
/div2
div class=library-item id=listItem-2
%= image_tag '/images/pdf.png', :height = '40px',
 :class
 = :handle%
h3%= library.title %/h3
p%= library.desc %/p
ul
li%= link_to Download,
 library.doc.url(), :target = :blank
 %/li
li%= link_to 'Delete', library, :confirm
 = 'Are you
 sure?', :method = :delete % | /li
li%= link_to Edit,
 edit_library_path(library.permalink), :rel
 = 'facebox' % | /li
/ul
/div
/div

 I do not get any errors in firebug, I am quite stumped. Any help would
 be much appreciated!

 Jack

 



[jQuery] IE Selection Hiding

2009-03-19 Thread Adam Paeth

Just curious if the problem of hiding an IE selection option has been
fixed or if anyone has a workaround other then keeping a hidden list
of options that aren't selected.

Thanks,
Adam Paeth

$(#option1).hide();  //works in FF, not in IE


[jQuery] Re: iCal Calendar format file browser

2009-03-19 Thread Muhammad Zaheer Asghar
http://lattestphones.blogspot.com/

http://latesttechnologyblog.blogspot.com/

http://home-safety-tips.blogspot.com/


On 3/18/09, coolimps vasanth.de...@gmail.com wrote:


 This web application browses .ics and .vcs iCal Calendar files

 http://coolimps.brinkster.net



[jQuery] Re: Unbind by Function Reference

2009-03-19 Thread bart

Thank you for your answer. With a search on the jquery site I can't
find the documentation on how to use the function or see an example..
Why is that?

On Mar 19, 3:40 pm, ricardobeat ricardob...@gmail.com wrote:
 Since jQuery 1.3 you can use the live() function, so you don't need to
 rebind the events.

 Just set $('table caption a').live('click', addItemFinal) once in $
 (document).ready() and all anchors added to the doc afterwards that
 match this selector will fire the function on click.

 live() uses what is called 'event 
 delegation':http://www.robertnyman.com/2008/05/04/event-delegation-with-javascript/

 In your code, you could simply use $('table caption a').unbind
 ('click') if there are no other event listeners you want to preserve.

 cheers,
 - ricardo

 On Mar 19, 9:33 am, bart b...@ivwd.nl wrote:

  I've followed Karl Swedberg's article on rebinding events at
  learningjquery.com. The theory behind this technique is clear to me
  and I've got a working example.

  function addItemFinal()
  {
          var $href = $('table caption a').attr('href');
          var $rawmaandjaar = $href.split('');
          var $maand = $rawmaandjaar[0].split('=');
          var $jaar = $rawmaandjaar[1].split('=');

          $.get('includes/inc/ajax/fetchtable.php', { maand: $maand[1], jaar:
  $jaar[1] }, function(data)
          {
                  $('div#agendawrapper').html(data);
                  $('table caption a').unbind('click', 
  addItemFinal).bind('click',
  addItemFinal);
          });
          return false;

  }

  $('table caption a').bind('click', addItemFinal);

  The code in the function is pretty simple, it takes the href attribute
  and extracts some variables from it. With the variables it makes a GET
  request and in the callback it rebinds again.

  However is there more than one anchor in the caption and with the
  current code it just takes table caption a whereas this should be
  the actual link you clicked. I guess I should pass something to the
  function but it's used as a reference so I'm not sure how to achieve
  this...

  Someone who can help out?


[jQuery] Re: Unbind by Function Reference

2009-03-19 Thread ricardobeat

http://docs.jquery.com/Events (Live Events)
http://docs.jquery.com/Events/live#typefn

On Mar 19, 3:35 pm, bart b...@ivwd.nl wrote:
 Thank you for your answer. With a search on the jquery site I can't
 find the documentation on how to use the function or see an example..
 Why is that?

 On Mar 19, 3:40 pm, ricardobeat ricardob...@gmail.com wrote:

  Since jQuery 1.3 you can use the live() function, so you don't need to
  rebind the events.

  Just set $('table caption a').live('click', addItemFinal) once in $
  (document).ready() and all anchors added to the doc afterwards that
  match this selector will fire the function on click.

  live() uses what is called 'event 
  delegation':http://www.robertnyman.com/2008/05/04/event-delegation-with-javascript/

  In your code, you could simply use $('table caption a').unbind
  ('click') if there are no other event listeners you want to preserve.

  cheers,
  - ricardo

  On Mar 19, 9:33 am, bart b...@ivwd.nl wrote:

   I've followed Karl Swedberg's article on rebinding events at
   learningjquery.com. The theory behind this technique is clear to me
   and I've got a working example.

   function addItemFinal()
   {
           var $href = $('table caption a').attr('href');
           var $rawmaandjaar = $href.split('');
           var $maand = $rawmaandjaar[0].split('=');
           var $jaar = $rawmaandjaar[1].split('=');

           $.get('includes/inc/ajax/fetchtable.php', { maand: $maand[1], 
   jaar:
   $jaar[1] }, function(data)
           {
                   $('div#agendawrapper').html(data);
                   $('table caption a').unbind('click', 
   addItemFinal).bind('click',
   addItemFinal);
           });
           return false;

   }

   $('table caption a').bind('click', addItemFinal);

   The code in the function is pretty simple, it takes the href attribute
   and extracts some variables from it. With the variables it makes a GET
   request and in the callback it rebinds again.

   However is there more than one anchor in the caption and with the
   current code it just takes table caption a whereas this should be
   the actual link you clicked. I guess I should pass something to the
   function but it's used as a reference so I'm not sure how to achieve
   this...

   Someone who can help out?


[jQuery] Re: Trying to animate the .before()/.after() dom action

2009-03-19 Thread ricardobeat

All I see is a brief flash at the end of the animation, not very
noticeable, both in IE and FF. I suppose there isn't a way to avoid
that as you are removing/appending the elements. Maybe fixing the
$targetNode position with position:absolute before the after/before
call, that should avoid some of the flickering.

On Mar 19, 9:28 am, ragsyboy james.wr...@gmail.com wrote:
 Hi,

 I'm trying to add animation to the .before()/.after() action on some
 dom nodes and getting visual glitches which get seriously worse on
 html 'heavy' pages.

 I've put together a quick n' dirty example here:http://jsbin.com/ahupa/edit
 If you click the down button in the first div you'll see them swap
 round with animation, then the change is reflected in the DOM.

 i'm getting the offsets of the clicked div and it's adjacent div,
 animating the difference so they slide past each other, then it
 removes the leftover styles applied by the animation, then fires
 the .before() or .after() depending on the required direction.
 But no matter what order i do this (remove styles before/after dom
 change) I always see for a split second the dom nodes swapped round
 but with the style remnants from the animation still there - meaning
 their all over the place for a second. This gets worse the heavier the
 page is.

 This is kinda hard to explain but hopefully your browser/machine is
 slow enough to show the problem in the example :S

 Any ideas? am i tackling this the wrong way?

 Thanks in advance,

 James


[jQuery] Re: Newbie: Convert onload scripts to plugin

2009-03-19 Thread simusch

anyone an idea?

thank you!

simon


[jQuery] Re: IE Selection Hiding

2009-03-19 Thread MorningZ

It's not an issue with jQuery but with IE itself

If you want it to work cross browser, you're going to have to remove
the item


On Mar 19, 11:46 am, Adam Paeth rvbtuc...@gmail.com wrote:
 Just curious if the problem of hiding an IE selection option has been
 fixed or if anyone has a workaround other then keeping a hidden list
 of options that aren't selected.

 Thanks,
 Adam Paeth

 $(#option1).hide();  //works in FF, not in IE


[jQuery] Re: Best way to select dom element ? (find or children ?)

2009-03-19 Thread ricardobeat

This is a bit more efficient:

$('.test1').change(function(){
  var test1 = $(this).val();
  var test2 = $(this).closest('li').next('li').find('select.test2').val
();
  alert(Test1: +test1+and Test2: +test2);
});

Or to avoid repeating the traversal every time:

$('#idfortheUL li').each(function(){
  var $t1 = $(this).find('select.test1'),
   $t2 = $(this).find('select.test2');
  $t1.change(function(){
alert( test1: + $t1.val() + \ntest2: + $t2.val() );
  });
});

cheers,
- ricardo

On Mar 19, 11:04 am, Jsbeginner jsbegin...@monarobase.net wrote:
 Hello,

 I'm trying to get the value of an option in a select list contained in a
 different li item...

 Here is the html code :

 ul
 lipselect class=test1
 option value=1 selected=selectedOption 1/option
 option value=2Option 2/option
 /select/p/li
 lipselect class=test2
 option value=3Option 3/option
 option value=4  selected=selectedOption 4/option
 /select/p/li
 /ul

 ul
 lipselect class=test1
 option value=1 selected=selectedOption 1/option
 option value=2Option 2/option
 /select/p/li
 lipselect class=test2
 option value=3 selected=selectedOption 3/option
 option value=4 Option 4/option
 /select/p/li
 /ul

 I would like to be able to get the text of .test2 option:selected when I
 change the value of .test1 option selected ...

 Here is the JS code I've written .:

 $(.test1).change(function(){
 var test1 = $(option:selected, this).val();
 var test2 = $(this).closest(ul).find(li  p  .test2
 option:selected).val();
 alert(Test1 : +test1+ and Test2 :+test2);

 });

 Is this the best way? or is there a better way to achieve the same result ?

 Thankyou.


[jQuery] Re: findValue

2009-03-19 Thread ricardobeat

I guess the problem is this line:

var ac = $(#operator)[0].autocompleter.findValue();

$(..)[0] gives you the first HTML Element in the object. It's not a
jQuery object anymore, so the autocompleter property doesn't exist.

IDs should be unique so that is unneeded, try changing it to

var ac = $(#operator).autocompleter.findValue();

If you had a class or other selector that returns many elements, and
you just want the first one, you'd use

$(.operator:first).autocompleter.findValue();
or
$(.operator).eq(0).autocompleter.findValue();
or
$( $(.operator)[0] ).autocompleter.findValue();
//notice the re-wrapping. this is useful if you already have the $
('.operator') object saved in a variable

cheers,
- ricardo



On Mar 19, 12:37 pm, brightdad...@googlemail.com
brightdad...@googlemail.com wrote:
 Thanks for the suggestion Lauri.

 I have tried as asuggested and still dont see anything happening.


[jQuery] Re: jquery.dates

2009-03-19 Thread RyanEv

I still get the same error on the datePicker line.


$(document).ready( function ()
{
  setTimeout(function(){
  $(#sample1).datePicker();
   }, 50);
   });


Is the DatePicker function included in the jquery 1.3 file?



On Mar 19, 12:41 pm, Jack Killpatrick j...@ihwy.com wrote:
 IIRC I had a similar issue with datePicker in IE and doing something
 like this resolved it:

 $(document).ready(function(){
     setTimeout(function(){
        $('#sample1').datePicker();
     }, 50);

 });

 worth a quick try, at least. I've also had to use a setTimeout like that
 for IE when there was Flash on the page.

 - Jack



 RyanEv wrote:
  All,
  I'm having an issue with the jquery.dates plug-in (http://
  grover.open2space.com/jquery.dates/home).  What is strange is that the
  error only happens in IE and not in FF.  Everything plays nice in FF.
  The error I am getting in IE is the the object does not support this
  property or method on line 29.

  27:  script type=text/javascript
  28:    $(document).ready( function () {
  29:      $(#sample1).datePicker();
  30:      $(#sample2).datePicker({format: .mm.dd});
  31:      $(#anchorSample3).datePicker({parent: $(#sample3)[0]});

  Not sure why the datePicker() function would work in FF but not IE.
  Do you guys think it has somethign to do with $(document).ready
  ( function () { on line 28?   Is there an issue with jquery, IE and
  this function?  I am using jquery 1.3.

  Ryan- Hide quoted text -

 - Show quoted text -


[jQuery] Re: findValue

2009-03-19 Thread Eric Garside

Also, pretty sure you just did it for development purposes, but you
probably shouldn't use an alert in an autocomplete context. :P

On Mar 19, 3:32 pm, ricardobeat ricardob...@gmail.com wrote:
 I guess the problem is this line:

 var ac = $(#operator)[0].autocompleter.findValue();

 $(..)[0] gives you the first HTML Element in the object. It's not a
 jQuery object anymore, so the autocompleter property doesn't exist.

 IDs should be unique so that is unneeded, try changing it to

 var ac = $(#operator).autocompleter.findValue();

 If you had a class or other selector that returns many elements, and
 you just want the first one, you'd use

 $(.operator:first).autocompleter.findValue();
 or
 $(.operator).eq(0).autocompleter.findValue();
 or
 $( $(.operator)[0] ).autocompleter.findValue();
 //notice the re-wrapping. this is useful if you already have the $
 ('.operator') object saved in a variable

 cheers,
 - ricardo

 On Mar 19, 12:37 pm, brightdad...@googlemail.com

 brightdad...@googlemail.com wrote:
  Thanks for the suggestion Lauri.

  I have tried as asuggested and still dont see anything happening.


[jQuery] compare jQuery objects

2009-03-19 Thread bob

How is it that I get false for the following?
Shouldn't I get true as a result? if not, why?

div id=home/div


$(document).ready(function(){


var one = $('#home');

console.log('compararison: ' +  (one == $('#home')) );  // false !!!


});

How do I compare jQuery objects?


[jQuery] Stuttering background with accordion in Firefox

2009-03-19 Thread Jason Broyles

Trying my luck over here because I am not getting any love in the
jquery ui mailing list.

I am getting a strange behavior with Firefox using the accordion. This
works fine in all other browsers including Internet Explorer. First,
let me describe my setup.

Firefox 3 (Tested in OS X and Windows, same behavior)
jQuery 1.3.
jQuery UI 1.7

Relevant screenshots:
Normal- http://www.jasonism.org/media/normal.png
Broken- http://www.jasonism.org/media/broken.png

Corresponding code:
$(function() {
$(#accordion).accordion({
autoHeight: false,
alwaysOpen: false,
collapsable: true,
header: 'h3',
active: false
});
});

If you take a look at the above screenshots you will notice a tree.
This tree is a background image. Whenever I click on one of the
accordion tabs, it in turns drops down everything underneath of it to
make room for the content as it should. But the problem I am seeing is
with the tree creating a stuttering effect. I know this may not be
something I can personally fix and may just be a bug. But I thought I
would start here. Thanks for any help you may be able to provide.

I still have not been able to fix this. I tried a different solution
where I made the tree an absolute image and put a z-index the middle
container. This solved the problem for most browser but on
the 2 pages I am using the accordion UI. In internet explorer the
images z-index gets messed up and it does not show up at all. I would
really love for the first solution to work. It is strange that this
only happens in Firefox.


[jQuery] 1.3.2 class selectors only returning first element

2009-03-19 Thread rockrep

I tried upgrading from 1.2.6 to 1.3.2 today and ran into all kinds of
issues with selectors.   I can't reproduce this with a simple page
yet.  (Only with our complex production app of course.)

Essentially, a page with three input type=text elements with
class=some_class  only returns the first element when I issue $
(.some_class).

My best attempt to debug this in Firebug took me to the method
makeArray(array, results)

jquery-1.3.2.js#2058
code
var makeArray = function(array, results) {
array = Array.prototype.slice.call( array );
if ( results ) {
results.push.apply( results, array );
return results;
}
return array;
};
/code

The values passed in are:
array: [input#user_name.some_class Name, input#user_email.some_class
Email, input#user_phone.some_class Phone]
results: [ length=0 prevObject=[1] context=document]

array[0].className = some_class
array[1].className = some_class
array[2].className = input_numeric some_class

And the return is:
[input#potential_investor_name.std_text_hint_input Name length=1
prevObject=[1] context=document]

results.length = 1
results[0] = input#user_name.some_class Name

This has me completely stumped.  Any help appreciated.


[jQuery] 1.3.2 class selectors only returning first element

2009-03-19 Thread rockrep

I tried upgrading from 1.2.6 to 1.3.2 today and ran into all kinds of
issues with selectors.   I can't reproduce this with a simple page
yet.  (Only with our complex production app of course.)

Essentially, a page with three input type=text elements with
class=some_class  only returns the first element when I issue $
(.some_class).

My best attempt to debug this in Firebug took me to the method
makeArray(array, results)

jquery-1.3.2.js#2058
code
var makeArray = function(array, results) {
array = Array.prototype.slice.call( array );
if ( results ) {
results.push.apply( results, array );
return results;
}
return array;
};

/code

The values passed in are:
array: [input#user_name.some_class Name, input#user_email.some_class
Email, input#user_phone.input_numeric Phone]
results: [ length=0 prevObject=[1] context=document]

array[0].className = some_class
array[1].className = some_class
array[2].className = input_numeric some_class

And the return is:
[input#user_name.some_class Name length=1
prevObject=[1] context=document]

results.length = 1
results[0] = input#user_name.some_class Name

This has me completely stumped.  Any help appreciated.


[jQuery] Re: compare jQuery objects

2009-03-19 Thread mkmanning

Two objects are equal if they refer to the exact same Object.

On Mar 19, 1:48 pm, bob xoxeo...@gmail.com wrote:
 How is it that I get false for the following?
 Shouldn't I get true as a result? if not, why?

 div id=home/div

 $(document).ready(function(){

         var one = $('#home');

         console.log('compararison: ' +  (one == $('#home')) );  // false !!!

 });

 How do I compare jQuery objects?


[jQuery] Re: compare jQuery objects

2009-03-19 Thread bob

Well, that did not help much
So what is the problem then?  Why do I get false?
How do I get true value?


[jQuery] Re: 1.3.2 class selectors only returning first element

2009-03-19 Thread rockrep

Some more debugging has shown this is being caused by an older jquery
validation plugin, and this post confirms that
http://blog.jquery.com/2009/02/20/jquery-132-released/.


  1   2   >