[jQuery] Re: Link Clicks Double Firing

2010-01-14 Thread bill
hi pedalpete, your solution does work perfectly fine, sorry for not
making that clear. but if we look beyond the initial implementation we
begin to see a problem: this solution requires two separate pieces of
code to be maintained to handle certain modifications.

for instance, if the link needs to be changed so that it opens in a
separate window, both the a tag and the jq code need to be modified;
and keep in mind these two pieces of code may reside in two different
files. many developers will find the first instance (either the a or
the jquery), change it, and move it back to production and think the
problem was completely resolved, then not understand why sometimes
users are going to the right page and sometimes they are still going
to the old one.

so your proposed solution does resolve the issue originally raised,
however, there are long term issues with it and i would like to see if
there is a better solution that does not introduce the maintenance
problem stated above.

i appreciate your feedback and hope that i've made my point, however
inelegant, a little clearer!



On Jan 13, 6:38 pm, pedalpete p...@hearwhere.com wrote:
 Hi Bill,

 I'm still learning lots, and was hoping you could better explain what
 was wrong with my solution (as it seems the other solutions are FAR
 more complicated.

 What I was trying to acheive was to just disable the link for
 javascript enabled browser, and keep it enabled for those without
 javascript.

 As the link is inside the cell, and the javascript action is triggered
 on any click within the cell, I believe my recommendation should work
 well in all instances.

 I believe with .unbind('click'), the click on a link will not be
 interpreted at all, and that the JS will always take the action.

 I may be misunderstanding what is happening under the covers, but what
 I recommend does not unbind after a click, it would unbind the clicks
 at load time if I've got it right.


[jQuery] Re: Link Clicks Double Firing

2010-01-14 Thread bill
this really an interesting jq/html semantic issue: if the a tag is
not handling the actual redirection to another page, maybe we
shouldn't be using the a tag at all. maybe the href should really
just be stored in the jq routine. this clears up maintenance issues
and passes the gut check.



[jQuery] Re: Link Clicks Double Firing

2010-01-14 Thread bill
doh! matt you hit the web accessibility nail right on the head! thanks
for reminding me.

maybe i should pay penance by turning off my javascript for a day!
then again, corporate policy dictates that i have IE6 loaded on my pc,
hopefully that buys me some web accessibility karma.



[jQuery] Re: tabs in one line, on small resolution

2010-01-13 Thread bill
just set the width of the containing div, not the min-width, as that
is all that is required
to prevent the collapsing and is supported by almost every browser
available, including
good ole IE6.

@Greg
to stop supporting IE6 means stop supporting the people who use IE6.
many
businesses rightly feel an obligation to support their customers,
regardless of
their financial state and/or technical acumen.

it would make my life easier to disregard all but the most compliant
browsers,
but, sadly, making my life easier is not what my job is about.  : )


On Jan 13, 8:50 am, Greg Tarnoff greg.tarn...@gmail.com wrote:
 Another option is using the CSS min-width to set a minimum width in
 case they make the window smaller, this will prevent the block from
 wrapping.. this will mean two things:
    1) Side scrolling in 800x600, but let's be real you shouldn't have
 to support that these days anyway.
    2) Min-width doesn't work in IE6,7 and I don't think 8. But
 again...we, as a community need to stop supporting IE6.

 Gregory Tarnoff

 www.tarnoff.infohttp://www.twitter.com/gregtarnoffhttp://www.flickr.com/photos/urothane


[jQuery] Re: Converting a javascript to jQuery

2010-01-13 Thread bill
modestmj, can you provide some background as to why you want to
convert working javascript to jquery? your reasons may (or may not be)
relevant to a solution. either way, i am curious. thank you.


[jQuery] treeview

2010-01-13 Thread Bill Oberacker
I am using the treeview plugin (with the famfamfam theme) as a
navigation tool, does anyone know how to stop a node which is a link,
that also has child nodes from collapsing/expanding when the actual
link is clicked? Basically, I want the tree to only collapse/expand
when the plus/minus (hitarea) images are pressed?

Thanks.


[jQuery] Re: Link Clicks Double Firing

2010-01-13 Thread bill
change window.open to window.location

both the anchor tag and the javascript are interpreting the click, and
the problem is that your anchor tag is opening the link in the same
window, whereas your js was opening the link in a new window.

actually, pedalpete's solution is more correct (as there is now only
one item interpreting the click), and should be followed.


[jQuery] Re: Link Clicks Double Firing

2010-01-13 Thread bill
ack, i just realized i misread pedalpete's solution; each click will
only get interpreted once, but depending on where the click happens
determines whether or not the a tag or the js will handle it. this
smacks of wrongness. let's examine other ways to handle this:

1. expand the size of the a to completely fill the td, which is
not a good solution if this requires placing a block element in an
inline element
2. leave out the a tag completely, putting your link in the title of
an existing element, which is semantically poor and may negatively
impact accessibility
3. just hide the a tag, so it cannot be clicked on, which just
doesnt seem palpable. h.
4. remove the a tag from the dom once the link is extracted, which
seems a bit like the unnecessary kidney operation i had has a youth
5. remove the 'href' from the a tag once the link is extracted, not
as invasive as #4 but still questionable

i'd vote for #3 but don't really like any of these approaches. can
anyone come up with a correct solution that will allow us all to
sleep better at night???



[jQuery] Re: Altering cloned HTML's ID values

2010-01-12 Thread bill

jQuery(this).attr(id,newId);



On Jan 12, 10:15 am, Sloan Thrasher sl...@sloanthrasher.com wrote:
 Hi,

 I've got a table where I'm adding rows using clone and appendTo. After 
 cloning, I need to change the ID of elements in the cloned HTML.

 How can I do that?

 Sloan


[jQuery] Re: show/hide

2010-01-12 Thread bill
without the corresponding html, it is hard to tell if this answer is
completely correct. however, think about trying this approach, where
these few lines replace ALL of your code:

$(function() {
$('div').click(function() {
$('div').hide(slow); // first, for simplification 
hide any
open divs (change specificity for your needs)
$(this).show(slow);   // second, open the selected div
});
});

On Jan 12, 8:17 am, tabu ces...@googlemail.com wrote:
 Hello,
 I'm new to javascript and jquery library, I have script running which
 functions fine only problem I have with it is that I want to close
 other divs when another is selected, I guess like an accordion style
 but using the toggle, slide fade-in functions. The problem I have is
 that once each button that controls the relevant div is clicked once,
 on subsequent clicks it requires double clicking to show the
 containing div, where i want a single.
 I imagine it is a very simple solution but I have tried a number of
 ways without success, any help would be great, thanks

 Here is the script Im using:

    $(document).ready(function() {
  $('div.me').hide();
  $('div.who').toggle(function() {
  $(this).siblings('div.me').fadeIn(900);
  $('div.view').hide();
   $('div.callme').hide();
    $('div.imagesview').hide();
  }, function() {
  $(this).siblings('div.me').fadeOut(500);
  return false;

  });

  });

  $(document).ready(function() {

  $('div.view').hide();
  $('div.slide').toggle(function() {
  $(this).siblings('div.view').fadeIn(900);
    $('div.me').hide();
      $('div.callme').hide();
    $('div.imagesview').hide();
  }, function() {
  $(this).siblings('div.view').fadeOut(500);
  return false;

  });
  });

   $(document).ready(function() {
  $('div.showwork').hide();
  $('div.work').toggle(function() {
  $(this).siblings('div.showwork').fadeIn(900);
  }, function() {
  $(this).siblings('div.showwork').fadeOut(500);
  return false;

  });
  });

    $(document).ready(function() {
  $('div.callme').hide();
  $('div.call').toggle(function() {
  $(this).siblings('div.callme').fadeIn(900);
  $('div.view').hide();
    $('div.me').hide();
      $('div.imagesview').hide();
  }, function() {
  $(this).siblings('div.callme').fadeOut(500);
  return false;

  });
  });

     $(document).ready(function() {
  $('div.imagesview').hide();
  $('div.images').toggle(function() {
  $(this).siblings('div.imagesview').fadeIn(900);
  $('div.view').hide();
    $('div.me').hide();
     $('div.callme').hide();
  }, function() {
  $(this).siblings('div.imagesview').fadeOut(500);
  return false;

  });
  });


[jQuery] Re: show/hide

2010-01-12 Thread bill


the jquery:

script type=text/javascript
$(function() {
$('.sectionTitle').click(function() {
$('.sectionBody').hide(slow);
$(this).next(div).show(slow);
});
});

the clickable parts:

it is unclear what you want the visitors to click on to
hide/show your sections, so i created an h1 element and
gave it a class of .sectionBody for the task. you can
certainly use whatever you like.

the content:

i wrapped the content following the h1 class=sectionTitle
elements in 'div class=contentBody/div' so
that you could easily show/hide the content.

the cleanup:

remove all of your jquery code referencing your divs.

the working example:

below is your code with the new code added in:
(please note that i removed some of your flash code as it was
aborting in my environment. you will need to add it back in.)



!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titlestripy divs/title

style type=text/css
@importcss/stripy_simple.css;
/style

script type=text/javascript src=jquery-1.3.2.min.js/script

script type=text/javascript
$(function() {
$('.sectionTitle').click(function() {
$('.sectionBody').hide(slow);
$(this).next(div).show(slow);
});
});

/script


/head

body

div id=container

div id=subframe

div id=contentpane

div id=header
noscript
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=9,0,0,0 width=550 height=48 id=stripy_ident
align=middle
param name=allowScriptAccess value=sameDomain /
param name=allowFullScreen value=false /
param name=movie value=stripy_ident.swf /param
name=quality
value=high /param name=wmode value=transparent /param
name=bgcolor value=#ff /embed src=stripy_ident.swf
quality=high bgcolor=#ff width=550 height=48
name=stripy_ident align=middle allowScriptAccess=sameDomain
allowFullScreen=false type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object
/noscript
/div

!--div id=stripes
/div--

div id=sidebar
GRAPHIC DESIGN
/div

div id=workhide class=work
/div
-
who
h1 class='sectionTitle'WHO/h1
div class='sectionBody'
!--ABOUT--
div id=about class=whothere is something here now/div
/div


-
me
h1 class='sectionTitle'Me/h1
div style='display: none;' class='sectionBody'
div id=history class=me divs
h4 class=headingWINK/h4
pSTRIPY EYE is a one person design compendium, Im an individual
working on a freelance basis.
My experience spans roughly ten years working in a variety of
backgrounds from exhibition, print and web based media, to teaching at
FE level and recently working in flash and 3d rendering.
br /
The site contains a selection of my work, illustrating a broad range
of skills in communication media.
br /
br /
If you wish to talk or simply seek advice about a project please
contact me
br /

t...@stripyeye.com
br /br /

If you would like further information about me, my cv is available as
a download
/p
/div

!--PROCESS--
div id=processbutton class=slide
/div
/div

-
view
h1 class='sectionTitle'VIEW/h1
div style='display: none;' class='sectionBody'

div id=main class=view

h4 class=heading PROCESS/h4

div class=divfloats
bMind/bbr /
Our perceptions of something can be both enlightening and perplexing.
We can present something that will communicate different things to
different people. Unifying the perceptions of an idea is an important
process that requires thought and a guiding hand on how it is
received. It requires someone who can take the idea in hand and enrich
it, so that it resonates in the receivers mind.
/div

div class=divfloats
bEars/bbr /
Listening to what you have to say about your design needs is of utmost
importance.
My approach is about listening to your needs and aspirations for the
design and how best to launch it in the public domain. Without
listening there is no presenting.
/div

