[jQuery] Re: Superfish skins...

2008-05-06 Thread Joel Birch

Hi Phil,

No there is no resource like that unfortunately - the styling has been
down to the developer. The easiest thing to do is start with the demo
CSS which as you can see is very basic, and alter the CSS file
gradually (remember to check IE as you go so you know when bugs occur)
to get the style you want.

There is a commented version of one of the Superfish CSS files which
may help you to understand what each rule does, here:
http://users.tpg.com.au/j_birch/plugins/superfish/superfish.commented.css

In that (rather messy looking) file I have attempted to separate the
styling into two groups - the essential styles that are crucial to
Superfish working (but in some cases can be tweaked slightly), and the
"skin" styles that are purely presentational which you can alter to
your heart's content.

Joel Birch.


[jQuery] Re: Superfish pathClass problem

2008-05-06 Thread Joel Birch

Hi Dave,

Sorry, but I don't understand your issue from what you posted. Can you
explain further please.

Cheers
Joel Birch.


[jQuery] Re: Superfish Menu Width Auto Resize

2008-05-06 Thread Joel Birch

Personally, I just design the menu so that the longer menu items do
flow onto a second or even third line if required. You have to use
padding instead of text-indent to provide the horizontal spacing in
this case.

As for your original request which would resize the width so that the
menu items are always only one-liners, I think that's a good idea for
a separate plugin that you could then add to the function chain after
Superfish.

$('ul.nav').superfish().submenuResize();

Joel Birch.


[jQuery] Re: Superfish image menu

2008-05-06 Thread Joel Birch

I looked at your page. It seems like you have the CSS figured out.
Nice menu! The styling to show where the user is would be via classes
on the relevant list item. This is not something that Superfish does -
it's best done on the server-side via PHP or whatever you use there.
That way your menu is not reliant on JS being available to provide
that navigation info.

Once you have the "current" class being added to the relevant list
items (via your back-end script) you can then use Superfish to add
further enhancements such as smoothly fading in the submenus rather
than the instant CSS behaviour, timed delay on mouseout to negate
minor mouse-piloting errors, and so on. I'd also recommend using the
pathClass option for this type of menu. You can read more about that
and check out the code I used here:
http://users.tpg.com.au/j_birch/plugins/superfish/all-horizontal-example/

Joel Birch.


[jQuery] Re: Superfish problem & question

2008-05-06 Thread Joel Birch

Hi Chris,

Sorry, but I'm not clear on what your issue is. Do you have a page you
can show us?

Joel Birch.


[jQuery] Re: Superfish Menu

2008-05-06 Thread Joel Birch

This sounds like IE's z-index bug. There should be a wealth of
information about it that you can find via google, but more helpfully,
the issue has been discussed on this list with regard to Superfish
quite a few times so if you search this list specifically you should
be able to find the solutions you need. I've attempted to describe the
problem and the solution on this list myself, so have a go at finding
those specific threads to start with.

Joel Birch.


[jQuery] Re: Superfish Menu Fade-out

2008-05-06 Thread Joel Birch

Hi Reuben,

No further progress to report on the closing animations for Superfish
I'm afraid. Looking at your page, it seems like maybe the Accordion
plugin may be more suitable for your menu. Have you looked into that?
Your menu behaves just like an Accordion menu. The only thing you
would miss out on is the timed delay, which really helps usability for
most dropdowns, but your style of menu does not need it so much. Also,
adding the hoverIntent plugin with Accordion will give you back some
of the benefits of the delay feature I think.

Joel Birch.


[jQuery] Re: superfish pathclass and joomla

2008-05-06 Thread Joel Birch

Hello,

You say it's organised like the my navbar example but also say it has
three levels. The navbar example demonstrates the pathClass feature
which works well for two level menus, but I have never attempted to
use it on menus that have more levels than that so you are heading
into uncharted territory I think.

That said, it seems like your immediate issue is getting an "active"
class onto the middle tier li element. I guess you could simply add
something like this inside your "document ready" block:

$('ul.nav li.active li.active').parents('li:first').addClass('active');

That will add the class "active" to the middle level li that Joomla
neglects. Let Superfish know to use the class "active" for the
pathClass by adding this to the options object:
pathClass : 'active'

Once that is done, hopefully you will be closer to the result you
want, but as I said, I have not attempted to use pathClass with a
three-tiered menu so I can't be sure. Good luck - please let us know
how you went.

Joel Birch.


[jQuery] Re: superfish - vertical menu, be able to drop left or right

2008-05-06 Thread Joel Birch

Hi,

The order and specificity of the CSS rules are crucial. The rules you
added to those new classes must be overriding the Superfish rule that
disables the pure CSS reveals so that JS can take control and animate
the submenus in.

Joel Birch.


[jQuery] Re: Attaching Events with Live Query

2008-05-06 Thread Adam Weis
Thanks Brandon, I'll take a look.  I obviously have lots to learn about
jQuery.

-Adam

On Tue, May 6, 2008 at 11:00 PM, Brandon Aaron <[EMAIL PROTECTED]>
wrote:

> Adam,
>
> Live Query works so nicely because it sits on top of jQuery. It isn't
> working for you because you aren't using jQuery's methods to append the
> content to the DOM. You can however manually run the registered live queries
> by running the following: jQuery.livequery.run();
>
> You might also investigate utilizing one of the event delegation plugins
> for jQuery such as Ariel Flesler's Listen plugin.
>
> --
> Brandon Aaron
>
>
> On Tue, May 6, 2008 at 8:42 PM, Adam Weis <[EMAIL PROTECTED]> wrote:
>
> >
> > Hello,
> >
> > I'm having an issue attaching some events to a simple accordion that
> > is loaded via ajax.  I've tried moving the accordion script into the
> > head with Live Query and also putting the accordion script after the
> > html that is loaded from the ajax for it to no avail.
> >
> > The ajax content is loaded by a non-jQuery ajax call, could that be
> > causing the problem?
> >
> > You can see the page at, http://efodev.thewonderlabs.com/about/company
> > and then clicking "Timeline" in left nav.
> >
> > Am I going about this entirely wrong?
> >
> > Any help would be appreciated.
> >
> > -Adam
> >
>
>


[jQuery] Re: Attaching Events with Live Query

2008-05-06 Thread Brandon Aaron
Adam,

Live Query works so nicely because it sits on top of jQuery. It isn't
working for you because you aren't using jQuery's methods to append the
content to the DOM. You can however manually run the registered live queries
by running the following: jQuery.livequery.run();

You might also investigate utilizing one of the event delegation plugins for
jQuery such as Ariel Flesler's Listen plugin.

--
Brandon Aaron


On Tue, May 6, 2008 at 8:42 PM, Adam Weis <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I'm having an issue attaching some events to a simple accordion that
> is loaded via ajax.  I've tried moving the accordion script into the
> head with Live Query and also putting the accordion script after the
> html that is loaded from the ajax for it to no avail.
>
> The ajax content is loaded by a non-jQuery ajax call, could that be
> causing the problem?
>
> You can see the page at, http://efodev.thewonderlabs.com/about/company
> and then clicking "Timeline" in left nav.
>
> Am I going about this entirely wrong?
>
> Any help would be appreciated.
>
> -Adam
>


