[jQuery] Re: [validate] generated attribute

2008-09-18 Thread Jörn Zaefferer
What does invalid mean in that context? The attribute is added at
runtime, so the w3c html validator will never see it.

Jörn

On Thu, Sep 18, 2008 at 12:25 AM, salac.r [EMAIL PROTECTED] wrote:

 Hi,
 I'm trying to use this plugin and it looks wonderfull.
 But i wonder if is necesary to use generated attribute which is
 invalid. In my opinion right way is to add/remove some class to
 element for example class with name
 generated_by_jquery_validation :-). But its only my idea...



[jQuery] Re: jQuery validation use different event for differernt input

2008-09-18 Thread Jörn Zaefferer
Disable the event handling and add manual validation to the username field:

$(...).validate({
  onkeyup: false,
  onfocusout: false
});
$(#username).blur(function() {
  $(this).valid();
});

Jörn

2008/9/18 Jacky [EMAIL PROTECTED]:
 Hi all,
 Some question on the validation plugin.
 Say there are 3 fields, and the first one is user name.
 I want to check the availability of the user name on focusout using
 'remote'.
 But for the rest of the fields, only validate when user clicking submit
 button.
 Can I do that?
 --
 Best Regards,
 Jacky
 網絡暴民 http://jacky.seezone.net



[jQuery] Re: jquery.com incredibly slow for me

2008-09-18 Thread Mika Tuupola



On Sep 17, 2008, at 8:34 PM, acacio wrote:


I had the same problem so I switched to the Google hosted files and
it's *much* faster.


AFAIK jquery.com provides files for downloading not hotlinking. So you  
should have used your own server to serve js in the first place.


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



[jQuery] simple test if all checked BEGINNER

2008-09-18 Thread tlob

Hello I sucessfully implemented a test to see if all checkboxes are
checked:

$(form#form1).submit(function() {
var anzahl = $(#form1 input:checked).length;
if (anzahl==7){$(#all).show(500);}
return false;
});

I think this can be done more elegant, because when the number of
checkboxes change, I have to change my code. Not sexy

Thanks in advance
Thomas


[jQuery] Re: simple test if all checked BEGINNER

2008-09-18 Thread Lukas Pitschl | Dressy Vagabonds


Hi Thomas,

you could compare the count of all available checkboxes
with all checked once.

That would look something like this:

$(form#form1).submit(function() {
var total = $(#form1 [EMAIL PROTECTED]'checkbox']).size()
var checked = $(#form1 [EMAIL PROTECTED]'checkbox']:checked).size()
if(checked == total)
$(#all).show(500);
return false;
});

I'm not too sure about the expression @type='checkbox', but i guess  
you get my point.


Hope this works for you

Lukas

Am 18.09.2008 um 09:44 schrieb tlob:



Hello I sucessfully implemented a test to see if all checkboxes are
checked:

$(form#form1).submit(function() {
var anzahl = $(#form1 input:checked).length;
if (anzahl==7){$(#all).show(500);}
return false;
});

I think this can be done more elegant, because when the number of
checkboxes change, I have to change my code. Not sexy

Thanks in advance
Thomas




[jQuery] Re: simple test if all checked BEGINNER

2008-09-18 Thread tlob

Oh so easy! Thank you very much! I changed it a little bit:

var total = $(#form1 :checkbox).size()
var checked = $(#form1 :checkbox:checked).size()
if(checked == total)
$(#all).show(500);

thx
tom


[jQuery] Re: Finding DIVS with similar IDs

2008-09-18 Thread Alex Weber

$('div[id^=test]').hide();


:)

if it doesnt work i think its just a case of syntax

$([EMAIL PROTECTED]).hide();

On Sep 17, 9:14 pm, ripple [EMAIL PROTECTED] wrote:
 Try this.
  
 $(div[id*=test]).hide();
  
 The second attempt evaulates the text in the div. Not the id of the div.
  

 --- On Wed, 9/17/08, MACE [EMAIL PROTECTED] wrote:

 From: MACE [EMAIL PROTECTED]
 Subject: [jQuery] Finding DIVS with similar IDs
 To: jQuery (English) jquery-en@googlegroups.com
 Date: Wednesday, September 17, 2008, 7:40 PM

 I have multiple DIVs with similar IDs:

 div id=test1Test 1/div
 div id=test2Test 2/div
 div id=test5Test 15/div
 div id=test11Test 11/div

 What is the syntax to hide all the DIVs that start with 'test'?

 This doesn't work:

 $(id*=test).hide();

 also tried:

 $(id:contains('test')).hide();


[jQuery] Re: best/standard way to benchmark your own scripts?

2008-09-18 Thread Alex Weber

thanks
:)

i use firebug but i wasnt aware of the profiling... :)

On Sep 17, 8:20 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
 I made my own benchmarker some time ago (3-4 months).
 It's not perfect but it did the job for me.

 You can check it here:http://benchmarker.flesler.com/
 The deploy part isn't included in the js. It's OO, you can create
 Benchmarker instances.

 I used it mainly to check different approaches for frequent problems.
 Also some experiments.

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

 On Sep 17, 1:14 am, Alex Weber [EMAIL PROTECTED] wrote:

  looking to find possible bottlenecks and basically optimize the hell
  outta my js which relies heavily on jquery and the occasional
  plugin...

  is there a more elegant and efficient way to do this than to toss a
  few document.write()s at my code?? =P

  thanks!!

  -Alex


[jQuery] find, not selector not working

2008-09-18 Thread vtjiles

I have the fairly simple markup below and am trying to only get only
the checkboxes under the first level LI (Main 1 and Main 2), not the
deeper ones.

ul id=el
li
input type=checkbox value=1 / - Main 1
ul
li
input type=checkbox value=1 / - Sub 1
/li
li
input type=checkbox value=1 / - Sub 2
ul
li
input type=checkbox 
value=1 / - Sub 2 Sub 1
/li
/ul
/li
/ul
/li
li
input type=checkbox value=1 / - Main 2
/li
/ul

Using $(#el).find(li input) gets all 5 checkboxes. I've tried
multiple variations of find(li input).not(li ul input) as well as
using :not() in the selector which doesn't work.

One way that did finally work:
var notgroup = $(#el).find(li ul input);
$(#el).find(li input).not(notgroup)

Why does it work if there is a variable which is the result of the
selector, but not the selector itself?

Is there any better way to do this?


[jQuery] fadeTo animation repeats multiple times in Firefox...why?

2008-09-18 Thread alexcoleman

I'm attempting to work with the fadeTo command (also tried other
animations like slideDown), but I keep getting repeat animations.
Sometimes it'll cycle through 2 times, other times many more times.
Here is the code I'm using:

$(document).ready(function() {

$('.featured').hover(function(){
$(this).find('.banner').fadeTo(slow,.6)
}, function(){
$(this).find('.banner').fadeTo(slow,1)
});
});

You can view the page live @ www.alexcoleman.net

Any help would be greatly appreciated...
Thanks!


[jQuery] Re: cascade question

2008-09-18 Thread kevin

hi ricardo,

i tried this before,
this only can set the first box.
it won't trigger the second box to get data from database.
second box still empty.

i have added selected attribute on my sample page.
http://sskes.damimi.org/test/

thanks anyway.

On 9月18日, 上午6時32分, ricardobeat [EMAIL PROTECTED] wrote:
 You can do it via XHTML:

 option value=B selected=selectedB/option

 or add the attribute with jQuery:

 $('#first option:eq(2)').attr('selected','selected');

 ricardo

 On Sep 17, 10:50 am, kevin [EMAIL PROTECTED] wrote:

  Hi all,

  here is my sample page  http://sskes.damimi.org/test/

  my question is how can i let the first box selected on B and also
  trigger second box list the correct value
  B1,B2,B3,B4 automatically when page loaded.

  thanks.


[jQuery] html for other examples (Bglframe, vertical style, nav-bar style and with Supersubs)

2008-09-18 Thread elvisparsley

I have downloaded the zip and found one example in it.

I'd like to know how to make it other examples in the website.
http://users.tpg.com.au/j_birch/plugins/superfish/#examples

Could anyone tell me html code for other samples?

thanks in advance.


[jQuery] Re: cascade question

2008-09-18 Thread kevin

Hi ricardo,

i tried this before,but set option attribute can only let first box
selected on B
it won't trigger second box get data from database.
second box won't change until you click on the first box and select
other options

all i want is first box selected on B and second box selected on
B2 automatically when page loaded.

i still added  selected=selected  on option B.
here is the sample page
http://sskes.damimi.org/test/

thanks anyway.

On 9月18日, 上午6時32分, ricardobeat [EMAIL PROTECTED] wrote:
 You can do it via XHTML:

 option value=B selected=selectedB/option

 or add the attribute with jQuery:

 $('#first option:eq(2)').attr('selected','selected');

 ricardo

 On Sep 17, 10:50 am, kevin [EMAIL PROTECTED] wrote:

  Hi all,

  here is my sample page  http://sskes.damimi.org/test/

  my question is how can i let the first box selected on B and also
  trigger second box list the correct value
  B1,B2,B3,B4 automatically when page loaded.

  thanks.


[jQuery] Re: JQuery - wrap() + Internet Explorer problem

2008-09-18 Thread weidc

ye your right, it works as long as i set the visibility to visible in
IE itself. if i do that in my .html script it doesn't work. but i
guess it's the same as when i right-click one of the picture and
choose properties it works too.

i noticed somehow the space between the picture's becomes smaller when
i set the visibility to visible in IE or right click a picture and
then it works.

On 17 Sep., 19:02, ricardobeat [EMAIL PROTECTED] wrote:
 Install IE Developer toolbar and check it, the images are still there.

 On Sep 17, 4:23 am, weidc [EMAIL PROTECTED] wrote:

  I allready tried 'visibility: visible' and 'display: block' but he
  doesn't hide the picture's. It seems like he totally remove them.
  I don't know what could change that.

  On 16 Sep., 22:16, ricardobeat [EMAIL PROTECTED] wrote:

   ooops.

   yeah, everything disappears on subsequent reloads.

   As Karl said, it looks like an IE rendering bug. When you change any
   of the style properties of an element inside #content, everything goes
   back to normal. Add 'visibility: visible' to your anchors tags and see
   what happens, adjusting the CSS should solve your problem.

   On Sep 16, 4:26 am, weidc [EMAIL PROTECTED] wrote:

Well for me it still doesn't work. I tried it in IE 6 and 7 with
windows vista and xp.
The first time I load the site it works but if I reload it it doesn't.

On 15 Sep., 20:41, ricardobeat [EMAIL PROTECTED] wrote:

 Works ok for me, It's probably your IE install.

 On Sep 15, 10:26 am, weidc [EMAIL PROTECTED] wrote:

  I still haven't solved it yet. Does someone got an idea?

  -weidc

  On 11 Sep., 13:49, weidc [EMAIL PROTECTED] wrote:

   Here's the link -http://tinyurl.com/629qpt

   It's really strange. The first 3-5 min it works and after that it
   removes the picture as I said.

   -weidc

   On 10 Sep., 18:12, Karl Swedberg [EMAIL PROTECTED] wrote:

I'm guessing this has less to do withwrap() than with an IE 
rendering  
bug of some sort. If you could provide a link to page that we 
can look  
at, that would be helpful. My hunch is that you're dealing with 
a  
hasLayout issue, but hard to tell if I can't see it.

--Karl


Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Sep 10, 2008, at 4:32 AM, weidc wrote:

 Hi,

 well I got some problems withwrap() and IE. It works fine in 
 FireFox
 but if I try it in IE it removes every picture beside the one 
 I
 clicked. But if I tab in an other register in IE and tab back 
 it works
 like in FireFox.

 I wonder if there is a way to get it work withwrap() or if 
 there is
 an other way to get it like that.

 I hope someone got an idea.

 -weidc


[jQuery] Re: Hover on all elements: $(*).hover(...)

2008-09-18 Thread John Boxall

Aaron, I had the same thought - when tried event.stopPropagation() it
just kept on sailing right up (though I'd like to test this again).

What I ended up with was a solution with a two global variables.

var flip = True;
var hover;

function hoverIn(event) {
if (flip) {
$(this).addClass('selected');
if (hover  hover != this) {
$(hover).removeClass('selected');
}
hover = this;
flip = false;
}
}

function hoverOut(event) {
$(this).removeClass('selected');
flip = true;
}

$(*).hover(hoverIn, hoverOut);

Thanks everyone for your help!

John

On Sep 17, 12:54 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 This one worked for me...

 $('body').bind('mouseover', function(event) {
    $(event.target).addClass('selected');}).bind('mouseout', function(event) {

    $(event.target).removeClass('selected');

 });

 You'll run into problems if you have properties assigned to more  
 specific selectors in your stylesheet, but otherwise, it should work  
 fine.

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 17, 2008, at 9:50 AM, benjam wrote:



  This is insanely kludgy, not very pretty, and probably slower than a
  more elegant solution.

  But it works.

     $('*').hover(
             function(event) {
                     var $this = $(this);
                     $this.addClass('selected');
                     $this.parents( ).removeClass('selected');
             },
             function(event) {
                     var $this = $(this);
                     $this.removeClass('selected');
                     $this.parents( ).removeClass('selected');
                     $this.parent( ).addClass('selected');
                     $this.children( ).removeClass('selected');
             }
     );

  I'm sure there are better solutions out there, but this was the
  fastest and easiest method.

  On Sep 17, 2:04 am, Balazs Endresz [EMAIL PROTECTED] wrote:
  I'm not sure I get it, but if you want to grab the strong inside a
  p when the event is only bound to p then you can get it simply by
  event.target:

  $('body').find('*').filter(function(){
    return !$(this).children().length;})

  .add('p').not('p *')
  .hover(function(event){

      var t=event.target  //this will be the strong tag inside the p

      if ($(this).children().length()  0) {
         return False
      }

      $(this).addClass('selected');
    },
    function(){
       $(this).removeClass('selected');
    }
  );

  You can also try this with event delegation, which will be much  
  faster
  with a lot of 
  elements:http://dev.distilldesign.com/log/2008/jan/27/event-delegation-jquery/...

  On Sep 16, 7:17 pm, John Boxall [EMAIL PROTECTED] wrote:

  Hi Balazs,

  Thanks for the reply - looking at your suggestion, my idea was to
  apply it to the code like this:

  $(function() {
          $(*).hover(
             function(){

                  // If the element has more than one child stop
  propagating.
                  if ($(this).children().length()  0) {
                      return False
                  }

                  $(this).addClass('selected');
              },
              function(){
                  $(this).removeClass('selected');
              }
          );

  }

  This is _close_ to what I want, but what I'd really like is to grab
  DOM element you are hovering over with the minimum number of  
  children
  - not necessarily zero.

  It's my understanding that with the above, if you hovered over a p
  with a strong inside you couldn't select the p because it would
  have a child!

  Thanks,

  John

  Should only return true if the selected $(this) has no children.
  This is _close_ to what I want - but what I'd really like is to grab
  the element

  On Sep 14, 4:10 am, Balazs Endresz [EMAIL PROTECTED] wrote:

  Hey John,

  I think this will do that:

  $('body').find('*').filter(function(){
    return !$(this).children().length;})

  .add('p').not('p *') //without this, if a paragraph contains tags  
  thehoverwon't be applied to the most of the text

  On Sep 12, 9:29 pm, John Boxall [EMAIL PROTECTED] wrote:

  Heyo jQuery hackers,

  I'm putting together a little script that adds a class  
  selected to
  an element when youhoverover it.
  When you stop hovering the class selected class is removed.

  I would like the class only to be apply to the lowest element in  
  the
  DOM.

  For example say I was hovering over a p deep inside a document  
  - I
  would like to only add the class selected to that p tag, not  
  the
  div, body and html tags surrounding it.

  So far my thinking has been to use something like this:

  $(function() {
          $(*).hover(
             function(){
                  $(this).addClass('selected');
              },
              function(){
                  $(this).removeClass('selected');
              }
          );

  }

  Which adds the selected class to any element 

[jQuery] Re: this.style is null or not an object

2008-09-18 Thread kim
i didn't put a runat='server' attribute to the div element so when we do a
viewsource the id is still 'showError' even if it's inside a
contentplaceholder control.

On Wed, Sep 17, 2008 at 9:42 PM, Eric Martin [EMAIL PROTECTED] wrote:


 It sounds like an issue with your page. Do you have any code examples
 or a page that I can view?

 On Sep 17, 5:40 am, kimoy [EMAIL PROTECTED] wrote:
  Hi,
 
  I'm developing on ASP.NET and have been trying to make the SimpleModal
  plugin work but somehow the jQuery.hide() function throws an error
  'this.style is null or not an object'.
 
  This is my jQuery code:
 
  jQuery(document).ready(function(){
  jQuery('#showError').modal();
 
  });
 
  Thanks.



[jQuery] Re: this.style is null or not an object

2008-09-18 Thread kim
here's the page declaration:

asp:Content ID=Content3 ContentPlaceHolderID=ContentPlaceHolder1
Runat=Server
input type=button id=btnTest value=Test ExceptionHandler
onclick=showError('Error Message') /
div id='showError' style='display:none'
a href='#' title='Close' class='modalCloseX modalClose'x/a
div class='header'spanError/span/div
p class='message'/p
div class='buttons'
div class='no modalClose'OK/div
/div
/div
/asp:Content


On Wed, Sep 17, 2008 at 9:42 PM, Eric Martin [EMAIL PROTECTED] wrote:


 It sounds like an issue with your page. Do you have any code examples
 or a page that I can view?

 On Sep 17, 5:40 am, kimoy [EMAIL PROTECTED] wrote:
  Hi,
 
  I'm developing on ASP.NET and have been trying to make the SimpleModal
  plugin work but somehow the jQuery.hide() function throws an error
  'this.style is null or not an object'.
 
  This is my jQuery code:
 
  jQuery(document).ready(function(){
  jQuery('#showError').modal();
 
  });
 
  Thanks.



[jQuery] Re: PHP port of jQuery

2008-09-18 Thread Tobiasz Cudnik

New release 0.9.4 is available featuring Ajax, Events, WebBrowser
plugin and client-side jQuery bindings.

Check out release notes for more information:
http://phpquery-library.blogspot.com/2008/09/phpquery-094-released.html

On Jul 29, 1:51 pm, Tobiasz Cudnik [EMAIL PROTECTED] wrote:
 Hi,

 I would like to introduce youphpQuery- jQuery port to 
 PHP.http://code.google.com/p/phpquery/

 There was one topic mentioning about it, but it is one year old and i
 decided to start a new one.

 phpQueryimplements following portions of jQuery API:
    1. Selectors
    2. Attributes
    3. Traversing
    4. Manipulation

 Today library seems to be quite stable, there is couple of test cases,
 but massive public tests would be very appreciated.

 License is MIT, like jQuery.

 Latest release download (as for 
 today):http://phpquery.googlecode.com/files/phpQuery-0.9.1-beta2.zip
 SVN checkout for latest releases:
 svn checkouthttp://phpquery.googlecode.com/svn/trunk/phpQuery

 Here's some showoff snippet:
 ?php
 // just one file to include
 require('phpQuery/phpQuery.php');

 // intialize new DOM from 
 markupphpQuery::newDocument('divmydivulli1/lili2/lili3/li/
 ul/div')
         -find('ul  li')
                 -addClass('my-new-class')
                 -filter(':last')
                         -addClass('last-li');

 // query all unordered lists in last used DOM
 pq('ul')-insertAfter('div');

 // iterate all LIs from last used DOM
 foreach(pq('li') as $li) {
         // iteration returns plain DOM nodes, notphpQueryobjects
         pq($li)-addClass('my-second-new-class');

 }

 // same as pq('anything')-htmlOuter() but on document root (returns
 doctype etc)
 printphpQuery::getDocument();
 ?

 Hope you will like it :)


[jQuery] Re: this.style is null or not an object

2008-09-18 Thread kim
i just added tried out this jQuery code:

alert(jQuery('#showError'));
jQuery('#showError').hide();

the alert resulted to [object Object], but the call to hide resulted to
the error this.display is null or not an object. i'm using IE7 by the way.


On Wed, Sep 17, 2008 at 9:42 PM, Eric Martin [EMAIL PROTECTED] wrote:


 It sounds like an issue with your page. Do you have any code examples
 or a page that I can view?

 On Sep 17, 5:40 am, kimoy [EMAIL PROTECTED] wrote:
  Hi,
 
  I'm developing on ASP.NET and have been trying to make the SimpleModal
  plugin work but somehow the jQuery.hide() function throws an error
  'this.style is null or not an object'.
 
  This is my jQuery code:
 
  jQuery(document).ready(function(){
  jQuery('#showError').modal();
 
  });
 
  Thanks.



[jQuery] Re: nth-child(n) not working for me.

2008-09-18 Thread Richard D. Worth
On Wed, Sep 17, 2008 at 11:29 PM, Karl Swedberg [EMAIL PROTECTED]wrote:

 Hi kcharles,
 you need to concatenate the variable, n, with the rest of the selector
 expression. Otherwise, it's treated as the string, n. Try this:

 $(#filterTable tbody tr td:nth-child( + n + )).each(function(){

 Also, you probably don't need either the tbody or tr part in there
 since, presumably, any td is going to be within a tr and a tbody.


Having the tbody there filters out any tds in a thead or tfoot. But yeah,
the tr can go.

- Richard


[jQuery] Re: add/removeClass problem

2008-09-18 Thread Richard D. Worth
Inside your click handler, 'this' is equal to the 'a' that has been clicked.
The problem is when you do

$('ul.tabNavigation a', this).removeClass('selected');

it means find me any anchors with ul.tabNavigation, but limit the query to
the contents/context of the 'this' element. So it's actually searching
inside that 'a' that was clicked for a ul.tabNavigation and then for 'a's
inside it. This should work fine:

$('ul.tabNavigation a').removeClass('selected');

- Richard


On Wed, Sep 17, 2008 at 10:21 PM, yellowboy [EMAIL PROTECTED]wrote:



 Problem:
 I have two divs, each containing tab navigation. When I click tab
 navigation
 items they receive class 'selected' while the previously clicked tab
 anchors
 retain 'selected' class as well.

 My intention is that with click of tab, other tabs drop the selected class.

 jquery:

 $(function () {
  $('div.tabs').each(function () {
  var tabContainers = $(' div', this);

  $('ul.tabNavigation a', this).click(function () {
tabContainers.hide().filter(this.hash).show();
$('ul.tabNavigation a', this).removeClass('selected');
$(this).addClass('selected');
return false;
  }).filter(':first').click();
  });
 });


 html:

 div
 h2 # Photography /h2

 div class=gallery

 div class=tabs
 ul class=tabNavigation
 li #first Alternative Process /li
 li #second Black amp; White /li
 li #third Digital /li
 /ul

 div id=first
 ul class=altpro
 li /imgs/main/ap1b.jpg /li
 li /imgs/main/ap1b.jpg /li
 li /imgs/main/ap1b.jpg /li
 /ul
 /div!--end first--

 div id=second
 ul class=bandw
 li /imgs/main/perf1.jpg /li
 li /imgs/main/perf2.jpg /li
 li /imgs/main/perf3.jpg /li
 /ul
 /div!--end second --

 div id=third
 ul class=digclr
 li /imgs/main/perf1.jpg /li
 li /imgs/main/perf2.jpg /li
 li /imgs/main/perf3.jpg /li
 /ul
 /div!--end third--

 /div!--end tabs--
 /div!--end gallery--

 /div!--end photography--

 Thanks!

 --
 View this message in context:
 http://www.nabble.com/add-removeClass-problem-tp19536474s27240p19536474.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: find, not selector not working

2008-09-18 Thread Richard D. Worth
Try

$(#el  li  input)

The (rough equiv) long-hand for that would be

$(#el).children(li).children(input)

So the space ( ) in css is analogous to .find(), and the
right-angled-bracket () to .children().

- Richard

On Wed, Sep 17, 2008 at 11:56 PM, vtjiles [EMAIL PROTECTED] wrote:


 I have the fairly simple markup below and am trying to only get only
 the checkboxes under the first level LI (Main 1 and Main 2), not the
 deeper ones.

 ul id=el
li
input type=checkbox value=1 / - Main 1
ul
li
input type=checkbox value=1 / - Sub 1
/li
li
input type=checkbox value=1 / - Sub 2
ul
li
input type=checkbox
 value=1 / - Sub 2 Sub 1
/li
/ul
/li
/ul
/li
li
input type=checkbox value=1 / - Main 2
/li
 /ul

 Using $(#el).find(li input) gets all 5 checkboxes. I've tried
 multiple variations of find(li input).not(li ul input) as well as
 using :not() in the selector which doesn't work.

 One way that did finally work:
 var notgroup = $(#el).find(li ul input);
 $(#el).find(li input).not(notgroup)

 Why does it work if there is a variable which is the result of the
 selector, but not the selector itself?

 Is there any better way to do this?



[jQuery] Re: Jcrop v0.9.0 image cropping plugin - comments please

2008-09-18 Thread Richard D. Worth
Yes, both do.

JCrop has an aspectRatio option. You specify a decimal, or a ratio (16 / 9
for wide, or 1.0 for square). See

http://deepliquid.com/content/Jcrop_Manual.html#Setting_Options

jQuery UI Resizables has a similar option (same key - aspectRatio). If
specified as a boolean/true it will maintain the original aspect ratio. Or
you can specify it as a number. Also if the aspectRatio option is not set,
you can hold the shift-key down while resizing and a square ratio will be
enforced. See

http://docs.jquery.com/UI/Resizables/resizable#options (click on the options
tab)

- Richard

On Wed, Sep 17, 2008 at 3:27 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 Please forgive me if this has been raised before (I may have missed it)
 but do either of these plugins have a contrained aspect ratio feature

 2008/9/17 Richard D. Worth [EMAIL PROTECTED]


 On Wed, Sep 17, 2008 at 10:37 AM, Kelly [EMAIL PROTECTED] wrote:


 Thanks Richard W. And thanks to everyone who has commented.
 I am glad that most of the issues raised have been purely
 philosophical. :)

 Jose, please use whatever plugin you feel is best suited for you
 needs.
 The whole purpose of a plugin is you don't need to worry about what's
 inside.
 If you have a conviction that you want to use jQuery UI somewhere,
 please do.


 Both good points.



 I've seen that jQuery UI-based cropping demo and frankly it's broken.
 I don't think that's jQuery UI's fault, but it does not make a very
 compelling demo.
 Nor does the demo include documentation, downloads, or anything else I
 can see.


 Agreed. Though I didn't author that demo, I've been meaning to fix it up
 for some time. Seeing what you've done has re-inspired me.



 Surely jQuery UI could have been used, but I was not/am not familiar
 enough with it.
 Therefore, I cannot comment if it would actually benefit more than my
 coding time.
 I also wanted to minimize the codebase and dependencies.

 I do plan to experiment with the UI libraries. If they prove
 beneficial, a future release may use it.
 Or, I may incorporate some of UI's optimizations in my own code, if
 applicable.


 Either way, :-)



 As with the naming (e.g. Jcrop vs. jCrop), these are issues I
 considered a lot.
 It's very possible that I made some wrong choices.

 This is the first time I've ever seen lack of a dependency as a
 detriment to someone.


 If someone is already using jQuery UI it's a bit reversed, as the
 duplication/dependence on additional code would be coming from your plugin,
 not the other way around. Of course it goes further than just code size. Not
 to say there's no place for Jcrop. There will always be a place for
 stand-alone plugins. But jQuery UI could really benefit from having
 available such a stellar image crop plugin as well.

 I'll take a crack at merging some bits of what you've done with what
 jQuery UI has. We'll see where it lands us. As I said, I'd been meaning to
 do something like this anyway, and you've done a lot of really great and
 hard work. So, thanks :)

 - Richard





[jQuery] Re: hover() with mouseout() problem

2008-09-18 Thread weidc

i guess the submenu dissapears 'cause you leave the menu item and
don't hover over it anymore.
maybe use mouseover() and mouseout() like that:

$(document).ready(function(){
$(#trzy).mouseover(
  function(){
$('#dwaOver').animate({
opacity: 1
}, 200);
  });
  $(#dwaOver).mouseout(function(){
$('#dwaOver').animate({
opacity: 0
}, 100);

  }
);

})

-weidc
On 17 Sep., 16:29, pawel.szymula [EMAIL PROTECTED] wrote:
 Hi,
 I'm having some problems - i'm sure they're lame, but i can't handle
 with them by myself. Any help really appreciated :)

 So, here's the problem:

 I'm moving mouse over menu item, then a submenu (beneath the main
 menu) shows up. I'd like to move mouse around the submenu, but it
 dissapears.

 How to make submenu visible (and clickable, because it contains an
 unsorted list) and make it dissapear after moving mouse out from it?

 Here's the code:

         $(document).ready(function(){
                         $(#trzy).hover(
                           function(){
                                 $('#dwaOver').animate({
                                         opacity: 1
                                 }, 200);
                           },
                           function(){
                                 $('#dwaOver').animate({
                                         opacity: 0
                                 }, 100);

                           }
                         );

         })

 BTW. Sry for my english


[jQuery] Using .load and updating the DOM

2008-09-18 Thread Paul

Hi - I'm using .load to update a panel on a page when a user clicks to
add an item to a list.

The panel reloads ok, but next to the item in the list is a link to
remove it - this is an a tag with a class; I have a function
listening out for clicks on links with this class, but this doesn't
work for links that are loaded into the updated panel _after_ the page
has been loaded.

The list is up-to-date, but the remove links are redundant.

Is there a way to update the dom so that it 'knows' these links exist
and have the corresponding class to fire the remove function?

Have I made any sense at all? :) Anyone that can offer some advice, it
will be greatly appreciated!


[jQuery] selection element

2008-09-18 Thread Alper Hankendi

I have selection problem. When i call the function value isnt comming.
How can i choose the title value from this array?

HTML
LI class=resourceListItem id=649459 title='=WTF=RvrvDH/k8XAVENVFZJ/
xoQKasfd/JsdfhJTVKVadsfASA='
LI class=resourceListItem id=649458 title='=WTF=RvrvDH/sdafasENVFZJ/
xoQadfwCd/JXhJTVKVOXdasdA='
LI class=resourceListItem id=649457 title='=WTF=RvrvDH/k8XsadNVFZJ/
xoQKwCsdfa/JXhJTVDewfsdDWW='
LI class=resourceListItem id=649456 title='=WTF=RvrvDH/asfdsfAVENVFZJ/
xtlqNwmXBhxUfqGt3V8Cg8E='


js
var id =649458
alert($(li.resourceListItem #+id).title);


Thanks,


[jQuery] Re: getting/setting height() in IE6 quirks mode behaves inconsistently

2008-09-18 Thread Enrique Meléndez Estrada


Please, publish that fix as a jQuery function...thnxs! ;-)

El 17/09/2008 19:26, Matt Kruse escribió:

In IE6, quirks mode, I expect this to not change their height of an
object:

var h = $obj.height();
$obj.height(h);

However, it does cause a re-size (if the object has padding/borders).
Is this intended?
( Using: http://code.jquery.com/jquery-latest.pack.js )

It looks like when height() is called, it returns the internal height,
minus borders and padding.
When height(val) is called, the height includes borders and padding.

I believe these should behave consistently in quirks mode. In
standards mode they work fine.

For now I will write a fix that switches based on compatMode.

Matt Kruse

  



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



[jQuery] Re: this.style is null or not an object

2008-09-18 Thread MorningZ

the problem is you have a div tag with the id of showError and you
also seemingly have an event called showError

That's not good to have and is probably the source of your issue



[jQuery] Re: Finding DIVS with similar IDs

2008-09-18 Thread MorningZ

yeah, my mistake on my post, shouldn't have had # in it


[jQuery] about $(document).ready()

2008-09-18 Thread 立体风
Hello all,
Why sometimes with time, and sometimes $(document).ready() with many
times?


[jQuery] div.hover, only w/ background-settings in IE?

2008-09-18 Thread bnlps

hi, ..

by using this snippet, everything works great in Firefox - you can
move the mouse
everywhere inside the red DIV border, and get out .. the fading effect
always works correctly.

but, in IE 6/7, .hover only seems to act when the mouse is AT the red
border; well,
if you set a background-color to #test, or, a background-image (like a
transparent GIF),
it also works ... but, when setting a transparent GIF, IE 6
flickers ... like, swichtes
between default cursor and hour glass during the fading process ...
also, can't set
background-color, because the (original) site itself has a background-
image ... so, the
DIV must remain transparent at all.


any solutions?

please, have a look at this..

...

div#test{position:absolute;top:100px;left:100px;height:300px;width:
300px;border:1px solid #f00;}

...

$(function(){

$('#test').fadeTo(0,0.25);

$('#test').hover(
function(){$(this).fadeTo('slow',1);},
function(){$(this).fadeTo('slow',0.25);}
);


});

...

div id=test.../div


love,
-bnlps


[jQuery] Re: [validate] Issues in IE6

2008-09-18 Thread Mattl

Thanks Jorn, however I'm still seeing the issue. Could someone check
on their version of IE6?

I get:

Line 30
Char: 1
Error: Object doesn't support this property or method
Code: 0


On Sep 17, 8:33 am, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Works fine for me, even in IE6.

 Jörn



 On Tue, Sep 16, 2008 at 10:49 PM, Mattl [EMAIL PROTECTED] wrote:

  Hi,
  I've got form validation 
  usinghttp://bassistance.de/jquery-plugins/jquery-plugin-validation/
  working well in Firefox 2, Safari 3.1, Opera 9.5 etc but throwing up
  an error in IE6.

  I can't see what's wrong, any suggestions?

 http://www.edenvillamedical.co.uk/

  The form in question is under the 'Prescriptions' tab. 'Patient Name'
  is required.

  Appreciate any help.

  Many thanks
  Matt- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Using .load and updating the DOM

2008-09-18 Thread Paul

Ah, I've now discovered LiveQuery and it all makes sense.

Sorry for wasting your time if you read this.


[jQuery] Re: get an image from an input field just with javascript

2008-09-18 Thread ^AndreA^

yeah, unfortunately you are both right... :-|

In fact I was afraid to receive this answer...

Anyway, how can I upload the image just with js and without submitting
the form?

jQuery standard function ($.ajax) does not seem to allow a file/image
as a file type...

I also looked to some plugins and they allow just xml,json...

Have you got any idea about what I can use?

Thanks,
Andrea

On Sep 17, 6:53 pm, tlphipps [EMAIL PROTECTED] wrote:
 You could certainly accomplish this with a little bit of AJAX thrown
 in.

 Scenario:
 - user selects image (using input type='file')
 - user clicks 'preview' button
 - system submits selected image file via AJAX to server
 - server processes image upload and stores file on server
 - In the AJAX 'success' handler, create new img tag on page which
 references newly stored image file on server.

 On Sep 17, 12:04 pm, config [EMAIL PROTECTED] wrote:

  You can't view the file because of security restrictions.

  A *long* time ago one could grab the path and call it with the file://
  protocol, but this is now blocked in most (all?) browsers. Similarly,
  one can't write a path into the file input.

  G.


[jQuery] Re: get an image from an input field just with javascript

2008-09-18 Thread ^AndreA^

yeah, unfortunately you are both right... :-|

In fact I was afraid to receive this answer...

Anyway, how can I upload the image just with js and without submitting
the form?

jQuery standard function ($.ajax) does not seem to allow a file/image
as a file type...

I also looked to some plugins and they allow just xml,json...

Have you got any idea about what I can use?

Thanks,
Andrea

On Sep 17, 6:53 pm, tlphipps [EMAIL PROTECTED] wrote:
 You could certainly accomplish this with a little bit of AJAX thrown
 in.

 Scenario:
 - user selects image (using input type='file')
 - user clicks 'preview' button
 - system submits selected image file via AJAX to server
 - server processes image upload and stores file on server
 - In the AJAX 'success' handler, create new img tag on page which
 references newly stored image file on server.

 On Sep 17, 12:04 pm, config [EMAIL PROTECTED] wrote:

  You can't view the file because of security restrictions.

  A *long* time ago one could grab the path and call it with the file://
  protocol, but this is now blocked in most (all?) browsers. Similarly,
  one can't write a path into the file input.

  G.


[jQuery] Re: jquery.com incredibly slow for me

2008-09-18 Thread Michael
On Wed, Sep 17, 2008 at 7:05 PM, John Resig [EMAIL PROTECTED] wrote:


 We just acquired four new servers from Media Temple, yesterday. We'll
 be moving the various sub-domains (docs, plugins, dev, ui) to their
 own unique servers this week - this should help with load times
 significantly.

 But yes, it's mostly due to popularity issues (we're getting the
 equivalent of about 4 Digg/Slashdot-ings worth of traffic, per day, at
 this point).


U! Thatsalot. Weel i guess that answers my questions perfectly. Hope
you're getting this fixed. Even nicer would be, if you could tell us,
there's a standalone version of the help-system out there. (who's based on
1.2.6)
:-)

--
micha


[jQuery] Re: get an image from an input field just with javascript

2008-09-18 Thread tlphipps

I've never done it, but I know of two scripts which support it:

1) http://www.phpletter.com/Demo/AjaxFileUpload-Demo/
2) http://malsup.com/jquery/form/#code-samples (file uploads tab)

On Sep 18, 7:22 am, ^AndreA^ [EMAIL PROTECTED] wrote:
 yeah, unfortunately you are both right... :-|

 In fact I was afraid to receive this answer...

 Anyway, how can I upload the image just with js and without submitting
 the form?

 jQuery standard function ($.ajax) does not seem to allow a file/image
 as a file type...

 I also looked to some plugins and they allow just xml,json...

 Have you got any idea about what I can use?

 Thanks,
 Andrea

 On Sep 17, 6:53 pm, tlphipps [EMAIL PROTECTED] wrote:

  You could certainly accomplish this with a little bit of AJAX thrown
  in.

  Scenario:
  - user selects image (using input type='file')
  - user clicks 'preview' button
  - system submits selected image file via AJAX to server
  - server processes image upload and stores file on server
  - In the AJAX 'success' handler, create new img tag on page which
  references newly stored image file on server.

  On Sep 17, 12:04 pm, config [EMAIL PROTECTED] wrote:

   You can't view the file because of security restrictions.

   A *long* time ago one could grab the path and call it with the file://
   protocol, but this is now blocked in most (all?) browsers. Similarly,
   one can't write a path into the file input.

   G.


[jQuery] Re: jquery.com incredibly slow for me

2008-09-18 Thread John Resig

 AFAIK jquery.com provides files for downloading not hotlinking. So you
 should have used your own server to serve js in the first place.

We provide code.jquery.com to hotlink to - that's perfectly ok.

--John


[jQuery] Re: Selecting a nested Ajax Tab from a link

2008-09-18 Thread Klaus Hartl

That's trickier than usual because you have to wait for the first Ajax
reponse to be completed (otherwise you would just select the proper
tabs in sequence). Try:

$('.buynow a').click(function() {
$('#main  ul').
bind('tabsload', function(e, ui) {
$('ul.sub-ui-tabs-nav', ui.panel).tabs({ selected: 3 });
$('#main  ul').unbind('tabsload');
}).
tabs('select',0);
return false;
});

I wonder what use Ajax tabs do have here though, as they make the user
just wait longer in this case.

--Klaus



On Sep 17, 4:22 pm, spyFly [EMAIL PROTECTED] wrote:
 Hello!

 I am using UI Tabs...and I think it is GREAT!
 Q: Is there an easy way to navigate to a Nested Ajax Tab from the main
 tabbed page?

 I have created a tabbed page with Ajax 
 content:http://www.edh.realmdigital.co.za/productgroup/golf/60
 The first Tab has nested Ajax tabs.
 For the life of me I cannot figure out how to select a SPECIFIC nested
 tab from a link on the main page.
 If you click on Buy Now I need to go to the first main tab and then
 to the 3rd nested tab within.

 I can select the main tab, but how do I tell it to select the 3rd
 nested tab (only when you click on 'buy now')

 $('.buynow a').click(function() {
         $('#main  ul').tabs('select',0);
         return false;

 });

 So what i need is click buynow -- goto Main Tab (0) and then when
 the nested tabs are built -- goto Nested Tab 3.

 Any advice will be greatly appreciated.

 Kind Regards
 Nico


[jQuery] Re: best/standard way to benchmark your own scripts?

2008-09-18 Thread Ariel Flesler

While firebug's profile is ok... it inflates times quite a lot, prolly
due to all the stuff it inserts around in your code.
I compare FF w/FB vs FF w/o FB and the results were a lot different.

I'd not recommend it for very specific tests.
Also, some approaches can be faster on FF and slower on other browsers
(like string concatenation vs array push+join).

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

On Sep 17, 1:51 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Do you use Firebug? It has a Profile option under the Console tab,
 that will profile (duh) all js action going on while it's on, giving
 you details like number of function calls and the time each took to
 execute, that's plenty of information ;)

 ricardo

 On Sep 17, 1:14 am, Alex Weber [EMAIL PROTECTED] wrote:

  looking to find possible bottlenecks and basically optimize the hell
  outta my js which relies heavily on jquery and the occasional
  plugin...

  is there a more elegant and efficient way to do this than to toss a
  few document.write()s at my code?? =P

  thanks!!

  -Alex


[jQuery] Re: find, not selector not working

2008-09-18 Thread vtjiles

Thank you! Your code worked great and your explanation of the space
and  is just what was needed.

Based on your explanation of , because there was no  before the li,
it was finding an li at any depth with an input child. By adding the 
at the begging it is now only looking for direct children of #el.

$(#el).find( li  input);


On Sep 18, 6:01 am, Richard D. Worth [EMAIL PROTECTED] wrote:
 Try

 $(#el  li  input)

 The (rough equiv) long-hand for that would be

 $(#el).children(li).children(input)

 So the space ( ) in css is analogous to .find(), and the
 right-angled-bracket () to .children().

 - Richard

 On Wed, Sep 17, 2008 at 11:56 PM, vtjiles [EMAIL PROTECTED] wrote:

  I have the fairly simple markup below and am trying to only get only
  the checkboxes under the first level LI (Main 1 and Main 2), not the
  deeper ones.

  ul id=el
         li
                 input type=checkbox value=1 / - Main 1
                 ul
                         li
                                 input type=checkbox value=1 / - Sub 1
                         /li
                         li
                                 input type=checkbox value=1 / - Sub 2
                                 ul
                                         li
                                                 input type=checkbox
  value=1 / - Sub 2 Sub 1
                                         /li
                                 /ul
                         /li
                 /ul
         /li
         li
                 input type=checkbox value=1 / - Main 2
         /li
  /ul

  Using $(#el).find(li input) gets all 5 checkboxes. I've tried
  multiple variations of find(li input).not(li ul input) as well as
  using :not() in the selector which doesn't work.

  One way that did finally work:
  var notgroup = $(#el).find(li ul input);
  $(#el).find(li input).not(notgroup)

  Why does it work if there is a variable which is the result of the
  selector, but not the selector itself?

  Is there any better way to do this?


[jQuery] jQuery.sheet, new layout, ThemeRoller integrated, what does everyone think?

2008-09-18 Thread K-BL

Hey Guys,
I just released jQuery.sheet 0.3.0 and wanted to know what everyone
thought about it.  Check out documentation  demo here:
http://jqueryplugins.weebly.com/uploads/3/1/3/8/313814/jquery.sheet.html
Check out home page here: http://jqueryplugins.weebly.com/ .

With your help, we can make jQuery.sheet the premier web-based
spreadsheet!


K-BL


[jQuery] Re: about $(document).ready()

2008-09-18 Thread ~flow

敬��原��但是文字上大概有�c儿不太清楚。

`$(document).ready(x)` [EMAIL PROTECTED]
如果document已��完成的�r候script�f`$(document).ready(x)`的��,那它的引��`x`立即被execute。

一个document ready的引��function可以有多少clauses,也可以在一个script�Y面define多少document
ready,它��都�⒈��绦小�

例。$(document).ready(function(){alert('helo')})

以上。

On Sep 18, 1:43 pm, 立体风 [EMAIL PROTECTED] wrote:
 Hello all,
 Why sometimes with time, and sometimes $(document).ready() with many
 times?

[jQuery] Superfish menu - flash of unstyled list before load

2008-09-18 Thread Terry.Morgan

Hi there,

I've got a Superfish menu on a page I'm working on but I'm getting a
flash of the unstyled list before the menu loads properly.

This is slightly different to the fairly rare flash of unstyled
content bug as the CSS backgrounds and other CSS are being loaded ok
at the same time as the unstyled list is flashed up.

This only seems to affect Internet Explorer

Here's the page it's happening on:

http://vse.nmdemo.net/

Any ideas?

Cheers,
Terry



[jQuery] Problem Firing AutoComplete in JQUERY

2008-09-18 Thread aimhier

Autocomplete is not fired for a textfield when the field is loaded
using ajax but the is fired when the same field is loaded directly. Is
there any issue that needs to be resolved regarding the same.


[jQuery] jTemplates and event handlers ?

2008-09-18 Thread websam

Hi there,

I have created a table of data using jTemplates where I have my table
template in a seperat .html file. I generate some links in the the
table that i want to add a event handler to but i can't get it to
work. What i do is using this code to add event handlers to all links
with class name remote and then add it to (document).ready :

function addClickHandlers() {
$(a.remote, this).click(function(e) {
e.preventDefault;
$(#Container).load(this.href, addClickHandlers);
alert('Testing event handler');
});
}
$(document).ready(addClickHandlers);

But the event handler does not get added. Is that because the
jTemplate is in a seperat file ?


[jQuery] jTemplate and AJAX ?

2008-09-18 Thread websam

I have tested the use of jQuery, jTemplates and AJAX together with
asp.net shown in this blog :

http://encosia.com/2008/08/20/easily-build-powerful-client-side-ajax-paging-using-jquery/

And i got everything to work against my library of methods. However i
need to set some event handlers to the data i load through AJAX and i
can't get it to work. This is what I have tryed :

function addClickHandlers() {
$(a.remote, this).click(function(e) {
e.preventDefault;
$(#RSSTable).load(this.href, addClickHandlers);
alert('Testing event handler');
});
}
$(document).ready(addClickHandlers);

As I understand from the jQuery docs then I have to do it this way to
prevent memory leaks. Can someone point me in the right direction on
how to do this ?


[jQuery] puzzling black hole in $(...).hasClass()?

2008-09-18 Thread ~flow


hi all,

i’m doing this in ffx2 and firebug1.05; i have a local document
loaded, go to the firebug console, and write

  $log( $Q( 'div' ).hasClass( '' ) ); $log( '###' )

to which firebug responds with
  true
  ###

thereby showing bot commands did execute. now i repeat the experiment,
but with

  $log( $Q( 'div' ).hasClass( '.x' ) ); $log( '###' )

the argument to `hasClass` is problematic: it uses selector-syntax and
starts with a dot. this is a mistake that easily results from copy-n-
pasting code. acceptable reactions of jQuery to this would be
responding with something like `null`, `undefined`, or `false`, or
raising an exception for having been passed a bogus argument.

instead what happens: NOTHING. NADA. firebug displays RIEN de tout.
this bit me when i wrote a suite of several method calls, one of which
included dotted class name---the code would run to a certain point,
then simply VANISH like being swallowed by a black hole. firebug
breakpoints etc. haven’t helped me so far.

i’m not even sure how to simulate this behavior using only
javascript---can’t be an early return statement, as then the `###`es
in the above example would still print out. javascript execution just
stops silently in some dark dead end. any ideas, anyone?

cheers  ~flow


[jQuery] Re: jdmenu top level links disabled with submenus

2008-09-18 Thread dduck1934

Okay i saw there is a disableLink property in the jdmenu, and I am not
sure how to call it.

var settings = $.extend({   // Time in ms before menu shows
showDelay:  200,
// Time in ms before menu hides
hideDelay:  500,
// Should items that contain submenus not
// respond to clicks
disableLinks:   true
// This callback allows for you to animate menus
//onAnimate:null
}, settings);

How do I use these settings when i specify these settings with the
jdmenu call
Here is what i was trying..

$(function(){
$('ul.jd_menu').jdMenu({disableLinks:false});
});

but this isnt working for me.  The top level links are still not
clickable



On Sep 17, 5:54 pm, dduck1934 [EMAIL PROTECTED] wrote:
 Hey all,

 Im using the jdmenu and when i add some sub menus, the top level menu
 item link is disabled.  If i try to click it it does nothing, and I
 need to have that top level menu item still available to be clicked
 on.  If anyone has any suggestions, please let me know.

 Cheers,
 Matthew


[jQuery] Re: jquery.com incredibly slow for me

2008-09-18 Thread William Chang

Same here, slowness and unresponsive been going on over a week.

I reported on the jQuery Development mailing list:
http://groups.google.com/group/jquery-dev/browse_thread/thread/5efcd4be97067ef

Sincerely,
Will

On Sep 18, 8:40 am, Michael [EMAIL PROTECTED] wrote:
 On Wed, Sep 17, 2008 at 7:05 PM, John Resig [EMAIL PROTECTED] wrote:

  We just acquired four new servers from Media Temple, yesterday. We'll
  be moving the various sub-domains (docs, plugins, dev, ui) to their
  own unique servers this week - this should help with load times
  significantly.

  But yes, it's mostly due to popularity issues (we're getting the
  equivalent of about 4 Digg/Slashdot-ings worth of traffic, per day, at
  this point).

 U! Thatsalot. Weel i guess that answers my questions perfectly. Hope
 you're getting this fixed. Even nicer would be, if you could tell us,
 there's a standalone version of the help-system out there. (who's based on
 1.2.6)
 :-)

 --
 micha


[jQuery] Re: nth-child(n) not working for me - I didn't see my previous post

2008-09-18 Thread kcharles

You rock!
That was it.
-Kevin


[jQuery] Re: Need some help with image map coding....

2008-09-18 Thread Aaron

well what can I do to use javascript  to submit a name to my php
code???

I want to use the image map as a gui so I want it to act just like a
form where I can name each state and then pass that name using post
method to my php script which will do a database lookup and then once
the list is create then I will take off the image map and put in the
table with the list displayed.

this is what I want to do but I can't figure out how I can pass the
name to my php script...



[jQuery] Re: this.style is null or not an object

2008-09-18 Thread kim
ok, i had to make double checks and it's actually the when scriptaculous is
used along side effects.js library. all these needed by lightbox.

On Thu, Sep 18, 2008 at 9:07 PM, kim [EMAIL PROTECTED] wrote:

 i've found the cause of the error. seems like jquery doesn't work well with
 scriptaculous. we are using the lightbox library, and it requires
 scriptaculous. after excluding the scriptaculous library, my jquery code
 works!

 is this a known issue?

 thanks.


 On Thu, Sep 18, 2008 at 7:01 PM, MorningZ [EMAIL PROTECTED] wrote:


 the problem is you have a div tag with the id of showError and you
 also seemingly have an event called showError

 That's not good to have and is probably the source of your issue





[jQuery] Re: Superfish navbar for Wordpress

2008-09-18 Thread kiper

Hi Joel!

I am just happy if I can contribute to make Superfish even better!

All the best,

Müfit

On Sep 18, 5:29 am, Joel Birch [EMAIL PROTECTED] wrote:
 Hi Müfit,

 Thanks for your well-articulated thoughts on this. I agree that being
 able to specify more that one pathClass would be very useful for
 WordPress generated menus. I will aim to get this in as a Superfish
 feature as soon as possible, although I'm snowed under with work for
 the next few weeks.

 Thanks again for the great feedback. I wish I could offer more immediate help.

 Joel Birch.


[jQuery] Re: jquery.com incredibly slow for me

2008-09-18 Thread vld

I had looked for a long time for good off-line copy of jQuery docs.
Not only for performance reasons - I do develop while commuting. So
far, checking out and using 
http://jqueryjs.googlecode.com/svn/trunk/tools/api-browser
meets my needs.

The only thing I am not sure about is how up-to-date the api-browser
is. Any comments?

On Sep 18, 8:44 am, John Resig [EMAIL PROTECTED] wrote:
  AFAIK jquery.com provides files for downloading not hotlinking. So you
  should have used your own server to serve js in the first place.

 We provide code.jquery.com to hotlink to - that's perfectly ok.

 --John


[jQuery] Re: Hover on all elements: $(*).hover(...)

2008-09-18 Thread [EMAIL PROTECTED]

Interesting.

Does anyone know if event.stopPropagation() is broken, not implemented
for the hover() anonymous functions, or we are using it wrong?

On Sep 18, 12:26 am, John Boxall [EMAIL PROTECTED] wrote:
 Aaron, I had the same thought - when tried event.stopPropagation() it
 just kept on sailing right up (though I'd like to test this again).

 What I ended up with was a solution with a two global variables.

 var flip = True;
 var hover;

 function hoverIn(event) {
     if (flip) {
         $(this).addClass('selected');
         if (hover  hover != this) {
             $(hover).removeClass('selected');
         }
         hover = this;
         flip = false;
     }

 }

 function hoverOut(event) {
     $(this).removeClass('selected');
     flip = true;

 }

 $(*).hover(hoverIn, hoverOut);

 Thanks everyone for your help!

 John

 On Sep 17, 12:54 pm, Karl Swedberg [EMAIL PROTECTED] wrote:

  This one worked for me...

  $('body').bind('mouseover', function(event) {
     $(event.target).addClass('selected');}).bind('mouseout', function(event) 
  {

     $(event.target).removeClass('selected');

  });

  You'll run into problems if you have properties assigned to more  
  specific selectors in your stylesheet, but otherwise, it should work  
  fine.

  --Karl

  
  Karl Swedbergwww.englishrules.comwww.learningjquery.com

  On Sep 17, 2008, at 9:50 AM, benjam wrote:

   This is insanely kludgy, not very pretty, and probably slower than a
   more elegant solution.

   But it works.

      $('*').hover(
              function(event) {
                      var $this = $(this);
                      $this.addClass('selected');
                      $this.parents( ).removeClass('selected');
              },
              function(event) {
                      var $this = $(this);
                      $this.removeClass('selected');
                      $this.parents( ).removeClass('selected');
                      $this.parent( ).addClass('selected');
                      $this.children( ).removeClass('selected');
              }
      );

   I'm sure there are better solutions out there, but this was the
   fastest and easiest method.

   On Sep 17, 2:04 am, Balazs Endresz [EMAIL PROTECTED] wrote:
   I'm not sure I get it, but if you want to grab the strong inside a
   p when the event is only bound to p then you can get it simply by
   event.target:

   $('body').find('*').filter(function(){
     return !$(this).children().length;})

   .add('p').not('p *')
   .hover(function(event){

       var t=event.target  //this will be the strong tag inside the p

       if ($(this).children().length()  0) {
          return False
       }

       $(this).addClass('selected');
     },
     function(){
        $(this).removeClass('selected');
     }
   );

   You can also try this with event delegation, which will be much  
   faster
   with a lot of 
   elements:http://dev.distilldesign.com/log/2008/jan/27/event-delegation-jquery/...

   On Sep 16, 7:17 pm, John Boxall [EMAIL PROTECTED] wrote:

   Hi Balazs,

   Thanks for the reply - looking at your suggestion, my idea was to
   apply it to the code like this:

   $(function() {
           $(*).hover(
              function(){

                   // If the element has more than one child stop
   propagating.
                   if ($(this).children().length()  0) {
                       return False
                   }

                   $(this).addClass('selected');
               },
               function(){
                   $(this).removeClass('selected');
               }
           );

   }

   This is _close_ to what I want, but what I'd really like is to grab
   DOM element you are hovering over with the minimum number of  
   children
   - not necessarily zero.

   It's my understanding that with the above, if you hovered over a p
   with a strong inside you couldn't select the p because it would
   have a child!

   Thanks,

   John

   Should only return true if the selected $(this) has no children.
   This is _close_ to what I want - but what I'd really like is to grab
   the element

   On Sep 14, 4:10 am, Balazs Endresz [EMAIL PROTECTED] wrote:

   Hey John,

   I think this will do that:

   $('body').find('*').filter(function(){
     return !$(this).children().length;})

   .add('p').not('p *') //without this, if a paragraph contains tags  
   thehoverwon't be applied to the most of the text

   On Sep 12, 9:29 pm, John Boxall [EMAIL PROTECTED] wrote:

   Heyo jQuery hackers,

   I'm putting together a little script that adds a class  
   selected to
   an element when youhoverover it.
   When you stop hovering the class selected class is removed.

   I would like the class only to be apply to the lowest element in  
   the
   DOM.

   For example say I was hovering over a p deep inside a document  
   - I
   would like to only add the class selected to that p tag, not  
   the
   div, body and html tags surrounding it.

   So 

[jQuery] Re: Hover on all elements: $(*).hover(...)

2008-09-18 Thread benjam

Nicely done Karl, I knew there was a better way.

On Sep 17, 1:54 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
 This one worked for me...

 $('body').bind('mouseover', function(event) {
    $(event.target).addClass('selected');}).bind('mouseout', function(event) {

    $(event.target).removeClass('selected');

 });

 You'll run into problems if you have properties assigned to more  
 specific selectors in your stylesheet, but otherwise, it should work  
 fine.

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 17, 2008, at 9:50 AM, benjam wrote:



  This is insanely kludgy, not very pretty, and probably slower than a
  more elegant solution.

  But it works.

     $('*').hover(
             function(event) {
                     var $this = $(this);
                     $this.addClass('selected');
                     $this.parents( ).removeClass('selected');
             },
             function(event) {
                     var $this = $(this);
                     $this.removeClass('selected');
                     $this.parents( ).removeClass('selected');
                     $this.parent( ).addClass('selected');
                     $this.children( ).removeClass('selected');
             }
     );

  I'm sure there are better solutions out there, but this was the
  fastest and easiest method.

  On Sep 17, 2:04 am, Balazs Endresz [EMAIL PROTECTED] wrote:
  I'm not sure I get it, but if you want to grab the strong inside a
  p when the event is only bound to p then you can get it simply by
  event.target:

  $('body').find('*').filter(function(){
    return !$(this).children().length;})

  .add('p').not('p *')
  .hover(function(event){

      var t=event.target  //this will be the strong tag inside the p

      if ($(this).children().length()  0) {
         return False
      }

      $(this).addClass('selected');
    },
    function(){
       $(this).removeClass('selected');
    }
  );

  You can also try this with event delegation, which will be much  
  faster
  with a lot of 
  elements:http://dev.distilldesign.com/log/2008/jan/27/event-delegation-jquery/...

  On Sep 16, 7:17 pm, John Boxall [EMAIL PROTECTED] wrote:

  Hi Balazs,

  Thanks for the reply - looking at your suggestion, my idea was to
  apply it to the code like this:

  $(function() {
          $(*).hover(
             function(){

                  // If the element has more than one child stop
  propagating.
                  if ($(this).children().length()  0) {
                      return False
                  }

                  $(this).addClass('selected');
              },
              function(){
                  $(this).removeClass('selected');
              }
          );

  }

  This is _close_ to what I want, but what I'd really like is to grab
  DOM element you are hovering over with the minimum number of  
  children
  - not necessarily zero.

  It's my understanding that with the above, if you hovered over a p
  with a strong inside you couldn't select the p because it would
  have a child!

  Thanks,

  John

  Should only return true if the selected $(this) has no children.
  This is _close_ to what I want - but what I'd really like is to grab
  the element

  On Sep 14, 4:10 am, Balazs Endresz [EMAIL PROTECTED] wrote:

  Hey John,

  I think this will do that:

  $('body').find('*').filter(function(){
    return !$(this).children().length;})

  .add('p').not('p *') //without this, if a paragraph contains tags  
  thehoverwon't be applied to the most of the text

  On Sep 12, 9:29 pm, John Boxall [EMAIL PROTECTED] wrote:

  Heyo jQuery hackers,

  I'm putting together a little script that adds a class  
  selected to
  an element when youhoverover it.
  When you stop hovering the class selected class is removed.

  I would like the class only to be apply to the lowest element in  
  the
  DOM.

  For example say I was hovering over a p deep inside a document  
  - I
  would like to only add the class selected to that p tag, not  
  the
  div, body and html tags surrounding it.

  So far my thinking has been to use something like this:

  $(function() {
          $(*).hover(
             function(){
                  $(this).addClass('selected');
              },
              function(){
                  $(this).removeClass('selected');
              }
          );

  }

  Which adds the selected class to any element Ihoverover fine. It
  also removes it.

  The problem is thehoveris firing all the way up the chain and
  hitting all elements from the lowest to the highest so I've got  
  a ton
  of ugly selected elements when I really just wanted the lowest  
  one...

  Is there any way I can restrict it?

  Thanks,

  John


[jQuery] Re: this.style is null or not an object

2008-09-18 Thread kim
i've found the cause of the error. seems like jquery doesn't work well with
scriptaculous. we are using the lightbox library, and it requires
scriptaculous. after excluding the scriptaculous library, my jquery code
works!

is this a known issue?

thanks.

On Thu, Sep 18, 2008 at 7:01 PM, MorningZ [EMAIL PROTECTED] wrote:


 the problem is you have a div tag with the id of showError and you
 also seemingly have an event called showError

 That's not good to have and is probably the source of your issue




[jQuery] jQuery.center Plugin

2008-09-18 Thread Mr Fett

Hi all,

I'm trying to debug a plugin - I believe its a new plugin and has a
bug as the behavior of it is incredibly inconsistent across browsers.
The plugin is the jQuery.center - 
http://plugins.jquery.com/project/elementcenter.

For reference I've put a basic example of my implementation of this:

http://www.rdp.freshmango.com/defaultAlexanmtz.asp

I also found another version of the plugin here:
http://exscale.se/archives/2007/11/20/jquery-center-element-plugin/

For reference I've put a basic example of my implementation of this
one here:

http://www.rdp.freshmango.com/

Does anyone have any ideas?

Basically all I'm trying to do is vertically  horizontally center a
fixed width/height DIV in the browser window.

Thanks!

Bob


[jQuery] Re: jQuery.center Plugin

2008-09-18 Thread Andy Matthews

Bob...

Is there any reason why you're not doing this with pure CSS? You'd probably
be done by now if you did. Here's a simple example:

http://commadelimited.com/uploads/center.html

As you can see, there's hardly anything to the CSS, and it's very simple to
implement.


andy
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mr Fett
Sent: Thursday, September 18, 2008 10:47 AM
To: jQuery (English)
Subject: [jQuery] jQuery.center Plugin


Hi all,

I'm trying to debug a plugin - I believe its a new plugin and has a bug as
the behavior of it is incredibly inconsistent across browsers.
The plugin is the jQuery.center -
http://plugins.jquery.com/project/elementcenter.

For reference I've put a basic example of my implementation of this:

http://www.rdp.freshmango.com/defaultAlexanmtz.asp

I also found another version of the plugin here:
http://exscale.se/archives/2007/11/20/jquery-center-element-plugin/

For reference I've put a basic example of my implementation of this one
here:

http://www.rdp.freshmango.com/

Does anyone have any ideas?

Basically all I'm trying to do is vertically  horizontally center a fixed
width/height DIV in the browser window.

Thanks!

Bob




[jQuery] Re: jquery.com incredibly slow for me

2008-09-18 Thread misterqj

Hi John,

Since we are on the subject of resources...

How is jquery funded/supported? Corporate sponsors, community support,
pennies from heaven, change from your couch...

Thanks for the info.

On Sep 17, 12:05 pm, John Resig [EMAIL PROTECTED] wrote:
 We just acquired four new servers from Media Temple, yesterday. We'll
 be moving the various sub-domains (docs, plugins, dev, ui) to their
 own unique servers this week - this should help with load times
 significantly.

 But yes, it's mostly due to popularity issues (we're getting the
 equivalent of about 4 Digg/Slashdot-ings worth of traffic, per day, at
 this point).

 On 9/17/08, misterqj [EMAIL PROTECTED] wrote:





  I have experienced the same thing. Based on other messages in this
  newsgroup, I think it is a combo of hosting issues and jQuery's
  popularity. On one hand, it is great that the toolkit is being so
  widely used, but on the other hand it seems that the resources aren't
  keeping up with demand.

  It is a free toolkit, though, so I am not inclined to complain too
  much. But if they need additional resources, it might be time for the
  community to kick in a little $$.

  On Sep 17, 7:30 am, micha_17 [EMAIL PROTECTED] wrote:
  Can someone please confirm that jquery.com is sometimes (%2) so slow,
  pages won't even show up after 2 minutes waiting ? The slowness has
  been there before tha page has been redesigned.

  I'm on winxp FF3. I's the same with my colleagues here and @home.

 --
 --John


[jQuery] Double JQuery Connundrum

2008-09-18 Thread geme4472

Hi,
I'm creating a widget that uses jquery.  As you might imagine, it
might load on a page already having jquery loaded.  Is there a way to
load two instances of jquery in a page?  Perhaps some variation on
noConflict()?


[jQuery] Re: Hover on all elements: $(*).hover(...)

2008-09-18 Thread John Boxall

Thanks a bunch Karl - I switched to your way much smoother : )

John

On Sep 18, 6:54 am, benjam [EMAIL PROTECTED] wrote:
 Nicely done Karl, I knew there was a better way.

 On Sep 17, 1:54 pm, Karl Swedberg [EMAIL PROTECTED] wrote:

  This one worked for me...

  $('body').bind('mouseover', function(event) {
     $(event.target).addClass('selected');}).bind('mouseout', function(event) 
  {

     $(event.target).removeClass('selected');

  });

  You'll run into problems if you have properties assigned to more  
  specific selectors in your stylesheet, but otherwise, it should work  
  fine.

  --Karl

  
  Karl Swedbergwww.englishrules.comwww.learningjquery.com

  On Sep 17, 2008, at 9:50 AM, benjam wrote:

   This is insanely kludgy, not very pretty, and probably slower than a
   more elegant solution.

   But it works.

      $('*').hover(
              function(event) {
                      var $this = $(this);
                      $this.addClass('selected');
                      $this.parents( ).removeClass('selected');
              },
              function(event) {
                      var $this = $(this);
                      $this.removeClass('selected');
                      $this.parents( ).removeClass('selected');
                      $this.parent( ).addClass('selected');
                      $this.children( ).removeClass('selected');
              }
      );

   I'm sure there are better solutions out there, but this was the
   fastest and easiest method.

   On Sep 17, 2:04 am, Balazs Endresz [EMAIL PROTECTED] wrote:
   I'm not sure I get it, but if you want to grab the strong inside a
   p when the event is only bound to p then you can get it simply by
   event.target:

   $('body').find('*').filter(function(){
     return !$(this).children().length;})

   .add('p').not('p *')
   .hover(function(event){

       var t=event.target  //this will be the strong tag inside the p

       if ($(this).children().length()  0) {
          return False
       }

       $(this).addClass('selected');
     },
     function(){
        $(this).removeClass('selected');
     }
   );

   You can also try this with event delegation, which will be much  
   faster
   with a lot of 
   elements:http://dev.distilldesign.com/log/2008/jan/27/event-delegation-jquery/...

   On Sep 16, 7:17 pm, John Boxall [EMAIL PROTECTED] wrote:

   Hi Balazs,

   Thanks for the reply - looking at your suggestion, my idea was to
   apply it to the code like this:

   $(function() {
           $(*).hover(
              function(){

                   // If the element has more than one child stop
   propagating.
                   if ($(this).children().length()  0) {
                       return False
                   }

                   $(this).addClass('selected');
               },
               function(){
                   $(this).removeClass('selected');
               }
           );

   }

   This is _close_ to what I want, but what I'd really like is to grab
   DOM element you are hovering over with the minimum number of  
   children
   - not necessarily zero.

   It's my understanding that with the above, if you hovered over a p
   with a strong inside you couldn't select the p because it would
   have a child!

   Thanks,

   John

   Should only return true if the selected $(this) has no children.
   This is _close_ to what I want - but what I'd really like is to grab
   the element

   On Sep 14, 4:10 am, Balazs Endresz [EMAIL PROTECTED] wrote:

   Hey John,

   I think this will do that:

   $('body').find('*').filter(function(){
     return !$(this).children().length;})

   .add('p').not('p *') //without this, if a paragraph contains tags  
   thehoverwon't be applied to the most of the text

   On Sep 12, 9:29 pm, John Boxall [EMAIL PROTECTED] wrote:

   Heyo jQuery hackers,

   I'm putting together a little script that adds a class  
   selected to
   an element when youhoverover it.
   When you stop hovering the class selected class is removed.

   I would like the class only to be apply to the lowest element in  
   the
   DOM.

   For example say I was hovering over a p deep inside a document  
   - I
   would like to only add the class selected to that p tag, not  
   the
   div, body and html tags surrounding it.

   So far my thinking has been to use something like this:

   $(function() {
           $(*).hover(
              function(){
                   $(this).addClass('selected');
               },
               function(){
                   $(this).removeClass('selected');
               }
           );

   }

   Which adds the selected class to any element Ihoverover fine. It
   also removes it.

   The problem is thehoveris firing all the way up the chain and
   hitting all elements from the lowest to the highest so I've got  
   a ton
   of ugly selected elements when I really just wanted the lowest  
   one...

   Is there any way I can restrict it?

   Thanks,

   

[jQuery] Best JQuery pop-up plugin.

2008-09-18 Thread crypto5


Hi All,

what is the best JQuery pop-up window plugin in your opinion?

I am not strong experienced in JQuery and looking for such plugin but don't
want test everything. So lloking for short cut.

Thanks All!
-- 
View this message in context: 
http://www.nabble.com/Best-JQuery-pop-up-plugin.-tp19556756s27240p19556756.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Best JQuery pop-up plugin.

2008-09-18 Thread MorningZ

I've had great luck/usage with jqModal

(http://dev.iceburg.net/jquery/jqModal/)

very configurable and easy to setup


[jQuery] Re: Best JQuery pop-up plugin.

2008-09-18 Thread GasGiant

Do any of them have a callback type of function for what to do on
close? I'd like to use a modal form that updates the Ajax in the
opener, but only when the modal get's closed.

On Sep 18, 1:43 pm, MorningZ [EMAIL PROTECTED] wrote:
 I've had great luck/usage with jqModal

 (http://dev.iceburg.net/jquery/jqModal/)

 very configurable and easy to setup


[jQuery] Re: Jcrop v0.9.0 image cropping plugin - comments please

2008-09-18 Thread Kelly

I wanted to use jQuery UI but the docs site was down :-)

At the end of the day, I don't think potential consumers of plugin(s)
should be too concerned whether there's an additional few KB of script
loaded on a page which duplicates a functionality already available in
another loaded library. Not as concerned as they should be about how
the end-user experience is, especially when it's all running together.

In other words, I would be concerned if there was a performance
degradation to using both. Absent that, I would evaluate on end-user
factors, or other developer concerns, if any. This is what I was
saying to Jose...which one you should use ought to be based on which
one does what you want it to do better, and then think about things
like ease-of-implementation. In my view, the spectre of bandwidth or
memory efficiency is not an issue on this scale per se.

I'm eager to see a solid demo of cropping using the UI libraries. Then
I'd like to see one with all the same interface features (dragging
from edges, animated ant-lines, etc). I'm not saying all those
features are necessary for a cropping tool, or even desirable to
everyone...I'm just saying, we've got to be able to compare apples to
apples. Regardless of bells and whistles, I think this type of
interface is valuable now and will be more valuable over time as more
sites implement more advanced interfaces and features. UI should have
something better than that existing demo.

I'm a big proponent of re-use, so I really appreciate this discussion
about the UI library. I am more motivated to go investigate how I
could utilize it here. Though I would expect that UI generally has
everything over my engine in terms of features and design, I have a
very specific use and it may be one case where the extra few kilobytes
of homebrew engine actually beats the performance overhead of a bigger
library, I don't know. But, I do plan to do some experiments in the
lab... Maybe when that docs site comes back up! :-)

Thanks again, RDW et al.
-Kelly


On Sep 18, 3:35 am, Richard D. Worth [EMAIL PROTECTED] wrote:
 Yes, both do.

 JCrop has an aspectRatio option. You specify a decimal, or a ratio (16 / 9
 for wide, or 1.0 for square). See

 http://deepliquid.com/content/Jcrop_Manual.html#Setting_Options

 jQuery UI Resizables has a similar option (same key - aspectRatio). If
 specified as a boolean/true it will maintain the original aspect ratio. Or
 you can specify it as a number. Also if the aspectRatio option is not set,
 you can hold the shift-key down while resizing and a square ratio will be
 enforced. See

 http://docs.jquery.com/UI/Resizables/resizable#options(click on the options
 tab)

 - Richard

 On Wed, Sep 17, 2008 at 3:27 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

  Please forgive me if this has been raised before (I may have missed it)
  but do either of these plugins have a contrained aspect ratio feature

  2008/9/17 Richard D. Worth [EMAIL PROTECTED]

  On Wed, Sep 17, 2008 at 10:37 AM, Kelly [EMAIL PROTECTED] wrote:

  Thanks Richard W. And thanks to everyone who has commented.
  I am glad that most of the issues raised have been purely
  philosophical. :)

  Jose, please use whatever plugin you feel is best suited for you
  needs.
  The whole purpose of a plugin is you don't need to worry about what's
  inside.
  If you have a conviction that you want to use jQuery UI somewhere,
  please do.

  Both good points.

  I've seen that jQuery UI-based cropping demo and frankly it's broken.
  I don't think that's jQuery UI's fault, but it does not make a very
  compelling demo.
  Nor does the demo include documentation, downloads, or anything else I
  can see.

  Agreed. Though I didn't author that demo, I've been meaning to fix it up
  for some time. Seeing what you've done has re-inspired me.

  Surely jQuery UI could have been used, but I was not/am not familiar
  enough with it.
  Therefore, I cannot comment if it would actually benefit more than my
  coding time.
  I also wanted to minimize the codebase and dependencies.

  I do plan to experiment with the UI libraries. If they prove
  beneficial, a future release may use it.
  Or, I may incorporate some of UI's optimizations in my own code, if
  applicable.

  Either way, :-)

  As with the naming (e.g. Jcrop vs. jCrop), these are issues I
  considered a lot.
  It's very possible that I made some wrong choices.

  This is the first time I've ever seen lack of a dependency as a
  detriment to someone.

  If someone is already using jQuery UI it's a bit reversed, as the
  duplication/dependence on additional code would be coming from your plugin,
  not the other way around. Of course it goes further than just code size. 
  Not
  to say there's no place for Jcrop. There will always be a place for
  stand-alone plugins. But jQuery UI could really benefit from having
  available such a stellar image crop plugin as well.

  I'll take a crack at merging some bits of what you've done with what
  jQuery UI has. 

[jQuery] Re: Best JQuery pop-up plugin.

2008-09-18 Thread Josh Nathanson


jqModal does have a callback for that, but it gets pretty ugly if you're 
using the same modal window for different forms.  Then you have to 
re-configure the jqModal settings on each modal request.


What I've done is use a combination of the ajaxForm plugin and LiveQuery to 
listen for modal forms when they are requested.  When the modal form 
enters the dom, LiveQuery binds the ajaxForm so that the form is handled 
when it is submitted.  Then you just close the modal and you're done.  That 
way you're not trying to handle everything through the modal callbacks.


-- Josh


- Original Message - 
From: GasGiant [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Thursday, September 18, 2008 10:49 AM
Subject: [jQuery] Re: Best JQuery pop-up plugin.



Do any of them have a callback type of function for what to do on
close? I'd like to use a modal form that updates the Ajax in the
opener, but only when the modal get's closed.

On Sep 18, 1:43 pm, MorningZ [EMAIL PROTECTED] wrote:

I've had great luck/usage with jqModal

(http://dev.iceburg.net/jquery/jqModal/)

very configurable and easy to setup 




[jQuery] Re: Double JQuery Connundrum

2008-09-18 Thread tlphipps

I'm no expert on jquery, but I would do the following:

if (typeof(jQuery) != 'function') {
  //code to load jquery plugin here
}

On Sep 18, 11:57 am, geme4472 [EMAIL PROTECTED] wrote:
 Hi,
 I'm creating a widget that uses jquery.  As you might imagine, it
 might load on a page already having jquery loaded.  Is there a way to
 load two instances of jquery in a page?  Perhaps some variation on
 noConflict()?


[jQuery] Re: Problem Firing AutoComplete in JQUERY

2008-09-18 Thread MorningZ

If you look inside the js file, specifically at the $input.bind part
around line 90, the code is looking for keypresses to fire it's
events.   you're not firing any of those with your ajax load of
it

so it would be like mis-use, not issue to describe your problem...
perhaps trigger a keypress event with your ajax is done?


[jQuery] Passing values to functions

2008-09-18 Thread Barney

Hi,

I am trying to get my head around jquery and am converting some
standard javascript code over.
My old code was setup like this:
function deleteid(id){
 // Delete by id
}

Then for html I have:
a href=javascript:void(0); id=delete
onClick=deleteid('{$entry.cID}')

Now moving to jQuery I just can't figure out how to pass the id I want
deleted attached to the click function.

For example:
$(#delete).click(function()
{

});

How to I pass the id of that row I want deleted? I know this is
probably something simple that I am just not getting my head around. :
(


[jQuery] Xpath Plugin: Child Selector Predicate Support [\d+]

2008-09-18 Thread John Boxall

Hey Jquery hackers:

I'm doing some work with the Xpath plugin and I notice it doesn't
support expressions like:

/html/body/center/form/table/tbody/tr/td[2]/input[3]
(Used to select the search box on www.google.com!)

I would like to extend the plugin to support this kind of expression.

Because (to my knowledge) CSS selectors don't specify a way of
selecting specific child elements I believe that the best way to run
the selector recursively:

Given the selector:
/html/body/center/form/table/tbody/tr/td[2]/input[3]

Run 1st:
/html/body/center/form/table/tbody/tr/td
Get the 2nd result.

Run 2nd:
td/input
Run td/input on the final result of the 1st run. Return the 3rd
result.

Does anyone else have any experience tackling this kind of problem?
(or know about a CSS selector rule that does this : P)

Thanks,

John



[jQuery] Re: jTemplate and AJAX ?

2008-09-18 Thread Adam Guichard

I'm new at this as well, but I might be able to provide you some
assistance if you clarify your question a little.  What are you trying
to accomplish?  What isn't working?  Do you have a link with an
example of what's not working?

After examining the snippet, this is my perception of what is
happening.  You associate an event handler with all a
class='image'... tags. When one of the anchors is clicked you load
some html content found at the url specified by the link into a
container with the id RSSTable .  After the content is loaded you
drill through the dom and find any anchors of the form a
class='remote' and attach this same event handler to them.

None of the code you posted makes any calls to JTemplates functions.


On Sep 18, 10:40 am, websam [EMAIL PROTECTED] wrote:
 I have tested the use of jQuery, jTemplates and AJAX together with
 asp.net shown in this blog :

 http://encosia.com/2008/08/20/easily-build-powerful-client-side-ajax-...

 And i got everything to work against my library of methods. However i
 need to set some event handlers to the data i load through AJAX and i
 can't get it to work. This is what I have tryed :

 function addClickHandlers() {
     $(a.remote, this).click(function(e) {
         e.preventDefault;
         $(#RSSTable).load(this.href, addClickHandlers);
         alert('Testing event handler');
     });}

 $(document).ready(addClickHandlers);

 As I understand from the jQuery docs then I have to do it this way to
 prevent memory leaks. Can someone point me in the right direction on
 how to do this ?


[jQuery] SlideViewerPro - modification request

2008-09-18 Thread Adam

Im using SlideViewerPro from Gian Carlo Mingati- great plugin!! You
can see my implementation here:

http://www.mydesign.net/our-projects/attractions/acme-factory-raft-ride

I would send him this request, but his entire site is in italian and I
dont see a way to contact him. What I would like is to add passive
functionality to this where the image would change automatically after
a given interval, with the main image sliding and the 'current' status
changing in the nav below. Would anyone be interested in contracting
to tackle this modification?

Thanks!!
-Adam


[jQuery] Re: Using jQuery Form Plugin - submitting special characters

2008-09-18 Thread [EMAIL PROTECTED]

Hi all, same to me!!
Please someone let me know about the solution!

[]'s

Casé

On 6 ago, 08:57, Eita [EMAIL PROTECTED] wrote:
 I know this is an old topic, but I'm dealing with the same problem as
 Pablo and I didn't find a solution for that.

 If anyone has a clue to solve this behavior...

 Thanks,
 Fabiano.

 On 18 jul, 22:43, Pablo Santiago [EMAIL PROTECTED] wrote:



  hubbs,

  Smart quotes from MS Word are a different charset (windows-1252). To
  have them correctly displayed you'll need to set your page to this
  charset and also check that your server accepts it (Firebug can tell
  you that).
  However, I'm dealing with a similiar problem... I'm using ISO-8859-1
  both in mi pages and my server. Special characters (á, ñ) are
  display correctly but when I try to send them through $.ajax they are
  displayed as strange symbols as if the charset is UTF-8.
  I'm clueless if anyone has any idea, please let me know.

  Thanks,

  Pablo

  On 11 jul, 15:11, hubbs [EMAIL PROTECTED] wrote:

   I am trying to send special characters through my form, using the form
   plugin, but they keep on getting converted to strange characters.
   e.g. Smart quotes from MS Word, etc.

   So, what I am wondering is, what do I need to do to fix this?  I
   thought that submitting the form into an iframe with the form plugin
   would fix this problem, but it doesn't seem to, still the same issue.

   Do I need to tell the form plugin to use the same charset that I use
   on my site?

   script type=text/javascript charset=iso-8859-1  ?- Ocultar texto 
   entre aspas -

  - Mostrar texto entre aspas -- Ocultar texto entre aspas -

 - Mostrar texto entre aspas -


[jQuery] dates - fourth Saturday from any given date

2008-09-18 Thread cappy

I'm completely new to this group, because I've only just discovered
it, so please forgive me for being a novice.

I'm totally baffled by dates - I work in an office that runs an
intranet which occasionally needs some kind of js to calculate things.
I've pretty much got my head round doing basic calculations to display
results depending on the user's input, but I am totally baffled by how
js works with dates, please forgive me again if the term js for Java
Script is offensive, if so, can someone let me know the acceptable
terminology?

The problem I'm stuck on is...

I need to create a form which the user enters a date and the js
displays the fourth Saturday after that date.

Most of the date calculators I've created in the past, such as setting
today's date or any other starting point, and displaying dates in the
future or the past, have been borrowed, and then manipulated by me,
are from other authors, which have been given freely by them. Which
I'm grateful for.

So I really hope someone out there can help me.

I'd like to say thanks for all the free help you experts give freely
to people like me, both on groups like this, forums, and your own
websites, because I for one have have learned so much from your
examples, help and advice.

Thanks

Cappy


[jQuery] Re: Best JQuery pop-up plugin.

2008-09-18 Thread spherop


I have best luck with blockUI.

something  about the way jqModal requires you to add a class to the link
bugs me. Or maybe I am recalling it incorrectly. 

blockUI is very lean and seems to cover all the bases.



crypto5 wrote:
 
 Hi All,
 
 what is the best JQuery pop-up window plugin in your opinion?
 
 I am not strong experienced in JQuery and looking for such plugin but
 don't want test everything. So lloking for short cut.
 
 Thanks All!
 

-- 
View this message in context: 
http://www.nabble.com/Best-JQuery-pop-up-plugin.-tp19556756s27240p19559316.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: cascade question

2008-09-18 Thread ricardobeat

oops, I didn't pay attention.

You need to set the selected attribute and then fire the 'change'
event on the parent select to which the 'cascade' funcionality is
bounded by default.

$('#first [value=B]').attr('selected','selected').parent().change()

ricardo

On Sep 18, 4:14 am, kevin [EMAIL PROTECTED] wrote:
 Hi ricardo,

 i tried this before,but set option attribute can only let first box
 selected on B
 it won't trigger second box get data from database.
 second box won't change until you click on the first box and select
 other options

 all i want is first box selected on B and second box selected on
 B2 automatically when page loaded.

 i still added  selected=selected  on option B.
 here is the sample pagehttp://sskes.damimi.org/test/

 thanks anyway.

 On 9月18日, 上午6時32分, ricardobeat [EMAIL PROTECTED] wrote:

  You can do it via XHTML:

  option value=B selected=selectedB/option

  or add the attribute with jQuery:

  $('#first option:eq(2)').attr('selected','selected');

  ricardo

  On Sep 17, 10:50 am, kevin [EMAIL PROTECTED] wrote:

   Hi all,

   here is my sample page  http://sskes.damimi.org/test/

   my question is how can i let the first box selected on B and also
   trigger second box list the correct value
   B1,B2,B3,B4 automatically when page loaded.

   thanks.


[jQuery] Re: dates - fourth Saturday from any given date

2008-09-18 Thread Matt Kruse

On Sep 18, 1:35 pm, cappy [EMAIL PROTECTED] wrote:
 I need to create a form which the user enters a date and the js
 displays the fourth Saturday after that date.

This really doesn't need to be jquery-related. You can use any old
date library, like mine at:
http://www.javascripttoolbox.com/lib/date/

For example,

var userDate = Date.parseString(09/18/2008); // Get your date string
from somewhere
userDate.add( d, 6-userDate.getDay() ); // Advance to saturday
userDate.add( d, 21 ); // Go 3 more weeks
alert(userDate.format(M/d/y));  // You should do something more
useful than alert!

Hope that helps,

Matt Kruse



[jQuery] Re: fadeTo animation repeats multiple times in Firefox...why?

2008-09-18 Thread ricardobeat

What is happening is that you are toggling the animations everytime
you mouseover/mouseout the element. Try hovering in and out the
element and wait, it will cycle through the animations as many times
as you hovered. Try this:

$('.featured').hover(
function(){
$(this).find('.banner').stop().fadeTo(slow,.6);
},
function(){
$(this).find('.banner').stop().fadeTo(slow,1);
});

The .stop() function cancels all animations queued/executing on the
element (not sure it is needed on the mouseout event), before starting
the new one.

ricardo

On Sep 18, 1:46 am, alexcoleman [EMAIL PROTECTED] wrote:
 I'm attempting to work with the fadeTo command (also tried other
 animations like slideDown), but I keep getting repeat animations.
 Sometimes it'll cycle through 2 times, other times many more times.
 Here is the code I'm using:

 $(document).ready(function() {

 $('.featured').hover(function(){
 $(this).find('.banner').fadeTo(slow,.6)
         }, function(){
                 $(this).find('.banner').fadeTo(slow,1)
         });

 });

 You can view the page live @www.alexcoleman.net

 Any help would be greatly appreciated...
 Thanks!


[jQuery] Re: div.hover, only w/ background-settings in IE?

2008-09-18 Thread ricardobeat

IE interprets a transparent background as 'phisically' transparent,
you can click through.

To fix the IE6 background-image flickering bug, add

document.execCommand(BackgroundImageCache, false, true)

to your JS.


On Sep 18, 8:40 am, bnlps [EMAIL PROTECTED] wrote:
 hi, ..

 by using this snippet, everything works great in Firefox - you can
 move the mouse
 everywhere inside the red DIV border, and get out .. the fading effect
 always works correctly.

 but, in IE 6/7, .hover only seems to act when the mouse is AT the red
 border; well,
 if you set a background-color to #test, or, a background-image (like a
 transparent GIF),
 it also works ... but, when setting a transparent GIF, IE 6
 flickers ... like, swichtes
 between default cursor and hour glass during the fading process ...
 also, can't set
 background-color, because the (original) site itself has a background-
 image ... so, the
 DIV must remain transparent at all.

 any solutions?

 please, have a look at this..

 ...

 div#test{position:absolute;top:100px;left:100px;height:300px;width:
 300px;border:1px solid #f00;}

 ...

 $(function(){

 $('#test').fadeTo(0,0.25);

 $('#test').hover(
 function(){$(this).fadeTo('slow',1);},
 function(){$(this).fadeTo('slow',0.25);}
 );

 });

 ...

 div id=test.../div

 love,
 -bnlps


[jQuery] Re: Best JQuery pop-up plugin.

2008-09-18 Thread MorningZ

something  about the way jqModal requires you to add a class to the
link
bugs me. Or maybe I am recalling it incorrectly

You don't *have* to

for instance, this would would just fine   :-)



a id=ThisTriggerOpen Window/a

div id=ThisModal style=display: none;
 Modal Window Markup ...
/div


$(document).ready(function() {
  $(#ThisModal).jqm();
  $(#ThisTrigger).click(function() {
   $(#ThisModal).jqmShow();
   return false;
  });
});



[jQuery] Stop browser to be closed

2008-09-18 Thread Feijó





Can I detect and stop user to close the window without logout ?

I have a win-cgi system that is configured to a few hours session
timeout, so if the user abandon the session, it will die only in
several hours

I saw that kind of warning or auto-logoff somewhere, just cant
remember. How could I implement that with jQuery?


Thanks a lot!

Alessandro Feij





[jQuery] Re: Best JQuery pop-up plugin.

2008-09-18 Thread spherop


ahh  ...glad you informed. i take back my point and will have to relook at
jqModal...


MorningZ wrote:
 
 
 something  about the way jqModal requires you to add a class to the
 link
 bugs me. Or maybe I am recalling it incorrectly
 
 You don't *have* to
 
 for instance, this would would just fine   :-)
 
 
 
  Open Window 
 
 div id=ThisModal style=display: none;
  Modal Window Markup ...
 /div
 
 
 $(document).ready(function() {
   $(#ThisModal).jqm();
   $(#ThisTrigger).click(function() {
$(#ThisModal).jqmShow();
return false;
   });
 });
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Best-JQuery-pop-up-plugin.-tp19556756s27240p19560590.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Hover on all elements: $(*).hover(...)

2008-09-18 Thread ricardobeat

You can do it with the hover function too for a bit shorter code ;)

$('body').hover(
 function(e){
$(e.target).addClass('selected');
},
 function(e){
$(e.target).removeClass('selected');
}
);

On Sep 18, 2:16 pm, John Boxall [EMAIL PROTECTED] wrote:
 Thanks a bunch Karl - I switched to your way much smoother : )

 John

 On Sep 18, 6:54 am, benjam [EMAIL PROTECTED] wrote:

  Nicely done Karl, I knew there was a better way.

  On Sep 17, 1:54 pm, Karl Swedberg [EMAIL PROTECTED] wrote:

   This one worked for me...

   $('body').bind('mouseover', function(event) {
      $(event.target).addClass('selected');}).bind('mouseout', 
   function(event) {

      $(event.target).removeClass('selected');

   });

   You'll run into problems if you have properties assigned to more  
   specific selectors in your stylesheet, but otherwise, it should work  
   fine.

   --Karl

   
   Karl Swedbergwww.englishrules.comwww.learningjquery.com

   On Sep 17, 2008, at 9:50 AM, benjam wrote:

This is insanely kludgy, not very pretty, and probably slower than a
more elegant solution.

But it works.

   $('*').hover(
           function(event) {
                   var $this = $(this);
                   $this.addClass('selected');
                   $this.parents( ).removeClass('selected');
           },
           function(event) {
                   var $this = $(this);
                   $this.removeClass('selected');
                   $this.parents( ).removeClass('selected');
                   $this.parent( ).addClass('selected');
                   $this.children( ).removeClass('selected');
           }
   );

I'm sure there are better solutions out there, but this was the
fastest and easiest method.

On Sep 17, 2:04 am, Balazs Endresz [EMAIL PROTECTED] wrote:
I'm not sure I get it, but if you want to grab the strong inside a
p when the event is only bound to p then you can get it simply by
event.target:

$('body').find('*').filter(function(){
  return !$(this).children().length;})

.add('p').not('p *')
.hover(function(event){

    var t=event.target  //this will be the strong tag inside the p

    if ($(this).children().length()  0) {
       return False
    }

    $(this).addClass('selected');
  },
  function(){
     $(this).removeClass('selected');
  }
);

You can also try this with event delegation, which will be much  
faster
with a lot of 
elements:http://dev.distilldesign.com/log/2008/jan/27/event-delegation-jquery/...

On Sep 16, 7:17 pm, John Boxall [EMAIL PROTECTED] wrote:

Hi Balazs,

Thanks for the reply - looking at your suggestion, my idea was to
apply it to the code like this:

$(function() {
        $(*).hover(
           function(){

                // If the element has more than one child stop
propagating.
                if ($(this).children().length()  0) {
                    return False
                }

                $(this).addClass('selected');
            },
            function(){
                $(this).removeClass('selected');
            }
        );

}

This is _close_ to what I want, but what I'd really like is to grab
DOM element you are hovering over with the minimum number of  
children
- not necessarily zero.

It's my understanding that with the above, if you hovered over a p
with a strong inside you couldn't select the p because it would
have a child!

Thanks,

John

Should only return true if the selected $(this) has no children.
This is _close_ to what I want - but what I'd really like is to grab
the element

On Sep 14, 4:10 am, Balazs Endresz [EMAIL PROTECTED] wrote:

Hey John,

I think this will do that:

$('body').find('*').filter(function(){
  return !$(this).children().length;})

.add('p').not('p *') //without this, if a paragraph contains tags  
thehoverwon't be applied to the most of the text

On Sep 12, 9:29 pm, John Boxall [EMAIL PROTECTED] wrote:

Heyo jQuery hackers,

I'm putting together a little script that adds a class  
selected to
an element when youhoverover it.
When you stop hovering the class selected class is removed.

I would like the class only to be apply to the lowest element in  
the
DOM.

For example say I was hovering over a p deep inside a document  
- I
would like to only add the class selected to that p tag, not  
the
div, body and html tags surrounding it.

So far my thinking has been to use something like this:

$(function() {
        $(*).hover(
           function(){
                $(this).addClass('selected');
            },
            function(){
                $(this).removeClass('selected');
 

[jQuery] Re: Stop browser to be closed

2008-09-18 Thread MorningZ

I'm not 100% sure what you are after ultimately...

but i think the javascript event onbeforeunload is what you need to
use

http://www.google.com/search?q=javascript+onbeforeunload


[jQuery] Re: Best JQuery pop-up plugin.

2008-09-18 Thread Chris Jordan
Um... jQueryUI's dialog widget is good... and super easy to use. I'm just
sayin'... ;o)

Chris

On Thu, Sep 18, 2008 at 11:51 AM, crypto5 [EMAIL PROTECTED] wrote:



 Hi All,

 what is the best JQuery pop-up window plugin in your opinion?

 I am not strong experienced in JQuery and looking for such plugin but don't
 want test everything. So lloking for short cut.

 Thanks All!
 --
 View this message in context:
 http://www.nabble.com/Best-JQuery-pop-up-plugin.-tp19556756s27240p19556756.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




-- 
http://cjordan.us


[jQuery] Re: fadeTo animation repeats multiple times in Firefox...why?

2008-09-18 Thread alexcoleman

Perfect. Thank you Ricardo.

In addition, I was missing the ; after each event... :)

On Sep 18, 12:37 pm, ricardobeat [EMAIL PROTECTED] wrote:
 What is happening is that you are toggling the animations everytime
 you mouseover/mouseout the element. Try hovering in and out the
 element and wait, it will cycle through the animations as many times
 as you hovered. Try this:

 $('.featured').hover(
 function(){
     $(this).find('.banner').stop().fadeTo(slow,.6);},

 function(){
     $(this).find('.banner').stop().fadeTo(slow,1);

 });

 The .stop() function cancels all animations queued/executing on the
 element (not sure it is needed on the mouseout event), before starting
 the new one.

 ricardo

 On Sep 18, 1:46 am, alexcoleman [EMAIL PROTECTED] wrote:

  I'm attempting to work with the fadeTo command (also tried other
  animations like slideDown), but I keep getting repeat animations.
  Sometimes it'll cycle through 2 times, other times many more times.
  Here is the code I'm using:

  $(document).ready(function() {

  $('.featured').hover(function(){
  $(this).find('.banner').fadeTo(slow,.6)
          }, function(){
                  $(this).find('.banner').fadeTo(slow,1)
          });

  });

  You can view the page live @www.alexcoleman.net

  Any help would be greatly appreciated...
  Thanks!


[jQuery] Enabling few dates

2008-09-18 Thread faizal iqbaal
Hi All,

I am looking for a calendar component wherein I can enable few dates only
for eg...I have, say 15 dates in a year which need to enabled for selection
out of the whole year. How do i do it, which plugin can I use, I am at
present using a calendar componet by matt kruse and wont want to change if
at all possible.

Thanks  Regards

Faizal


[jQuery] Jquery 1.2.6 + jGrowl easing error

2008-09-18 Thread gecko68

When I am using the default swing method of easing I get this error.
D.easing[this.options.easing || (D.easing.swing ? swing : linear)]
is not a function

Was easing removed in 1.2.6?





[jQuery] Re: jTemplate and AJAX ?

2008-09-18 Thread websam

Hi Adam,

The only thing i have changed in the code from Dave's blog is that I
pull the data from a database instead of from a news feed.

So you can take a look at the code from the download in his blog,
there you will find some javascript function's that deal with
jTemplate. Then what I need to do is that when the data is loaded into
a table through a jTemplate then i need to add some click events. And
the snippet above should be the way to do it to prevent memory leaks.

Does that make a better understandig of what i want to do ?

On 18 Sep., 20:44, Adam Guichard [EMAIL PROTECTED] wrote:
 I'm new at this as well, but I might be able to provide you some
 assistance if you clarify your question a little.  What are you trying
 to accomplish?  What isn't working?  Do you have a link with an
 example of what's not working?

 After examining the snippet, this is my perception of what is
 happening.  You associate an event handler with all a
 class='image'... tags. When one of the anchors is clicked you load
 some html content found at the url specified by the link into a
 container with the id RSSTable .  After the content is loaded you
 drill through the dom and find any anchors of the form a
 class='remote' and attach this same event handler to them.

 None of the code you posted makes any calls to JTemplates functions.

 On Sep 18, 10:40 am, websam [EMAIL PROTECTED] wrote:

  I have tested the use of jQuery, jTemplates and AJAX together with
  asp.net shown in this blog :

 http://encosia.com/2008/08/20/easily-build-powerful-client-side-ajax-...

  And i got everything to work against my library of methods. However i
  need to set some event handlers to the data i load through AJAX and i
  can't get it to work. This is what I have tryed :

  function addClickHandlers() {
      $(a.remote, this).click(function(e) {
          e.preventDefault;
          $(#RSSTable).load(this.href, addClickHandlers);
          alert('Testing event handler');
      });}

  $(document).ready(addClickHandlers);

  As I understand from the jQuery docs then I have to do it this way to
  prevent memory leaks. Can someone point me in the right direction on
  how to do this ?


[jQuery] Nothing displays when reloading Flash content with an .ajax() call

2008-09-18 Thread Laker Netman

I've been working on an issue for a while that's got me beat. I have
googled quite a bit, and found this article,
http://weblogs.asp.net/adamgreene/archive/2007/09/11/ajax-flash-cs3-and-dynamic-javascript.aspx,
that describes my issue, but the solution is not jQuery-oriented.

Quoting from the article: When you update a block of text via AJAX
that has embedded script tags, the script doesn't run.

This is *exactly* the issue I'm running into. When a menu item is
clicked, I am simply loading the HTML SCRIPT tag block that contains
the JS to run a Flash bit into a DIV block. The Flash never runs. I've
also tried using the jquery.flash plugin with no success. Same
symptom.

I know the ajax call is working correctly, because I can place static
content in the file containing the Flash script block and the static
content shows up as expected. Also, if I place the Flash script code
on a page by itself, the flash loads on that page.

So, how do I make dynamically loaded and *run* Flash scripts run using
jQuery?

TIA,
Laker


[jQuery] Dialog Box Too Small

2008-09-18 Thread Brad M
Thanks for taking the time to read my question.

I have a dialog box on my page that pops up after clicking the link.

My problem is that when it comes up, it is too small. My content requires
the size of the dialog box to be both wider and taller.

I've downloaded jquery-ui-themeroller.css from Themeroller.

I've tried to add width and height to .ui-dialog, but it doesn't make a
difference to the size. I can change the border width, and that changes...
I've tried resizing the background image, but that doesn't change anything
either. I made it 200px high and kept the width.

How can I make my dialog box larger?

Thanks,

Brad


.ui-dialog {
 /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3;
text-decoration: none; font-size: 100%; list-style: none;
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
 background: #ff url(Images/Dialog/ff_40x100_textures_01_flat_0.png)
0 0 repeat-x;
 color: #22;
 border: 10px solid #dd;
 position: re

-- 
Brad McIntyre


[jQuery] Re: Passing values to functions

2008-09-18 Thread ricardobeat

Easy way:

a href={$entry.cID} class=delete

$('.delete').click(function(){
   deleteid(this.href);
});


On Sep 18, 3:56 pm, Barney [EMAIL PROTECTED] wrote:
 Hi,

 I am trying to get my head around jquery and am converting some
 standard javascript code over.
 My old code was setup like this:
 function deleteid(id){
  // Delete by id

 }

 Then for html I have:
 a href=javascript:void(0); id=delete
 onClick=deleteid('{$entry.cID}')

 Now moving to jQuery I just can't figure out how to pass the id I want
 deleted attached to the click function.

 For example:
 $(#delete).click(function()
         {

         });

 How to I pass the id of that row I want deleted? I know this is
 probably something simple that I am just not getting my head around. :
 (


[jQuery] Re: Using jQuery Form Plugin - submitting special characters

2008-09-18 Thread ricardobeat

XHR requests are known to have issues with special characters.

Try using the funcion encodeURIComponent() around each string you send
with Ajax.

On Sep 18, 3:11 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi all, same to me!!
 Please someone let me know about the solution!

 []'s

 Casé

 On 6 ago, 08:57, Eita [EMAIL PROTECTED] wrote:

  I know this is an old topic, but I'm dealing with the same problem as
  Pablo and I didn't find a solution for that.

  If anyone has a clue to solve this behavior...

  Thanks,
  Fabiano.

  On 18 jul, 22:43, Pablo Santiago [EMAIL PROTECTED] wrote:

   hubbs,

   Smart quotes from MS Word are a different charset (windows-1252). To
   have them correctly displayed you'll need to set your page to this
   charset and also check that your server accepts it (Firebug can tell
   you that).
   However, I'm dealing with a similiar problem... I'm using ISO-8859-1
   both in mi pages and my server. Special characters (á, ñ) are
   display correctly but when I try to send them through $.ajax they are
   displayed as strange symbols as if the charset is UTF-8.
   I'm clueless if anyone has any idea, please let me know.

   Thanks,

   Pablo

   On 11 jul, 15:11, hubbs [EMAIL PROTECTED] wrote:

I am trying to send special characters through my form, using the form
plugin, but they keep on getting converted to strange characters.
e.g. Smart quotes from MS Word, etc.

So, what I am wondering is, what do I need to do to fix this?  I
thought that submitting the form into an iframe with the form plugin
would fix this problem, but it doesn't seem to, still the same issue.

Do I need to tell the form plugin to use the same charset that I use
on my site?

script type=text/javascript charset=iso-8859-1  ?- Ocultar texto 
entre aspas -

   - Mostrar texto entre aspas -- Ocultar texto entre aspas -

  - Mostrar texto entre aspas -


[jQuery] Re: puzzling black hole in $(...).hasClass()?

2008-09-18 Thread ricardobeat

Most jQuery functions fail silently, that's by design. You must write
your own function if you want to validate the class name being passed.

cheers,
ricardo

On Sep 18, 11:03 am, ~flow [EMAIL PROTECTED] wrote:
 hi all,

 i’m doing this in ffx2 and firebug1.05; i have a local document
 loaded, go to the firebug console, and write

   $log( $Q( 'div' ).hasClass( '' ) ); $log( '###' )

 to which firebug responds with
   true
   ###

 thereby showing bot commands did execute. now i repeat the experiment,
 but with

   $log( $Q( 'div' ).hasClass( '.x' ) ); $log( '###' )

 the argument to `hasClass` is problematic: it uses selector-syntax and
 starts with a dot. this is a mistake that easily results from copy-n-
 pasting code. acceptable reactions of jQuery to this would be
 responding with something like `null`, `undefined`, or `false`, or
 raising an exception for having been passed a bogus argument.

 instead what happens: NOTHING. NADA. firebug displays RIEN de tout.
 this bit me when i wrote a suite of several method calls, one of which
 included dotted class name---the code would run to a certain point,
 then simply VANISH like being swallowed by a black hole. firebug
 breakpoints etc. haven’t helped me so far.

 i’m not even sure how to simulate this behavior using only
 javascript---can’t be an early return statement, as then the `###`es
 in the above example would still print out. javascript execution just
 stops silently in some dark dead end. any ideas, anyone?

 cheers  ~flow


[jQuery] Re: Dialog Box Too Small

2008-09-18 Thread MorningZ

Well, the object isn't going to take on the width/height of the
background

Have you tried to explicitly set width and height right there in your
CSS?


[jQuery] Re: put image on top of another image

2008-09-18 Thread cc96ai

it won't work in IE 6.

On Sep 9, 2:42 pm, Andy Matthews [EMAIL PROTECTED] wrote:
 You don't need jQuery for this. It can be done with CSS. Here's a link that
 you can inspect to see what I'm talking about:

 http://www.commadelimited.com/code/overlapimages/

 andy

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

 Behalf Of cc96ai
 Sent: Tuesday, September 09, 2008 3:34 PM
 To: jQuery (English)
 Subject: [jQuery] put image on top of another image

 I m new on jquery,
 I am not can jquery can do or not
 I want to put a image on top of other image, e.g. we have a product image,
 we want to put a sign of sold or hot buy image on top , any idea how
 could I do it in jquery ?


[jQuery] Re: custom / slimmed-down jquery possible?

2008-09-18 Thread Alex Weber

That's possibly the smartest thing I've heard all day! :)

The content INSIDE the lightbox/modal does need jquery but the biggest
problem is that im dependent on using jquery to display the modal in
the first place... thanks i'm gonna look for alternatives! :)

On Sep 17, 2:04 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Don't feel tied tojQuery. There are many lightbox scripts offering
 modal dialogs, independent from any library, with less than 10kb
 uncompressed. Just google lightbox.

 On Sep 17, 12:45 pm, Eric Martin [EMAIL PROTECTED] wrote:

  Alex -

  I briefly went throughjQueryand removed some of the unused parts (as
  it relates to SimpleModal). I was able to get it down to just under
  75k, 42k minified (which is about 12k less that the non-modified
  version). I can't make any guarantees, but if you'd like to try the
  slimmed down version, just send me an email.

  I don't really see how 55k would really cripple your load times -
  especially if you are loading the scripts near the bottom of your
  page. In addition, if you are using compression, you should hardly
  notice the loading time for the script(s).

  -Eric

  On Sep 17, 1:20 am, Alex Weber [EMAIL PROTECTED] wrote:

   and no i dont mean packing or minifying! :)

   basically all i need is 1 plugin (simplemodal) and because of that i'm
   forced to load the entirejquerylibrary, which is crippling load
   times...

   we usejqueryextensively in our website but we have banners in other
   sites that open a simplemodal (lightboxish) dialog and as far as the
   banners are concerned since its many sites and many different viewers
   we can't really count on caching to help either...

   so here's my question, is it possible to strip-down the original
  jquerysource code *just* for the banner modal?
   i guess it could be a kind of trial and error thing, but i'm wondering
   how interconnected the seperate parts of the library are and whether i
   should even spend any time on this...

   although it seems silly to have to load almost 50kb of additional JS
   when all i want is a 5Kb plugin :)

   thanks!

   -Alex


[jQuery] Re: Using jQuery Form Plugin - submitting special characters

2008-09-18 Thread Carlos André Oliveira
All strings are in the form, to submit this form I'm using the jquery.form
plugin as the function below:

function foo(){
  var options = {
  url: 'model/serviceRelease.asp?id=5',
  target: '#divMessage',
  type: 'get',
  success: messageSuccess};
  $('#myForm').ajaxForm(options);
  $('#myForm').submit();
}

I'm using ISO-8859-1 and all the labels (with special characters) in the
form appears correctly even when i write into the fields, but when
submitted, the data is saved in a different encode.
So, a tried to change the charset/encode to UTF-8 and the opposite happen,
the labels in the form come wrong and the data saved correct.

Any tip how to unify both?

On Thu, Sep 18, 2008 at 5:46 PM, ricardobeat [EMAIL PROTECTED] wrote:


 XHR requests are known to have issues with special characters.

 Try using the funcion encodeURIComponent() around each string you send
 with Ajax.

 On Sep 18, 3:11 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Hi all, same to me!!
  Please someone let me know about the solution!
 
  []'s
 
  Casé
 
   On 6 ago, 08:57, Eita [EMAIL PROTECTED] wrote:
 
   I know this is an old topic, but I'm dealing with the same problem as
   Pablo and I didn't find a solution for that.
 
   If anyone has a clue to solve this behavior...
 
   Thanks,
   Fabiano.
 
   On 18 jul, 22:43, Pablo Santiago [EMAIL PROTECTED] wrote:
 
hubbs,
 
Smart quotes from MS Word are a different charset (windows-1252). To
have them correctly displayed you'll need to set your page to this
charset and also check that your server accepts it (Firebug can tell
you that).
However, I'm dealing with a similiar problem... I'm using ISO-8859-1
both in mi pages and my server. Special characters (á, ñ) are
display correctly but when I try to send them through $.ajax they are
displayed as strange symbols as if the charset is UTF-8.
I'm clueless if anyone has any idea, please let me know.
 
Thanks,
 
Pablo
 
On 11 jul, 15:11, hubbs [EMAIL PROTECTED] wrote:
 
 I am trying to send special characters through my form, using the
 form
 plugin, but they keep on getting converted to strange characters.
 e.g. Smart quotes from MS Word, etc.
 
 So, what I am wondering is, what do I need to do to fix this?  I
 thought that submitting the form into an iframe with the form
 plugin
 would fix this problem, but it doesn't seem to, still the same
 issue.
 
 Do I need to tell the form plugin to use the same charset that I
 use
 on my site?
 
 script type=text/javascript charset=iso-8859-1  ?- Ocultar
 texto entre aspas -
 
- Mostrar texto entre aspas -- Ocultar texto entre aspas -
 
   - Mostrar texto entre aspas -



  1   2   >