div class=divfloats
bMouth/bbr /
Discussion and partnership through the process is equally important.
It's essential to communicate and discuss each stage of the process
and maintain constant correspondence throughout the implementation,
ensuring the project grows in the right way for you.
/div

div class=divfloats
bEyes/bbr /
The work is there for all to see, so if we get the first three right
the eyes will have it.

Help me to help you present your idea to the world.
/div

/div

!--CONTACT--
div id=contact class=call
/div
/div
-

[jQuery] (tooltip) position near the page borders

2009-12-02 Thread Bill Pairaktaridis
Hi there! I was wondering if there's a way to change the behavior of
the tooltip when it reaches the borders of the page. I'd like it to
either get pushed in the other direction as it gets closer or just not
appear at all. Thanks a lot in advance.


[jQuery] dialog partial content not visible in IE7

2009-11-23 Thread Bill
I have a jQuery dialog where some of the content does not display
initially in IE7. When I mouse over the dialog, the content appears.
This problem does not seem to occur in IE8 or other browsers (FF,
Safari, Chrome).

He is a link to the (test) site. If you click on the login link in
IE7, three links at the bottom of the dialog will not appear.
https://exdev.ucx.ucr.edu/enroll/catalog/olr_catalog_main.php

I cannot find any reason this is occurring. Have tried several things
to make them appear (set focus, do a show on the containing div,
etc.), but nothing seems to work. Any help or ideas would be greatly
appreciated.

Bill


[jQuery] array of attributes

2009-11-20 Thread Bill
Hey y'all,

The jQuery attr() method returns only the attribute of a set's first
matched element. E.g., for the HTML snippet:

input type=text name=input-one value=some stuff/
input type=text name=input-two value=some other stuff/
input type=text name=input-three value=some other other stuff/

the jQuery expression

$(input).attr(name) will return only the string input-one.

What if, instead, I wanted to return all the attribute values in an
array? What's the syntax to produce this result?

Thanks in advance,

--Bill


[jQuery] Re: array of attributes

2009-11-20 Thread Bill
Ha. Found an answer:

http://groups.google.com/group/jquery-en/browse_thread/thread/b73ab7267d9e0357/cc4b528a4f079254?lnk=gstq=attr+array#cc4b528a4f079254

Has anyone used this?

$.fn.attrs = function(key, val){
if (val != undefined)
return this.attr(key, val);
return $.map(this, function(a){
return $(a).attr(key);
});
}

On Nov 20, 12:30 pm, Bill bllfr...@gmail.com wrote:
 Hey y'all,

 The jQuery attr() method returns only the attribute of a set's first
 matched element. E.g., for the HTML snippet:

 input type=text name=input-one value=some stuff/
 input type=text name=input-two value=some other stuff/
 input type=text name=input-three value=some other other stuff/

 the jQuery expression

 $(input).attr(name) will return only the string input-one.

 What if, instead, I wanted to return all the attribute values in an
 array? What's the syntax to produce this result?

 Thanks in advance,

 --Bill


[jQuery] Re: Frustrating Scope Question with getJSON

2009-09-19 Thread Bill H

I've tried that and still can't seem to get the data into any sort of
usable scope.


[jQuery] Re: slideUp(), slideDown() not working in IE 6, 7 on LI elements

2009-07-16 Thread Bill

Is the best way forward to just rewrite the HTML so that it uses DIV
elements instead of UL and LIs? There's got to be a better way...

On Jul 15, 2:38 pm, Bill bllfr...@gmail.com wrote:
 Leonardo, thanks very much for your reply.

 I've updated my code, so the third wrapper contains the following:

         div class=wrapper
                 h3Plain ol' UL,slideDown()/h3
                 ul id=menu-1-fix
                         lidivOne/div/li
                         lidivTwo/div/li
                         lidivThree/div/li
                         lidivFour/div/li
                         lidivFive/div/li
                 /ul
         /div

 And the jQuery code:

         /**
          * Fix...
          */
          $(#menu-1-fix li div).click(function(e) {
                 $(this).slideUp(2000, function() {
                         $(this).parent().hide(-1).remove();
                 });
          });

 But the problem persists inIE. Anyone know when the bug will be
 fixed? Could I get around the problem using the animate() command?

 Regards

 --Bill

 On Jul 15, 1:34 pm, Leonardo K leo...@gmail.com wrote:



   You can put a DIV inside a LI and animate the DIV

  li
       div content here /div
  /li

  On Wed, Jul 15, 2009 at 16:31, Bill bllfr...@gmail.com wrote:

   Alright, so this *is* a bug:

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

   Anyone have any advice on a workaround ?

   On Jul 15, 12:15 pm, Bill bllfr...@gmail.com wrote:
Hi all,

I posted a week ago about some odd behavior with slideUp() and
   slideDown() inIE6, 7, and 8 (the post is here:
  http://groups.google.com/group/jquery-en/browse_thread/thread/1b4cda0...
). After several hours of further investigation, it appears that
jQuery isn't properly animating LI elements.

I set up a simplified example here:

   http://69.59.182.148:4080/test/07152009/index.html

The first two examples on this page show slideUp() andslideDown() on
LI elements. In Firefox, Chrome, Opera, and Safari, clicking causes
slideUp() orslideDown() animations that behave as expected. InIE6
and 7, slideUp() andslideDown() behave very differently.

The second two examples basically translate the unordered lists and
list items into divs. slideUp() andslideDown() work as expected in
these examples, even inIE6 and 7.

Is this a flaw in the slideUp()/slideDown() commands?

Regards,

--Bill


[jQuery] slideUp(), slideDown() not working in IE 6, 7 on LI elements

2009-07-15 Thread Bill

Hi all,

I posted a week ago about some odd behavior with slideUp() and
slideDown() in IE 6, 7, and 8 (the post is here:
http://groups.google.com/group/jquery-en/browse_thread/thread/1b4cda051e732376/87cb9b7657b7a4a3
). After several hours of further investigation, it appears that
jQuery isn't properly animating LI elements.

I set up a simplified example here:

http://69.59.182.148:4080/test/07152009/index.html

The first two examples on this page show slideUp() and slideDown() on
LI elements. In Firefox, Chrome, Opera, and Safari, clicking causes
slideUp() or slideDown() animations that behave as expected. In IE 6
and 7, slideUp() and slideDown() behave very differently.

The second two examples basically translate the unordered lists and
list items into divs. slideUp() and slideDown() work as expected in
these examples, even in IE 6 and 7.

Is this a flaw in the slideUp()/slideDown() commands?

Regards,

--Bill


[jQuery] Re: slideUp(), slideDown() not working in IE 6, 7 on LI elements

2009-07-15 Thread Bill

Alright, so this *is* a bug:

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

Anyone have any advice on a workaround ?

On Jul 15, 12:15 pm, Bill bllfr...@gmail.com wrote:
 Hi all,

 I posted a week ago about some odd behavior with slideUp() and
 slideDown() in IE 6, 7, and 8 (the post is 
 here:http://groups.google.com/group/jquery-en/browse_thread/thread/1b4cda0...
 ). After several hours of further investigation, it appears that
 jQuery isn't properly animating LI elements.

 I set up a simplified example here:

 http://69.59.182.148:4080/test/07152009/index.html

 The first two examples on this page show slideUp() and slideDown() on
 LI elements. In Firefox, Chrome, Opera, and Safari, clicking causes
 slideUp() or slideDown() animations that behave as expected. In IE 6
 and 7, slideUp() and slideDown() behave very differently.

 The second two examples basically translate the unordered lists and
 list items into divs. slideUp() and slideDown() work as expected in
 these examples, even in IE 6 and 7.

 Is this a flaw in the slideUp()/slideDown() commands?

 Regards,

 --Bill


[jQuery] Re: slideUp(), slideDown() not working in IE 6, 7 on LI elements

2009-07-15 Thread Bill

Leonardo, thanks very much for your reply.

I've updated my code, so the third wrapper contains the following:

div class=wrapper
h3Plain ol' UL, slideDown()/h3
ul id=menu-1-fix
lidivOne/div/li
lidivTwo/div/li
lidivThree/div/li
lidivFour/div/li
lidivFive/div/li
/ul
/div

And the jQuery code:

/**
 * Fix...
 */
 $(#menu-1-fix li div).click(function(e) {
$(this).slideUp(2000, function() {
$(this).parent().hide(-1).remove();
});
 });

But the problem persists in IE. Anyone know when the bug will be
fixed? Could I get around the problem using the animate() command?

Regards

--Bill

On Jul 15, 1:34 pm, Leonardo K leo...@gmail.com wrote:
  You can put a DIV inside a LI and animate the DIV

 li
      div content here /div
 /li



 On Wed, Jul 15, 2009 at 16:31, Bill bllfr...@gmail.com wrote:

  Alright, so this *is* a bug:

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

  Anyone have any advice on a workaround ?

  On Jul 15, 12:15 pm, Bill bllfr...@gmail.com wrote:
   Hi all,

   I posted a week ago about some odd behavior with slideUp() and
   slideDown() in IE 6, 7, and 8 (the post is here:
 http://groups.google.com/group/jquery-en/browse_thread/thread/1b4cda0...
   ). After several hours of further investigation, it appears that
   jQuery isn't properly animating LI elements.

   I set up a simplified example here:

  http://69.59.182.148:4080/test/07152009/index.html

   The first two examples on this page show slideUp() and slideDown() on
   LI elements. In Firefox, Chrome, Opera, and Safari, clicking causes
   slideUp() or slideDown() animations that behave as expected. In IE 6
   and 7, slideUp() and slideDown() behave very differently.

   The second two examples basically translate the unordered lists and
   list items into divs. slideUp() and slideDown() work as expected in
   these examples, even in IE 6 and 7.

   Is this a flaw in the slideUp()/slideDown() commands?

   Regards,

   --Bill


[jQuery] Re: slideUp(), slideDown() choppy on IE 6, 7, 8

2009-07-13 Thread Bill

Thanks very much for your reply, Olaf.

I tried removing the 0.625em of padding from the top and bottom and it
doesn't help at all. See it in action here:

http://69.59.182.148:4080/test/07132009/html-scaffolding/advanced-search.html



On Jul 11, 1:15 pm, Olaf Bosch olaf.bo...@t-online.de wrote:
 Bill schrieb:

  I'm seeing some weird behavior with the slideUp() andslideDown()
  functions inIE6, 7, and 8.

 You have the padding top/bottom change in adv*_search.css line 328 ff.

 padding-top: 0.625em;
 padding-bottom: 0.625em;

 to:
 padding-top: 0;
 padding-bottom: 0;

 then better?

 --
 Viele Grüße, Olaf

 ---
 olaf.bo...@t-online.dehttp://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/
 ---


[jQuery] Re: slideUp(), slideDown() choppy on IE 6, 7, 8

2009-07-13 Thread Bill

Thanks again for looking at this.

The padding still exists in all browsers except IE 6, 7, and 8,
because those are the only ones exhibiting the issue. A conditional IE-
only stylesheet applies the following style:

.advanced-search #smart-filters li .added-criteria UL LI {
padding: 0;
}

(ie.css, line 193)

On Jul 13, 11:24 am, Olaf Bosch olaf.bo...@t-online.de wrote:
 Bill schrieb:

  Thanks very much for your reply, Olaf.

  I tried removing the 0.625em of padding from the top and bottom and
  it doesn't help at all. See it in action here:

 http://69.59.182.148:4080/test/07132009/html-scaffolding/advanced-sea...

 Hm, i see the padding is ON???

 Going Screens here? Then see attachment

 You must delete all paddings on TOP and BOTTOM on elements for
 slideUp(), slideDown() and in this elements.

 li.apply also

 --
 Viele Grüße, Olaf

 ---
 olaf.bo...@t-online.dehttp://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/
 ---

  screen_13.07.2009-20.16.40.png
 72KViewDownload