[jQuery] Re: prefill textarea

2008-05-06 Thread Karl Rudd

The textarea's id and name are all lower case (textareaname) and the
selector has an uppercase character (textareaName). CSS selectors are
case sensitive.

There's also brackets missing in the second group of $() calls.

The "val()" function is the way to get and set the content of a
textarea. The "text()" and "html()" functions will return different
results for different browsers.

Karl Rudd

On Wed, May 7, 2008 at 12:10 PM, JP <[EMAIL PROTECTED]> wrote:
>
>  nothing seems to work.
>  how does jquery  prefill a textarea ?
>
>
>  
>  
>  
>  
>  http://code.jquery.com/jquery-
>  latest.pack.js">
>  
>
>  $(function() {
>   $("#textareaName").val("hello1");
>   $("#textareaName").text("hello2");
>   $("#textareaName").html("hello3");
>
>   $("[EMAIL PROTECTED]'textareaName']".val("hello4");
>   $("[EMAIL PROTECTED]'textareaName']".text("hello5");
>   $("[EMAIL PROTECTED]'textareaName']".html("hello6");
>
>   $('textarea').val( "hello7" ) ;
>   $('textareaname').val( "hello8" ) ;
>
>  });
>  
>  
>  
>  
>id="textareaname"
>name="textareaname"
>rows="5"
>cols="20">
>  
>  
>  
>


[jQuery] prefill textarea

2008-05-06 Thread JP

nothing seems to work.
how does jquery  prefill a textarea ?






http://code.jquery.com/jquery-
latest.pack.js">


$(function() {
  $("#textareaName").val("hello1");
  $("#textareaName").text("hello2");
  $("#textareaName").html("hello3");

 $("[EMAIL PROTECTED]'textareaName']".val("hello4");
 $("[EMAIL PROTECTED]'textareaName']".text("hello5");
 $("[EMAIL PROTECTED]'textareaName']".html("hello6");

  $('textarea').val( "hello7" ) ;
  $('textareaname').val( "hello8" ) ;

});




   





[jQuery] Re: $ is not defined

2008-05-06 Thread darren

yeah I get that error when libraries conflict.  We are using the
Prototype and jQuery libraries together on a project.  If it is an
issue of multiple libraries using the $, try the above solution of
using jQuery() instead of $().  Also look into the jQuery noConflict
function.

On May 6, 5:42 pm, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
> It can be becaused the $ was used by another library like in wordpress
> admin (if i am not wrong), $ is assigned to their own lib.
>
> so try to use this : jQuery('#yourid').val(); :)
>
> On May 6, 11:57 pm, motob <[EMAIL PROTECTED]> wrote:
>
> > When ever I get the $ not defined error, its because my core jQuery
> > library is not there, for example when I switch from jquery.pack to
> > jquery.min and I forget to change the 

[jQuery] Attaching Events with Live Query

2008-05-06 Thread Adam Weis

Hello,

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

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

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

Am I going about this entirely wrong?

Any help would be appreciated.

-Adam


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

2008-05-06 Thread darren

oh man, i wish i could do as you suggested, that was my first idea and
it would make things so much easier.  However, the code i'm working
with is markup of Shakespeare's works.  Its incredibly complex and we
use Cocoon to generate these pages from xml.  long story short, my
employer can't afford to make such a change now so I have to make due
with what's there.  I think i came up with a reasonable solution
though:

1. Find the div with the lower tln value. Then get its index with
respect to the parent.
2. Find the next highest div tln and get its index as well.
3. From this we know the text node lies within the indexes, so search
for the text there.

Again, because of the code complexity, this does not always work, but
at least i'm making progress.  Thanks for your insight though.



On May 6, 9:28 am, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> I tried to cut corners by skimming your html.  I see it now.  The divs close
> and the text is after the div.
> This is really strange HTML to me.  Why not just put the text inside the
> div?  Or just wrap the text inside a span?
> If you wrap the text inside spans, then the jQuery is pretty simple.  I
> whipped up a sample.
>
> http://commadot.com/jquery/findTextElements.php
>
> $("#tln21").next("span").addClass("highlight")
>
> Sometimes, fancy JS is not as good as clean html.
>
> Glen
>
> On Mon, May 5, 2008 at 6:51 PM, darren <[EMAIL PROTECTED]> wrote:
>
> > hi glen, thanks for replying.
>
> > That still wouldn't work. With that you are looking for the text
> > inside div elements which are descendants of of the id'd element.
> > What i want to select are certain text elements of the id'd element.
> > I figured something out, but this is surprisinlgy difficult:
>
> > 
> > 
> > 
> > 
> > 
> > ...
> > 
>
> > I had to use .contains() and [nodeType=3] to pick text nodes.  not
> > pretty.
>
> > On May 5, 4:23 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> > > $("#tln21 div").text();
>
> > > Like that?  By the way, firebug is very helpful to test our selectors and
> > > see what they come up with.
> > > Hmm, it would be nice to have a tutorial on how to do this.  I can try
> > and
> > > whip one up.
>
> > > Glen
>
> > > On Mon, May 5, 2008 at 2:47 PM, darren <[EMAIL PROTECTED]> wrote:
>
> > > > hi Joe, thanks for your comment
>
> > > > If you look closer, you can see that the text is not actually in the
> > > > div element.  i basically need to select the text after that node:
>
> > > > 
> > > >   
> > > >   Some text
> > > >   
> > > >   some more text
> > > >   
> > > >   even more text
> > > > 
>
> > > > So that wouldnt work
>
> > > > On May 5, 2:06 pm, Joe <[EMAIL PROTECTED]> wrote:
> > > > > $("#tln21').text();
>
> > > > > This will return the text associated with id="tln21".
>
> > > > >http://docs.jquery.com/Attributes/text
>
> > > > > Joe
>
> > > > >www.subprint.com
>
> > > > > On May 5, 2:34 pm, darren <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi everybody, new member here.
>
> > > > > > I have a project with the following snipped of code:
>
> > > > > > =start html=
> > > > > > 
> > > > > >   
> > > > > >  
> > > > > >   As I remember, Adam, it was
> > upon
> > > > > > this fashion
> > > > > >   5bequeathed me by will but poor a thousand
> > > > > >   
> > > > > >  
> > > > > >   crowns, and, as thou say'st,
> > > > > > charged my brother,
> > > > > >   
> > > > > >  
> > > > > >   on his blessing, to breed me
> > well;
> > > > > > and
> > > > > >   
> > > > > >  
> > > > > >   there begins my sadness. My
> > > > > > brother Jaques he keeps
> > > > > >   
> > > > > >  
> > > > > >   at school, and report speaks
> > > > > > goldenly of his profit.
> > > > > >> class="ln
> > > > > > tln">10For my part, he keeps me rustically at home, or, to
> > > > > > speak
> > > > > >> class="ln
> > > > > > tln">
> > > > > >  
> > > > > >   more properly, stays me here at
> > > > > > home unkept; for call
> > > > > >> class="ln
> > > > > > tln">
> > > > > >  
> > > > > >   you that "keeping" for a
> > gentleman
> > > > > > of my birth that differs
> > > > > >> class="ln
> > > > > > tln">
> > > > > >  
> > > > > >   not from the stalling of an ox?
> > > > > > His horses are bred
> > > > > >

[jQuery] Superfish question

2008-05-06 Thread Double D

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

Thanks,

Darryl


[jQuery] Re: Need help with hover and fadein and fade out

2008-05-06 Thread Aaron

Can you give me an example code of what I need to do to get a table to
fade in above the picture which when the mouse is over the picture
will activate the fade in function and also when the mouse goes off
the photo or that new fadeded in table then it would fade out. The
table that fades will will contain more photos of that user.

On May 3, 5:20 pm, Aaron <[EMAIL PROTECTED]> wrote:
> Hi I am having trouble using the hover and fade in and fade out I look
> at the doc I understand it but I don't understand how I can use it for
> what I want to do.
>
> I want the user to be able when the mouse is over a photo of them a
> table or window fades in with other photos they uploaded ect when the
> mouse moves off the photo or the table then the table or window fades
> out.
>
> can some one explain how I can do this and what rules I should follow
> when using hover and fade in and fade out ect.
>
> could I make a javascript use jquery? if so how??
>
> I know I can do this in html but I would like to make a javascript
> with jquery functions ect and have that file added to the html doc.


[jQuery] Re: $ is not defined

2008-05-06 Thread Adwin Wijaya

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

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

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

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

2008-05-06 Thread Shane

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

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


Good luck...


On Apr 17, 6:27 am, "Chris Davies" <[EMAIL PROTECTED]> wrote:
> Hi, I am trying to pass multiple form fields to the ajax_fileUpload.cfm page
> with no success.  Is it possible to send a list of form ID's as I am trying
> below?
>
> $.ajaxFileUpload
> (
> {
> url:'ajax_fileUpload.cfm',
> secureuri:false,
> fileElementId:*'fileToUpload,createpoloroid,createmedium',*
> dataType: 'json',
> success: function (data, status)
>
> Thanks!


[jQuery] Re: addUnique

2008-05-06 Thread Ariel Flesler

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

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

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

On 6 mayo, 13:50, Iconico <[EMAIL PROTECTED]> wrote:
> On May 1, 7:42 pm, Dave Methvin <[EMAIL PROTECTED]> wrote:
>
> > That actually sounds like a bug. What version ofjQueryare you using?
> > AFAICT,jQuery().add() is supposed to usejQuery.merge to avoid
> > duplicates. Can you create a test case and post a bug report?
>
> I'm using 1.2.3, the latest. I don't think it's a bug, it's more
> subtle than that.
>
> There's a thread here that details the issue pretty 
> well:http://groups.google.com/group/jquery-en/browse_thread/thread/f08ee33...
>
> If you still don't follow I can mock up a test for you, just let me
> know.


[jQuery] Re: append div trouble

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

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

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

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

- Richard

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

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

>
> hey folks,
> brand new here. been fiddling with jquery for a little bit now, but
> this one has me stumped.
>
> the goal is to de-link the links on a navigation system depending on
> what you've clicked on.
> but i need a restore function which i'm trying to do with append
>
> the functions work fine without the append, but then i can't restore
> the links i've taken off.
> and after i do the append the html looks fine, but it doesn't seem to
> be part of the DOM anymore.
> since it won't respond to the functions anymore.
>
> i've tried so many things and got no where.
> i believe it to be NOT appending to the DOM
>
> but again i'm new to the more complex stuff.
>
> thanks in advance for any help.
> gary.
>
>
> [code DOM ready]
>
> // get all the html in the navigation div
> var hex = $("#navigation").clone().html();
>
> // my trigger
> // all links with an anchor tag inside of navigation
> $('#navigation  [EMAIL PROTECTED]"#"]').click(function() {
>
> // set a variable to what i clicked on
> var clickedMe = $(this);
>
> // restoring state of navigation div
> $('#navigation').empty().append(hex);
>
> // here i do all my style changes using the clickedMe variable
> // including replacing the link i clicked on with just text
> // omitted for clarity
>
> });
>
> [/code]
>


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

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

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

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

- Richard

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

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

>
> if i have 
>
>  if I do:
>
> $('#fname').attr('type') - it returns "undefined"
>
> how can I get the "type" ?
>
>


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

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

- Richard

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

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

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


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

2008-05-06 Thread JP

if i have 

 if I do:

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

how can I get the "type" ?



[jQuery] jQuery AJAX IE Error

2008-05-06 Thread MediaJunkie

The offending jQuery code:

$.ajax({
type: "POST",
url: "/?ct=rating&rt_v=rr&rt_rk=" + 
markerObject.number,
dataType: "html",
success: function(dataSet) {
var status = $("status", 
dataSet).text();
if (status == "ERROR") {

The error IE gives:

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

Line 173 is:

 if (status == "ERROR") {

This code works just fine in FF and Safari.

Any suggestions would be greatly appreciated.

- Brad


[jQuery] jQuery keeping tabs on the election

2008-05-06 Thread Shaun Kester

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


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

2008-05-06 Thread Jörn Zaefferer

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

Jörn

On Fri, May 2, 2008 at 4:52 PM, rolfsf <[EMAIL PROTECTED]> wrote:
>
>  We're still having problems implementing a 'refresh' button for a
>  treeview tree. We need to be able to re-initialize the tree, clearing
>  out the current version completely, and reloading with data fresh from
>  the server.
>
>  we're clearing out the current tree with:
>  $('#openExistingTree').empty();
>
>  and then re-initializing with
>  $('#openExistingTree').treeview({ url:
>  "CalcBldrOpenExisting.ashx" });
>
>  Each time we hit 'refresh', we're getting a duplicate set of 'hitarea'
>  divs
>
>  The initial json returned is:
>  "[{'text': 'Private Drafts','id': 3, 'hasChildren': true},{'text':
>  'Shared Drafts','id': 4, 'hasChildren': true},{'text': 'Published
>  Calculations','id': 5, 'hasChildren': true}]"
>
>  Any help would be appreciated. I realize my previous posts came out a
>  bit unreadable...
>
>  thanks
>  rolf
>


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

2008-05-06 Thread Yann

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


[jQuery] Re: extending objects with jquery

2008-05-06 Thread real

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

On May 6, 11:13 am, Javier Martinez <[EMAIL PROTECTED]> wrote:
> I'm moving from mootools to jquery and trying to port my UI framework
> to jquery.
> Some of my widgets are extending from another widget. For example a
> "datagrid" and a "dataview" objects extends from "view" object
> (because both uses same methods from view).
> With Mootools I have something like this
>
> Class View()
>
> Class DataGrid ({
> extends: View
>
> })
>
> Class DataView({
> extends: View
>
> })
>
> What is the equivalent on jQuery?
>
> Thanks!


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

2008-05-06 Thread [EMAIL PROTECTED]

Hi!

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

Kind regards Andreas



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

2008-05-06 Thread flipthekid

hi andreas,

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

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

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

gary.


[jQuery] Re: validating dynamically generated data

2008-05-06 Thread pedalpete

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

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



On May 6, 1:01 pm, jpl80 <[EMAIL PROTECTED]> wrote:
> I need to validate some dynamically generated form data to ensure clients
> can't order more of something than we have in stock. I can't set static
> comparisons. Here is my html:
>
> 
> 
>
> 
>   manual 1
>   90
>for="150">Qty:
> 
>
> 
>   manual 2
>   48
>for="151">Qty:
> 
>
> 
>
> I want to validate on keyup(). In rough pseudocode, something like this:
>
> $(document).keyup(function(event){
>   if (($this.getValue(input)) > ($this.getValue(span.qty))) {
> addText("Not enough in stock");
>   }
>
> });
>
> I know that's not even close. Could someone help me?
> --
> View this message in 
> context:http://www.nabble.com/validating-dynamically-generated-data-tp1709106...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] [ANNOUNCE] Unobtrusive JavaScript with jQuery

2008-05-06 Thread Klaus Hartl

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


--Klaus


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

2008-05-06 Thread Joe

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

Joe

www.subprint.com



On May 6, 2:46 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> Yep. The only reason I didn't mention it in this context is because
> Snitter is not a OSS project and the code cannot be used to create your
> own client.
>
> I actually use Snitter and it's great!
>
> Rey
>
> Andy Matthews wrote:
> > Same thing with Snitter.
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> > Behalf Of Rey Bango
> > Sent: Tuesday, May 06, 2008 1:53 PM
> > To: jquery-en@googlegroups.com
> > Subject: [jQuery] [ANNOUNCE] Spaz Twitter Client uses jQuery
>
> > If you've ever been interested in learning how develop AIR apps w/ jQuery
> > then take a look at the Spaz Twitter clienthttp://funkatron.com/spaz. It's
> > a OSS project where you can download the
> >   source and see how things are done.
>
> > It's also a pretty neat Twitter client as well. :)
>
> > Many thanks to Ed Finkler for starting this project up and using jQuery
> > under the hood.
>
> > Rey


[jQuery] append div trouble

2008-05-06 Thread flipthekid

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

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

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

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

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

thanks in advance for any help.
gary.


[code DOM ready]

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

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

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

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

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

});

[/code]


[jQuery] Re: TableSorter + Filtering + Ajax

2008-05-06 Thread patrick davey

Hi Kevin,

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

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

Thanks,
Patrick

On May 6, 9:47 pm, Kevin Kietel <[EMAIL PROTECTED]> wrote:
> Try Flexigrid!
>
> http://webplicity.net/flexigrid/
>
> This jQuery plugin is a Lightweight but rich data grid with resizable
> columns and a scrolling data to match the headers, plus an ability to
> connect to an json/xml based data source using Ajax to load the
> content.
>
> If you need any help implementing it, just contact me or take a look
> at the Flexigrid discussion on CodeIgniter 
> forums:http://codeigniter.com/forums/viewthread/75326/
> There are several examples that you can use.
>
> Let me know if this is what you're looking for!
>
> Bye,
>
> Kevin
>
> On May 6, 2:18 am, patrick davey <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I am using the tablesorter pluginghttp://tablesorter.com/andit
> > works fine for smallish tables.  However, I need to page through large
> > result sets (and filter them) - so I am going to use AJAX to
> > repopulate the table once the options have been selected.
>
> > Now, if through filtering / whetever - less than 100 rows are
> > returned, then I want tablesorter to just sort the table (without
> > having to make an AJAX call)
>
> > To do this I want to edit the tablesorter plugin to call a function
> > which returns true/false depending on how many records there are to
> > sort.
>
> > So my question (there is one!) is how do I do that with tablesorter.
> > I have tried using 'sortStart' and returning false but no joy.  I can
> > edit the source of course - but if there is a simple way I'd love to
> > know it.
>
> > Better still, does anyone have an example of doing filtering&sorting&
> > paging of large datasets using  JSON/AJAX and Jquery? :)
>
> > Thanks,
> > Patrick


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

2008-05-06 Thread [EMAIL PROTECTED]

Hi pros!

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

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

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

Thank you so much!!!
Kind regards Andreas

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

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

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



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

2008-05-06 Thread aldomatic

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

Thanks though.

On May 6, 2:51 pm, Christoph Haas <[EMAIL PROTECTED]> wrote:
> On Dienstag, 6. Mai 2008, aldomatic wrote:
>
> > How do I redirect an Ajax loaded page to another page? The Meta
> > refresh does not work. Anyone?
>
> You are expecting too much magic to happen. Unless you handle redirections
> yourself it won't work. Just fetch the correct URl and you don't need any
> redirects.
>
> Cheers
>  Christoph (yes, I have a real name)
> --
> When you do things right people won't be sure you've done anything at all.
>
>  signature.asc
> 1KDownload


[jQuery] Re: how do it?

2008-05-06 Thread Karl Swedberg

Luciano,

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


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


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



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


sure!, but i need do it ?

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


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


besides that, this

$('input #search')


should be

$('input#search')



Hope this helps!

alex



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

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

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

but no sucess,

so i try it:

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

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

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

tks




--
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com



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




[jQuery] Re: strange behaviour: multiple selectors responding

2008-05-06 Thread Karl Swedberg


Hi Bob,

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


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

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



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



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

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

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

try this instead...

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

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


hi,



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



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

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



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

try clicking a few different links.



thanks




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

2008-05-06 Thread MorningZ

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





On May 6, 5:33 am, Lokesh <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can I use jQuery AJAX Autocomplete script to call my AJAX method
> from ASP .NET instead of php.


[jQuery] validating dynamically generated data

2008-05-06 Thread jpl80


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






  manual 1
  90
  Qty:



  manual 2
  48
  Qty:




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

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

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



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

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

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

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


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


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

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

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

>
> I got a smilingly simple problem but I have spent way to much time
> trying to fix it unsuccessfully already... Hoping some jQuery guru can
> figure this one out for me...
>
> The javascript is pretty basic:
>
>// set defaults
>$('.news_content').hide();
>$('.news_item_bg div:first').show();
>$('#latest_news a:first').addClass('selected');
>// set news links behavior
>$('#latest_news a').click(function () {
>$('#latest_news a').removeClass('selected');
>$(this).addClass('selected');
>
>var target = $(this).attr('href');
>
> $(".news_content:visible").animate({color: '#fff'},
> 500).slideUp(1000, function() {
>$(target).slideDown(1000).animate({color: '#fff'},
> 1000);
>});
>return false;
>});
>
> But when it slides down, the end of the animation is choppy, more
> accurately, it seems that the height is calculated wrong during the
> animation and readjusted at the end...
>
> Anyone else has experienced this problem before? I must be doing
> something wrong since Google search didn't turn anything up...
>
> Thanks!
>



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


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

2008-05-06 Thread Rey Bango


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


I actually use Snitter and it's great!

Rey

Andy Matthews wrote:
Same thing with Snitter. 


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


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

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

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

Rey





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

2008-05-06 Thread Andy Matthews

Same thing with Snitter. 

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


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

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

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

Rey




[jQuery] Re: jQuery Trac unavailable

2008-05-06 Thread Nick Fletcher

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

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


[jQuery] Re: how do it?

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

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


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

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




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


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

2008-05-06 Thread gr00vy0ne

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

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

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

-v

On May 5, 10:53 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> In your code, it looks like you use many calls to $(this) and
> $("#times_zoom").  You'll get much better performance if you set variables
> and use those instead, i.e in your mouseover function:
>
> var th = $(this), tz = $("#times_zoom");
>
> Then you would use those references like so:
>
> // change the contents
> tz.html(th.html());
>
> This will improve performance because you are not calling the jQuery
> function as many times.
>
> -- Josh
>
> - Original Message -
> From: "gr00vy0ne" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Monday, May 05, 2008 6:15 PM
> Subject: [jQuery] suggestions for a hover zoom on text...
>
> > I'm trying to come up with a technique for expanding text when you
> > hover over it. I built a real quick and dirty demo to help explain the
> > affect I'm trying to achieve:
>
> >http://imlocking.com/projects/zoom_text.html
>
> > So, in the list of times, I'd like to make them "pop" when you hover
> > over. Of course, it would be easy to change the style of the element
> > directly but then the list would move which I'm trying to avoid.
>
> > What I'm doing now is creating a hidden positionable container that
> > moves to the correct location and shows a copy of the hovered element
> > (with a different style applied). It works but I've noticed on an
> > actual page with other content, the performance can get horrendous.
> > Safari is blazing fast. Both Firefox and IE can both go up to 100% CPU
> > usage.
>
> > All the code (HTML/CSS/JS) is inline. So, please take a look and let
> > me know if there's a better more efficient way to do this. Any
> > suggestions, tips, comments, etc. are welcome.
>
> > Another alternative we've tried is putting hidden spans in the page
> > that show up on hover (requires little-to-no scripting) but it ends up
> > marking the markup unnecessarily large.
>
> > Many thanks,
> > victor


[jQuery] Re: how do it?

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




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

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




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


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

2008-05-06 Thread aldomatic

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

Thanks.


[jQuery] [ANNOUNCE] Spaz Twitter Client uses jQuery

2008-05-06 Thread Rey Bango


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


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

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


Rey


[jQuery] slide down animation "jumps" at the end

2008-05-06 Thread Yann

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

The javascript is pretty basic:

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

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

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

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

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

Thanks!


[jQuery] Re: Photo Crop proposal

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

> Please see the video of my prototype here:
>
> http://www.hdgreetings.com/view.aspx?name=JQuery%20Crop%20Prototype&video=http://download.hdgreetings.com/crop.flv


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

http://images.google.com/images?q=family&um=1&hl=en&sa=N&imgsz=huge

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

- Richard


[jQuery] Re: event data ?

2008-05-06 Thread motob

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

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


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

On May 6, 9:22 am, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
> Thanks .. but I still curious what is inside the variable that passed
> through function callback (btn in my example) and how to have access
> on it.
>
> On May 6, 6:39 pm, motob <[EMAIL PROTECTED]> wrote:
>
> > $('.mybutton').click(function(){
> >   alert($(this).attr("id")); //get the id
> >   $(this).attr("disabled", "disabled"); //disable the clicked button
>
> > });
>
> > On May 6, 3:33 am, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
>
> > > Hi
>
> > > I got a problem ... I have more than 1 buttons and each buttons has
> > > unique name.
> > > I assign / bind the button with function like this :
>
> > > $('.mybutton').bind('click',function(btn){ alert( btn.id); } );
>
> > > every time i click on the buttons the alert always show undefined. How
> > > to get the ID of button who clicked ? i want to get the id, change the
> > > button to disabled ... how to do that one ...
>
> > > and what is event.data actually is
>
> > > thanks !


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

2008-05-06 Thread Aaron

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

once I do that would it run the js  or do I have to do a special
call using 

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

2008-05-06 Thread code_berzerker

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

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

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

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


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

2008-05-06 Thread code_berzerker

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

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

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

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


[jQuery] Re: addUnique

2008-05-06 Thread Iconico

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

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

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

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


[jQuery] Re: Contributors to jQuery and GPL license

2008-05-06 Thread Rey Bango


Simon,

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


Rey...

Simon wrote:

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

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

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



[jQuery] Re: $ is not defined

2008-05-06 Thread motob

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

[jQuery] Re: Reinitialization of css values

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

-or-

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

- Richard

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

>
> Hello people!
>
> I'm looking for a solution to put div properties to initial state.
>
> Explanation :
> $("div").toggle(function(){
>$(this).animate({
>width : "90%",
>height : "90%",
>left : "5%",
>top : "5%"
>},500);
>},function(){
> //Reinitialization of initial values which are
> described in the CSS file
>});
>
> Thank you!
>


[jQuery] Re: extending objects with jquery

2008-05-06 Thread motob

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

function View(){
  ...
}

function DataGrid(){
  ...
}

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

Now DataGrid has all of the methods that View has.

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

On May 6, 11:13 am, Javier Martinez <[EMAIL PROTECTED]> wrote:
> I'm moving from mootools to jquery and trying to port my UI framework
> to jquery.
> Some of my widgets are extending from another widget. For example a
> "datagrid" and a "dataview" objects extends from "view" object
> (because both uses same methods from view).
> With Mootools I have something like this
>
> Class View()
>
> Class DataGrid ({
> extends: View
>
> })
>
> Class DataView({
> extends: View
>
> })
>
> What is the equivalent on jQuery?
>
> Thanks!


[jQuery] Re: $ is not defined

2008-05-06 Thread Jake McGraw

Could you provide an example of this online?

- jake

On Tue, May 6, 2008 at 12:33 PM, mdg583 <[EMAIL PROTECTED]> wrote:
>
>  Hi, I don't know where this problem is coming from, but I find that
>  over the course of a few jquery AJAX operations and a ajaxForm submit,
>  for a little while I find that "$ is not defined". Basically, I am
>  loading a form into the current document using the jquery load
>  function, and then setting up ajaxForm to submit this form and put the
>  results into another div. This content that is finally loaded into
>  this next div div has a javascript function near the beginning, and at
>  the point in time when this script is reached, I find that "$ is not
>  defined".
>
>  This happened once before and I just worked around it, but that is
>  getting difficult.
>
>  Does anyone know why this would be?
>
>  I have jquery.form that says it requires jQuery v1.1 or later, and I
>  have jQuery 1.2.1.
>


[jQuery] $ is not defined

2008-05-06 Thread mdg583

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

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

Does anyone know why this would be?

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


[jQuery] Modal Dialog in blockUI

2008-05-06 Thread Adam

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


[jQuery] Contributors to jQuery and GPL license

2008-05-06 Thread Simon

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

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

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


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

2008-05-06 Thread all4one

style="display:none worked great! thanks

On May 2, 2:33 am, yabado <[EMAIL PROTECTED]> wrote:
> You may want to specifically tell the menu dive to not display, hard
> coded.
>
> 
>
> On May 1, 6:04 pm, "Theodore Ni" <[EMAIL PROTECTED]> wrote:
>
>
>
> > You'll need to give us more information, a demo or at least some code,
> > before we can help you diagnose.
>
> > On Thu, May 1, 2008 at 5:18 PM, all4one <[EMAIL PROTECTED]> wrote:
>
> > > I have two drop-down lists in the "main menu" at the top of the page.
> > > When you click on link items in the "top menu" (different menu) which
> > > is below the "main menu" the drop-down menu flashs then disapears as
> > > the rest of the page loads.
>
> > --
> > Ted- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: newbie struggling with JSON

2008-05-06 Thread Josh Nathanson


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


-- Josh


- Original Message - 
From: "Stan McFarland" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Tuesday, May 06, 2008 4:55 AM
Subject: [jQuery] Re: newbie struggling with JSON



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

Thanks again,

Stan



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

Stan,

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

-- Josh



- Original Message -
From: "Stan McFarland" <[EMAIL PROTECTED]>
To: "jQuery (English)" 
Sent: Monday, May 05, 2008 2:07 PM
Subject: [jQuery] newbie struggling with JSON

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

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

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

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

> I always get back: "code" has no properties

> Any suggestions?

> Thanks,

> Stan McFarland
> `- Hide quoted text -

- Show quoted text - 




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

2008-05-06 Thread Rey Bango


Please post this bug on the jQuery UI mailing list.

Thanks,

Rey

Quinode wrote:


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



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

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

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

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

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

Glen

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

>
> hi glen, thanks for replying.
>
> That still wouldn't work. With that you are looking for the text
> inside div elements which are descendants of of the id'd element.
> What i want to select are certain text elements of the id'd element.
> I figured something out, but this is surprisinlgy difficult:
>
> 
> 
> 
> 
> 
> ...
> 
>
> I had to use .contains() and [nodeType=3] to pick text nodes.  not
> pretty.
>
> On May 5, 4:23 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> > $("#tln21 div").text();
> >
> > Like that?  By the way, firebug is very helpful to test our selectors and
> > see what they come up with.
> > Hmm, it would be nice to have a tutorial on how to do this.  I can try
> and
> > whip one up.
> >
> > Glen
> >
> > On Mon, May 5, 2008 at 2:47 PM, darren <[EMAIL PROTECTED]> wrote:
> >
> > > hi Joe, thanks for your comment
> >
> > > If you look closer, you can see that the text is not actually in the
> > > div element.  i basically need to select the text after that node:
> >
> > > 
> > >   
> > >   Some text
> > >   
> > >   some more text
> > >   
> > >   even more text
> > > 
> >
> > > So that wouldnt work
> >
> > > On May 5, 2:06 pm, Joe <[EMAIL PROTECTED]> wrote:
> > > > $("#tln21').text();
> >
> > > > This will return the text associated with id="tln21".
> >
> > > >http://docs.jquery.com/Attributes/text
> >
> > > > Joe
> >
> > > >www.subprint.com
> >
> > > > On May 5, 2:34 pm, darren <[EMAIL PROTECTED]> wrote:
> >
> > > > > Hi everybody, new member here.
> >
> > > > > I have a project with the following snipped of code:
> >
> > > > > =start html=
> > > > > 
> > > > >   
> > > > >  
> > > > >   As I remember, Adam, it was
> upon
> > > > > this fashion
> > > > >   5bequeathed me by will but poor a thousand
> > > > >   
> > > > >  
> > > > >   crowns, and, as thou say'st,
> > > > > charged my brother,
> > > > >   
> > > > >  
> > > > >   on his blessing, to breed me
> well;
> > > > > and
> > > > >   
> > > > >  
> > > > >   there begins my sadness. My
> > > > > brother Jaques he keeps
> > > > >   
> > > > >  
> > > > >   at school, and report speaks
> > > > > goldenly of his profit.
> > > > >class="ln
> > > > > tln">10For my part, he keeps me rustically at home, or, to
> > > > > speak
> > > > >class="ln
> > > > > tln">
> > > > >  
> > > > >   more properly, stays me here at
> > > > > home unkept; for call
> > > > >class="ln
> > > > > tln">
> > > > >  
> > > > >   you that "keeping" for a
> gentleman
> > > > > of my birth that differs
> > > > >class="ln
> > > > > tln">
> > > > >  
> > > > >   not from the stalling of an ox?
> > > > > His horses are bred
> > > > >class="ln
> > > > > tln">
> > > > >  
> > > > >   better, for, besides that they
> are
> > > > > fair with their feeding,
> > > > >class="ln
> > > > > tln">15they are taught their man�ge, and to that end riders
> > > > >class="ln
> > > > > tln">
> > > > >  
> > > > >   dearly hired; but I, his
> brother,
> > > > > gain nothing under
> > > > >class="ln
> > > > > tln">
> > > > >  
> > > > >   him but growth, for the which
> his
> > > > > animals on his
> > > > >class="ln
> > > > > tln">
> > > > >  
> > > > >   dunghills are as much bound to
> him
> > > > > as I. Besides this nothing
> > > > >class="ln
> > > > > tln">
>

[jQuery] jQuery UI Bug Reporting & Discussion - PLEASE READ

2008-05-06 Thread Rey Bango


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

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

Rey...


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

2008-05-06 Thread Rey Bango


Please post this error on the jQuery UI mailing list.

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

Rey...

Adwin Wijaya wrote:

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

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

but using beta2 it work perfectly ...

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

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


thx

adwin


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

- Show quoted text -




[jQuery] Re: how do it?

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

besides that, this

$('input #search')


should be

$('input#search')



Hope this helps!

alex


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

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


-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] extending objects with jquery

2008-05-06 Thread Javier Martinez

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

Class View()

Class DataGrid ({
extends: View
})

Class DataView({
extends: View
})

What is the equivalent on jQuery?

Thanks!


[jQuery] Re: using variables with jquery

2008-05-06 Thread Carl Von Stetten

quirksmode,

Try this:

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

HTH,
Carl

quirksmode wrote:
> Hi,
>
> I need to make a div slide across the screen using the animate
> command. It works when I use the following:
>
> $('#js_innerwrapper').animate({left:"+=500"}, 1000, 'easeOutSine');
>
>
> However, i need to be able to change the 500 to be width of the div,
> which i get using:
>
> $.gamewidth = $('.gamewrapper').width();
>
>
> I then need to combine the two which does not seem to work:
>
> $('#js_innerwrapper').animate({left:"+=$.gamewidth"}, 1000,
> 'easeOutSine');
>
> Any ideas?
>
>
>
>   


[jQuery] using variables with jquery

2008-05-06 Thread quirksmode

Hi,

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

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


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

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


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

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

Any ideas?



[jQuery] Autocompleter using a static dropdown

2008-05-06 Thread Pickledegg

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

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


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

2008-05-06 Thread Adwin Wijaya

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

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

but using beta2 it work perfectly ...

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

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


thx

adwin

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


[jQuery] Reinitialization of css values

2008-05-06 Thread Gildas

Hello people!

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

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

Thank you!


[jQuery] how do it?

2008-05-06 Thread Luciano

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

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

but no sucess,

so i try it:

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

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

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

tks



[jQuery] IE7 accordion bug with images

2008-05-06 Thread Philip

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

example of bug:
http://ppe.philipspence.com/?page=property&subNav=rental

Any help is appreciated.


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

2008-05-06 Thread kareneliot

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


[jQuery] Re: event data ?

2008-05-06 Thread Adwin Wijaya

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

On May 6, 6:39 pm, motob <[EMAIL PROTECTED]> wrote:
> $('.mybutton').click(function(){
>   alert($(this).attr("id")); //get the id
>   $(this).attr("disabled", "disabled"); //disable the clicked button
>
> });
>
> On May 6, 3:33 am, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > I got a problem ... I have more than 1 buttons and each buttons has
> > unique name.
> > I assign / bind the button with function like this :
>
> > $('.mybutton').bind('click',function(btn){ alert( btn.id); } );
>
> > every time i click on the buttons the alert always show undefined. How
> > to get the ID of button who clicked ? i want to get the id, change the
> > button to disabled ... how to do that one ...
>
> > and what is event.data actually is
>
> > thanks !


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

2008-05-06 Thread Eric Martin

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

On May 5, 10:02 pm, paulp75 <[EMAIL PROTECTED]> wrote:
> Ok I have a set of results from a search, and for each record in the
> result set, there is a form built.
> When they click add to cart, i would like it to have a warning, to
> check the measurements before ordering, to double check they are
> ordering the right product, then when they click ok, it will add it to
> the cart via jquery.form, when they click cancel it shouldnt add it.
>
> but this is what actually occurs. when first clicking add to cart, the
> confirmation modal pops up, click ok, and nothing happens. then if you
> add another item, both the second and first items appear in the
> shopping cart, but this occurs before clicking ok though. so the
> confirmation essentially does not work.
> if you click cancel then the product is still added.
> this is the code for clicking the add button.
>
>                 $(".ajaxadd").livequery('submit',function (e) {
>         e.preventDefault();
>
>                 // example of calling the confirm function
>                 // you must use a callback function to perform the "yes" 
> action
>                 confirm("Please check measurements", function (e) {
>
> $('.ajaxadd').ajaxForm(options);
>         return false;
>                 });
>
> and this is the code for the function to pop up the modal, and make
> the person confirm their product.
>
> function confirm(message, callback) {
>         $('#confirm').modal({
>                 close:false,
>                 overlayId:'confirmModalOverlay',
>                 containerId:'confirmModalContainer',
>                 onShow: function (dialog) {
>                         dialog.data.find('.message').append(message);
>
>                         // if the user clicks "yes"
>                         dialog.data.find('.yes').click(function () {
>                                 // call the callback
>                                 if ($.isFunction(callback)) {
>                                         callback.apply();
>                                 }
>                                 // close the dialog
>                                 $.modal.close();
>                         });
>                 }
>         });
>
> }
>
> any help on this would be great. thank you
>         });


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

2008-05-06 Thread noon

Thanks a lot !


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

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

Angus,

>I just know that in jQuery + IE5.5 most selectors return empty array.
>After digging into source code I found that it will try to get the
>nodeName and nodeType of document (nodeType=9) which IE 5.5's document
>element doesn't have these two attributes.  As a quick fix I add the
>following lines at the beginning of my HTML:
>
>if (document) {
>  if (!document.nodeType) document.nodeType = 9;
>  if (!document.nodeName) document.nodeName = '#document';
>}
>
>and all of my selector works.  Of course there should be other cases
>failed in IE 5.5 but at least simple selectors will work
>
>Hope this help

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

-Dan



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

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

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

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

- Richard

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

>
> $("p.more a").click(function() {
>$(this).parent().siblings("div.overflow").toggle();
>$(this).toggle(
>function() {$(this).html("« Less"); alert('1');},
>function() {$(this).html("More »"); alert('2');}
>);
> });
>
> I am referring to "p.more a" when mentioning a click. The first time I
> click no alert is fired. The second time I click 1 is alerted. The
> third time I click 2 is alerted then 1 is alerted. The fourth time I
> click 2 is alerted, 1 is alerted, 2 is alerted.  And so on.  Every
> time "div.overflow" is toggled correctly.
>
> Why is it recursively operating like this?
>


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

2008-05-06 Thread [EMAIL PROTECTED]

It's an awesome job 

Congratulations from Belgium to all contributors !

On May 6, 2:47 pm, Joe <[EMAIL PROTECTED]> wrote:
> The new website is slick...great work.
>
> Nice to see the Liferay sponsorship as well.  I started a project
> using Liferay.  What an intensely robust solution!
>
> Joe
>
> www.subprint.com
>
> On May 5, 9:20 am, Rey Bango <[EMAIL PROTECTED]> wrote:
>
>
>
> > jQuery UI v1.5b3, the jQuery project's UI & effects library, is now
> > available for download. While still in beta, the library is feature
> > frozen and the features are in excellent shape.
>
> > The jQuery UI team is anxious for your feedback so please join them on
> > the UI mailing list found here:
>
> >http://groups.google.com/group/jquery-ui?hl=en
>
> > Any assistance with testing is greatly appreciated as it will help in
> > making UI rock-solid out of the gate.
>
> > Also check out the new site for the jQuery UI project 
> > athttp://ui.jquery.com/
>
> > Rey- Hide quoted text -
>
> - Show quoted text -


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

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

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

- Richard

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

>
> When you use innerHtml it completely destroys the anchor tag and
> replaces it with another one. Not sure if jQuery does this or the
> browser, but when you destroy an element, all event listeners are
> destroyed too. So you'll either have to re-initialize the click
> listener when you use innerHtml, or just simply change the text of the
> anchor tag like so:
>
> $("a.xx").click(function(){
>  var $this = $(this);
>  event.preventDefault();
>  if($this.text() == "click") {
>$this.text("click again");
>  } else {
>$this.text("click");
>  }
> });
>
> By changing the text of an element allows for the event listener to
> remain in place, since the element itself didn't actually get
> destroyed.
>
> Hope this helps
>
> On May 6, 4:58 am, biggie_mac <[EMAIL PROTECTED]> wrote:
> > I discovered this accidentaly today. I have an anchor like
> > click and a simple
> > jquery like
> >
> > jQuery().ready(function() {
> > $("a.xx").click(function(event){
> > event.preventDefault();
> > alert('u clicked');
> > });
> > });
> >
> > I run this, works fine, I get the alert when I click on the anchor.
> > Now I also have a button which when I click it changes the innerHTML
> > of the div with click again. basically it
> > changes an anchor with another which is the same but only has
> > different message. But it's still an anchor with xx class. Yet, when I
> > click on the second anchor, nothing happens. Anyone know why this
> > happens?Below the code I tried:
> >
> > Js:
> > jQuery().ready(function() {
> > $("a.hide").click(function(event){
> > event.preventDefault();
> > alert('ai facut click pe un a cu class hide');
> > });
> > });
> >
> > HTML:
> > click
> >  > onclick="document.getElementById('divb').innerHTML=' > class="hide" href="#">click2';";
> >
> > 10x
>


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

2008-05-06 Thread Joe


The new website is slick...great work.

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

Joe

www.subprint.com


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


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

2008-05-06 Thread noon

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

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

Why is it recursively operating like this?


[jQuery] Re: newbie struggling with JSON

2008-05-06 Thread Stan McFarland

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

Thanks again,

Stan



On May 5, 7:42 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Stan,
>
> I'd suggest using Firefox with the Firebug extension, and doing a
> console.log(code) in your callback.  This will give you better information
> than is provided by using the alert method.
>
> -- Josh
>
>
>
> - Original Message -
> From: "Stan McFarland" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Monday, May 05, 2008 2:07 PM
> Subject: [jQuery] newbie struggling with JSON
>
> > Hi,  newbie here.   Hoping someone can help.  I'm able to successfully
> > call $.get and then eval() a URL that returns a JSON object:
>
> > $.get("myurl",
> >    function(code)  {  eval(code);  alert(code[0]); });
>
> > But if I try to call $.getJSON on the same URL:
>
> > $.getJSON ("myurl",
> >   function(code) { alert(code[0]); });
>
> > I always get back:    "code" has no properties
>
> > Any suggestions?
>
> > Thanks,
>
> > Stan McFarland
> > `- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: newbie struggling with JSON

2008-05-06 Thread Stan McFarland

Josh,

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

-stan


On May 5, 7:42 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Stan,
>
> I'd suggest using Firefox with the Firebug extension, and doing a
> console.log(code) in your callback.  This will give you better information
> than is provided by using the alert method.
>
> -- Josh
>
>
>
> - Original Message -
> From: "Stan McFarland" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Monday, May 05, 2008 2:07 PM
> Subject: [jQuery] newbie struggling with JSON
>
> > Hi,  newbie here.   Hoping someone can help.  I'm able to successfully
> > call $.get and then eval() a URL that returns a JSON object:
>
> > $.get("myurl",
> >    function(code)  {  eval(code);  alert(code[0]); });
>
> > But if I try to call $.getJSON on the same URL:
>
> > $.getJSON ("myurl",
> >   function(code) { alert(code[0]); });
>
> > I always get back:    "code" has no properties
>
> > Any suggestions?
>
> > Thanks,
>
> > Stan McFarland
> > `- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: processing json object

2008-05-06 Thread Nicola Rizzo

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

On Tue, May 6, 2008 at 5:16 AM, JP <[EMAIL PROTECTED]> wrote:
>
>  thanks !
>
>  I only had to add:
>   ...   i < records.length; ...
>
>
>  On May 4, 2:14 pm, "Nicola Rizzo" <[EMAIL PROTECTED]> wrote:
>  > success: function(json, status){
>  > var records = json.Records;
>  > var str = "";
>  > if(records){
>  > for(var i = 0; i < records; records++){
>  > for(var j in records[i]){
>  > str += j + " --> " + records[i][j] + "\n";
>  > }
>  > }
>  > window.alert(str);
>  > }
>  >
>  > }
>  >
>  > hth,
>  > Nicola
>  >
>
>
> > On Sun, May 4, 2008 at 8:02 PM, JP <[EMAIL PROTECTED]> wrote:
>  >
>  > >  how can I process values from json object without having to use
>  > >  indivual reference names?
>  >
>  > >  using json:
>  >
>  > >  ( {"Records": [ {"firstname":"Nancy","lastname":"Davolio"} ],
>  > >  "RecordCount":"1" } )
>  >
>  > >  instead of  :
>  >
>  > >  $.ajax({ ..
>  >
>  > > success: function(json, status) {
>  > >   if(json.Records){alert("Records="+json.Records[0].firstname );}
>  > >  ...
>  >
>  > >  is there a way to numerically reference values --something like :
>  >
>  > >  $.ajax({ ..
>  >
>  > > success: function(json, status) {
>  > >   if(json.Records){alert("Records="+json.Records[0].0);}
>  > >  ...
>  >
>  > >  only it should work :)
>  >
>  > >  thanks in advance
>


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

2008-05-06 Thread Marco

Hi!

This code seems not to work:

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

Could someone Please help me?

The page I am trying to manipulating is the following:

=

http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>

http://www.w3.org/1999/xhtml";>



 

 FAQ













FAQ



Some more text...










=


[jQuery] Re: event data ?

2008-05-06 Thread motob

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



On May 6, 3:33 am, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
> Hi
>
> I got a problem ... I have more than 1 buttons and each buttons has
> unique name.
> I assign / bind the button with function like this :
>
> $('.mybutton').bind('click',function(btn){ alert( btn.id); } );
>
> every time i click on the buttons the alert always show undefined. How
> to get the ID of button who clicked ? i want to get the id, change the
> button to disabled ... how to do that one ...
>
> and what is event.data actually is
>
> thanks !


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

2008-05-06 Thread motob

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

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

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

Hope this helps

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


[jQuery] Re: php mysql

2008-05-06 Thread Brad Hile

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

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

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

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

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

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

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

exit($return);




On May 6, 8:57 am, John <[EMAIL PROTECTED]> wrote:
> I have the same question. I have over 20k rows of data in mysql, and
> the idea is for there to be an update button beside each row. I don't
> see any examples of how to interact with the database here -- in php
> it's $sql = "..."; in ruby/rails it's Thing.new[...], but what's up
> with jquery? I don't think an explanation would be voodoo - it'd be a
> lifesaver. I already understand the old ways - school me on the
> jquery.
> Thanks
> John
>
>
>
> > This is a pretty big question. What you need to do is learn how to do
> > it with regular HTTP interaction with the backend. Once you understand
> > that you'll be able to adapt it to Ajax. A firm grounding in HTTP
> > makes XHR pretty straightforward.
>
> > Doing this right is not simple. You should probably read up on REST
> > and understand which parts should GET and which parts should POST (or
> > really even PUT/DELETE but that's often unused due to bad support and
> > general lack of understanding).
>
> > The take away point is that if you don't know how to do every part
> > with regular forms and backend interaction already, doing it in Ajax
> >  will seem like insurmountable voodoo.


  1   2   >