[jQuery] Re: slideUp(), slideDown() choppy on IE 6, 7, 8

2009-07-09 Thread Bill

Any ideas on this one? I've struggled with this for hours now.

On Jul 8, 8:43 am, Bill bllfr...@gmail.com wrote:
 OK, I gave it a try but the problem persists.

 The animation works perfectly on all other browsers and I'd really
 like to keep it because it provides important (maybe essential)
 feedback to the user. However, since (inexplicably) most of our
 clients use IE only, this animation problem is a deal breaker. Any
 other tips/tricks/magic spells out there?

 On Jul 8, 8:17 am, Bill bllfr...@gmail.com wrote:



  Thanks Leonardo, I'll try that now.

  On Jul 8, 5:52 am, Leonardo K leo...@gmail.com wrote:

   I'm trying to guess here. I believe the problem is the padding of the
   element you are sliding. Try to remove the padding from li and add to the
   div inside.

   I know jQuery animate padding as well but in the IE is not smooth enough.

   On Tue, Jul 7, 2009 at 19:52, Bill bllfr...@gmail.com wrote:

I'm seeing some weird behavior with the slideUp() and slideDown()
functions in IE 6, 7, and 8.

First, open the following URL in Firefox, Chrome, or Safari:

   http://69.59.182.148:4080/test/07072009/html-scaffolding/advanced-sea...

Click on one of the checkboxes under the first grouping with the
heading, Multi-Select Filter Name 1. A control appears at left. If
you continue clicking on and off checkboxes, you will continue to add/
subtract elements from the control appearing at left. Additionally you
can subtract elements from the control by clicking on the little x
icons. Whenever addition/subtraction occurs, jQuery first calls the
slideDown()/slideUp() function, and then deletes the actual HTML that
was just shown/hidden. This animation is very smooth in all browsers
that play according to the rules, but IE 6, 7, and 8 introduce some
unique detritus into the animation that makes it appear jumpy.

1. The solid blue border at left turns white during the animation
2. A small white gap at the bottom of each added li element appears
during the animation
3. The animation stops when it appears to be only half-way through,
meaning it doesn't change the height from 32px to 0px continuously.
Instead, it goes from 32 px to about 16px, and then straight to 0.
4. #3 seems to be worse when the x icon is clicked rather than
unchecking the checkbox.

I'm using jQuery v. 1.3.2. All my code is in the file
jquery.smartfilter.js.

I've read about issues like these in earlier versions of jQuery, but
applying fixes similar to the ones described in those articles bore no
fruit, which leads me to believe there's something wrong with my code.
Any insight into what's happening here would be greatly, greatly
appreciated.

Regards,

--Bill


[jQuery] Re: slideUp(), slideDown() choppy on IE 6, 7, 8

2009-07-09 Thread Bill

Is it possible that this is a bug in jQuery? From everything I've
read, this same problem existed in earlier versions of jQuery, those
less than 1.3. However, it persists in IE 6, 7, and 8, even using
jQuery 1.3.2.

I'll PayPal someone $20 if they can solve the issue and provide an
explanation detailing 1) the issue and 2) how to avoid it.

On Jul 9, 8:04 am, Bill bllfr...@gmail.com wrote:
 Any ideas on this one? I've struggled with this for hours now.

 On Jul 8, 8:43 am, Bill bllfr...@gmail.com wrote:



  OK, I gave it a try but the problem persists.

  The animation works perfectly on all other browsers and I'd really
  like to keep it because it provides important (maybe essential)
  feedback to the user. However, since (inexplicably) most of our
  clients use IE only, this animation problem is a deal breaker. Any
  other tips/tricks/magic spells out there?

  On Jul 8, 8:17 am, Bill bllfr...@gmail.com wrote:

   Thanks Leonardo, I'll try that now.

   On Jul 8, 5:52 am, Leonardo K leo...@gmail.com wrote:

I'm trying to guess here. I believe the problem is the padding of the
element you are sliding. Try to remove the padding from li and add to 
the
div inside.

I know jQuery animate padding as well but in the IE is not smooth 
enough.

On Tue, Jul 7, 2009 at 19:52, Bill bllfr...@gmail.com wrote:

 I'm seeing some weird behavior with the slideUp() and slideDown()
 functions in IE 6, 7, and 8.

 First, open the following URL in Firefox, Chrome, or Safari:

http://69.59.182.148:4080/test/07072009/html-scaffolding/advanced-sea...

 Click on one of the checkboxes under the first grouping with the
 heading, Multi-Select Filter Name 1. A control appears at left. If
 you continue clicking on and off checkboxes, you will continue to add/
 subtract elements from the control appearing at left. Additionally you
 can subtract elements from the control by clicking on the little x
 icons. Whenever addition/subtraction occurs, jQuery first calls the
 slideDown()/slideUp() function, and then deletes the actual HTML that
 was just shown/hidden. This animation is very smooth in all browsers
 that play according to the rules, but IE 6, 7, and 8 introduce some
 unique detritus into the animation that makes it appear jumpy.

 1. The solid blue border at left turns white during the animation
 2. A small white gap at the bottom of each added li element appears
 during the animation
 3. The animation stops when it appears to be only half-way through,
 meaning it doesn't change the height from 32px to 0px continuously.
 Instead, it goes from 32 px to about 16px, and then straight to 0.
 4. #3 seems to be worse when the x icon is clicked rather than
 unchecking the checkbox.

 I'm using jQuery v. 1.3.2. All my code is in the file
 jquery.smartfilter.js.

 I've read about issues like these in earlier versions of jQuery, but
 applying fixes similar to the ones described in those articles bore no
 fruit, which leads me to believe there's something wrong with my code.
 Any insight into what's happening here would be greatly, greatly
 appreciated.

 Regards,

 --Bill


[jQuery] Re: slideUp(), slideDown() choppy on IE 6, 7, 8

2009-07-08 Thread Bill

Thanks Leonardo, I'll try that now.

On Jul 8, 5:52 am, Leonardo K leo...@gmail.com wrote:
 I'm trying to guess here. I believe the problem is the padding of the
 element you are sliding. Try to remove the padding from li and add to the
 div inside.

 I know jQuery animate padding as well but in the IE is not smooth enough.



 On Tue, Jul 7, 2009 at 19:52, Bill bllfr...@gmail.com wrote:

  I'm seeing some weird behavior with the slideUp() and slideDown()
  functions in IE 6, 7, and 8.

  First, open the following URL in Firefox, Chrome, or Safari:

 http://69.59.182.148:4080/test/07072009/html-scaffolding/advanced-sea...

  Click on one of the checkboxes under the first grouping with the
  heading, Multi-Select Filter Name 1. A control appears at left. If
  you continue clicking on and off checkboxes, you will continue to add/
  subtract elements from the control appearing at left. Additionally you
  can subtract elements from the control by clicking on the little x
  icons. Whenever addition/subtraction occurs, jQuery first calls the
  slideDown()/slideUp() function, and then deletes the actual HTML that
  was just shown/hidden. This animation is very smooth in all browsers
  that play according to the rules, but IE 6, 7, and 8 introduce some
  unique detritus into the animation that makes it appear jumpy.

  1. The solid blue border at left turns white during the animation
  2. A small white gap at the bottom of each added li element appears
  during the animation
  3. The animation stops when it appears to be only half-way through,
  meaning it doesn't change the height from 32px to 0px continuously.
  Instead, it goes from 32 px to about 16px, and then straight to 0.
  4. #3 seems to be worse when the x icon is clicked rather than
  unchecking the checkbox.

  I'm using jQuery v. 1.3.2. All my code is in the file
  jquery.smartfilter.js.

  I've read about issues like these in earlier versions of jQuery, but
  applying fixes similar to the ones described in those articles bore no
  fruit, which leads me to believe there's something wrong with my code.
  Any insight into what's happening here would be greatly, greatly
  appreciated.

  Regards,

  --Bill


[jQuery] Re: slideUp(), slideDown() choppy on IE 6, 7, 8

2009-07-08 Thread Bill

OK, I gave it a try but the problem persists.

The animation works perfectly on all other browsers and I'd really
like to keep it because it provides important (maybe essential)
feedback to the user. However, since (inexplicably) most of our
clients use IE only, this animation problem is a deal breaker. Any
other tips/tricks/magic spells out there?

On Jul 8, 8:17 am, Bill bllfr...@gmail.com wrote:
 Thanks Leonardo, I'll try that now.

 On Jul 8, 5:52 am, Leonardo K leo...@gmail.com wrote:



  I'm trying to guess here. I believe the problem is the padding of the
  element you are sliding. Try to remove the padding from li and add to the
  div inside.

  I know jQuery animate padding as well but in the IE is not smooth enough.

  On Tue, Jul 7, 2009 at 19:52, Bill bllfr...@gmail.com wrote:

   I'm seeing some weird behavior with the slideUp() and slideDown()
   functions in IE 6, 7, and 8.

   First, open the following URL in Firefox, Chrome, or Safari:

  http://69.59.182.148:4080/test/07072009/html-scaffolding/advanced-sea...

   Click on one of the checkboxes under the first grouping with the
   heading, Multi-Select Filter Name 1. A control appears at left. If
   you continue clicking on and off checkboxes, you will continue to add/
   subtract elements from the control appearing at left. Additionally you
   can subtract elements from the control by clicking on the little x
   icons. Whenever addition/subtraction occurs, jQuery first calls the
   slideDown()/slideUp() function, and then deletes the actual HTML that
   was just shown/hidden. This animation is very smooth in all browsers
   that play according to the rules, but IE 6, 7, and 8 introduce some
   unique detritus into the animation that makes it appear jumpy.

   1. The solid blue border at left turns white during the animation
   2. A small white gap at the bottom of each added li element appears
   during the animation
   3. The animation stops when it appears to be only half-way through,
   meaning it doesn't change the height from 32px to 0px continuously.
   Instead, it goes from 32 px to about 16px, and then straight to 0.
   4. #3 seems to be worse when the x icon is clicked rather than
   unchecking the checkbox.

   I'm using jQuery v. 1.3.2. All my code is in the file
   jquery.smartfilter.js.

   I've read about issues like these in earlier versions of jQuery, but
   applying fixes similar to the ones described in those articles bore no
   fruit, which leads me to believe there's something wrong with my code.
   Any insight into what's happening here would be greatly, greatly
   appreciated.

   Regards,

   --Bill


[jQuery] slideUp(), slideDown() choppy on IE 6, 7, 8

2009-07-07 Thread Bill

I'm seeing some weird behavior with the slideUp() and slideDown()
functions in IE 6, 7, and 8.

First, open the following URL in Firefox, Chrome, or Safari:
http://69.59.182.148:4080/test/07072009/html-scaffolding/advanced-search.html

Click on one of the checkboxes under the first grouping with the
heading, Multi-Select Filter Name 1. A control appears at left. If
you continue clicking on and off checkboxes, you will continue to add/
subtract elements from the control appearing at left. Additionally you
can subtract elements from the control by clicking on the little x
icons. Whenever addition/subtraction occurs, jQuery first calls the
slideDown()/slideUp() function, and then deletes the actual HTML that
was just shown/hidden. This animation is very smooth in all browsers
that play according to the rules, but IE 6, 7, and 8 introduce some
unique detritus into the animation that makes it appear jumpy.

1. The solid blue border at left turns white during the animation
2. A small white gap at the bottom of each added li element appears
during the animation
3. The animation stops when it appears to be only half-way through,
meaning it doesn't change the height from 32px to 0px continuously.
Instead, it goes from 32 px to about 16px, and then straight to 0.
4. #3 seems to be worse when the x icon is clicked rather than
unchecking the checkbox.

I'm using jQuery v. 1.3.2. All my code is in the file
jquery.smartfilter.js.

I've read about issues like these in earlier versions of jQuery, but
applying fixes similar to the ones described in those articles bore no
fruit, which leads me to believe there's something wrong with my code.
Any insight into what's happening here would be greatly, greatly
appreciated.

Regards,

--Bill


[jQuery] Re: getJSON callback? does not work with querystring param

2009-07-06 Thread Bill Ramirez

If you pass a param to the json call, it gets passed into the
querystring:

$.getJSON(jsdata/customerhandler.ashx, { show: Math.random(),
departmentId: dptId}, customerLoaded);

would be rendered as:

jsdata/customerhandler.ashx?show=0.23231553departmentId=123

the second parameter to the getJson function is the query string
parameters.


[jQuery] jquery parsing problem

2009-06-23 Thread Bill

If I get the following response back from $.get(..., 'xml'), jQuery is
unable to recognize address as an attribute.

?xml version=1.0 encoding=UTF-8?\n
device address=http://192.168.1.100/

NOTE: The '\n' are actual line feeds not, the characters \ and n. I
just want to show them for emphasis since removing it in the above
scenario allows it to work.

If the line feed character is removed so that it is all on one line,
then it works fine. If device is split up like

?xml version=1.0 encoding=UTF-8?\n
device\n
  url address=http://192.168.1.100/\n
/device

then everything parses fine.


[jQuery] Re: Is it possible to add jquery effect on jquery created dom??

2009-06-15 Thread John Bill
i think that very easy to use json that get message from service.

2009/6/15 polygontseng polygon.ts...@gmail.com


 We want to make a ajax post to remote usr on an jquery created dom(an
 appended input). but it's not work.

 Thanks.



[jQuery] Re: switching two table rows

2009-06-14 Thread John Bill
good job!

2009/6/15 Paul Witschger tigerseyet...@gmail.com

 Thank you, Karl!!

 Works excellent. Exactly what I needed!




 Karl Swedberg wrote:

 Assuming that the Move Up link is within the table row and that the link
 has a class of moveup, you could do something like this:

 $('a.moveup').click(function() {
   var $thisRow = $(this).parents('tr:first');
   $thisRow.insertBefore( $thisRow.prev() );
   return false;
 });

 --Karl

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




  On Jun 14, 2009, at 6:36 PM, theprodigy wrote:


 I am creating an admin section for a site I'm building. One of the
 options is to change the sort order of a list of items. I have all the
 backend (PHP) code running properly, but having a little issue with
 the jQuery.

 When the user clicks the Move Up link, how can I switch the table row
 containing the link they clicked on, and the one above it (row 3
 becomes 2, and row 2 becomes 3)?

 Thanks





[jQuery] Re: Issue with Cycle Plugin

2009-06-14 Thread John Bill
great job!

2009/6/15 vintom v...@vintom.com


 I am not great with jquery (yet), but I have used a few plugins with
 me newest site. I am using the cycle plugin and it works great, but I
 am having one issue. When I load the page initially (http://vintom.com/
 gfc) it stacks the images on top of each other until the plugin kicks
 in (which is only about 2 seconds).

 Is there any way to get around this? I would like to just have the
 first image in the cycle show up, and not have it affect the rest of
 the site layout.

 Any help would be great:

 With problem:

 img src=http://vintom.com/jing/gfc-before.png; alt= /

 Without problem:

 img src=http://vintom.com/jing/gfc-after.png; alt= /



[jQuery] Re: Ajax Edit in Place

2009-06-14 Thread John Bill
I think if somebody edit one person , u can make the page can't click again
,and show a message :waiting...

2009/6/15 Jennifer Roberts jenmorrowrobe...@gmail.com


 Hi everyone!

 What I'd like to build is a page which displays a list of people.
 Next to each person is an edit button.  Clicking the edit button will
 replace the person's information with an edit form where the user can
 change information about the person.  The edit form has a save and
 cancel button.  There is also a button at the top of the list which
 will pop up a new person form.

 I'm designing an approach for tackling this problem:
 1)  I'm thinking of having two divs for each person, one for show, one
 for edit.  This way the edit button will just hide the show div and
 show the edit div.
 2)  Clicking the Save button will post the form info to the server in
 an AJAX call.  The server will return a string in the following
 format: [result];[html], where [result] is either a 1 or 0,
 depending on whether the edit was successful or not, and the [html] is
 either a replacement show and edit div or a string with the error
 message of the failure.
 3)  Clicking Cancel will hide the edit div and and show the show
 div.

 Here are my questions:
 1)  How can I remember the original values of the edit box if the user
 hits cancel.  I'd rather not hit the server again as this will cause
 lag.
 2)  If the user is editing one person and then hits edit on a
 different person, I'd like to cancel the original edit.  What is a
 good way to do this?
 3)  Are there any patterns or pre-built libraries to do this?

 Thanks!



[jQuery] Re: get email and send email?

2009-06-14 Thread John Bill
make up !

2009/6/15 inkexit createmod...@gmail.com


 Looking for a good tutorial on how to use jQuery to read email sent to
 my site's email address, and how to send email through my site's
 email.  Basically, how to construct the server email portion of
 Twitter.  Thanks all.


[jQuery] Re: anonymous function and code reusing

2009-06-13 Thread John Bill
it is very fun!  why?

2009/6/14 MorningZ morni...@gmail.com


 I thought it should have worked but it doesn't

 You cannot pass params like that in a click event

 instead of

 $(document).ready(function(){
  $(#moon).click(myFunction(param));
  $(#earth).click(myFunction(param2));

  function myFunction(param){
alert(param);
  }
 });


 use

 $(document).ready(function(){
$(#moon).click(function() { myFunction(param); });
$(#earth).click(function() { myFunction(param2); });
 });

 function myFunction(param){
alert(param);
 }


  On Jun 13, 12:07 pm, Mirko Galassi mirko.gala...@ymail.com wrote:
  Hi guys, apologize for posting again the same topic. I haven't found a
 solution yet for my simple problem. I have a simple function that works when
 a link is clicked $(document).ready(function(){ $(#moon).click(function(){
 alert(do something); }); }); I need to reuse that function passing a
 parameter so I modified the function like that $(document).ready(function(){
 $(#moon).click(myFunction(param));
 $(#earth).click(myFunction(param2)); function myFunction(param){
 alert(param); } }); I thought it should have worked but it doesn't. In fact,
 when the page has loaded even without clicking the first and second
 istructions are executed: $(#moon).click(myFunction(param));
 $(#earth).click(myFunction(param2)); whereas with the following case
 $(#moon).click(function(){ alert(do something); }); the function need to
 be activate by a click any idea? Thanks a lot c



[jQuery] Re: animate callback scope for infinite loop?

2009-06-11 Thread Bill

Just adding some comments to make this thread more complete...

One could also include all the callback code in an anonymous function
within the arguments to the animate() function.  Like this:

$(elementID).animate(
{opacity:(this.opa),
 marginTop:top+'px',
 marginLeft:left+'px'
},
1000,
'linear',
function(){ //callback
if(startStop == 1){
_this.floatAround(); //loop
}
}
);

That would create a closure.  But as you can see above, you would
still need to save the reference to the original context (_this) to
be able to call the floatAround() function.

This technique (and the technique of saving the reference to the
original context suggested by mkmanning) is outlined in the book
JQuery in Action by Bibeault and Katz on page 337.  Great book!



On Jun 8, 12:07 pm, Bill bill.fisher.oakl...@gmail.com wrote:
 I get it now.  It's simply the normal scope rules.  this.callback()
 inherits the variables of all the functions above itself in the scope
 chain, so var _this can be seen, but this._this cannot -- that would
 reference the invocation context of the callback, which is the HTML
 element object.

 thanks again!

 On Jun 8, 11:58 am, Bill bill.fisher.oakl...@gmail.com wrote:

  Hi everyone,

  Thanks for your replies!

  I was about to reply to mkmanning and say that his solution would not
  work, but I tried it and it does!  wow!  thanks!

  Is this because floatAround(), being declared within function Animation
  (), is a closure?  So the callback still has access to the local
  variables within Animation?

  thanks again,
  Bill

  On Jun 7, 11:13 pm, mkmanning michaell...@gmail.com wrote:

   The above post fails due to this:

   obj.animate({ opacity:myOpacity}, 500);
   animation();

   The animation() function will be called immediately each time. It
   should be in obj.animate's callback function. That being said, the OP
   was asking how to do this without resorting to setTimeout().

   To do that, in your Animation function just set a var to 'this':

    var Animation = function(elementID){
                   var _this = this;
                   this.opa = 1;
                   this.floatAround = function(){
                   ...

   then refer to it in your callback:

   if(startStop == 1){
         _this.floatAround(); //won't work, because this no longer
   points
   to the Animation object, but this is what I want to do.
                           }

   On Jun 7, 10:02 pm, waseem sabjee waseemsab...@gmail.com wrote:

var obj = $(div):
// i want my objects opacity to go to 1 to 0.6 then follow that pattern

var animeframe = 0;
var myOpacity;

function animation() {
setTimeout(function() {
if(animeframe == 0) {
myOpacity = 0.6;
animeframe = 1;} else if(animeframe  == 1) {

myOpacity = 1;
animeframe  = 0;}

obj.animate({ opacity:myOpacity}, 500);
animation();

}, 1000);
}

The Above  animation function has some code wrapped in a setTimeout
recalling the function after x seconds
I then access my variable to define to which frame the animation should 
be
on and what the properties are to set for that frame.
i then do the animation and recall the function
This will loop endlessly between frame one and two as the end can never 
me
achieved.

On Mon, Jun 8, 2009 at 3:11 AM, Bill bill.fisher.oakl...@gmail.com 
wrote:

 I think you may have misunderstood what I am trying to do.  I need to
 refer to the instance of the Animation object.  Within the callback,
 this already refers to the HTML Element.

 On Jun 7, 4:40 pm, Gustavo Salomé gustavon...@gmail.com wrote:
  try
  $this=$(elementID);

  2009/6/7 Bill bill.fisher.oakl...@gmail.com

   Hi,

   I'm trying to create an endless animation similar to a screen 
   saver,
   where an image floats around the screen, fading in and out.  I 
   would
   like to stay out of the global namespace, so I'd like to use the
   callback to animate() rather than getTimeout(), which seems to 
   operate
   only on functions in the global namespace.  Please correct me if 
   I'm
   wrong about that.

   But I'm having trouble maintaining the scope I want for the 
   callback
   -- I want this to refer to my Animation object, not the HTML
   element.  I understand many folks have solved this problem for 
   events
   by using bind() or live(), but I am wondering how to do this for
   animate().

   Here is my code:

   $(document).ready(function(){

          var startStop = 1;

          //object for creating animated elements that fade in or out
 while
   moving to a random point.
          var Animation = function(elementID){
                  this.opa = 1;
                  this.floatAround = function(){
                      var top = Math.random

[jQuery] Re: animate callback scope for infinite loop?

2009-06-08 Thread Bill

Hi everyone,

Thanks for your replies!

I was about to reply to mkmanning and say that his solution would not
work, but I tried it and it does!  wow!  thanks!

Is this because floatAround(), being declared within function Animation
(), is a closure?  So the callback still has access to the local
variables within Animation?

thanks again,
Bill

On Jun 7, 11:13 pm, mkmanning michaell...@gmail.com wrote:
 The above post fails due to this:

 obj.animate({ opacity:myOpacity}, 500);
 animation();

 The animation() function will be called immediately each time. It
 should be in obj.animate's callback function. That being said, the OP
 was asking how to do this without resorting to setTimeout().

 To do that, in your Animation function just set a var to 'this':

  var Animation = function(elementID){
                 var _this = this;
                 this.opa = 1;
                 this.floatAround = function(){
                 ...

 then refer to it in your callback:

 if(startStop == 1){
       _this.floatAround(); //won't work, because this no longer
 points
 to the Animation object, but this is what I want to do.
                         }

 On Jun 7, 10:02 pm, waseem sabjee waseemsab...@gmail.com wrote:

  var obj = $(div):
  // i want my objects opacity to go to 1 to 0.6 then follow that pattern

  var animeframe = 0;
  var myOpacity;

  function animation() {
  setTimeout(function() {
  if(animeframe == 0) {
  myOpacity = 0.6;
  animeframe = 1;} else if(animeframe  == 1) {

  myOpacity = 1;
  animeframe  = 0;}

  obj.animate({ opacity:myOpacity}, 500);
  animation();

  }, 1000);
  }

  The Above  animation function has some code wrapped in a setTimeout
  recalling the function after x seconds
  I then access my variable to define to which frame the animation should be
  on and what the properties are to set for that frame.
  i then do the animation and recall the function
  This will loop endlessly between frame one and two as the end can never me
  achieved.

  On Mon, Jun 8, 2009 at 3:11 AM, Bill bill.fisher.oakl...@gmail.com wrote:

   I think you may have misunderstood what I am trying to do.  I need to
   refer to the instance of the Animation object.  Within the callback,
   this already refers to the HTML Element.

   On Jun 7, 4:40 pm, Gustavo Salomé gustavon...@gmail.com wrote:
try
$this=$(elementID);

2009/6/7 Bill bill.fisher.oakl...@gmail.com

 Hi,

 I'm trying to create an endless animation similar to a screen saver,
 where an image floats around the screen, fading in and out.  I would
 like to stay out of the global namespace, so I'd like to use the
 callback to animate() rather than getTimeout(), which seems to operate
 only on functions in the global namespace.  Please correct me if I'm
 wrong about that.

 But I'm having trouble maintaining the scope I want for the callback
 -- I want this to refer to my Animation object, not the HTML
 element.  I understand many folks have solved this problem for events
 by using bind() or live(), but I am wondering how to do this for
 animate().

 Here is my code:

 $(document).ready(function(){

        var startStop = 1;

        //object for creating animated elements that fade in or out
   while
 moving to a random point.
        var Animation = function(elementID){
                this.opa = 1;
                this.floatAround = function(){
                    var top = Math.random() * $('#content').height();
                    var left = Math.random() * $('#content').width();
                        $(elementID).animate(
                                        {       opacity:(this.opa),
                                                marginTop:top+'px',
                                                marginLeft:left+'px'
                                        },
                                        1000,
                                        'linear',
                                        this.callback
                        );
                        this.opa = this.opa  0 ? 0 : 1;
                };
                this.callback = function(){
                        //alert(this); //HTML Image Element -- not what
   I
 want.
                        if(startStop == 1){
                                //this.floatAround(); //won't work,
   because
 this no longer points
 to the Animation object, but this is what I want to do.
                        }
                };
        };

        //user may click on the containing div to stop the animation.
        $('#content').toggle(
                function(){
                        startStop = 0;
                },
                function(){
                        startStop = 1;
                        //floater.floatAround(); //...and maybe start 
 it
 again

[jQuery] Re: animate callback scope for infinite loop?

2009-06-08 Thread Bill

I get it now.  It's simply the normal scope rules.  this.callback()
inherits the variables of all the functions above itself in the scope
chain, so var _this can be seen, but this._this cannot -- that would
reference the invocation context of the callback, which is the HTML
element object.

thanks again!

On Jun 8, 11:58 am, Bill bill.fisher.oakl...@gmail.com wrote:
 Hi everyone,

 Thanks for your replies!

 I was about to reply to mkmanning and say that his solution would not
 work, but I tried it and it does!  wow!  thanks!

 Is this because floatAround(), being declared within function Animation
 (), is a closure?  So the callback still has access to the local
 variables within Animation?

 thanks again,
 Bill

 On Jun 7, 11:13 pm, mkmanning michaell...@gmail.com wrote:

  The above post fails due to this:

  obj.animate({ opacity:myOpacity}, 500);
  animation();

  The animation() function will be called immediately each time. It
  should be in obj.animate's callback function. That being said, the OP
  was asking how to do this without resorting to setTimeout().

  To do that, in your Animation function just set a var to 'this':

   var Animation = function(elementID){
                  var _this = this;
                  this.opa = 1;
                  this.floatAround = function(){
                  ...

  then refer to it in your callback:

  if(startStop == 1){
        _this.floatAround(); //won't work, because this no longer
  points
  to the Animation object, but this is what I want to do.
                          }

  On Jun 7, 10:02 pm, waseem sabjee waseemsab...@gmail.com wrote:

   var obj = $(div):
   // i want my objects opacity to go to 1 to 0.6 then follow that pattern

   var animeframe = 0;
   var myOpacity;

   function animation() {
   setTimeout(function() {
   if(animeframe == 0) {
   myOpacity = 0.6;
   animeframe = 1;} else if(animeframe  == 1) {

   myOpacity = 1;
   animeframe  = 0;}

   obj.animate({ opacity:myOpacity}, 500);
   animation();

   }, 1000);
   }

   The Above  animation function has some code wrapped in a setTimeout
   recalling the function after x seconds
   I then access my variable to define to which frame the animation should be
   on and what the properties are to set for that frame.
   i then do the animation and recall the function
   This will loop endlessly between frame one and two as the end can never me
   achieved.

   On Mon, Jun 8, 2009 at 3:11 AM, Bill bill.fisher.oakl...@gmail.com 
   wrote:

I think you may have misunderstood what I am trying to do.  I need to
refer to the instance of the Animation object.  Within the callback,
this already refers to the HTML Element.

On Jun 7, 4:40 pm, Gustavo Salomé gustavon...@gmail.com wrote:
 try
 $this=$(elementID);

 2009/6/7 Bill bill.fisher.oakl...@gmail.com

  Hi,

  I'm trying to create an endless animation similar to a screen saver,
  where an image floats around the screen, fading in and out.  I would
  like to stay out of the global namespace, so I'd like to use the
  callback to animate() rather than getTimeout(), which seems to 
  operate
  only on functions in the global namespace.  Please correct me if I'm
  wrong about that.

  But I'm having trouble maintaining the scope I want for the callback
  -- I want this to refer to my Animation object, not the HTML
  element.  I understand many folks have solved this problem for 
  events
  by using bind() or live(), but I am wondering how to do this for
  animate().

  Here is my code:

  $(document).ready(function(){

         var startStop = 1;

         //object for creating animated elements that fade in or out
while
  moving to a random point.
         var Animation = function(elementID){
                 this.opa = 1;
                 this.floatAround = function(){
                     var top = Math.random() * $('#content').height();
                     var left = Math.random() * $('#content').width();
                         $(elementID).animate(
                                         {       opacity:(this.opa),
                                                 marginTop:top+'px',
                                                 marginLeft:left+'px'
                                         },
                                         1000,
                                         'linear',
                                         this.callback
                         );
                         this.opa = this.opa  0 ? 0 : 1;
                 };
                 this.callback = function(){
                         //alert(this); //HTML Image Element -- not 
  what
I
  want.
                         if(startStop == 1){
                                 //this.floatAround(); //won't work,
because
  this no longer points

[jQuery] click event firing twice in Firefox

2009-06-08 Thread Bill

Hi all,

I've got a really pesky issue. For some reason, Firefox (both version
2 and 3) is firing multiple click events on checkbox elements. This
isn't happening in IE, Chrome, or Safari. I'm using event delegation,
in the form of a plugin that looks like this:

(function($) {
$.fn.delegate = function(eventType, rules) {
var i = 0;
return this.bind(eventType, function(e) {
var target = $(e.target);
for (var selector in rules) {
if (target.is(selector)) {
$.debug(i++ + . selector:  + 
selector);
return rules[selector].apply(this, 
arguments)
}
}
})
};
})(jQuery);

The var i  = 0 and $.debug() method call lines are there to assist in
debugging.

The code delegates clicks within a certain element as follows:

$filter.children(.container, .hierarchy-container).delegate(click,
{
.filter-label input:checkbox: function(e) {
$.debug(click: .filter-label input:checkbox);
e.stopPropagation();
},
.close-filter-a, .child0 .close-filter-a: function(e) {
$.debug(click: .close-filter-a);
close($filter);
e.stopPropagation();
},
.result-count a:  function(e) {
$.debug(click: .result-count a);
e.stopPropagation();
},
li.more p a:  function(e) {
$.debug(click: li.more p a);
e.stopPropagation();
}
});

The delegate() method takes two parameters, 1) the name of the event
on which attach handlers, and 2) an object consisting of jQuery
selectors acting as keys to the functions that should handle wrapped
sets selected by 1). Everything works as expected, except for the
checkboxes selected by the pattern .filter-label input:checkbox. In
Firefox, these handlers are always executed twice.

To illustrate the issue, I've uploaded the code here:

http://69.59.182.148:4080/test/06082008/html-scaffolding/filters.html

Click on Multi-select Filter Name. Click on/off checkboxes, and
notice the output in the Firebug console. Notice that two handlers are
being invoked for every event. However, if you click on the more 
link in the lower right-hand corner, only one event is fired.

I've been struggling with this for days. Any help would be *greatly*
appreciated.

Kind regards

--Bill


[jQuery] animate callback scope for infinite loop?

2009-06-07 Thread Bill

Hi,

I'm trying to create an endless animation similar to a screen saver,
where an image floats around the screen, fading in and out.  I would
like to stay out of the global namespace, so I'd like to use the
callback to animate() rather than getTimeout(), which seems to operate
only on functions in the global namespace.  Please correct me if I'm
wrong about that.

But I'm having trouble maintaining the scope I want for the callback
-- I want this to refer to my Animation object, not the HTML
element.  I understand many folks have solved this problem for events
by using bind() or live(), but I am wondering how to do this for
animate().

Here is my code:

$(document).ready(function(){

var startStop = 1;

//object for creating animated elements that fade in or out while
moving to a random point.
var Animation = function(elementID){
this.opa = 1;
this.floatAround = function(){
var top = Math.random() * $('#content').height();
var left = Math.random() * $('#content').width();
$(elementID).animate(
{   opacity:(this.opa),
marginTop:top+'px',
marginLeft:left+'px'
},
1000,
'linear',
this.callback
);
this.opa = this.opa  0 ? 0 : 1;
};
this.callback = function(){
//alert(this); //HTML Image Element -- not what I want.
if(startStop == 1){
//this.floatAround(); //won't work, because 
this no longer points
to the Animation object, but this is what I want to do.
}
};
};

//user may click on the containing div to stop the animation.
$('#content').toggle(
function(){
startStop = 0;
},
function(){
startStop = 1;
//floater.floatAround(); //...and maybe start it again.
}
);

//start the animation
var floater = new Animation('#animate_me');
floater.floatAround();
});

thanks for any help in advance!


[jQuery] Re: animate callback scope for infinite loop?

2009-06-07 Thread Bill

I think you may have misunderstood what I am trying to do.  I need to
refer to the instance of the Animation object.  Within the callback,
this already refers to the HTML Element.


On Jun 7, 4:40 pm, Gustavo Salomé gustavon...@gmail.com wrote:
 try
 $this=$(elementID);

 2009/6/7 Bill bill.fisher.oakl...@gmail.com





  Hi,

  I'm trying to create an endless animation similar to a screen saver,
  where an image floats around the screen, fading in and out.  I would
  like to stay out of the global namespace, so I'd like to use the
  callback to animate() rather than getTimeout(), which seems to operate
  only on functions in the global namespace.  Please correct me if I'm
  wrong about that.

  But I'm having trouble maintaining the scope I want for the callback
  -- I want this to refer to my Animation object, not the HTML
  element.  I understand many folks have solved this problem for events
  by using bind() or live(), but I am wondering how to do this for
  animate().

  Here is my code:

  $(document).ready(function(){

         var startStop = 1;

         //object for creating animated elements that fade in or out while
  moving to a random point.
         var Animation = function(elementID){
                 this.opa = 1;
                 this.floatAround = function(){
                     var top = Math.random() * $('#content').height();
                     var left = Math.random() * $('#content').width();
                         $(elementID).animate(
                                         {       opacity:(this.opa),
                                                 marginTop:top+'px',
                                                 marginLeft:left+'px'
                                         },
                                         1000,
                                         'linear',
                                         this.callback
                         );
                         this.opa = this.opa  0 ? 0 : 1;
                 };
                 this.callback = function(){
                         //alert(this); //HTML Image Element -- not what I
  want.
                         if(startStop == 1){
                                 //this.floatAround(); //won't work, because
  this no longer points
  to the Animation object, but this is what I want to do.
                         }
                 };
         };

         //user may click on the containing div to stop the animation.
         $('#content').toggle(
                 function(){
                         startStop = 0;
                 },
                 function(){
                         startStop = 1;
                         //floater.floatAround(); //...and maybe start it
  again.
                 }
         );

         //start the animation
         var floater = new Animation('#animate_me');
         floater.floatAround();
  });

  thanks for any help in advance!

 --
 Gustavo Salome Silva


[jQuery] cancelling default click handler for label/

2009-03-08 Thread Bill

I have markup that looks like this:

div id=phrase:witness%2Bwhereof class=as-s-comp
label class=checkbox title=witness whereof
input type=checkbox value=witness whereof/
witness whereof
/label
a class=cl href=#(4104)/a
/div

When I click anywhere within the label, the checkbox toggles from its
previous state. I'd like to cancel this behavior, so that clicking
within the label has no effect on the checkbox. How would I use jQuery
to accomplish this?

Thanks in advance for any help with this.

--Bill


[jQuery] Re: cancelling default click handler for label/

2009-03-08 Thread Bill

Actually, no. Thanks for the simplification!

On Mar 8, 6:12 pm, MorningZ morni...@gmail.com wrote:
 is there any reason why you couldn't use a span instead of a
 label ?

 On Mar 8, 8:57 pm, Bill bllfr...@gmail.com wrote:

  I have markup that looks like this:

  div id=phrase:witness%2Bwhereof class=as-s-comp
      label class=checkbox title=witness whereof
          input type=checkbox value=witness whereof/
          witness whereof
      /label
      a class=cl href=#(4104)/a
  /div

  When I click anywhere within the label, the checkbox toggles from its
  previous state. I'd like to cancel this behavior, so that clicking
  within the label has no effect on the checkbox. How would I use jQuery
  to accomplish this?

  Thanks in advance for any help with this.

  --Bill


[jQuery] Extension/modification/overriding jQuery plugins

2009-01-22 Thread Bill

Hi all,

I'm developing functionality for an application using jQuery plugins.
Our organization has a compelling need to allow for these plugins to
be extended without touching the original code. I.e., let's say I have
a plugin that looks like this:

$.fn.somePlugin = function(callerSettings) {
// statement #1
$(this).click(function(e) {
doStuff();
});

// statement #2
$(this).hover(function(e) {
doSomeMoreStuff();
}, function(e) {
doStillMoreStuff();
});
}

I'd like to allow users of this plugin to 1) add functionality and 2)
change existing functionality without rewriting the entire plugin. Is
it possible for users to modify the plugin without modifying the
original code, so that the plugin becomes, in effect (note that only
statement #1 and #3 have changed, #2 is untouched):

$.fn.somePlugin = function(callerSettings) {
// statement #1
$(this).click(function(e) {
doStuff();
doCustomStuff();
doSomeMoreCustomStuff();
});

// statement #2
$(this).hover(function(e) {
doSomeMoreStuff();
}, function(e) {
doStillMoreStuff();
});

// statement #3
$(this).focus(function(e) {
doStillMoreCustomStuff();
});
}

I would have a souce file called jquery.somePlugin.js and then maybe
another one called jquery.somePluginOverride.js that would contain the
extensions to the original.

Thanks in advance for your help.

--Bill


[jQuery] Trouble with extending Object prototype

2008-12-11 Thread Bill

Hi all,

I extended the Object object with a method called getKeys() that works
like Perl's keys() function -- given a hash, or associative array, the
method returns an array containing all keys:

Object.prototype.getKeys = function() {
var arr = new Array();
for (var s in this) {
if (this.hasOwnProperty(s)) arr.push(s);
}
return arr;
}

However, when I include this function definition anywhere in a page,
jQuery reports the following error:

name.replace is not a function
name = name.replace(/-([a-z])/ig, function(all, letter)
{jquery-1.2.6.js (line 1115)

Any idea why this might be happening?

Thank you kindly,

--Bill


[jQuery] Re: Trouble with extending Object prototype

2008-12-11 Thread Bill

If you know of another way of accomplishing this using jQuery, please
let me know!

On Dec 11, 11:12 am, Bill bllfr...@gmail.com wrote:
 Hi all,

 I extended the Object object with a method called getKeys() that works
 like Perl's keys() function -- given a hash, or associative array, the
 method returns an array containing all keys:

 Object.prototype.getKeys = function() {
         var arr = new Array();
         for (var s in this) {
                 if (this.hasOwnProperty(s)) arr.push(s);
         }
         return arr;

 }

 However, when I include this function definition anywhere in a page,
 jQuery reports the following error:

 name.replace is not a function
 name = name.replace(/-([a-z])/ig, function(all, letter)
 {            jquery-1.2.6.js (line 1115)

 Any idea why this might be happening?

 Thank you kindly,

 --Bill


[jQuery] Re: Trouble with extending Object prototype

2008-12-11 Thread Bill

Thanks Eric, that's definitely a more jQuery-centric approach.

But the Javascript error persists.

On Dec 11, 11:24 am, Eric Garside gars...@gmail.com wrote:
 Try:

 Object.prototype.getKeys = function(){
     var arr = [];
     $.each(this, function(k){ arr.push(k) });
     return arr;



 }
 On Thu, Dec 11, 2008 at 2:17 PM, Bill bllfr...@gmail.com wrote:

  If you know of another way of accomplishing this using jQuery, please
  let me know!

  On Dec 11, 11:12 am, Bill bllfr...@gmail.com wrote:
   Hi all,

   I extended the Object object with a method called getKeys() that works
   like Perl's keys() function -- given a hash, or associative array, the
   method returns an array containing all keys:

   Object.prototype.getKeys = function() {
           var arr = new Array();
           for (var s in this) {
                   if (this.hasOwnProperty(s)) arr.push(s);
           }
           return arr;

   }

   However, when I include this function definition anywhere in a page,
   jQuery reports the following error:

   name.replace is not a function
   name = name.replace(/-([a-z])/ig, function(all, letter)
   {            jquery-1.2.6.js (line 1115)

   Any idea why this might be happening?

   Thank you kindly,

   --Bill

 --
 Eric Garside
 Front End Developer
 LabPrints


[jQuery] Re: quote standards

2008-11-28 Thread Bill

I've wondered about this myself. I seem to go back and forth between
the two without any rhyme or reason. Looking forward to more responses
on this thread.

On Nov 28, 1:51 pm, Andy Matthews [EMAIL PROTECTED] wrote:
 Yes. I am. Plus single quoting is slightly faster due to it's lower case
 nature. No need to hold down the shift key.

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

 Behalf Of seasoup
 Sent: Friday, November 28, 2008 2:47 PM
 To: jQuery (English)
 Subject: [jQuery] quote standards

 I've started using a single quote inside of all $() when quotes are needed
 because it makes creating DOM elements much simpler. $('a
 href=/path/a') or $('div id=anId/div and for consistency
 doing $('#anId').   Anyone else doing the same thing?

 Josh Powell


[jQuery] Question about $.data()

2008-11-14 Thread Bill

Hi all,

Quick question about the $.data() function... Is there a way to see
everything that's currently stored in one of these data objects? Since
the function (and its compliment, $.data.removeData()) allow for
setting/retrieving/deleting key/value pairs, it seems natural that one
would want to do something like this:

for (var x in $jQueryObject.data) {
do something with x;
}

Is it possible to iterate through the data cache? If not, why not?

Thanks in advance and regards,

--Bill


[jQuery] Announcement: Sorted Column Highlighting Widget For TableSorter.js Plugin

2008-11-11 Thread Bill

Good Afternoon,

I wanted to let everyone know that I have created a widget for the
tablesorter.js plugin that highlights the sorted column or columns.
Please take a look at my post on it and let me know what could be
improved here or in the post comments as I am still pretty new to
jQuery and javascript in general.

http://beckelman.net/post/2008/11/11/Sorted-Column-Highlighting-Widget-for-jQuery-TableSorter-Plugin-Demo.aspx

Best Regards,
Bill Beckelman


[jQuery] SimpleModal containerCSS not working in Firefox or Chrome

2008-10-26 Thread Bill

Good Afternoon,

I tried to override the settings in the default stlyesheet that comes
with the simplemodal jquery plugin with containerCSS which is working
fine in IE7 but not Firefox or Chrome. Not sure if this is a bug or I
am doing something wrong.

jQuery:
$(document).ready(function() {
$(#ButtonPopup).click(function() {
$(#addEditTask).modal({
onOpen: modalOpen,
persist: true,
containerCss: ({ width: 300, height: 200,
marginLeft: -150 })
});
return false;
});
});

HTML:
button id=ButtonPopupPopup/button
div id=addEditTask style=display:none;
 pAliquam nonummy adipiscing augue. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit.
 Maecenas porttitor congue massa. Fusce posuere, magna sed
pulvinar ultricies, purus lectus malesuada
 libero, sit amet commodo magna eros quis urna./
p
button id=ButtonSaveSave/button
button id=ButtonCancelCancel/button
/div

Please see http://beckelman.net/issues/simplemodalfirefoxproblem/default.aspx
for a working demo and zip download of the code that you can test for
yourself.

Thanks for the help in advance.

Bill




[jQuery] Re: SimpleModal containerCSS not working in Firefox or Chrome

2008-10-26 Thread Bill

Eric,

Awesome. I knew it had to be something simple that I was missing.
Adding the units fixed it straight away.

Bill


[jQuery] Re: JQuery validate problem

2008-10-07 Thread Bill

thanks a lot!

On 10月6日, 下午8时45分, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Take a look at the instructions 
 here:http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_compl...

 Jörn



 On Mon, Oct 6, 2008 at 10:50 AM, Bill [EMAIL PROTECTED] wrote:

  I have a problem.where i use the jqueyvalidateplugin for my
  project.

  I want to use thevalidatelike this:

  s:textfieldid=namename=userGroup.name/

  but it does not work . i should make theidandnameproperty as same.
  or named theidas cname andnameis name

  if i use the struts2 framework and want to usenamelike xxx.yyy,what
  can i do to resolve this situation? 3x- 隐藏被引用文字 -

 - 显示引用的文字 -


[jQuery] JQuery validate problem

2008-10-06 Thread Bill

I have a problem.where i use the jquey validate plugin for my
project.

I want to use the validate like this:

s:textfield id=name name=userGroup.name/

but it does not work . i should make the id and name property as same.
or named the id as cname and name is name

if i use the struts2 framework and want to use name like xxx.yyy,what
can i do to resolve this situation? 3x


[jQuery] Re: Validation Plugin Not Working in FF3 but okay in IE, Chrome and Opera 9.5?

2008-09-10 Thread Bill

Jörn,

Great catch that fixed it :) Thanks so much for taking a look.

Bill

On Sep 10, 8:09 am, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Your script tag seems to get ignored in Firefox: You've got
 type=text/jscript there, which should be text/javascript. That may
 be it.

 Jörn

 On Tue, Sep 9, 2008 at 7:24 PM, Bill [EMAIL PROTECTED] wrote:

  I am using the great Validation plugin by Jörn Zaefferer (http://
  bassistance.de/jquery-plugins/jquery-plugin-validation/). In my
  project it is working fine except when the page is viewed with FF3. It
  works fine with IE7, Chrome and Opera 9.5.

  You can view my post on this project at
 http://beckelman.net/post/2008/09/08/Client-Side-Validating-Bulk-Inse...
  and a demo 
  athttp://beckelman.net/Demos/jQueryValidateDDLAndTBCombo/Default.aspx.

  Has anyone run across this problem?

  I am using:
  jQuery 1.2.6
  jQuery validation plug-in 1.4

  Thank you.


[jQuery] Validation Plugin Not Working in FF3 but okay in IE, Chrome and Opera 9.5?

2008-09-09 Thread Bill

I am using the great Validation plugin by Jörn Zaefferer (http://
bassistance.de/jquery-plugins/jquery-plugin-validation/). In my
project it is working fine except when the page is viewed with FF3. It
works fine with IE7, Chrome and Opera 9.5.

You can view my post on this project at
http://beckelman.net/post/2008/09/08/Client-Side-Validating-Bulk-Insert-With-jQuery-Validation-Plugin.aspx
and a demo at 
http://beckelman.net/Demos/jQueryValidateDDLAndTBCombo/Default.aspx.

Has anyone run across this problem?

I am using:
jQuery 1.2.6
jQuery validation plug-in 1.4

Thank you.


[jQuery] Cross Browser variance in scrollTop related calculation?

2008-06-30 Thread Bill

To determine if the document's vertical scroll bar is at the bottom
of its travel, I've seen this calculation:

delta = $(document).height() - $(window).height();
scrollTopIsAtMax =  ($(window).scrollTop() == delta);

As the document's scroll bar is scrolled down, the value of $
(window.scrollTop()) increases until it equals the value of delta,
signifying the scrollbar is at the bottom end of its travel.

Using jquery-nightly.js for June 28/08 with the DOCTYPE in strict mode
I get the following when the scrollbar is at the bottom of its travel
(all windows maximized):

   IE7FFox3
Safari3.1.2(win)Opera9.5

$(document).height()11701015
1006 896
$(window).height() 626  583
634 880
delta544  432
372   16
$(window).scrollTop() 544  432
372 237
scrollTopIsAtMax  true  true
true   false
jQuery browser infomsie7.0mozilla1.9 safari525.19
opera9.50

As you can see, this algorithm doesn't work for Opera.  Is there a
more jQueryesq way to determine when the scrollbar is at its end?

Thanks,
Bill


[jQuery] Re: Cross Browser variance in scrollTop related calculation?

2008-06-30 Thread Bill

I've done a bit more research and found the following link, which I
think is related:  http://www.pithill.org/opera9.5_jquerybug.html.
The source code for that web page implies that for Opera 9.5, the
value of $(window).height() should be set to the value of
window.innerHeight.

Also, sorry about the mess in the previous post.  I've tried to
reformat the table, below. (Is there any sort of monospaced font
option in Google Groups?  Are we stuck with the 40 column, or so, wrap-
around?)

  Original Post reformatted  

To determine if the document's vertical scroll bar is at the bottom
of its travel, I've seen this calculation:

delta = $(document).height() - $(window).height();
scrollTopIsAtMax =  ($(window).scrollTop() == delta);

As the document's scroll bar is scrolled down, the value of $
(window.scrollTop()) increases until it equals the value of delta,
signifying the scrollbar is at the bottom end of its travel.

Using jquery-nightly.js for June 28/08 with the DOCTYPE in strict mode
I get the following when the scrollbar is at the bottom of its travel
(all windows maximized):

jQuery browser info msie7.0
$(document).height()1170
$(window).height()626
delta   544
$(window).scrollTop()   544
scrollTopIsAtMaxtrue

jQuery browser info  mozilla1.9  (FFox 3.0)
$(document).height()1015
$(window).height() 583
delta432
$(window).scrollTop()432
scrollTopIsAtMax true

jQuery browser info  safari525.19
$(document).height()1006
$(window).height()634
delta372
$(window).scrollTop()372
scrollTopIsAtMax true

jQuery browser info  opera9.50
$(document).height()896
$(window).height()880
delta   16
$(window).scrollTop()237
scrollTopIsAtMax false

As you can see, this algorithm doesn't work for Opera.  Is there a
more jQueryesq way to determine when the scrollbar is at its end?

Thanks,
Bill


[jQuery] Ingore: Cross Browser variance in scrollTop related calculation? - (see ticket #3046)

2008-06-30 Thread Bill

This Opera 9.5 discrepency has already be covered by 
http://dev.jquery.com/ticket/3046
(in fact, that's where the link in my 2nd post comes from).

Sorry about all the noise.

Bill



On Jun 30, 5:45 pm, Bill [EMAIL PROTECTED] wrote:
 I've done a bit more research and found the following link, which I
 think is related:  http://www.pithill.org/opera9.5_jquerybug.html.
 The source code for that web page implies that for Opera 9.5, the
 value of $(window).height() should be set to the value of
 window.innerHeight.

 Also, sorry about the mess in the previous post.  I've tried to
 reformat the table, below. (Is there any sort of monospaced font
 option in Google Groups?  Are we stuck with the 40 column, or so, wrap-
 around?)

   Original Post reformatted  

 To determine if the document's vertical scroll bar is at the bottom
 of its travel, I've seen this calculation:

 delta = $(document).height() - $(window).height();
 scrollTopIsAtMax =  ($(window).scrollTop() == delta);

 As the document's scroll bar is scrolled down, the value of $
 (window.scrollTop()) increases until it equals the value of delta,
 signifying the scrollbar is at the bottom end of its travel.

 Using jquery-nightly.js for June 28/08 with the DOCTYPE in strict mode
 I get the following when the scrollbar is at the bottom of its travel
 (all windows maximized):

 jQuery browser info     msie7.0
 $(document).height()    1170
 $(window).height()        626
 delta                           544
 $(window).scrollTop()   544
 scrollTopIsAtMax        true

 jQuery browser info      mozilla1.9  (FFox 3.0)
 $(document).height()    1015
 $(window).height()         583
 delta                            432
 $(window).scrollTop()    432
 scrollTopIsAtMax         true

 jQuery browser info      safari525.19
 $(document).height()    1006
 $(window).height()        634
 delta                            372
 $(window).scrollTop()    372
 scrollTopIsAtMax         true

 jQuery browser info      opera9.50
 $(document).height()    896
 $(window).height()        880
 delta                           16
 $(window).scrollTop()    237
 scrollTopIsAtMax         false

 As you can see, this algorithm doesn't work for Opera.  Is there a
 more jQueryesq way to determine when the scrollbar is at its end?

 Thanks,
 Bill


[jQuery] window.home() or location.href='about:home' and Safari 3.1

2008-04-18 Thread Bill

I'm trying to put together a cross-browser function for
programmatically taking the user to their home page.  So far I have
found this:

  script language=javascript
function gohome(){
  if (typeof window.home == 'function'){
window.home();
  } else if (document.all) {
window.location.href = about:home;
  } else {
document.write(pPlease click on your browser's Home
button./p);
  }
}
  /script

Firefox and Opera like window.home() and IE likes href=about:home.
But Safari 3.1 (for Windows) falls through to the else clause.

Does Safari have a different place in the DOM where the home page can
be triggered using Javascript?  So far I haven't been able to find
anything.

Thanks,
Bill



[jQuery] Re: ANNOUNCE: No Spam plugin

2008-03-03 Thread Bill

Hi  Mike

On Jan 23, 9:39 am, Mike Branski [EMAIL PROTECTED] wrote:
 This jQuery plugin turns an obfuscated e-mail address into a human-
 readable one. It's lightweight and accepts multiple filtering levels
 for additional security.

Thanks for the plugin.  Works great for me!

I did run into a problem with email addresses that have more than one
dot (period) in them.  For example, my/name/my/domain/com gets
rendered as [EMAIL PROTECTED] when it should be
[EMAIL PROTECTED]

I made a small change in the encoding convention by using a double
slash (//) to represent the @.  Single slashes (/) represent the
dots.  So my example is now encoded as my/name//my/domain/com.

Another thing that I noticed is if there are several single slashes in
the obfuscated email address, only the first one gets substituted with
a dot because the replace() function is not executing globally.

So to put this together, I changed the common code sequence:
.replace('/', '@').replace('/', '.')
to:
.replace('//', '@').replace(/\//g, '.')

This replaces the singly occurring double slash with an @, then
replaces all single slashes with a dot.

Cheers,
Bill


I


[jQuery] clueTips: how do I embed a clueTip inside another clueTip?

2008-02-08 Thread Bill

I've got a clueTip that brings in content using AJAX (the code is
below).  The onShow action creates another clueTip from a class within
the first, parent, cueTip.  So I have a clueTip inside a clueTip.
This works fine except that when I hover over the inner clueTip
element the outer, parent, clueTip is automatically closed and
disappears.  Is there any way to keep the outer or parent clueTip
from closing in this applicaiton?

I'm new at this so maybe this is not what cueTips are intended for.
Is there some other plugin I should be using?  Any recommendations?

Thanks,
Bill

- main.html ---
  html
  head
script type=text/javascript src=jquery.js/script
script type=text/javascript src=jquery.dimensions.js/
script
script type=text/javascript src=jquery.hoverIntent.js/
script
script type=text/javascript src=jquery.cluetip.js/script
script type=text/javascript
 $(document).ready(function(){
  $('.outer').cluetip({
dropShadow: false,
showTitle: true,
sticky: true,
closePosition: 'title',
arrows: true,
onShow: function(){
  $('.inner').cluetip({
dropShadow: false,
showTitle: true,
sticky: true,
closePosition: 'title',
arrows: true
  });
  return true;
},
ajaxCache: false
 });
 });
 /script
   link rel=stylesheet href=jquery.cluetip.css type=text/css /
 /head
  body
pspan class=outer rel=outer.html title=Outer clueTipHover
for Outer clueTip/span/p
  /body
  /html

-- outer.html 
  html
  head
 /head
  body
pspan class=inner rel=inner.html title=Inner clueTipHover
for Inner clueTip/span/p
  /body
  /html

-- inner.html  ---
  html
  head
 /head
  body
pInner clueTip contents/p
  /body
  /html


[jQuery] Re: [ANN] Lily, javascript visual programming tool

2008-01-30 Thread Bill Orcutt

Thanks Morgan- I'll make that change

On Jan 29, 10:58 pm, Morgan Allen [EMAIL PROTECTED] wrote:
 The minVersion in the install.rdf is 2.0.0 I changed to 2.0.0.* and it
 installed

 On Jan 29, 2008 9:33 PM, Bill Orcutt [EMAIL PROTECTED] wrote:





  Thanks for the useful feedback on the site. I've added another
  download link and will implement some of the other suggestions as I
  find time. I hope once you've had a chance to have a look at the
  program, you'll consider joining the user group-
 http://groups.google.com/group/lily-users.

  -Bill

  On Jan 29, 4:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote:
   Jörn Zaefferer schrieb:

   BillOrcuttschrieb:
[...]
Have a look at the demo applications below to get a feel for some of
what Lily can do:
[...]
More information about Lily is available on the website:
   http://www.lilyapp.org/

Wow. Thats amazing stuff, I love the svg/javascript sound demos. Using
interactive visuals to create music is so much fun.

Now I just need to take a closer look how Lily enbales stuff like
that, so most likey more feedback coming soon from here.

   Okay, some things:
   You need a Getting Started section and make that awfully obvious to find
   on the lilapp.org front page. Currently its difficult to find the
   download or even the wiki (which doesn't help in that respect).
   Along the link to the download should be the content of the readme file,
   avoid the need to download the package before being able to understand
   what and how to install.
   I found the download link only on the Public Beta 1 release post, which
   isn't even on the front page anymore.
   I also wonder if that couldn't be installed directly from the page - its
   just a firefox extension, isn't it? That way I wouldn't need to save
   anything on my disk and unpacking it. The included examples and demos
   could be provided via the page/wiki.

   Ah. After writing all that I discovered the top navigation bar,
   including the download link. You may want to make that a bit more
  obvious...

   Jörn

 --http://morglog.alleycatracing.com
 Lets make up more accronyms!

 http://www.alleycatracing.com
 LTABOTIIOFR! ROFL! ROFL! ROFL!
 Upcoming alley cats, reviews, touring logs, and a general congregation of
 bike nerdity.


[jQuery] [ANN] Lily, javascript visual programming tool

2008-01-29 Thread Bill Orcutt

Hi All-

I'm happy to announce the first beta release of Lily, a Mozilla based
visual programming environment written in Javascript. Lily is a
modular framework that allows you to wire together Javascript library
components graphically. Currently there are Lily modules that wrap
components from the YUI, JQuery  Scriptaculous libraries. There are
also modules that provide access to the file system, browser storage,
network  graphics. Lily programs can be saved as standalone XULRunner
applications or as Firefox addons.

Have a look at the demo applications below to get a feel for some of
what Lily can do:

http://www.vimeo.com/625294
http://www.vimeo.com/625739
http://www.vimeo.com/626481
http://www.vimeo.com/625141

More information about Lily is available on the website: http://www.lilyapp.org/

thanks

-Bill


[jQuery] Re: [ANN] Lily, javascript visual programming tool

2008-01-29 Thread Bill Orcutt

Thanks for the useful feedback on the site. I've added another
download link and will implement some of the other suggestions as I
find time. I hope once you've had a chance to have a look at the
program, you'll consider joining the user group- 
http://groups.google.com/group/lily-users.

-Bill

On Jan 29, 4:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Jörn Zaefferer schrieb:

 BillOrcuttschrieb:
  [...]
  Have a look at the demo applications below to get a feel for some of
  what Lily can do:
  [...]
  More information about Lily is available on the website:
 http://www.lilyapp.org/

  Wow. Thats amazing stuff, I love the svg/javascript sound demos. Using
  interactive visuals to create music is so much fun.

  Now I just need to take a closer look how Lily enbales stuff like
  that, so most likey more feedback coming soon from here.

 Okay, some things:
 You need a Getting Started section and make that awfully obvious to find
 on the lilapp.org front page. Currently its difficult to find the
 download or even the wiki (which doesn't help in that respect).
 Along the link to the download should be the content of the readme file,
 avoid the need to download the package before being able to understand
 what and how to install.
 I found the download link only on the Public Beta 1 release post, which
 isn't even on the front page anymore.
 I also wonder if that couldn't be installed directly from the page - its
 just a firefox extension, isn't it? That way I wouldn't need to save
 anything on my disk and unpacking it. The included examples and demos
 could be provided via the page/wiki.

 Ah. After writing all that I discovered the top navigation bar,
 including the download link. You may want to make that a bit more obvious...

 Jörn


[jQuery] ClueTip Absolute Position Relative to Screen

2008-01-12 Thread Bill

Is there a way to position the cluetip relative to the same position
on the screen?

Bill


[jQuery] Re: Firefox uncaught exception - Please help

2007-12-27 Thread Bill

AdBlock Plus was killing it HAH!  Thanks to Benjamin for checking it
out.

Bill

On Dec 26, 10:49 pm, Karl Delandsheere [EMAIL PROTECTED]
wrote:
 I prefer to use Firefox, but for the time being I will have recommend
 to users to use internet explorer.

 Bill 

 Haha... Bill... Gates? :D

 I have the same problem... Sometimes... I didn't get any answer yet.
 Wait and see :).

 And remember... Do not choose the dark side. It is easier, but much
 less powerful :D.

 On Dec 27, 2:39 am, Benjamin Sterling

 [EMAIL PROTECTED] wrote:
  Bill,
  What is the url for the page with tooltip?

  On 12/26/07, Bill [EMAIL PROTECTED] wrote:

   I have posted this message back in November and received no replies.
   I am able to get JQuery Ajax ClueTips to work in Internet Explorer
   fine however when I open the same page in firefox the cluetips do not
   work and when I look at the error console I see the following

   Error: uncaught exception: [Exception... Component returned failure
   code: 0x805e000a [nsIXMLHttpRequest.open]  nsresult: 0x805e000a
   (unknown)  location: JS frame ::
  http://www.quidizzle.com/scripts/js/jquery.js
   :: anonymous :: line 2293  data: no]

   this is an example of one of the divs I am trying to display a tooltip
   from

   div class=nav id=q83 onMouseOut= change(event,
   'up')
   onMouseDown=change(event, 'down') onMouseUp=change(event, 'up')
   onClick=window.location='layout.php?parent=83' href=ADS/
   AlfaAD.html rel=ADS/AlfaAD.html div class=nav-img
   style=background-image: url('images/stories/navigation/istockimages/
   Vehicles.png')/div/div

   I really have no clue where to start to fix this error.

   I prefer to use Firefox, but for the time being I will have recommend
   to users to use internet explorer.

   Bill

  --
  Benjamin 
  Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjam...


[jQuery] Re: Firefox uncaught exception - Please help

2007-12-27 Thread Bill

Adblock Plus was the cluprit.

On Dec 26, 10:49 pm, Karl Delandsheere [EMAIL PROTECTED]
wrote:
 I prefer to use Firefox, but for the time being I will have recommend
 to users to use internet explorer.

 Bill 

 Haha... Bill... Gates? :D

 I have the same problem... Sometimes... I didn't get any answer yet.
 Wait and see :).

 And remember... Do not choose the dark side. It is easier, but much
 less powerful :D.

 On Dec 27, 2:39 am, Benjamin Sterling

 [EMAIL PROTECTED] wrote:
  Bill,
  What is the url for the page with tooltip?

  On 12/26/07, Bill [EMAIL PROTECTED] wrote:

   I have posted this message back in November and received no replies.
   I am able to get JQuery Ajax ClueTips to work in Internet Explorer
   fine however when I open the same page in firefox the cluetips do not
   work and when I look at the error console I see the following

   Error: uncaught exception: [Exception... Component returned failure
   code: 0x805e000a [nsIXMLHttpRequest.open]  nsresult: 0x805e000a
   (unknown)  location: JS frame ::
  http://www.quidizzle.com/scripts/js/jquery.js
   :: anonymous :: line 2293  data: no]

   this is an example of one of the divs I am trying to display a tooltip
   from

   div class=nav id=q83 onMouseOut= change(event,
   'up')
   onMouseDown=change(event, 'down') onMouseUp=change(event, 'up')
   onClick=window.location='layout.php?parent=83' href=ADS/
   AlfaAD.html rel=ADS/AlfaAD.html div class=nav-img
   style=background-image: url('images/stories/navigation/istockimages/
   Vehicles.png')/div/div

   I really have no clue where to start to fix this error.

   I prefer to use Firefox, but for the time being I will have recommend
   to users to use internet explorer.

   Bill

  --
  Benjamin 
  Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjam...


[jQuery] Firefox uncaught exception - Please help

2007-12-26 Thread Bill

I have posted this message back in November and received no replies.
I am able to get JQuery Ajax ClueTips to work in Internet Explorer
fine however when I open the same page in firefox the cluetips do not
work and when I look at the error console I see the following

Error: uncaught exception: [Exception... Component returned failure
code: 0x805e000a [nsIXMLHttpRequest.open]  nsresult: 0x805e000a
(unknown)  location: JS frame :: 
http://www.quidizzle.com/scripts/js/jquery.js
:: anonymous :: line 2293  data: no]

this is an example of one of the divs I am trying to display a tooltip
from

div class=nav id=q83 onMouseOut= change(event, 'up')
onMouseDown=change(event, 'down') onMouseUp=change(event, 'up')
onClick=window.location='layout.php?parent=83' href=ADS/
AlfaAD.html rel=ADS/AlfaAD.html div class=nav-img
style=background-image: url('images/stories/navigation/istockimages/
Vehicles.png')/div/div

I really have no clue where to start to fix this error.

I prefer to use Firefox, but for the time being I will have recommend
to users to use internet explorer.

Bill


[jQuery] Firefox uncaught exception

2007-11-28 Thread Bill

It seems that others have found and been able to work around this
problem, but I am not experienced enough with javascript and ajax to
fix this.  I am somewhat desperate.

I have been able to get the jQuery cluetips to work fine in IE.

However in Firefox I am getting the uncaught exception.  Error.  The
tip I have associated with a div element and the div contains other
items.  In fact here is a copy paste of the div...

div class=nav id=q1230 onMouseOut= change(event, 'up')
onMouseDown=change(event, 'down') onMouseUp=change(event, 'up')
onClick=window.location='layout.php?parent=1230' href=ADS/
AlfaAD.html rel=ADS/AlfaAD.html div class=nav-img
style=background-image: url('images/stories/navigation/istock/
music.png')/div/div

I so much want this to work in Firefox, but I do not know what to do
to fix this.

The exact error code is pasted here
Error: uncaught exception: [Exception... Component returned failure
code: 0x805e000a [nsIXMLHttpRequest.open]  nsresult: 0x805e000a
(unknown)  location: JS frame :: 
http://www.quidizzle.com/scripts/js/jquery.js
:: anonymous :: line 2293  data: no]

Like I said it works fine in IE ugg!).

Thanks for anyones expertise.

Bill


[jQuery] Re: Announce: jQuery Tablesorter 2.0.1 Released

2007-09-20 Thread Bill Huber


Thanks for the great work Christian! I did find that the 2.0.1 packed version
does not work for me. It complains about a missing semi-colon. I ran the
code through online lint(http://www.javascriptlint.com/online_lint.php) and
it points at line 235. The unpacked and minified version worked since they
are less particular about semi-colons.

Enjoy!
Bill
-- 
View this message in context: 
http://www.nabble.com/Announce%3A-jQuery-Tablesorter-2.0.1-Released-tf4468417s15494.html#a12801762
Sent from the JQuery mailing list archive at Nabble.com.