Re: [jQuery] New Forums

2010-01-26 Thread Joe Moore
I was able to use my Google account to logon and didn't have to supply any
info. I also haven't received any emails.

When I click the Login button, below the Username and Password fields are
other options for logging in, either a Google account or a Yahoo! account.
It also looks like a Google Apps account.

Hope this helps,

Joe Moore

On Thu, Jan 21, 2010 at 7:28 PM, Shawn  wrote:

> My apologies to the list managers.  I did not mean to belittle their
> efforts in any way.  I only meant to state that for me, personally, forums
> are not the preferred tool.
>
> I am involved in a number of organizations where the main mantra is the
> concept of a do-aucracy.  If you think it should be done a particular way,
> do it.  For this list, this means that the list managers have DONE it, and
> so they get to make the rules.  I don't pretend to know all the
> considerations that went into the choices that were made.
>
> But, I find it unacceptable that I have to give my contact information to
> zoho.com so that I can use a forum on jquery.com.  (as suggested by Andre
> in a different posting on this thread).  For some reason it is deemed "ok"
> for our account info (and everything related to it) to be accessible by
> absolute anyone.  Whether it is a FaceBook account, a GMail account, etc.  I
> have put the brakes on for this trend and refuse to give my information away
> to third party sites that have nothing to do with what I'm trying to do.  No
> offense intended to the zoho gang, as I do not know them or their
> intentions/purposes.  But I'll just say no.
>
> My thoughts.
>
> Shawn
>
> Shawn wrote:
>
>> I received this email as well.  I don't know if it is legitimate or not
>> tough.  Nor do I care.  Web based forums DO NOT WORK for my needs.  I cannot
>> do a quick scan of topics in a forum without first opening a browser and
>> going to that forum.  Whereas with an email list, I scan my email frequently
>> during the day as part of my usual routine.
>>
>> So, if the mailing list is to disappear, I for one will not spend t
>> much effort trying to replace it with a web forum.  I can always use the IRC
>> channel when I need assistance.
>>
>> To be fair though, I can see why there would be a desire to shift away
>> from Google Groups.  I will likely take a look at the forum to see what's
>> what, but doubt it fill my needs.
>>
>> Still, there are other alternatives than a web forum (i.e. mailman).
>>
>> My thoughts.
>>
>> Shawn
>>
>> Matt Quackenbush wrote:
>>
>>> Hello,
>>>
>>> I received an email inviting me to join the new jQuery forums.  It
>>> contained a username and password for me to use.  However, when I try to
>>> login, I am told that my email address has not been confirmed and therefore
>>> cannot do so.  A link to a help page is given whereby I can allegedly have a
>>> confirmation email sent by following a list of instructions.  Interestingly
>>> enough, the very first step given in the instructions is to login.  I
>>> thought that perhaps I would be able to do so at the link given, but alas an
>>> attempt to login there results in the exact same message and help link being
>>> presented.
>>>
>>> Any suggestions on how to actually login/activate would be appreciated.
>>>  :-)
>>>
>>>


Re: [jQuery] jQuery Version

2010-01-06 Thread Joe Moore
There's no way for us to determine whether updating the jQuery library will
affect your site. Too many variables.
- Review the Release notes for the version to see if there are any known
issues.
- Review any plugins that you have to determine if they will work.
- Update the library and test your site.

Good luck!

Joe

On Wed, Jan 6, 2010 at 10:04 AM, Cyberdog wrote:

> Hi,
> I have a website which has jQuery JavaScript Library v1.3.2 installed.
> Should i update this to the latest, or would this cause problems to
> the site.
>
> Thanks
> Dave.
>


[jQuery] Re: How to check whether an element is bound to an event or not?

2010-01-02 Thread Joe Sondow
Yes, the live function. http://docs.jquery.com/Events/live

"Added in jQuery 1.3: Binds a handler to an event (like click) for all
current - and future - matched element. Can also bind custom events."

On Jan 2, 11:44 pm, "Md. Ali Ahsan Rana" 
wrote:
> hi, thanks. But, what is happening here is:
>      There is an DOM element, which is reloading(replaced by ajax response
> with same id/tag), then the event isn't no more bounded. I want it to be
> bounded all the time.  Do you think, here unbound will work? Or Is there any
> way to keep the binding whenever a new element is being loaded?
>
> Regards
>
> On Sun, Jan 3, 2010 at 1:41 AM, waseem sabjee wrote:
>
>
>
> > usually when I bind a click event I do this.
> > unbind before bind
>
> > $(elm).unbind('click');
> > $(elm).bind("click", function() {
>
> > });
>
> > may be a modification like this
>
> > if(!$(elm).unbind('click')) {
> >    $(elm).bind("click", function() {
> >      alert("This element was only bound if it was not bound");
> >    });
> > }
>
> > On Sat, Jan 2, 2010 at 7:28 PM, ranacseruet  wrote:
>
> >> I need to check whether an element is bound to an event or not. How to
> >> achieve this?
>
> --http://ranacseruet.blogspot.com/


[jQuery] Re: json return

2009-12-30 Thread Joe Sondow
Your json string represents an array. The variable "data" is probably
that array. There is no idfakultas property on the array, but there is
an idfakultas property on each of the two objects in the array. Try
this for your alert:

alert("tes =" + data[0].idfakultas + " " + data[1].idfakultas);


[jQuery] What is the canonical way of seeing if a selector returns an empty list?

2009-12-17 Thread Joe Grossberg
I understand that the way to see if there are any elements on the page
with the class of "foo" is this: $('.foo')

On a page with such elements, I will get a result like: jQuery(p.foo,
p.foo) and if there are no matching elements, I will get jQuery() --
or at least that's how it's displayed in Firebug.

Anyhow, an empty jQuery() is not false-y even when it is empty, and
this code (below) will always result in the first alert being called,
never the second:

if ( $('.foo') ) {
  alert('at least one matching element');
} else {
  alert('nothing matches');
}

Instead, I do it like this (since zero is false-y in JavaScript):

if ( $('.foo').length ) {
  alert('at least one matching element');
} else {
  alert('nothing matches');
}

But is that the preferred way of doing this?

Thanks,
Joe


[jQuery] Re: Simple XML Parsing Question

2009-11-18 Thread Joe
thx, i tried that.   whether i do a find or a children, it still
returns both id's.  you can try it with a simple app that loads that
XML.  it's really odd.

i still haven't got a solution.

On Nov 18, 2:12 pm, Wil Everts  wrote:
> Here's an old, but good, tutorial on xml and 
> jQuery:http://www.bennadel.com/blog/1054-jQuery-Demo-Working-With-XML-Docume...
>
> ...or if you want to make the code you have work you can "cheat" and just
> change the name of one of the two 'id's in your xml... ;)
>
> Wil
>
> On Wed, Nov 18, 2009 at 1:18 AM, Joe Moore  wrote:
> > Instead of find, use children?
>
> > On Nov 17, 2009 2:56 PM, "Joe"  wrote:
>
> > I have been banging my head against the wall and searching for answers
> > for the past week, so any help or direction would be appreciated.  I
> > am sure that I am missing something obvious.   I have some XML that
> > looks like this:
>
> > 
> > 
> >                
> >                        181
> >                        First Message
> >                        
> >                                135
> >                                Sample_img.png
> >                                image/png
> >                                2009-08-25
> > 11:25:28.34
> >                        
> >                
> > 
>
> > And an AJAX call that looks like this:
>
> > $.ajax({
> >   type: "GET",
> >   url: myURL,
> >   success: function(xml) {
> >                 $(xml).find('CustomMessage').each(function(){
> >                         var id_text = (this).find('id').text();
> >                         var name_text = $(this).find('name').text();
> >                         var contentType_text =
> > $(this).find('contentType').text();
> >                 }); //close each(
> >   }
> >   }
> >  });
>
> > When i run this code, the id and name variables have all the id/name
> > nodes in them.  I only want the id/name for the child node.   the
> > contentType variable works find (but there is only one instance.
>
> > Any ideas on how to fix this?   I am at my wits end.
>
> > thx,
>
> > Joe C


Re: [jQuery] Simple XML Parsing Question

2009-11-18 Thread Joe Moore
Instead of find, use children?

On Nov 17, 2009 2:56 PM, "Joe"  wrote:

I have been banging my head against the wall and searching for answers
for the past week, so any help or direction would be appreciated.  I
am sure that I am missing something obvious.   I have some XML that
looks like this:



   
   181
   First Message
   
   135
   Sample_img.png
   image/png
   2009-08-25
11:25:28.34
   
   



And an AJAX call that looks like this:

$.ajax({
  type: "GET",
  url: myURL,
  success: function(xml) {
$(xml).find('CustomMessage').each(function(){
var id_text = (this).find('id').text();
var name_text = $(this).find('name').text();
var contentType_text =
$(this).find('contentType').text();
}); //close each(
  }
  }
 });


When i run this code, the id and name variables have all the id/name
nodes in them.  I only want the id/name for the child node.   the
contentType variable works find (but there is only one instance.

Any ideas on how to fix this?   I am at my wits end.

thx,

Joe C


[jQuery] Simple XML Parsing Question

2009-11-17 Thread Joe
I have been banging my head against the wall and searching for answers
for the past week, so any help or direction would be appreciated.  I
am sure that I am missing something obvious.   I have some XML that
looks like this:




181
First Message

135
Sample_img.png
image/png
2009-08-25 11:25:28.34





And an AJAX call that looks like this:

$.ajax({
   type: "GET",
   url: myURL,
   success: function(xml) {
 $(xml).find('CustomMessage').each(function(){
 var id_text = (this).find('id').text();
 var name_text = $(this).find('name').text();
 var contentType_text = 
$(this).find('contentType').text();
 }); //close each(
   }
   }
 });


When i run this code, the id and name variables have all the id/name
nodes in them.  I only want the id/name for the child node.   the
contentType variable works find (but there is only one instance.

Any ideas on how to fix this?   I am at my wits end.

thx,

Joe C


Re: [jQuery] Re: button value change

2009-11-12 Thread Joe Moore
Certainly more concise!

On Thu, Nov 12, 2009 at 10:00 AM, saxan rappai wrote:

> iam not sure with this .. but its working... a lil modification..
>
>
> 
> 
> Test Page
> 
> 
> $(function() {
> $('#but').toggle(
> function(event) {
> $(this).val('Hide Details');
> },
> function(event) {
> $(this).val( 'More Details');
> }
> );
>
> });
> 
> 
> 
>
> 
> 
> 
>
>
>
> thanks
> saxan Rappai
>
>
>
> On Thu, Nov 12, 2009 at 8:00 PM, David pr  wrote:
>
>> Thanks but this won't work for a   ?
>>
>> David
>>
>
>
>
> --
> Thanks & regards
>
> Saxan Rappai.
>
> http://www.primemoveindia.com/in_IT_4.html
>


Re: [jQuery] Re: button value change

2009-11-12 Thread Joe Moore
David,

You are correct, that wont work for the input element. Sorry about that. I
guess I got focused on the first part of your email and the a element.

I'm wondering if you thought about why the code I provided didn't work? You
might want to review the jQuery documentation and the tutorials:
 - http://docs.jquery.com/Main_Page
 - http://docs.jquery.com/Tutorials

Here's why, because the text attribute doesn't exist for your input tag, it
doesn't have a text attribute (ok as enhanced by jQuery).

When the input element is created like this, then you'd have to change the
value attribute. This would then change the text that is displayed to the
user. (Note this also changes the value you'd receive on the server end.)

If you had used the  element, then changing the text attribute would
have worked.

Here is some more modified code for you to play.



Test Page


$(function() {
$('#frm1').submit( function(event) {
event.preventDefault();
event.stopPropagation();
});

$('#btn1').toggle(
function(event) {
$(this).attr('value','Hide Details');
},
function(event) {
$(this).attr('value','More Details');
}
);
   $('#btn2').toggle(
function(event) {
$(this).text('Hide Details');
},
function(event) {
$(this).text('More Details');
    }
);
   });





More Details




HTH,

Joe



On Thu, Nov 12, 2009 at 9:30 AM, David pr  wrote:

> Thanks but this won't work for a   ?
>
> David
>


Re: [jQuery] Re: IE7 onclick object.function

2009-11-11 Thread Joe Moore
Well, maybe all is not lost. How about this, which uses jQuery inside the
function. Then you could call your plugin, I bet. Still not the best, but
perhaps it will work.



Test Page


$(function() {
$('a.detailLink').click(
function(event) {
//stop the events default action and propagation.
event.stopPropagation();
event.preventDefault();
//run custom function.
//cutsom_function(parameters);
}
);


});

function custom_function(obj, varone, vartwo, varthree, varfour,
varfive)
{
var elem = $(obj);
alert("This: " + elem.attr('id') + "\n" +
"varone: " + varone + "\n" +
"vartwo: " + vartwo + "\n" +
"varthree: " + varthree + "\n" +
"varfour: " + varfour + "\n" +
"varfive: " + varfive  );
    }



More Details




Joe


On Wed, Nov 11, 2009 at 2:52 PM, Matthew  wrote:

> Thanks for the help Joe. Originally most of the on-page script was
> just javascript, but the function call was to a custom jQuery plugin.
> I did a modified version of what you  suggested and rewrote the plugin
> to just be basic functions with parameters. Seems to work now, I'm
> just bummed I couldn't keep the jQuery plugin because IE7 decided it
> wasn't going to let it work with onclick.
>
> Thanks again.
>
> On Nov 11, 11:17 am, Joe Moore  wrote:
> > Mmm... I'm thinking there's a better way to do it, but as I'm not
> familiar
> > with the code you are dealing with, here's what I came up with, basically
> > you aren't using jQuery.
> >
> > 
> > 
> > Test Page
> > 
> > 
> > $(function() {
> > $('a.detailLink').click(
> > function(event) {
> > //stop the events default action and propagation.
> > event.stopPropagation();
> > event.preventDefault();
> > //run custom function.
> > //cutsom_function(parameters);
> > }
> > );
> >
> > });
> >
> > function custom_function( varone, vartwo, varthree, varfour,
> > varfive)
> > {
> > alert("varone: " + varone + "\n" +
> > "vartwo: " + vartwo + "\n" +
> > "varthree: " + varthree + "\n" +
> > "varfour: " + varfour + "\n" +
> > "varfive: " + varfive );
> > }
> > 
> > 
> > 
> >  > onclick="custom_function(1,2,3,4,5); return false;">More Details
> > 
> > 
> >
> > Joe
> >
> > On Wed, Nov 11, 2009 at 2:06 PM, Matthew  wrote:
> > > I'm passing about 5 parameters to the function that are coming from
> > > php running in a loop. So I was thinking I needed to use the onclick
> > > on the  tag so that I could just pass the php variables as
> > > parameters right there in the loop instead of storing them somehow and
> > > referencing them after the page load.
> >
> > > On Nov 11, 10:54 am, Joe Moore  wrote:
> > > > Is there some reason you don't want to put this onclick event in a
> script
> > > > tag in the head section? Like,
> >
> > > > 
> > > > 
> > > > Test Page
> > > > 
> > > > 
> > > > $(function() {
> > > > $('a.detailLink').click(
> > > > function(event) {
> > > > //stop the events default action - stops
> click.
> > > > event.preventDefault();
> > > > //stop propagation so the event doesn't
> bubble
> > > up.
> > > > event.stopPropagation();
> > > > //run custom function.
> > > > cutsom_function(parameters);
> > > > }
> > > > );
> > > > });
> > > > 
> > > > 
> > > > 
> > > > More Details
> > > > 
> > > > 
> >
> > > > HTH,
> >
> > > > Joe
> >
> > > > On Wed, Nov 11, 2009 at 1:14 PM, Matthew  wrote:
> > > > > I posted this earlier, but perhaps I didn't explain it right.
> >
> > > > > Im trying to get code that uses this syntax to work in IE6/7
> >
> > > > > 
> >
> > > > > It seems like IE6/7 do not like the $(this).function syntax,
> although
> > > > > if I just alert($(this)) I get [object Object] which I think is
> what
> > > > > should be expected.
> >
> > > > > I am using a custom jQuery plugin. A watered down version can be
> seen
> > > > > here:http://jsbin.com/ehoxu
> >
> > > > > Thanks in advance.
> >
> >
>


Re: [jQuery] Re: IE7 onclick object.function

2009-11-11 Thread Joe Moore
Mmm... I'm thinking there's a better way to do it, but as I'm not familiar
with the code you are dealing with, here's what I came up with, basically
you aren't using jQuery.



Test Page


$(function() {
$('a.detailLink').click(
function(event) {
//stop the events default action and propagation.
event.stopPropagation();
event.preventDefault();
//run custom function.
//cutsom_function(parameters);
}
);


});

function custom_function( varone, vartwo, varthree, varfour,
varfive)
{
alert("varone: " + varone + "\n" +
"vartwo: " + vartwo + "\n" +
"varthree: " + varthree + "\n" +
"varfour: " + varfour + "\n" +
"varfive: " + varfive );
}



More Details




Joe



On Wed, Nov 11, 2009 at 2:06 PM, Matthew  wrote:

> I'm passing about 5 parameters to the function that are coming from
> php running in a loop. So I was thinking I needed to use the onclick
> on the  tag so that I could just pass the php variables as
> parameters right there in the loop instead of storing them somehow and
> referencing them after the page load.
>
> On Nov 11, 10:54 am, Joe Moore  wrote:
> > Is there some reason you don't want to put this onclick event in a script
> > tag in the head section? Like,
> >
> > 
> > 
> > Test Page
> > 
> > 
> > $(function() {
> > $('a.detailLink').click(
> > function(event) {
> > //stop the events default action - stops click.
> > event.preventDefault();
> > //stop propagation so the event doesn't bubble
> up.
> > event.stopPropagation();
> > //run custom function.
> > cutsom_function(parameters);
> > }
> > );
> > });
> > 
> > 
> > 
> > More Details
> > 
> > 
> >
> > HTH,
> >
> > Joe
> >
> > On Wed, Nov 11, 2009 at 1:14 PM, Matthew  wrote:
> > > I posted this earlier, but perhaps I didn't explain it right.
> >
> > > Im trying to get code that uses this syntax to work in IE6/7
> >
> > > 
> >
> > > It seems like IE6/7 do not like the $(this).function syntax, although
> > > if I just alert($(this)) I get [object Object] which I think is what
> > > should be expected.
> >
> > > I am using a custom jQuery plugin. A watered down version can be seen
> > > here:http://jsbin.com/ehoxu
> >
> > > Thanks in advance.
> >
> >
>


Re: [jQuery] IE7 onclick object.function

2009-11-11 Thread Joe Moore
Is there some reason you don't want to put this onclick event in a script
tag in the head section? Like,



Test Page


$(function() {
$('a.detailLink').click(
function(event) {
//stop the events default action - stops click.
event.preventDefault();
//stop propagation so the event doesn't bubble up.
event.stopPropagation();
//run custom function.
cutsom_function(parameters);
}
);
});



More Details



HTH,

Joe

On Wed, Nov 11, 2009 at 1:14 PM, Matthew  wrote:

> I posted this earlier, but perhaps I didn't explain it right.
>
> Im trying to get code that uses this syntax to work in IE6/7
>
> 
>
> It seems like IE6/7 do not like the $(this).function syntax, although
> if I just alert($(this)) I get [object Object] which I think is what
> should be expected.
>
> I am using a custom jQuery plugin. A watered down version can be seen
> here: http://jsbin.com/ehoxu
>
> Thanks in advance.
>


Re: [jQuery] button value change

2009-11-11 Thread Joe Moore
David,

Here's one way, using the toggle event (really a click event, check out:
http://docs.jquery.com/Events/toggle#fnfn2fn3.2Cfn4.2C...)



Test Page


$(function() {
$('a.detailLink').toggle(
function(event) {
$(this).text('Hide Details');
},
function(event) {
$(this).text( 'More Details');
}
);

$('div[class^=hide-BAT]').hide();

});

    

More Details




HTH,

Joe

On Wed, Nov 11, 2009 at 1:01 PM, David pr  wrote:

> Hello,
>
> I had an 
> More details a>
> $(this).text($(this).text() == 'More details' ? 'Hide details' : 'More
> details');
>
> and on click I changed the text from more to hide
>
> I had to change the 
> 
>
> How do I change the value text on click ?
>
> David
>
>
>
>
>


Re: [jQuery] Re: .hide and .show div's

2009-11-11 Thread Joe Moore
Oops! Thanks for the catch!
The other thing to understand is that this wont work for browsers that have
JavaScript disabled.

On Nov 11, 2009 9:16 AM, "MorningZ"  wrote:

> Oops. got the selector wrong. It should be: > $( function() { >
$(div[class^=hide-BAT].hide(); ...
You still didn't get it right :-)

$("div[class^=Hide-BAT]").hide();


To original poster:

if you want "fast", then you can't beat CSS with jQuery's hide method

have like:



.


and now the CSS class "Hide" is defined like so:

.Hide { display: none; }


But, I'd suggest really reading into some replies above, you shouldn't
be using class names this way.  if your  needs to be uniquely
identified, then ID is the way to go, and the class name "BAT" would
be used to grab all those uniquely identified 's

so building on that (note: id's are not supposed to start with
numbers, hence the "B"):



.


so now on page load, it'll see:
.Hide { display: none; }

and not show all 55 's

want to do something to item 35?

function Action(id) {
  $("#B" + id).doSomething
}

Action("35")

want to do something to all 55 items?

$(".Hide").show()

doesn't that seem easier plus more importantly make more sense?

something like the suggested selector against your current structure

$("div[class^=hide-BAT]").hide();

while it *would work*, you need to understand why it is slow...

- first jQuery walks across the whole entire DOM tree grabbing every
single , and that's whether it's one you are after or not
- then id needs to get every single class name, and do a (relatively
to other methods anyways) slow "end with" operator

Yuck and just think if you had 200 of those 's, or 400 !

On Nov 11, 8:58 am, Joe Moore  wrote: > Oops. got
the selector wrong. I...

> On Wed, Nov 11, 2009 at 8:38 AM, Joe Moore 
wrote: > > $( function()  { ...

> > On Nov 11, 2009 8:17 AM, "David pr"  wrote: > >
> Hello, > > > Could you...


Re: [jQuery] .hide and .show div's

2009-11-11 Thread Joe Moore
Oops. got the selector wrong. It should be:

$( function()  {
   $(div[class^=hide-BAT].hide();
});

Joe

On Wed, Nov 11, 2009 at 8:38 AM, Joe Moore  wrote:

> $( function()  {
>$(div[class=hide-BAT$].hide();
> });
>
> I haven't tested this, but it should work. If not, verify the selector.
>
> Not sure why you are giving a unique classname to all these elements. If
> you need it, why not use the I'd attribute?
>
> Regards,
> Joe
>
> On Nov 11, 2009 8:17 AM, "David pr"  wrote:
>
> Hello,
>
> Could you help me please. I have a list of hotel which I .hide
> and .show div's to show more or less info.
>
> so i have
>
> 
>
> when the user press a button I use the code
> var Hcode = $(this).attr("custom");
>  $('div.Hide-' + Hcode).toggle();
>
> but when the page loads how do I hide this div automatically ?
>
> I have used
>
> for (i = 0; i <= 70; i++)
> {
>   $("div.Hide-BAT" + i).hide();
> }
>
> But its slow and probably not the best way to do it ?
>
> Hope you can help and this makes sense.
>
> Regards
>
> David
>
>


Re: [jQuery] .hide and .show div's

2009-11-11 Thread Joe Moore
$( function()  {
   $(div[class=hide-BAT$].hide();
});

I haven't tested this, but it should work. If not, verify the selector.

Not sure why you are giving a unique classname to all these elements. If you
need it, why not use the I'd attribute?

Regards,
Joe

On Nov 11, 2009 8:17 AM, "David pr"  wrote:

Hello,

Could you help me please. I have a list of hotel which I .hide
and .show div's to show more or less info.

so i have



when the user press a button I use the code
var Hcode = $(this).attr("custom");
 $('div.Hide-' + Hcode).toggle();

but when the page loads how do I hide this div automatically ?

I have used

for (i = 0; i <= 70; i++)
{
  $("div.Hide-BAT" + i).hide();
}

But its slow and probably not the best way to do it ?

Hope you can help and this makes sense.

Regards

David


Re: [jQuery] Re: Error '$this' is undefined

2009-11-11 Thread Joe Moore
Then something like this:



Test Page


$(function() {
$('a.cartSummaryLink').each(function(i) {
$(this).text( $(this).text().replace('Cart','My Shopping
Bag'));
});

});


    
View Cart




Joe

On Wed, Nov 11, 2009 at 7:30 AM, Daybreak0  wrote:

> Joe
>
> No I dont want anything to happen when you click on the link
>
> I want to change it beforehand.
>
> Basically ON LOAD of the html I need certain text replaced by my text.
>
> There is certain text that I can not control through HTML or in the
> backend, which needs to be replaced by my text. Not just this link,
> but I can choose the incorrect text, by either the CSS Class or ID.
>
>
> For Example:  $('.cartSummaryLink').val was my attempt to get the
> value of the  "incorrect text" (being View Cart) and the rest of my
> code was my attempt to replace part of that text (Cart) with my text.
>
>
>


Re: [jQuery] Re: Error '$this' is undefined

2009-11-11 Thread Joe Moore
You can't use the val() attribute, you need to use the text() attribute. Its
still not clear to me what you are trying to accomplish, so I played a
little and here's what I came up with for you to peruse.



Test Page


$(function(event) {
$('a.cartSummaryLink').click(function(event) {
aLink = $(event.target);
aLink.text( aLink.text().replace('Cart','My Shopping
Bag'));
event.preventDefault();
});
});

    

View Cart



HTH,

Joe

On Wed, Nov 11, 2009 at 5:32 AM, Joe Moore  wrote:

> So the jquery code executes when they click on the link?
> If so, do you have a click event attached to the links and this code is on
> it?
>
> On Nov 10, 2009 10:46 PM, "Daybreak0"  wrote:
>
> Joe
>
> Here is the Html fom above - I should have continued it into the
> conversations.
>
> HTML Code:
>
>  vertical="False"> The CSS class of the link View Cart is
> '.cartSummaryLink'
>
> The Jquery code is of course
>
> $('.cartSummaryLink').val( $(this).val().replace('Cart','My Shopping Bag')
> $(this) is meant to be equal to 'View Cart'
>
> Thanks
>
> On Nov 11, 2:05 pm, Joe Moore  wrote: > Well,
> what are you expecting $(t...
>
> > On Nov 10, 2009 8:42 PM, "Daybreak0"  wrote: > >
> Joe and Marcel - I see. > > ...
>
>


Re: [jQuery] Re: Error '$this' is undefined

2009-11-11 Thread Joe Moore
So the jquery code executes when they click on the link?
If so, do you have a click event attached to the links and this code is on
it?

On Nov 10, 2009 10:46 PM, "Daybreak0"  wrote:

Joe

Here is the Html fom above - I should have continued it into the
conversations.

HTML Code:

View Cart is
'.cartSummaryLink'

The Jquery code is of course

$('.cartSummaryLink').val( $(this).val().replace('Cart','My Shopping Bag')
$(this) is meant to be equal to 'View Cart'

Thanks

On Nov 11, 2:05 pm, Joe Moore  wrote: > Well, what
are you expecting $(t...

> On Nov 10, 2009 8:42 PM, "Daybreak0"  wrote: > > Joe
and Marcel - I see. > > ...


Re: [jQuery] Re: Error '$this' is undefined

2009-11-10 Thread Joe Moore
Well, what are you expecting $(this) to be? What code (HTML & JavaScript )
do you have to show us?

On Nov 10, 2009 8:42 PM, "Daybreak0"  wrote:

Joe and Marcel - I see.

Thank you

$('.cartSummaryLink').val( $(this).val().replace('Cart','My Shopping Bag')
);
No errors occur but it does not work.

I am not sure why, as its beyond my limited knowledge, but there must
be a way to replace certain text.


Re: [jQuery] Error '$this' is undefined

2009-11-10 Thread Joe Moore
$this should be $(this).

Hth,
Joe

On Nov 10, 2009 2:12 PM, "Daybreak0"  wrote:

Hi all,

I have the following html, of which I want to replace the text "Cart"
with "My Shopping Bag" (The Veiw Cart text is near the end)

Code:
1 item(s),
Total: £0.00 View Cart


Now I need the ability to actually choose the actual text I want to
replace, as there is other text, where I can not replace the whole
text line due to different numbers produced on the fly, so I cant use
the following, which does work.

Code:
$(".cartSummaryLink").html("View My Shopping Bag'");

I need to use the following one, but my experience is poor

Code:
$('.cartSummaryLink').val( $this.val().replace('Cart','My Shopping
Bag') );

I get the following error
Message: '$this' is undefined

any help will be appreciated.
Thanks
John


[jQuery] Get XML nodes when node name is repeated

2009-11-03 Thread Joe
I am having trouble getting a specific node in an XML doc, when the
doc contains various nodes that contain sub-nodes with the same name.
It probably easiest to just show an example.

For example, with this XML:


   100
   
  200
   


if i do this jquery

var fooId = xml.find("id").text();

It returns "100200"   It is returning both "id" nodes, when all i want
is the foo id node.   How can i select only foo's id node.
t

thx,

Joe C


[jQuery] Re: How to access a JavaScript object from within an ajax call?

2009-10-27 Thread Joe

Thx!!!  This is exactly what i was looking for!!!   I knew there was a
simple solution.

Joe C

On Oct 27, 11:08 am, Michel Belleville 
wrote:
> Well, you're using $.ajax() and the context of its callbacks make this the
> xhr object, so no surprise there.
>
> This should work as you expect :
>
> var myself = this;
> var Zone = function(data) {
> myself.someInfo = data;
> myself.load = Zone_Load;};
>
> var Zone_Load = function() {
> $.ajax({
> type: "GET",
> url: "http://localhost/foo.xml";,
> success: requestSuccess});
> };
>
> var requestSuccess = function(data) {
> myself.someInfo = $(data).find('type');
>
> };
>
> JavaScript allows methods to access all objects contained by the context
> they're declared in (provided you don't declare nested variables overriding
> existing context variables). In this case we declare "myself" and give it a
> reference to the content of "this" so when this is bound to other objects we
> still can use "myself" to access the desired object.
>
> Michel Belleville
>
> 2009/10/27 Joe 
>
>
>
> > I am trying to access my own JS object from within an ajax call, and
> > can't figure out how to get it to work.   Whenever I access "this" in
> > the function, it returns the ajax context and not my JS object
> > context.  My code looks something like this.  I have a Zone object
> > defined in a JS file like this:
>
> > //START CODE
> > function Zone(data){
> >   this.someInfo = data;
> >   this.load = Zone_Load;
> > }
>
> > function Zone_Load(){
> >        $.ajax({
> >           type: "GET",
> >           url: "http://localhost/foo.xml";,
> >                success: requestSuccess
> >         });
> > }
>
> > function requestSuccess(data){
> >  this.someInfo = $(data).find('type');
> > }
> > //ENDCODE
>
> > I am having problems with the last line.  How do i get access to the
> > JS object, so that i can set some info on it, based on the ajax call?
>
> > Any help would be appreciated?
>
> > thx,
>
> > Joe C


[jQuery] How to access a JavaScript object from within an ajax call?

2009-10-27 Thread Joe

I am trying to access my own JS object from within an ajax call, and
can't figure out how to get it to work.   Whenever I access "this" in
the function, it returns the ajax context and not my JS object
context.  My code looks something like this.  I have a Zone object
defined in a JS file like this:

//START CODE
function Zone(data){
   this.someInfo = data;
   this.load = Zone_Load;
}

function Zone_Load(){
$.ajax({
   type: "GET",
   url: "http://localhost/foo.xml";,
success: requestSuccess
 });
}

function requestSuccess(data){
  this.someInfo = $(data).find('type');
}
//ENDCODE

I am having problems with the last line.  How do i get access to the
JS object, so that i can set some info on it, based on the ajax call?

Any help would be appreciated?

thx,

Joe C


[jQuery] Re: images show before jquery and cycle plugin work their magic

2009-10-23 Thread joe

Thor I am having the exact same problem - have you found a solution??
can someone explain overflow and overflow of hidden?
poundcommapo...@gmail.com  your message is cryptic - can you
elaborate.  I am not calling the plug-in from a parent element,
unless  would be the parent element?

Joe

On Oct 20, 4:38 pm, thor  wrote:
> Hi,
> I am looking for assistance with a loading problem and my apologies if
> this is beyond the scope of this group.
>
> I am running the lastestjQueryandJquerycycle plugin. I haven't
> done any customization per se only trying to get the two components to
> work.  I am at the point where things "seem" to work, however when the
> page loads all 4 images in my DIV span down the page and then merge
> into one at the end of the page load.
>
> I've seen other implementation of these 2 components but the images
> don't flash first and then merge.
>
> Do you believe I need to create another function or put some more
> logic into my page to have it load correctly.  My goal would be to
> have everything seemlessly loaded from the start.  I've explored the
> document.ready function and believe I have it in the correct location
> of my site.  No matter what though other parts of the page load
> first
>
> I realize there are a lot of unknown variables but maybe someone has
> an idea?
>
> My site is clippervacations.com and I am going to change out the
> current homepage banners withjqueryfunctionality.  Nothing is LIVE
> right now, but perhaps someone can get an idea.
>
> Thanks,
> Thor


[jQuery] images visible when first loading the web page

2009-10-22 Thread joe

I have a problem with jquery and ie - the code for my webpage is
broken down in three parts - script, style and body.  the body is just
tables of images.  All the images have been tagged with a div id that
should render them invisible using the jquery hide function.  When you
load the page all the images appear to load one on top of the other.
When all the loading is done they disappear and the page works just
fine.  It is as if the jquery functions are kicking in after the
images are loaded.  Is there any way to prevent this.  It doesn't
happen with safari 4.0.3 or foxfire.  although it does happen on an
earlier version of safari.

Joe


[jQuery] autocomplete with tooltip

2009-10-08 Thread Joe

Hi Folks,

it is possible to combined the autocompleter with the tooltip plugin?
I must call "   $("#tooltip").tooltip({ track: true, showURL: false });"
to acticate the tooltip BUT i dont have the "onComplete" or "onReady"
Event on the autocompleter.  ;(

Or is the the wrong way ?

Thx
Joe


[jQuery] Auto Slide show with 3 images (a couple of problems) <--> Need Some Assistance

2009-09-08 Thread Joe Kinslow

Hi Folks:  I have jquery code on my index.html found here:
http://joeyworldfamous.com/

I need to modify the code to include the following:

1.  only show the slide show once (remove the repeat).
2.  auto direct to another page after the slide show completes once.
3.  understand how to delay my "enter site" text hyperlink to not
appear until the first image appears (why does it appear first before
the first image loads?)
4.  add a fade function in between each slide show image.
5.  force the slide show to appear in the center (horizontal and
vertical) of the browser; no matter what resolution the viewer has
their browser set to

Can anyone assist?



[jQuery] Fwd: [jquery-ui] Re: Psychological Assessmet Tool Using JQuery and Personal Construct Theory

2009-08-24 Thread Joe Whitehurst
Perhaps someone on this forum will have a suggestion for me to try?

-- Forwarded message --
From: jQuery UI Support 
Date: Mon, Aug 24, 2009 at 3:47 AM
Subject: [jquery-ui] Re: Psychological Assessmet Tool Using JQuery and
Personal Construct Theory
To: jquery...@googlegroups.com


Is this actuallly related to jQuery UI? If not, please post to the jQuery
discussion list: http://groups.google.com/group/jquery-en

Otherwise, please provide a more specific description of your problem.

jQuery UI support team


On Sun, Aug 23, 2009 at 10:49 PM, Joe Whitehurst wrote:

> I recently discovered Jquery and am quite excited about its capabilities.
>  I'm working on a sophisticated online psychological assessment tool using
> Personal Construct Theory (go here:
> http://www.warpraptor.com/irannewuser.html. to see an example of its use
> in political polling using the 2009 Iranian Presidential debacle (and get
> links to learn more about Personal Construct Theory).
> What I'm trying to accomplish is to place three circles (images) in a
> rectangular box and allow a user to move each of the circles anywhere in
> this rectangular box--but be locked within the box--occupying about 70% of
> the screen.  I want to capture the amount of time each circle is selected
> (cumulative if they are selected multiple times) and the total distance each
> is moved--no matter how they zig and zag or circle.  I want to be able to
> calculate the distances between the center of each circle and the centers of
> the other two when they all have been moved where the user wants to place
> them finally (actually, I would really like to capture the distances
> continuously from the time a user starts until the user clicks finished, but
> I'll add this in version 2).  I have downloaded and tested  wz_dragdrop (
> http://www.walterzorn.com/dragdrop/dragdrop_e.htm), but I have not yet
> gotten it to work correctly.  But now I think Jquery is a better bet.   I
> want the circles to be fairly small but big enough to contain a recognizable
> image of a human face.  I also want them to be perfect circles including the
> background.  I have not been able to figure out to create an image with a
> perfectly circular background.  Circular images are no problem.  The closest
> I have come to circular backgrounds is squares with rounded edges.  If you
> come across something that might help with any of these please let me know
>
>
>
>
>



[jQuery] Re: (Validate) Validation is only occuring the first time "Submit" is clicked

2009-07-22 Thread Joe Devon

Thanks for coming back...I'm having the same problem and your solution
doesn't work for me.


[jQuery] Is it possible to add filters to the (validate) plugin?

2009-07-20 Thread Joe Devon

The validation plugin is working wonderfully. On the server side,
there is some processing like trimming the input field, lowercasing
the input field, etc... Is there an easy way to wrap the fields into
such filters prior to processing so that the client check matches the
server check?

The syntax I'm using is:
$(document).ready(function(){
$("#form_frame").validate({ success: "valid",rules: {
  email: {
email: true,
minlength: 6,
maxlength: 150,
required: true,
  },
  password: {
minlength: 6,
maxlength: 50,
required: true,
  },
},
messages: {
  email: {
email: "please enter a valid email address",
minlength: "emails must be at least 6 characters",
maxlength: "emails cannot exceed 150 characters",
required: "email is required",
  },
  password: {
minlength: "passwords must be at least 6 characters",
maxlength: "passwords cannot exceed 50 characters",
required: "password is required",
  },
}});});

I'm not sure where the toLowerCase() goes. I don't know javascript and
am new to jQuery.
Thank you.


[jQuery] Problem with looping autocomplete

2009-06-07 Thread Joe Tseng
I've tried every possible combination I can think of so I hope someone here
can see something I'm missing...  I have a form with multiple line items and
I want to have a few of the fields validated against my database to make
sure the values exist.  My code is as follows:

I've got a select form element to pick a department:



  
#name#

  

...

I loop to create an initial ten blank line items:



  
  
...

  

...


var methodURL = 'http://#CGI.HTTP_HOST#/';

$(document).ready(function() {
function checkValue(li) {
alert($('#job1').val());
}

for (var i=1;i<=10;i++) {
The first autocomplete finds valid job numbers based on the dept selected

$('#job'+i).autocomplete(methodURL,
{
 minChars:4
,timeout:3000
,matchContains:1
,cacheLength:1
,extraParams:{
 'fuseaction':'j.jobnumber_autocomplete'

,'company':document.getElementById('dept0').options[document.getElementById('dept0').selectedIndex].text
}
}
);

The 2nd autocomplete finds valid elements based on the 1st job number found:

$('#elem'+i).autocomplete(methodURL,
{
 minChars:1
,timeout:3000
,matchContains:1
,cacheLength:1
,onItemSelect:checkValue
,extraParams:{
 'fuseaction':'j.elements_autocomplete'
,'jobno':$('#job'+i).val()
}
}
);

}
});
}

My problem is that the 2nd autocomplete queries and returns valid values but
does not seem to pass my 2nd parameter (jobno).  The record from my web
server access log is as follows:
q=95&fuseaction=j.elements_autocomplete&jobno=
Jobnumber should have a large integer value (eg 100245100).

What irritates me is that my 1st autocomplete works perfectly but the 2nd
one doesn't no matter what I try (even if I replace '#job'+i with 'job1').
I am desperate for any useful insight...


tia,

 - Joe

-- 

Failure is always an option -- Adam Savage


[jQuery] IFrame Question

2009-05-28 Thread Joe L

Hello All!

I'm working on a project and within a document I have content being
loaded into an iframe.
When a user clicks on an item in the iframe, a pop-up div is loaded
using the facebox plugin but it's obviously contained by the iframe.

Is there any way that I can pull that element out of the iframe into
the parent document?  Or at least position it so it looks like it's
part of the parent document and not the iframe?  My reasoning for this
is sizing and positioning.  I want to expand the size of the facebox
div and position it over top of some of the parent document elements
but, since it's within the iframe, I'm limited to the size of the
iframe and positioning is limited to being within the iframe.



[jQuery] Re: jQuery.support -- No direct support for IE6 detection

2009-04-06 Thread Joe McCann

Ricardo,

I see your point now.  I was under the impression $.browser was
becoming deprecated so $.support would take it's place.  But given the
fact that I currently need to run one method for IE6, I will continue
to use the $.browser method.

In regards to conditional comments, this becomes a performance issue
where an additional JavaScript request is made on the server and has
to download, impacting page load speed.  I would rather take my
chances with a browser sniff in one JS file than have to load an
additional JS file AND maintain that JS file.  For small scale sites,
this isn't an issue but for enterprise level sites, it is.

On Apr 6, 2:41 pm, Spot  wrote:
> Yes, key handling support would be a god send!
>
> akzhan wrote:
> > Also I suppose that jQuery.support can add key handling browser mode.
>
> > WebKit, Mozilla and IE works different on key events.
>
> > On Apr 5, 8:45 am, Ricardo  wrote:
>
> >> jQuery.support is for feature detection. The whole point of it is to
> >> avoid browser detection - which is still available via jQuery.browser.
> >> Instead of sniffing the browser and serving fixes according to
> >> previous knowledge about it's flaws, you check for correct
> >> implementations of the exact features you need, browser agnostic.
>
> >> cheers,
> >> - ricardo
>
> >> On Apr 4, 1:43 pm, Joe  wrote:
>
> >>> I'm all for migrating to the jQuery.support() utility method, but
> >>> there is not definitive test available to detect IE6 specifically.  Do
> >>> we have a consensus on this yet?


[jQuery] Re: jQuery.support -- No direct support for IE6 detection

2009-04-05 Thread Joe McCann

I've tried multiple combinations of the $.support method's properties
and have had zero success with properly detecting IE6.  Does IE6 have
a specific feature that IE7 and IE8 do not have?

On Apr 5, 6:21 am, akzhan  wrote:
> Also I suppose that jQuery.support can add key handling browser mode.
>
> WebKit, Mozilla and IE works different on key events.
>
> On Apr 5, 8:45 am, Ricardo  wrote:
>
> > jQuery.support is for feature detection. The whole point of it is to
> > avoid browser detection - which is still available via jQuery.browser.
> > Instead of sniffing the browser and serving fixes according to
> > previous knowledge about it's flaws, you check for correct
> > implementations of the exact features you need, browser agnostic.
>
> > cheers,
> > - ricardo
>
> > On Apr 4, 1:43 pm, Joe  wrote:
>
> > > I'm all for migrating to the jQuery.support() utility method, but
> > > there is not definitive test available to detect IE6 specifically.  Do
> > > we have a consensus on this yet?


[jQuery] Re: jQuery.support -- No direct support for IE6 detection

2009-04-05 Thread Joe McCann

Ricardo,

Good point, but it still doesn't answer the question for how to handle
applying say a png fix to IE6.

I can't simply say:

if (!$.support.leadingWhitespace)
{
// apply pngfix
}


Because this is for ALL IE versions.  This is unacceptable.  We still
need to know the version of IE and the support method doesn't appear
to have that option.  Unless I am missing something...

Joe

On Apr 4, 11:45 pm, Ricardo  wrote:
> jQuery.support is for feature detection. The whole point of it is to
> avoid browser detection - which is still available via jQuery.browser.
> Instead of sniffing the browser and serving fixes according to
> previous knowledge about it's flaws, you check for correct
> implementations of the exact features you need, browser agnostic.
>
> cheers,
> - ricardo
>
> On Apr 4, 1:43 pm, Joe  wrote:
>
> > I'm all for migrating to the jQuery.support() utility method, but
> > there is not definitive test available to detect IE6 specifically.  Do
> > we have a consensus on this yet?


[jQuery] jQuery.support -- No direct support for IE6 detection

2009-04-04 Thread Joe

I'm all for migrating to the jQuery.support() utility method, but
there is not definitive test available to detect IE6 specifically.  Do
we have a consensus on this yet?


[jQuery] Tabs and tables

2009-03-24 Thread Joe Tseng
Currently I am working on an entry form that I've realized has become too
long and would like to break up using Tabs.  My current form uses tables
(yes I should use divs but I'm still used to tables) and I thought I could
just put in child tables inside the divs used by Tabs.  I've come to
discover this breaks the entire page and was wondering if others have been
able to use child tables and Tabs successfully.

tia,

 - Joe

-- 

Failure is always an option -- Adam Savage


[jQuery] Ajax Multiplayer Game

2009-02-25 Thread Joe

I've been writing a little ajax based game.

It will be multiplayer, and is written with jquery.

http://code.google.com/p/ajaxmmo

enjoy :)


[jQuery] Re: select next n "somethings"

2009-01-22 Thread Joe

This:  var preBefore = $('p:eq(3)').prev('pre').text();

Only grabs the text of the preceding text contained within the 
tag.  If you need all the  tags prior, then use prevAll()

http://docs.jquery.com/Traversing/prevAll

Joe

http://www.subprint.com

On Jan 19, 5:03 pm, JLundell  wrote:
> Thanks, guys. nextUntil() looks like what I need.
>
> Joe, am I right that your suggestion grabs all the following pre's? I
> need to stop on the first following non-pre.


[jQuery] Re: select next n "somethings"

2009-01-19 Thread Joe

Here ya go:


http://www.w3.org/1999/xhtml"; xml:lang="en-us" lang="en"
dir="ltr">

http://ajax.googleapis.com/
ajax/libs/jquery/1.3/jquery.min.js">



$(function(){

var preBefore = $('p:eq(3)').prev('pre').text();
var preAllAfter = "";
$('p:eq(3)').nextAll('pre').each(function(){
preAllAfter += $(this).text()+'\n';
});

console.log( preBefore );
console.log( preAllAfter );

});





loreum ipsum 1
paragraph 1
loreum ipsum 2
paragraph 2
loreum ipsum 3
paragraph 3
loreum ipsum 4
paragraph 4
loreum ipsum 5
paragraph 5
loreum ipsum 6
paragraph 6
loreum ipsum 7
paragraph 7
loreum ipsum 8
paragraph 8





On Jan 19, 1:59 pm, JLundell  wrote:
> I have a page with alternating sets of one or more  and 
> paragraphs.
>
> Given that $(this) is a  block, I want to select the next 
> block, plus the additional  blocks, if any, that follow the first
> one.
>
> How?


[jQuery] Re: simple click event won't fire

2009-01-19 Thread Joe

What is a "one" event?

On Jan 19, 6:48 am, mmvdl  wrote:
> Within a  each first  of every row has an  tag.
> But I want the whole  to be clickable.
>
> To avoid recursion I've put a .one() event on the  like so:
>
> $("table.vacatures tbody tr").one("click", function(){
>    $(this).find("a:first").click();
>
> });
>
> But the click on the  tag will not fire. Why?


[jQuery] Issue upgrading to 1.3

2009-01-14 Thread Joe Morgan
Hello,

When I attempt to upgrade my site from 1.2.6 to 1.3, I get an unresponsive
script error that causes my browser (both IE7 and FF3) to hang if the script
is not stopped.

I've tracked down the bit of script causing the problem:
$("ul#loginSection li#emilyLogin:not(.loggedIn), ul#loginSection
li#joeLogin:not(.loggedIn)").click(
 function(){}
);
As you can see, the problem exists even when the function defined for the
click event is empty, leading me to wonder if it is some problem in the CSS
selector that is being used, given the engine changes from 1.2.6 to 1.3. Am
I doing something incorrectly?

- Joe


[jQuery] Re: append() not working on dynamically-created nodes in IE

2009-01-12 Thread Joe White

Yep, that was all it took. Thanks!


On Jan 11, 3:43 pm, "Karl Rudd"  wrote:
> Try closing the tag, ie:
>
> $('#myDiv').append($(''));
>
> Actually the second $() shouldn't be needed:
>
> $('#myDiv').append('');
>
> Karl Rudd
>
> On Mon, Jan 12, 2009 at 7:35 AM, Joe White  wrote:
>
> > I'm troubleshooting a problem where my text wasn't showing up in IE.
> > I've narrowed the problem down to creating a DOM node dynamically
> > (with $(html)) and then passing it to append(). In FireFox, append
> > will add the node as expected; but when passed a dynamically-created
> > node in IE, it does nothing. No error message is displayed; it just
> > silently fails, and no node is added to the page.
>
> > Here's a trivial example:
>
> > $('#myDiv').append($(''));
>
> > I put that code into the ready event, on a page with a div id="myDiv".
> > I also added some CSS to put a border on the h2, so I'd be able to see
> > whether it got added. Result: in FireFox, I can see the border,
> > proving that the h2 got added. In IE, nothing. No error.
>
> > If, instead, I find an existing  using its selector (e.g. $
> > ('#myH2')), and append() that (instead of a dynamically-created one),
> > then IE works fine; it moves that existing element into myDiv. It
> > appears to just be when a DOM element is dynamically created with $
> > (html), and then append()ed, that there's a problem.
>
> > Full example:
>
> > 
> > 
> > h2{border:1px solid blue;}
> > 
> > 
> > $(function(){
> >  $('#myDiv').append($('<h2>'));
> > });
> > 
> > 
> > 
> > 
> > 
> > 
>
> > Expected behavior: when you run this, you should get a blank page with
> > a 2px-tall blue line extending across the page. (This is the border
> > around the h2.) FireFox shows this expected behavior.
>
> > Actual behavior (IE6 on Windows): you get a blank page. The status bar
> > just says "Done" like usual, and does not show that any errors
> > occurred.
>
> > Is this a bug in jQuery? Or am I misunderstanding how $(html) is meant
> > to be used?


[jQuery] append() not working on dynamically-created nodes in IE

2009-01-11 Thread Joe White

I'm troubleshooting a problem where my text wasn't showing up in IE.
I've narrowed the problem down to creating a DOM node dynamically
(with $(html)) and then passing it to append(). In FireFox, append
will add the node as expected; but when passed a dynamically-created
node in IE, it does nothing. No error message is displayed; it just
silently fails, and no node is added to the page.

Here's a trivial example:

$('#myDiv').append($(''));

I put that code into the ready event, on a page with a div id="myDiv".
I also added some CSS to put a border on the h2, so I'd be able to see
whether it got added. Result: in FireFox, I can see the border,
proving that the h2 got added. In IE, nothing. No error.

If, instead, I find an existing  using its selector (e.g. $
('#myH2')), and append() that (instead of a dynamically-created one),
then IE works fine; it moves that existing element into myDiv. It
appears to just be when a DOM element is dynamically created with $
(html), and then append()ed, that there's a problem.

Full example:



h2{border:1px solid blue;}


$(function(){
  $('#myDiv').append($('

')); }); Expected behavior: when you run this, you should get a blank page with a 2px-tall blue line extending across the page. (This is the border around the h2.) FireFox shows this expected behavior. Actual behavior (IE6 on Windows): you get a blank page. The status bar just says "Done" like usual, and does not show that any errors occurred. Is this a bug in jQuery? Or am I misunderstanding how $(html) is meant to be used?


[jQuery] Re: jQuery-dependent TouchGraph Visualization (experiment)

2009-01-07 Thread Joe

Very impressive!  Seems a bit sluggish at times in FF 3.0.5, but nice
work!

Joe

On Jan 7, 5:12 am, David Decraene  wrote:
> I had some fun creating a pure HTML-DOM based Force-directed graph
> layout, similar to a touchgraph (http://www.touchgraph.com/) view.
>
> Built with the help of jQuery (hereby again: wonderful library), no
> canvas or SVG used (only DOM manipulations).
>
> You can see an experimental demo 
> at:http://jowl.ontologyonline.org/TouchGraph.html.
> and the blog 
> post:http://ontologyonline.blogspot.com/2009/01/experimental-touchgraph-vi
>
> Room for lot's of improvement, but nevertheless quite happy with the
> result already.
>
> David Decraenehttp://ontologyonline.org


[jQuery] Re: feature suggestion: .attr() without params returns the whole list of attributes

2009-01-07 Thread Joe

Oh nice!

Yeah what I need to do is get the source from you and add the cookie
settings to the plugin.  It's been working like a charm!

joe

On Jan 6, 11:45 am, Balazs Endresz  wrote:
> Hi Joe!
>
> Sorry, I was wrong, as the namespace is reversed. But maybe using it
> this way is easier and a bit faster:
>
> $(el).data('myns', {});
> var mydata=$(el).data('myns'); //save a reference
> mydata.prop=0; //set
> mydata.prop;  //get
>
> Btw. if you're still working on it the translation plugin has gotten
> modularized, so you can skip the the language detection and the "ready
> event" is firing properly too :)
>
> On Jan 6, 6:22 pm, Joe  wrote:
>
> > Balazs,
>
> > That throws an error in the data method.
>
> > Joe
>
> > On Jan 6, 10:06 am, Ricardo Tomasi  wrote:
>
> > > You can't see all data saved either..
>
> > > On Jan 6, 12:01 pm, Balazs Endresz  wrote:
>
> > > > Why not use $(el).data() for that?
>
> > > > On Jan 6, 12:57 pm, "Alexandre Plennevaux" 
> > > > wrote:
>
> > > > > I would like to suggest a feature to add to jquery attributes 
> > > > > commands:
>
> > > > > I 'm using custom attributes to store UI states. At some point i 
> > > > > would find
> > > > > it handy to be able to just console.log($(this).attr() ) to see all 
> > > > > the
> > > > > attributes and their value.
>
> > > > > Not a groundbreaking change, but a nice -to-have...
>
> > > > > thanks
>
> > > > > Alexandre


[jQuery] [OT] form input field value

2009-01-07 Thread Joe

I've got a text field (named searchParam) that onkeypress will trigger
a function that will extract the field's value using $
('#searchParam').val() and use that value to be used in a database
query.  I've noticed that when I'm typing the value, the JS code is
one step behind.  That is, if I've typed a string that says foobar,
the database is given the string fooba.  If I've deleted the string to
say foo, the database is passed the string foob.  Has anyone seen this
before and figured it out?

tia,

 - Joe


[jQuery] Re: feature suggestion: .attr() without params returns the whole list of attributes

2009-01-06 Thread Joe

Balazs,

That throws an error in the data method.

Joe

On Jan 6, 10:06 am, Ricardo Tomasi  wrote:
> You can't see all data saved either..
>
> On Jan 6, 12:01 pm, Balazs Endresz  wrote:
>
> > Why not use $(el).data() for that?
>
> > On Jan 6, 12:57 pm, "Alexandre Plennevaux" 
> > wrote:
>
> > > I would like to suggest a feature to add to jquery attributes commands:
>
> > > I 'm using custom attributes to store UI states. At some point i would 
> > > find
> > > it handy to be able to just console.log($(this).attr() ) to see all the
> > > attributes and their value.
>
> > > Not a groundbreaking change, but a nice -to-have...
>
> > > thanks
>
> > > Alexandre


[jQuery] Re: How can I replace some text to another fragment? Wrappers don't support it

2009-01-05 Thread Joe

There is no "ReplaceTo" method in jQuery.  You will need to create
your own method.

Appears some simple regex replace would work.

Joe

On Jan 5, 6:20 am, ranium  wrote:
> Hello. How can I replace some text to another fragment? For example,
> if I want to highlight all words ‘the’ with red color, I guess to do
> something like that
>
> $('body').ReplaceTo(‘%the%’, ‘ red;”>the’);
>
>  I can’t do this with standard wrappers built-in on jQuery…


[jQuery] Re: checkboxes, array and $.post

2009-01-04 Thread Joe

$(':submit').click(function(){

var serial = $('form').serialize();
var subVal = $('#submitButton').val();
var param = $('#submitButton').attr('name');

var data = serial + subVal + param;

$.post("delete.php", data, function(){ ... });

});


That should do it.

Joe

http://www.subprint.com

On Jan 2, 3:15 am, jjshell  wrote:
> You rock Ricardo! :) Thank you very much.
>
> Just one last question. The submit button (#submitButton) doesn't seem
> to be serialized along with other fields... And I need its value. How
> would you add it to the post collection?
>
> Regards,
>
> -jj.
>
> On 1 jan, 22:03, Ricardo Tomasi  wrote:
>
> > That's what serialize() is for:
>
> > $(':submit').click(function(){
> >     var data = $(this).parents('form:first').serialize();
> >     // or $('#formID').serialize();
> >     $.post("delete.php", data, function(){ ... });
>
> > });
>
> > On Jan 1, 8:48 am, jjshell  wrote:
>
> > > Hi Ricardo, thanks for your reply.
> > > I think I must be missing something when it comes to $.post a form in
> > > jQuery. It seems too complicated to have to do something like this:
>
> > > $.post("delete.php",{
> > >               field1: $("#field1").val(),
> > >               field2: $("#field2").val(),
> > >               field3: $("#field3").val(),
> > >               field4: $("#field4").val(),
> > >         }
>
> > > Isn't there a way to simply post the whole form, with the whole post
> > > collection, to the specified url, without having to specify which
> > > field should be collected? That would make dealing with checkboxes
> > > much easier...
>
> > > Here's a sample form. How would you submit it?
>
> > > 
>
> > > 
> > > 
> > > 
> > > 
>
> > > 
> > > 
> > > 
> > > 
> > > 
>
> > > Regards,
>
> > > -jj.
>
> > > On 31 déc 2008, 22:56, Ricardo Tomasi  wrote:
>
> > > > Assuming you have unique names:
>
> > > > var CheckedIDs = [];
>
> > > >     $("input.items_id").livequery('click',function(event){
> > > >       $("input.items_id").each(function() {
> > > >         if (this.checked) { CheckedIDs[this.name] = $(this).attr
> > > > ("value"); }
> > > >         else { CheckedIDs[this.name] = null }
> > > >       });
> > > >     });
>
> > > > Why do you need to store them in an array anyway? The checked ones
> > > > values will be submitted with the form, and you can access them at
> > > > anytime with $(":checkbox:checked")
>
> > > > On Dec 31, 3:52 pm, jjshell  wrote:
>
> > > > > Ok I'm getting closer... And thanks again for your help :)
>
> > > > > I can manage to have the checked checkboxes added to the CheckedIDs
> > > > > array. However, if I uncheck a checkbox, it is not removed from the
> > > > > array.
>
> > > > > It's the last little problem I have to solve :)
>
> > > > > Here's my code:
>
> > > > > var CheckedIDs = [];
>
> > > > >     $("input.items_id").livequery('click',function(event){
> > > > >       $("input.items_id").each(function() {
> > > > >         if(this.checked){CheckedIDs.push($(this).attr("value"));}
> > > > >       });
> > > > >       //alert('clicked');
> > > > >     });
>
> > > > > On 31 déc, 17:33, Joe  wrote:
>
> > > > > > I don't believe you are using livequery in the proper way.  You're
> > > > > > passing an 'each' event, which does not exist here.
>
> > > > > > In theory, you could do the following:
>
> > > > > > $("input.item_id").livequery('foo',function(bar) {
> > > > > > alert('nothing happens');
>
> > > > > > });
>
> > > > > > In the console, you will see the length of the wrapped set, the 
> > > > > > number
> > > > > > of inputs with class "item_id".
>
> > > > > > Check the API again:  http://brandonaaron.net/docs/livequery/#api
>
> > > > > &g

[jQuery] Re: How to check all required fields after each field is filled...

2009-01-04 Thread Joe

This works, but is not terribly usable as it throws an alert every
after every failed scan, but you can easily modify the method to make
it more usable, or even simply remove the alert and the button will
remain disabled until all required fields are filled in.  It could be
optimized a bit, but for clarity it's a bit verbose.

Copy and paste this into a new .html file and load in your browser.


http://www.w3.org/1999/xhtml"; xml:lang="en-us" lang="en"
dir="ltr">

http://ajax.googleapis.com/</a>
ajax/libs/jquery/1.2.6/jquery.js">



$(function(){
// Cached the wrapped set.
$req = $('input.required');

// A flag for scan results.
$.reqFlag = {
pass: null,
failMethod: function(){
alert('Please Fill In All Required 
Fields');
},
passMethod: function(){

$('#submitButton').attr('disabled',false);
}
}

// Scan method.
$.scan = function(){
$req.each(function(){
!$(this).val() ? $.reqFlag.pass = false 
: $.reqFlag.pass = true;
})
!$.reqFlag.pass ? $.reqFlag.failMethod() : 
$.reqFlag.passMethod();
}

$req.each(function(){
$(this).blur(function(){ $.scan() });
});
});












        






On Jan 3, 9:58 pm, "Rick Faircloth"  wrote:
> Thanks for the reply, Joe...
>
> To answer your question:  I want to check the required fields for any that 
> are still
> invalid after a user blurs out of any required field.
>
> Rick
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > Behalf Of Joe
> > Sent: Saturday, January 03, 2009 10:15 PM
> > To: jQuery (English)
> > Subject: [jQuery] Re: How to check all required fields after each field is 
> > filled...
>
> > > > However, I want to be able to scan all required fields
> > > > after each field is filled in and see if any required
> > > > fields remain to be satisfactorily completed.
>
> > When do you want to "scan"?  After the user blurs out of the last
> > input?  Or blurs out of any required input (because technically the
> > user could skip around on the form)?
>
> > You obviously can't do it on submit because the button is disabled.
>
> > I have an idea of how to do it, but you need to dictate the event
> > handler that is going to do trigger the scanning.
>
> > Joe
>
> >http://www.subprint.com
>
> > On Jan 3, 6:17 pm, "Rick Faircloth"  wrote:
> > > Anyone?
>
> > > > I'm trying to validate a form.
>
> > > > All the validation I've implemented up to this point
> > > > is working fine.
>
> > > > However, I want to be able to scan all required fields
> > > > after each field is filled in and see if any required
> > > > fields remain to be satisfactorily completed.  If there
> > > > are any, I want to keep the submit button on my form
> > > > disabled.
>
> > > > I'm trying to use this code:
>
> > > > $(':input.required').each(function() {
> > > >      var val = (this.value.length);
> > > >      if (val == 0)
> > > >         { $('#submit').attr('disabled', 'disabled'); };
> > > > });
>
> > > > However, each time I fill in a required field, the submit
> > > > button is enabled.  (I realize for now that the code above
> > > > is only checking length and I can add other checks later,
> > > > but wanted to get this one working first.
>
> > > > Any clues?
>
> > > > Thanks,
>
> > > > Rick


[jQuery] Re: How to check all required fields after each field is filled...

2009-01-03 Thread Joe

> > However, I want to be able to scan all required fields
> > after each field is filled in and see if any required
> > fields remain to be satisfactorily completed.



When do you want to "scan"?  After the user blurs out of the last
input?  Or blurs out of any required input (because technically the
user could skip around on the form)?

You obviously can't do it on submit because the button is disabled.

I have an idea of how to do it, but you need to dictate the event
handler that is going to do trigger the scanning.

Joe

http://www.subprint.com




On Jan 3, 6:17 pm, "Rick Faircloth"  wrote:
> Anyone?
>
>
>
> > I'm trying to validate a form.
>
> > All the validation I've implemented up to this point
> > is working fine.
>
> > However, I want to be able to scan all required fields
> > after each field is filled in and see if any required
> > fields remain to be satisfactorily completed.  If there
> > are any, I want to keep the submit button on my form
> > disabled.
>
> > I'm trying to use this code:
>
> > $(':input.required').each(function() {
> >      var val = (this.value.length);
> >      if (val == 0)
> >         { $('#submit').attr('disabled', 'disabled'); };
> > });
>
> > However, each time I fill in a required field, the submit
> > button is enabled.  (I realize for now that the code above
> > is only checking length and I can add other checks later,
> > but wanted to get this one working first.
>
> > Any clues?
>
> > Thanks,
>
> > Rick


[jQuery] Re: Submit not propagating.

2009-01-02 Thread Joe

What is the code for the context menu?  I have a hunch it is somewhere
in there.

Joe

On Jan 2, 11:17 am, TimW66  wrote:
> Thanks for the response.  I changed the name attribute to be "save",
> but that didn't work either.  I think what's happening is there are
> other event handlers getting executed in the for loop, and one of
> those is returning a value that val gets set to, such that it doesn't
> propagate to the next function; which in my case is the browser
> submit.  Of course, I have no idea which event handler is returning a
> value that is causing val to get set that way.
>
> On Jan 2, 10:21 am, Dave Methvin  wrote:
>
> > I have a suspicion...give the button a name other than submit.
>
> >http://jibbering.com/faq/names/


[jQuery] Re: How can I call a function if I have that function name stored in a string?

2009-01-02 Thread Joe

Nice trickery there Mike!  I dig it!

On Jan 2, 3:34 am, "Michael Geary"  wrote:
> I don't know about the $.fn.myplugin part - that's not how you would
> typically call a plugin function in the first place.
>
> But in general, given any object 'foo' and any property 'bar', you can
> reference the 'bar' property in either of two ways:
>
>     foo.bar
>
> Or:
>
>     foo['bar']
>
> If 'bar' is a method, you can call it with:
>
>     foo.bar(...);
>
> Or:
>
>     foo['bar'](...);
>
> Either one means exactly the same thing.
>
> One common use for this is with show and hide methods. Instead of coding:
>
>     if( doShow )
>         $('#foo').show();
>     else
>         $('#foo').hide();
>
> You can code:
>
>     $('#foo')[ doShow ? 'show' : 'hide' ]();
>
> -Mike
>
> > From: yellow1912
>
> > Something like this
> > var func = 'myFunc';
>
> > Can I call the function like this for example:
>
> > $.fn.myplugin.(func)();
>
> > (I'm using this in a plugin I'm working on)
>
> > Thank you very much


[jQuery] Re: live stats + setinterval

2008-12-31 Thread Joe

So you want the user to see changes to the number of visitors to the
site essentially every single second?

If this is what you are after, and you are getting that data from a
database, then a request must be sent every time to that database.
Seems to be pretty taxing, especially if traffic ramps up.

Joe

http://www.subprint.com

On Dec 31, 1:15 am, Commandos  wrote:
> is there a better way to write this code to avoid server problem if
> the site gets a lot of visitors ?
>
> (keeping the "live" stats)
>
> 
>
> // the call for the update (it just change an entry in the db total =
> total + 1;
>         function autoupdate() {
>
>         $.post("count.php", {count:1},
>   function(data){
>    $("#counter").html(data);
>   });}
>
> // the 1 sec interval
>   $(document).ready(function() {
>     setInterval("autoupdate()", 1000);
>   });
>   


[jQuery] Re: checkboxes, array and $.post

2008-12-31 Thread Joe

I don't believe you are using livequery in the proper way.  You're
passing an 'each' event, which does not exist here.

In theory, you could do the following:

$("input.item_id").livequery('foo',function(bar) {
alert('nothing happens');
});

In the console, you will see the length of the wrapped set, the number
of inputs with class "item_id".

Check the API again:  http://brandonaaron.net/docs/livequery/#api

Also, $.each method is similar to a for-loop:  http://docs.jquery.com/Core/each


That's a start for sure...

Cheers.

Joe

http://www.subprint.com

On Dec 31, 9:39 am, jjshell  wrote:
> The problem seems to be located around these parts:
>
> var CheckedIDs = [];
> $("input.item_id").livequery('each',function(add) {
>       if (this.checked){
>        alert('push');
>        CheckedIDs.push($(this).attr("value"));
>      }
>
> });
>
> On 31 déc, 15:26, jjshell  wrote:
>
> > Thanks for your reply :)
>
> > I only get the alert nothing selected though... Tried to go through
> > the code, couldn't find what is wrong...
>
> > Regards,
>
> > -jj.
>
> > On 31 déc, 14:51, MorningZ  wrote:
>
> > > Not sure if it's the *best* way, but it works
>
> > > I'd do something like
>
> > > var CheckedIDs = [];
> > > $("input.item_id").each(function() {
> > >       if (this.checked) { CheckedIDs.push($(this).attr("value")); }});
>
> > > if (CheckedIDs.length == 0) {
> > >      alert("Nothing selected!");}
>
> > > else {
> > >      $.post(
> > >           "delete.php",
> > >          item_ids: CheckedIDs.join(","),
> > >          function(data) {
> > >               //Handle the returned results
> > >          }
>
> > > }
>
> > > "delete.php" will see a comma delimited string of IDs to delete
>
> > > On Dec 31, 7:11 am, jjshell  wrote:
>
> > > > Hi,
>
> > > > I have a tabular data I need to be able to delete by selecting
> > > > checkboxes, and submitting a form (a .php script then checks which
> > > > checkboxes have been submitted, delete by id, return an updated list
> > > > of the items injected into the dom).
>
> > > > My problem is that I currently can't manage to gather these checkboxes
> > > > values as an array.
>
> > > > Please consider the below code:
>
> > > > $(document).ready(function(){
>
> > > >     //submit the form
> > > >     $("form#form-delete").livequery('submit', function(event){
> > > >       $("span#wait").html('');
> > > >       $.post("delete.php",{
> > > >               item_id: $(".item_id").val(),
> > > >         },function(data){
> > > >         $("span#wait").html('');
> > > >         $("div#view-items").html(data);
> > > >       });
> > > >       return false;
> > > >     });
>
> > > > });
>
> > > > And the html:
>
> > > > 
> > > > 
> > > > 
> > > > 
> > > > //etc.
>
> > > > What would be the ideal jQuery way to handle checkboxes?
>
> > > > Thanks in advance for your time :)
>
> > > > Regards,
>
> > > > -jj.- Masquer le texte des messages précédents -
>
> > > - Afficher le texte des messages précédents -- Masquer le texte des 
> > > messages précédents -
>
> > - Afficher le texte des messages précédents -


[jQuery] Re: Problem link,href,tree, etc.

2008-12-31 Thread Joe

Could you point me to a link or show more code?  Not sure exactly what
your trying to accomplish here.

Joe

On Dec 31, 9:40 am, vcs  wrote:
> Hello everyone!
> My description:
> I have a field (type div), under which links links are available to
> some country's regions and loaded on button click. When I click on
> loaded data, I mean one of these links, region's districts are loaded.
> When I click on one of the districts links, spots (I named
> them-'miejscowosci') are loaded. There is a weird problem, because
> first data is returned correctly by a certain field, while when
> clicking next time, it jumps to the same page and looks like doesn't
> pick up the jquery:
> $('.teryt').click(function(){
>                         $('#miejscowosci-wybierz-wyniki').load($
> (this).attr('href'));
>                         return false;
>                  });


[jQuery] Re: pausing jquery

2008-12-30 Thread Joe

Nice plugin Mike...

On Dec 30, 1:49 pm, "Michael Geary"  wrote:
> You can call setTimeout again and keep track of your loop counter, or you
> can use setInterval.
>
> To make that easy, I posted a slowEach() plugin to this group a while back.
> It may be just what you need. Here's the original post:
>
> http://groups.google.com/groups/search?q=sloweach+jquery+plugin
>
> Here's an updated version of that code that supports both ways of calling
> it:
>
>     $.slowEach( array, interval, callback );
>
> Or:
>
>     $( array-or-selector-etc ).slowEach( interval, callback );
>
> The plugin code is:
>
>     jQuery.slowEach = function( array, interval, callback ) {
>         if( ! array.length ) return;
>         var i = 0;
>         next();
>         function next() {
>             if( callback.call( array[i], i, array[i] ) !== false )
>                 if( ++i < array.length )
>                     setTimeout( next, interval );
>         }
>     };
>
>     jQuery.fn.slowEach = function( interval, callback ) {
>         jQuery.slowEach( this, interval, callback );
>     };
>
> These functions work just like $.each() (for an array only, not an object),
> or $(...).each(), except that they inserts a delay between each iteration of
> the loop.
>
> For your use case, you could do something like this:
>
>     var myURL = "getSearchResults.php";
>     $.getJSON( myURL, function( data ) {
>         $.slowEach( data, 1000, function( i, value ) {
>             $("#searchResults").html( value );
>         });
>     });
>
> Or you could write it this way if you prefer:
>
>     var myURL = "getSearchResults.php";
>     $.getJSON( myURL, function( data ) {
>         $(data).slowEach( 1000, function( i, value ) {
>             $("#searchResults").html( value );
>         });
>     });
>
> If you want to stop the loop before it's finished, return false from the
> callback function (where the .html() call is made).
>
> -Mike
>
> > From: bwdev
>
> > Yes but the set TImeout seems to happen once.  I need it to
> > pause on each interation of the loop.
>
> > On Dec 30, 1:05 pm, "Michael Geary"  wrote:
> > > Not only will that lock up the current browser, in many browsers it
> > > will lock up *every* browser window or tab. Plus, if someone is
> > > running on battery power it will drain the battery needlessly.
>
> > > As Richard said, setTimeout is the right solution:
>
> > >     doSomething();
> > >     setTimeout( function() {
> > >         doSomethingLater();
> > >     }, 5000 );
>
> > > -Mike
>
> > > > From: Joe
>
> > > > // Similar to PHP's sleep function.
> > > > function pause(numOfSeconds) {
>
> > > >     numOfSeconds *= 1000;
> > > >     var startTime = new Date().getTime();
> > > >     while (new Date().getTime() < startTime + numOfSeconds);
> > > >     return false;
> > > > }
>
> > > > // Let's pause for 5 seconds...
> > > > pause(5);
> > > > console.log('Awake Now');
>
> > > > A simple way of doing it, but it will lock the browser...
>
> > > > Cheers.
>
> > > > Joe
>
> > > >http://www.subprint.com
>
> > > > On Dec 30, 10:23 am, bwdev  wrote:
> > > > > I have the following code and want to basically write
> > > > something out,
> > > > > let it sit for a while, and then write something else
> > > > out...how do I
> > > > > do the pause/wait?
>
> > > > > Thanks!
>
> > > > > myURL="getSearchResults.php";
> > > > >                                 $.getJSON(myURL,
> > function(data) {
> > > > >                                 for (var i=0; i < data.length;
> > > > > i++)
>
> > > > >                                        
> > > > > $("#searchResults").html(data[i]);
> > > > >                                         //I want to
> > pause here
>
> > > > >                                         });


[jQuery] Re: pausing jquery

2008-12-30 Thread Joe

// Similar to PHP's sleep function.
function pause(numOfSeconds) {

numOfSeconds *= 1000;
var startTime = new Date().getTime();
while (new Date().getTime() < startTime + numOfSeconds);
return false;
}

// Let's pause for 5 seconds...
pause(5);
console.log('Awake Now');

A simple way of doing it, but it will lock the browser...

Cheers.

Joe

http://www.subprint.com

On Dec 30, 10:23 am, bwdev  wrote:
> I have the following code and want to basically write something out,
> let it sit for a while, and then write something else out...how do I
> do the pause/wait?
>
> Thanks!
>
> myURL="getSearchResults.php";
>                                 $.getJSON(myURL, function(data) {
>                                 for (var i=0; i < data.length; i++)
>
>                                         $("#searchResults").html(data[i]);
>                                         //I want to pause here
>
>                                         });


[jQuery] Re: .load quircky

2008-12-30 Thread Joe

Hey JJ,

After the delete.php?id="X" is loaded and completed, do you then want
the display.php to be loaded?  If so, place it in a callback function
so it will be completed after delete.php has completed/sent a
response.

$(document).ready(function(){
$("a.test").livequery("click",function(event){
  var id = $(this).attr('id').substr(1);
  $("div#status").html('');

  $("div#status").load("delete.php?id=" + id, function(){
   $("div#display").load("display.php");
  });
  return false;
});

});


The way you currently have your code written will load display.php
immediately after delete.php?... is executed.  If I'm understanding
you correctly, you want it to load AFTER delete.php has run its
course.  Is this what you intended?

Cheers.

Joe

http://www.subprint.com



On Dec 30, 10:14 am, jjshell  wrote:
> Hi,
>
> Please consider the code below:
>
> $(document).ready(function(){
>     $("div#display").load("display.php");
>
> });
>
> $(document).ready(function(){
>     $("a.test").livequery("click",function(event){
>       var id = $(this).attr('id').substr(1);
>       $("div#status").html('');
>       $("div#status").load("delete.php?id=" + id);
>       $("div#display").load("display.php");
>       return false;
>     });
>
> });
>
> display.php is loaded with the document and injected into the dom (the
> first time the page is loaded, that is). Then when a link with
> class .test is clicked, a deletion process is triggered (delete.php,
> which outputs a process status), and the display.php page should be
> reloaded and re-injected into the dom, with updated results.
>
> The reload of display.php after a .test click is quirky. Sometimes it
> works, sometimes it doesn't.
>
> Any idea why?
>
> Regards,
>
> -jj. :)


[jQuery] Re: Selector Logic

2008-12-30 Thread Joe

No problem, Dave...glad I could help.

Joe

http://www.subprint.com

On Dec 30, 4:29 am, daveyoi  wrote:
> Thanks both for your excellent suggestions.. and thanks for the links
> on Context Joe. :)


[jQuery] Re: Selector Logic

2008-12-29 Thread Joe

Use the associated div's context:

$(".headerbutton img","#div_1");

This is also highly optimal as jQuery no longer searches the entire
DOM for all classes of "headerbutton", only the nodes with class
"headerbutton" in the context of "#div_1".

You can read more about context here:

http://docs.jquery.com/Core/jQuery#expressioncontext

Cheers.

Joe
http://www.subprint.com



On Dec 29, 9:51 am, Eric Martin  wrote:
> Depending on what you are trying to do:
>
> $("#div_1 .headerButton img"); // return the img in header button for
> div_1
>
> $(".headerButton img"); // return an array of img for
> each .headerButton
> You can then iterate over the array for additional processing.
>
> If you are passing the div_n (divId) dynamically, the following will
> work:
> $("#" + divId + " .headerButton img");
>
> Hope that helps.
>
> -Eric
>
> On Dec 29, 7:19 am, daveyoi  wrote:
>
> > Sorry - left out the important part
>
> > The containing div (div_1)  can be created more than one on a page --
> > so div_1 , div_2 , div_3  and they would all contain the structure
> > described above.. this is why I cant just access using $
> > (".headerButton") as there could be potentially more than 1.
>
> > I reasoned therefore that i need  to access via the unique div_n id
> > and make way through the selectors to ensure i get the right one..?


[jQuery] Re: I wrote a YUI Multi FIle Compression Utility

2008-12-23 Thread Joe

Very interesting.  We added the Java .jar file to our build process so
it keeps our code in source control "legible" and the code pushed to
prod compressed.  YUI compressor, IMO, is the best and most
consistent.

Joe

http://www.subprint.com

On Dec 23, 11:03 am, "Alexandre Plennevaux" 
wrote:
> it sounds very interesting, but i'm quite puzzled on how to do it
> correctly. i'm interested in reducing the load time of my websites but
> i don't really master these compression logics.
> I would have assumed i'd have to point to the html file loading the
> js+css files but your app seems to look for folders.
> If i'm correct, what file structure is supposed to work for this? I
> for one store all my javascript in a _js folder , which contains a
> "frontend" for the files dealing with the frontend, and a "backend"
> for the javascript files used in the backend app. I have a 3rd folder
> "jquery_plugins" folder inside this _js, which contains a folder for
> each plugin that i use.
>
> given that folder structure, is it possible to use your app?
>
> Sorry if this is out of my league...
>
> On Tue, Dec 23, 2008 at 5:27 PM, K-BL  wrote:
>
> > Hey Guys,
> > I just finished writing a YUI Multi-File Compression Utility.  It's
> > really simple, it just runs some CLI commands, but more importantly,
> > it compiles entire directories and sub directories with a clean UI.
> > For us IT guys, it makes quick site changes a breeze from source to
> > compressed in just seconds.
>
> > Anyway, find it 
> > here:http://jqueryplugins.weebly.com/yui-compressor-multi-file-utility.html
>
> > If you like it, let me know.  Also, source is available in C#.
>
> > K-BL


[jQuery] Re: incompatible while creating image element with IE

2008-12-15 Thread joe

i use the three way to create a image element,it works on all browsers
except IE,
IE just not show the image element.
thank you.

On 12月16日, 上午2时25分, brian  wrote:
> On Mon, Dec 15, 2008 at 10:41 AM, joe  wrote:
>
> > $("").attr({src:imagesrc,alt:"joe"})
> > .mouseover(function(){this.src=imagel+imageid;})
> > .mouseout(function(){this.src=images+imageid;})
> > .appendTo($("#bc"+bookrecno));
>
> > $("")
> > .mouseover(function(){this.src=imagel+imageid;})
> > .mouseout(function(){this.src=images+imageid;})
> > .appendTo($("#bc"+bookrecno));
>
> > $("").attr({src:imagesrc,alt:"joe"})
> > .mouseover(function(){this.src=imagel+imageid;})
> > .mouseout(function(){this.src=images+imageid;})
> > .appendTo($("#bc"+bookrecno));
>
> > IE is the only bugger.
>
> You might be more likely to get a response if you were to mention what
> the problem is.


[jQuery] incompatible while creating image element with IE

2008-12-15 Thread joe

$("").attr({src:imagesrc,alt:"joe"})
.mouseover(function(){this.src=imagel+imageid;})
.mouseout(function(){this.src=images+imageid;})
.appendTo($("#bc"+bookrecno));

$("")
.mouseover(function(){this.src=imagel+imageid;})
.mouseout(function(){this.src=images+imageid;})
.appendTo($("#bc"+bookrecno));

$("").attr({src:imagesrc,alt:"joe"})
.mouseover(function(){this.src=imagel+imageid;})
.mouseout(function(){this.src=images+imageid;})
.appendTo($("#bc"+bookrecno));

IE is the only bugger.


[jQuery] Re: Click Handler Not Returning False in IE7 Due to getScript()?

2008-12-11 Thread Joe

Strange, I get the jumpy response

On Dec 10, 6:15 pm, donb <[EMAIL PROTECTED]> wrote:
> Seems perfectly fine to me.  IE version 7
>
> On Dec 10, 5:32 pm, Joe <[EMAIL PROTECTED]> wrote:
>
> > Any leads on this?
>
> > On Dec 6, 2:01 pm, Joe <[EMAIL PROTECTED]> wrote:
>
> > > Go here:
>
> > >http://www.theshedbbq.com/gulfport/photos/
>
> > > Click one of the photo gallery links.  In IE7, it does not return
> > > false and immediately jumps back to the top of the page.  Within the
> > > clickhandler, I'm grabbing some data from the anchor tags' attributes,
> > > then callinggetScript().  Do I need to add a callback togetScript()
> > > to return false?
>
> > >         $('#gallerySelect ul li a').click(function(){
>
> > >                 // Grab id value
> > >                 var obj = $(this);
> > >                 var id = obj.attr('id');
> > >                 var rel = obj.attr('rel');
>
> > >                 // CallgetScriptwith id passed.
> > >                 $.getScript("/gulfport/photos/"+rel+"/"+id+"/"+id+".js" );
> > >                 return false;
> > >         });- Hide quoted text -
>
> > - Show quoted text -


[jQuery] Re: Click Handler Not Returning False in IE7 Due to getScript()?

2008-12-10 Thread Joe

Any leads on this?

On Dec 6, 2:01 pm, Joe <[EMAIL PROTECTED]> wrote:
> Go here:
>
> http://www.theshedbbq.com/gulfport/photos/
>
> Click one of the photo gallery links.  In IE7, it does not return
> false and immediately jumps back to the top of the page.  Within the
> clickhandler, I'm grabbing some data from the anchor tags' attributes,
> then callinggetScript().  Do I need to add a callback togetScript()
> to return false?
>
>         $('#gallerySelect ul li a').click(function(){
>
>                 // Grab id value
>                 var obj = $(this);
>                 var id = obj.attr('id');
>                 var rel = obj.attr('rel');
>
>                 // CallgetScriptwith id passed.
>                 $.getScript("/gulfport/photos/"+rel+"/"+id+"/"+id+".js" );
>                 return false;
>         });


[jQuery] Re: bind a function to another function

2008-12-06 Thread Joe

I think I understand what you are trying to do, but the example is
rather confusing.  Can you use maybe more unique names?  I got mixed
up because of this:

The variable called1 will have 'called1-fun1' and
The variable called2 will have 'called1-fun2'.

called1-fun1 should be class1-fun1 and called1-fun2 should be class1-
fun2, right?

Joe

On Dec 6, 11:22 am, "Prajwala Manchikatla" <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
>     I released my first jquery plugin. It is about binding or connecting a
> function to another function. It is just like binding a handler function to
> event. Please have a look at it and send me your 
> comments.http://plugins.jquery.com/project/jqConnect
>
> cheers,
> Prajwala


[jQuery] Re: Click event broken by AJAX - explain please?

2008-12-06 Thread Joe

I'm having the exact same issue, but ony in IE 6/7, using getScript
().  I'm wondering if it has to do with sending a GET request and IE
is funky about it???



On Dec 6, 7:16 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
> Doesn't this work?
>
> $("a").click(function() {
>     var self = this;
>     $.get($(self).attr('href'),function(html){
>        // put the html into a textbox
>     });
>    return false;
>
> };
>
> On Dec 6, 5:00 pm, donb <[EMAIL PROTECTED]> wrote:
>
> > Having read the handful of mentions I could find, the underlying 'why'
> > is still a mystery to me.  I tried stepping through the code with
> > Firebug but can't make out why it's not working, although I have MADE
> > it work in this manner:
>
> > $("a").click(
> >    function() {
> >     var self = this;
> >      setTimeout(
> >      function() {
> >        $.get(
> >         $(self).attr('href'),
> >         function(html){
> >         <...put the html into a textbox...>
> >         }
> >      )},
> >     500
> >     );
> >    return false;
>
> > }
>
> > So what is the actual reason when the .get() executes, the return
> > false never happens, unless I do the setTimeout trick to effectively
> > move the get OUT of the click function?
>
> > If I just have in-line code, no AJAX action, the code proceeds merrily
> > along to the return and suppresses my event-bubbling nicely.
>
> > When I step through the code WITH an AJAX action in there (no
> > setTimeout), then execution never returns to the 'return'.
>
> > I concede that's just the way it is, but I would like to understand
> > why it's that way.  Bug, design tradeoff, was overlooked by developer,
> > can't be done for some reason because of javascript architecture,
> > other?


[jQuery] Re: if ($("#field").val() == '') or something more elegant?

2008-12-06 Thread Joe

Karl's suggestion is how I always do it...simplest IMO.

On Dec 6, 8:19 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Sure, that's fine. You could also do this:
>
> if (!$('#text').val())
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Dec 6, 2008, at 5:12 PM, Costaud wrote:
>
>
>
> > Hello,
>
> > I'm wondering if this is the correct way of checking whether the
> > textbox is empty or not:
>
> > if ($("#text").val() == '')
>
> > Thanks.


[jQuery] Click Handler Not Returning False in IE7 Due to getScript()?

2008-12-06 Thread Joe

Go here:

http://www.theshedbbq.com/gulfport/photos/

Click one of the photo gallery links.  In IE7, it does not return
false and immediately jumps back to the top of the page.  Within the
clickhandler, I'm grabbing some data from the anchor tags' attributes,
then calling getScript().  Do I need to add a callback to getScript()
to return false?


$('#gallerySelect ul li a').click(function(){

// Grab id value
var obj = $(this);
var id = obj.attr('id');
var rel = obj.attr('rel');

// Call getScript with id passed.
$.getScript("/gulfport/photos/"+rel+"/"+id+"/"+id+".js" );
return false;
});


[jQuery] Re: Simple Selector Question -- Context

2008-12-04 Thread Joe

Thanks Ricardo, looks good.

On Dec 3, 10:14 am, ricardobeat <[EMAIL PROTECTED]> wrote:
> Or pError.filter(':visible').
>
> By using 'pError' as a context, you are looking for it's children, not
> the elements themselves.
>
> - ricardo
>
> On Dec 3, 1:17 pm, Liam Potter <[EMAIL PROTECTED]> wrote:
>
> > it would be this
>
> > $('p.error:visible')
>
> > Joe wrote:
> > > If I have the following:
>
> > > var pError = $('p.error');
>
> > > Then I can do the following with no problem:
>
> > > pError.text('lorem");
>
> > > Yet, I want to check for the paragraphs that have the class "error"
> > > that are visible, I would think it is something like this:
>
> > > var visibleError = $(':visible', pError);
>
> > > However, this fails.
>
> > > Is this because the visible selector is different in creating the
> > > wrapped set of paragraph tags with the class error?
>
> > > What is the proper way of using the context of pError with the visible
> > > selector?
>
> > > Thanks!


[jQuery] Re: Simple Selector Question -- Context

2008-12-04 Thread Joe

Liam,

Right, but that defeats the point of "caching" the jQuery object that
was created by:

var pError = $('p.error');

Since I'm just calling it again with a different selector, namely,
the :visible one.

On Dec 3, 9:17 am, Liam Potter <[EMAIL PROTECTED]> wrote:
> it would be this
>
> $('p.error:visible')
>
> Joe wrote:
> > If I have the following:
>
> > var pError = $('p.error');
>
> > Then I can do the following with no problem:
>
> > pError.text('lorem");
>
> > Yet, I want to check for the paragraphs that have the class "error"
> > that are visible, I would think it is something like this:
>
> > var visibleError = $(':visible', pError);
>
> > However, this fails.
>
> > Is this because the visible selector is different in creating the
> > wrapped set of paragraph tags with the class error?
>
> > What is the proper way of using the context of pError with the visible
> > selector?
>
> > Thanks!


[jQuery] Simple Selector Question -- Context

2008-12-03 Thread Joe

If I have the following:

var pError = $('p.error');

Then I can do the following with no problem:

pError.text('lorem");

Yet, I want to check for the paragraphs that have the class "error"
that are visible, I would think it is something like this:

var visibleError = $(':visible', pError);

However, this fails.

Is this because the visible selector is different in creating the
wrapped set of paragraph tags with the class error?

What is the proper way of using the context of pError with the visible
selector?

Thanks!


[jQuery] Re: jQuery / XML / IE

2008-12-01 Thread JOE VELEZ

Jemo - Your link appears to be working in IE7 ... probably since
you've updated your script since this posting/solution below.

Do you have your original code that wasn't working? It would be nice
to see the differences in your code.

Thanks

- Joe


[jQuery] Re: remove() Method Causes Flicker in Firefox

2008-11-05 Thread Joe

Any ideas on this?  Still stuck...

On Nov 1, 4:33 pm, Joe <[EMAIL PROTECTED]> wrote:
> I have to remove it, because the code directly following shows it
> loading the new image and appending it to the parent div.  So in order
> for the image that was faded out to not be there, it has to be
> removed.  Once all the rows of the table have been clicked on, they
> images are cached and then I can just alter the "src" attribute's
> value for the image.
>
> As far as the dimensions are concerned, I disagree.  The flicker only
> occurs in Firefox, and moreover, the images are dynamically created
> with a php script in the CMS that I built.  They all can't be the same
> size, because the images will never all be the same size, and in order
> to keep the aspect ratio intact, I have to allow them to have
> different widths and heights.
>
> So thanks for the suggestion, but still having an issue.
>
> And I'm glad you like the site...my own creation on the front end and
> all the work on the back end as well.
>
> Cheers.
>
> Joe
>
> www.subprint.com
>
> On Nov 1, 1:43 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Not sure why you wouldremovethe photo... What happens when you hide
> > it.
>
> > On my G4 mac everything looks good except on the photo of "Little Dave
> > Thompson". It moves up and down as it comes in. Noflickerbut it
> > doesn't look right.
>
> > I think your problem is related to different dimension in your images.
> > When you display "Little Dave Thompson" you are removing an image with
> > different height dimensions. I'd recommend keep heights and widths the
> > same on all images. No need toremoveimages either. Just hide them,
> > check to see if they are there before you load them. (Easy to do in
> > JQuery)
>
> > The website looks great BTW. I have my own band (http://
> > RodeoClownsBand.com)
>
> > Regards,
>
> > -b
>
> > On Oct 31, 3:18 pm, Joe <[EMAIL PROTECTED]> wrote:
>
> > > Go here:
>
> > >http://www.theshedbbq.com/dev/franchise/events
>
> > > Click on one of the rows in the table and you'll see the image fade
> > > out and thenflicker.
>
> > > var livePhoto = $('img#eventImage');
> > > livePhoto.fadeOut('fast');
> > > livePhoto.remove();
>
> > > Not sure what is causing this but I use
> > > setTimeout( livePhoto.remove(), 50 but it did not work.
>
> > > Suggestions?


[jQuery] Re: remove() Method Causes Flicker in Firefox

2008-11-01 Thread Joe

I have to remove it, because the code directly following shows it
loading the new image and appending it to the parent div.  So in order
for the image that was faded out to not be there, it has to be
removed.  Once all the rows of the table have been clicked on, they
images are cached and then I can just alter the "src" attribute's
value for the image.

As far as the dimensions are concerned, I disagree.  The flicker only
occurs in Firefox, and moreover, the images are dynamically created
with a php script in the CMS that I built.  They all can't be the same
size, because the images will never all be the same size, and in order
to keep the aspect ratio intact, I have to allow them to have
different widths and heights.

So thanks for the suggestion, but still having an issue.

And I'm glad you like the site...my own creation on the front end and
all the work on the back end as well.

Cheers.

Joe

www.subprint.com

On Nov 1, 1:43 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Not sure why you wouldremovethe photo... What happens when you hide
> it.
>
> On my G4 mac everything looks good except on the photo of "Little Dave
> Thompson". It moves up and down as it comes in. Noflickerbut it
> doesn't look right.
>
> I think your problem is related to different dimension in your images.
> When you display "Little Dave Thompson" you are removing an image with
> different height dimensions. I'd recommend keep heights and widths the
> same on all images. No need toremoveimages either. Just hide them,
> check to see if they are there before you load them. (Easy to do in
> JQuery)
>
> The website looks great BTW. I have my own band (http://
> RodeoClownsBand.com)
>
> Regards,
>
> -b
>
> On Oct 31, 3:18 pm, Joe <[EMAIL PROTECTED]> wrote:
>
> > Go here:
>
> >http://www.theshedbbq.com/dev/franchise/events
>
> > Click on one of the rows in the table and you'll see the image fade
> > out and thenflicker.
>
> > var livePhoto = $('img#eventImage');
> > livePhoto.fadeOut('fast');
> > livePhoto.remove();
>
> > Not sure what is causing this but I use
> > setTimeout( livePhoto.remove(), 50 but it did not work.
>
> > Suggestions?


[jQuery] Re: jQuery Leaderboard?

2008-10-02 Thread Joe

yeah what are you trying to accomplish?  Not clear from the static
image you posted.

Cheers.

Joe

www.subprint.com

On Oct 2, 9:53 am, "David Meiser" <[EMAIL PROTECTED]> wrote:
> I'm not quite sure what it is you're looking for, here.  Are you looking for
> a rotating image like the one found here:  *http://crosier.org/*?
>
> On Thu, Oct 2, 2008 at 10:46 AM, Brit Mansell <[EMAIL PROTECTED]> wrote:
>
> > Anyone?
>
> > On Sep 30, 6:01 am, bmzero <[EMAIL PROTECTED]> wrote:
> > > I'm trying to find a javascriptleaderboardscript. I've seen this done
> > many
> > > times in Flash, but I would prefer to do it in Javascript/jQuery if
> > > possible.
>
> > > Here is an example of what I'm talking about:
> >http://www.nabble.com/file/p19739832/leaderboard.gif
>
> > > Do you guys have any suggestions?
>
> > > Thanks in advance.
> > > --
> > > View this message in context:
> >http://www.nabble.com/jQuery-Leaderboard--tp19739832s27240p19739832.html
> > > Sent from the jQuery General Discussion mailing list archive at
> > Nabble.com.


[jQuery] Re: Hover Events Can't "Keep Up" With FadeIn and FadeOut? Events Queue?

2008-10-01 Thread Joe

Still no luck.  Been trying to keep track of a flag value and it
doesn't help at all.

Any suggestions?

On Oct 1, 9:40 am, Joe <[EMAIL PROTECTED]> wrote:
> Go here:
>
> http://www.uisore.com/dev/new_placard/
>
> Now, mouseover the first thru the fifth thumbnails at the bottom
> really quickly and then back from the fifth to the first thumbnail
> really quickly.
>
> You'll notice that it has to "cycle" thru all the thumbnails'
> animations (fadeIn/Out) until it reached the last thumbnail that you
> hovered over.
>
> So it seems there is some sort of queue of events that are stacking up
> and I need to clear that queue when another thumbnail hover state has
> been encounterd.
>
> How do you do this?  I've read up on the queue, dequeue, and stop
> portions of the jQuery API and have had no luck with my current
> scenario.
>
> thanks.
>
> Joe
>
> www.subprint.com


[jQuery] Hover Events Can't "Keep Up" With FadeIn and FadeOut? Events Queue?

2008-10-01 Thread Joe

Go here:

http://www.uisore.com/dev/new_placard/

Now, mouseover the first thru the fifth thumbnails at the bottom
really quickly and then back from the fifth to the first thumbnail
really quickly.

You'll notice that it has to "cycle" thru all the thumbnails'
animations (fadeIn/Out) until it reached the last thumbnail that you
hovered over.

So it seems there is some sort of queue of events that are stacking up
and I need to clear that queue when another thumbnail hover state has
been encounterd.

How do you do this?  I've read up on the queue, dequeue, and stop
portions of the jQuery API and have had no luck with my current
scenario.

thanks.

Joe

www.subprint.com


[jQuery] Processing.js Google Group Now Formed!

2008-09-24 Thread Joe

Head here:

http://groups.google.com/group/processingjs


And discuss!  I already have one question and don't want to post it
here on the jQuery board so I figured I'd go ahead and create the
group.

Cheers.

Joe


[jQuery] FF3 Error With Preloaded CSS Images -- Works in IE?!!

2008-08-27 Thread Joe

Okay, so I built a site using jQuery as my preferred JavaScript
library (of course).  However, I'm getting the strangest error in
FF2/3 for a preLoadedCSSImages plugin.  It works fine in IE 6/7.
FTW?!

Here's the site:

http://www.headacheandpain.com


Now, I will say, this site is hosted on a shared hosting package and
the performance is awful at best.  So I'm wondering if the script is
failing in FF because the CSS file hasn't fully loaded by the time the
script is trying to execute on the stylesheet.  Here's the error:

A parameter or an operation is not supported by the underlying object"
code: "15

And the code in the plugin where the error is firing is here:

if(sheets[i].cssRules){//w3


Any clues?

Thanks.

Joe
www.subprint.com



[jQuery] Re: Using instead of with Superfish

2008-08-26 Thread Joe

Just a note for anyone who tries to do the same thing as me:

Be sure that the  you use doesn't interfere with the  that
superfish puts in to hold the arrows.  otherwise, everything will go
all screwy and you'll be able to see both arrows.

Alternately, if you remove the spans and use text like me, then
be sure to remove the css styling the  that you removed.


On Aug 26, 8:22 am, Joe <[EMAIL PROTECTED]> wrote:
> Thanks Joel,
>
> Putting in blank anchors worked perfectly.
>
> thanks
>
> -Joe
>
> On Aug 25, 10:51 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote:
>
> > Hi Joe,
>
> > Be aware that by using spans instead of anchors you will be breaking
> > keyboard access to the submenus. Maybe using an anchor without a href
> > attribute would be a better option? If you still want to use spans
> > then you could probably change this line:
>
> >  if (o.autoArrows) addArrow( $('>a:first-child',this) );
>
> > to this:
>
> >  if (o.autoArrows) addArrow( $('>:first-child',this) );
>
> > I just removed the 'a' from before ':first-child'.
>
> > Good luck.
> > Joel Birch.


[jQuery] Re: Using instead of with Superfish

2008-08-26 Thread Joe

Thanks Joel,

Putting in blank anchors worked perfectly.

thanks

-Joe

On Aug 25, 10:51 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Hi Joe,
>
> Be aware that by using spans instead of anchors you will be breaking
> keyboard access to the submenus. Maybe using an anchor without a href
> attribute would be a better option? If you still want to use spans
> then you could probably change this line:
>
>  if (o.autoArrows) addArrow( $('>a:first-child',this) );
>
> to this:
>
>  if (o.autoArrows) addArrow( $('>:first-child',this) );
>
> I just removed the 'a' from before ':first-child'.
>
> Good luck.
> Joel Birch.


[jQuery] Using instead of with Superfish

2008-08-24 Thread Joe

Hi,
Thanks to Joel for creating Superfish.  It has eliminated many
headaches for me.  My implimentation is almost complete, but my lack
of javascript knowledge is showing (the CSS is tough enough for me).

I have a  like so:


 first category
  
   item 1
   item 2
  
 
  first category
  
   item 1
   item 2
  
 
 
  Home
 


I would like to automatically put an arrow next to "first category" as
well as "second category" but superfish only seems to put arrows next
to links.

I assume I need to change this:

addArrow = function($a)
{ $a.addClass(c.anchorClass).append($arrow.clone()); };


or this (the addArrow section):
return this.each(function() {
var s = this.serial = sf.o.length;
var o = $.extend({},sf.defaults,op);
o.$path = $
('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){

$(this).addClass([o.hoverClass,c.bcClass].join(' '))

.filter('li:has(ul)').removeClass(o.pathClass);
});
sf.o[s] = sf.op = o;

$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) 
?
'hoverIntent' : 'hover'](over,out).each(function() {
if (o.autoArrows) addArrow( 
$('>a:first-child',this) );
})
.not('.'+c.bcClass)
.hideSuperfishUl();

var $a = $('a',this);
$a.each(function(i){
var $li = $a.eq(i).parents('li');

$a.eq(i).focus(function(){over.call($li);}).blur(function()
{out.call($li);});
});
o.onInit.call(this);

Any help would be very much appreciated.

-Joe


[jQuery] Re: loading image for blockui on form submit

2008-08-20 Thread Joe

Hmm, very strange.  If you inspect the element in firefox it shows the
 tag as not displayed.  If you "preview" the image by mousing
over the src attribute in the image tag, then it shows up in Firebug.
After this, it is cached and then shows up when I upload.  Very very
bizarre.  I've used blockUI for many things and never had this issue.
Maybe explicitly make the image display: block or apply it as a
background image to the h1 or another tag.

Joe

On Aug 19, 9:41 pm, xxkylexx <[EMAIL PROTECTED]> wrote:
> Hey guys,
> I am trying to use the blockui plugin in order to block a div that
> contains my file uploader while the file is in the process of
> uploading (form is being submitted).
>
> I have successfully achieved this, however, I want to display a cool
> little animated loading .gif in the blockui message, but am having
> issues getting it to load, and animate in some browsers (ff and ie6).
>
> I think the problem is that the image isn't getting enough time to
> load or something before the submit begins. I am using a javascript
> submit() to handle submitting the form, and then trigger the blockui.
>
> You can see this working in action here (as well as view my 
> source):http://new.imagenerd.com/. Just upload an image to see the issue I am
> describing.
>
> Thanks for any help.
>
> -Kyle


[jQuery] Re: Your jQuery Best Practices

2008-08-18 Thread Joe

Wow now that's what I'm talkin about!  Well done all!  Keep'em coming,
if we haven't covered them already.

cheers.

Joe

On Aug 15, 10:38 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> On Aug 15, 2008, at 8:32 PM, Michael Geary wrote:
>
>
>
> >>> From: Michael Geary
> >>> It's worth noting the implementation of the .hover() method:
>
> >>>   hover: function(fnOver, fnOut) {
> >>>      return this.bind('mouseenter', fnOver).bind('mouseleave',  
> >>> fnOut);
> >>>  },
>
> >>> As you can see, hover does nothing more than hook up
> >>> the 'mouseenter' and 'mouseleave' events to your two handlers.
> >>> So, if you only need to listen for one of these events and not both,
> >>> it's perfectly OK to use one of those two events (but not, as you
> >>> note, mouseover and mouseout).
>
> >> From: Karl Swedberg
>
> >> Glad you brought this up, Michael!
>
> >> A couple things to note about this:
>
> >> 1. The .hover() wasn't always written that way internally. It
> >> was a change in one of the 1.2.x versions. So if you're using
> >> an old version of jQuery, you might want to double check for
> >> those mouseenter and mouseleave events before attempting to use them.
>
> >> 2. At this point there is no shorthand .mouseenter(fn) or
> >> .mouseleave(fn) like this is .mouseover(fn) and
> >> .mouseout(fn). Instead, we have to use .bind('mouseenter',
> >> fn) and .bind('mouseleave', fn)
>
> > Ah... So I could be way off base in suggesting that the mouseenter and
> > mouseleave events are fair game. I saw that .hover was using them  
> > and figure
> > it must be OK! Clearly a case of monkey see, monkey do coding. For  
> > all I
> > knew, they could have been intended for internal use only and  
> > subject to
> > change. After all, they are not documented.
>
> > So what's the intent with these two events? Are they intended for  
> > apps to
> > use and will remain stable - in that case they just need to be added  
> > to the
> > documentation.
>
> > Thanks,
>
> > -Mike
>
> Hey Mike,
>
> I don't think you're off base. It's my impression that the two events  
> are sticking around. But, then again, it's just an impression. And  
> it's just mine.
>
> They actually are in the documentation -- but they're kind of hidden:
>
> Possible event values: blur, focus, load, resize, scroll, unload,  
> click, dblclick,  mousedown, mouseup, mousemove, mouseover, mouseout,  
> mouseenter, mouseleave, change, select,  submit, keydown, keypress,  
> keyup, error
>
> (http://docs.jquery.com/Events/bind#typedatafn)
>
> They were also mentioned in the Release Notes for jQuery 1.2.2 [1].  
> I'd love to see them given their own shorthand methods to put them on  
> par with their mousey brethren.
>
> Not sure, but it could be just a matter of adding them to the list  
> around line 2386:
>
> jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
>         "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
>         "submit,keydown,keypress,keyup,error").split(","), function(i, name){
>
>         // Handle event binding
>         jQuery.fn[name] = function(fn){
>                 return fn ? this.bind(name, fn) : this.trigger(name);
>         };
>
> });
>
> I've been meaning to mention this on the dev list, but it keeps  
> slipping my mind. And I'm a little shy about suggesting such things.  
> Anyway, it's always a pleasure corresponding with you. Any chance at  
> all you can make it to the jQuery Conference next month? Would be  
> great to meet you!
>
> [1]http://docs.jquery.com/Release:jQuery_1.2.2#.bind.28.22mouseenter.22
>
> --Karl
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Jquery Problem in IE 6

2008-08-18 Thread Joe

Dear friends,

i am working in a site, in which i have used jquery scripts.
In Jquery the .html() is not working. I used .html() to print the
output to one div from one file.
If i use .html() in ie6 means the site in keep on loading.

Please help me to fix the error.

It is very Urgent


[jQuery] Jquery Problem in IE 6

2008-08-18 Thread Joe

Dear friends,

i am working in a site, in which i have used jquery scripts.
In Jquery the .html() is not working. I used .html() to print the
output to one div from one file.
If i use .html() in ie6 means the site in keep on loading.

Please help me to fix the error.

It is very *Urgent*


[jQuery] what 's the matter with jqgrid's website?

2008-07-21 Thread Double Joe

Tony ,what 's the matter with jqgrid's website, Is it down?


[jQuery] Re: Multiple Instances of the same effect without unique IDs

2008-07-16 Thread Joe S

I've just tried this and it seems to work... just wondering what other
unintended side effects I'm not seeing   ;)

$(".extraContent").hide();  // hide the extra stuff by default

$('a.extraContentTrigger').click(function() { // added a class to
the [TITLE] link
  $(this.parentNode).find('.extraContent').slideToggle();
});



On Jul 16, 12:09 pm, Joe S <[EMAIL PROTECTED]> wrote:
> OK, spoke too soon... on further testing, I'm getting an unintended
> (but really stupid, on my part) side effect...
>
> if i put another anchor in the hidden content (a link to a file or
> site, for example), the toggle is triggered on that click, too (since
> it's in the wrapper DIV, right?). so, in a single table cell, i've
> got:
>
> 
>    [TITLE of CONTENT]
>       
>          My File
>          Another Site
>       
> 
>
> I need to click the title > expose the extraContent > and click the
> links in the extraContent without triggering the toggle. is there way
> to either adjust what i'm listening for (the click of the [Title]) or
> ignore clicks within the extraContent (again, without resorting to
> unique IDs for each row)?
>
> --joe
>
> On Jul 16, 8:59 am, Joe S <[EMAIL PROTECTED]> wrote:
>
> > Hi Karl,
> > Thanks so much for the help - it definitely got me in the right
> > direction. Here's what I ended up with inside the (document).ready
> > function:
>
> > $(".extraContent").hide();  // hide the extra stuff by default
>
> > $('div.contentWrapper').click(function() {     // contentWrapper DIV,
> > contains [TITLE] and .extraContent DIV
> >   $(this).find('.extraContent').slideToggle();  // slide toggles
> > the .extraContent DIV within the .contentWrapper
>
> > });
>
> > it all seems to work; clicking one leaves the others untouched;
> > clicking multiple works as it should. i was getting weird thing
> > happening with the 'td:first-child' approach. is anything i'm doing
> > terribly bad form?
>
> > again, thanks!
>
> > On Jul 15, 7:51 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> > > Hi Joe,
>
> > > Assuming that the additional information that you're initially hiding  
> > > is in a span tag, I'd do something like this:
>
> > > $(document).ready(function() {
> > >    $('td:first-child').click(function() {
> > >      $(this).find('span').slideToggle();
> > >    });
>
> > > });
>
> > > --Karl
> > > 
> > > Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> > > On Jul 15, 2008, at 2:04 PM, Joe S wrote:
>
> > > > I know this has got to be in here somewhere; I'm not familiar enough
> > > > with jQuery syntax to know what a valid search string is (i keep
> > > > looking for EACH and THIS and MULTIPLE but I'm not returning anything
> > > > useful). So I apologize that my noob stripes are showing through...
>
> > > > I've got (basically) a table looking like:
>
> > > > Title          |  Release Date  |   Revised Date | Contact
> > > > ---
> > > > ---
> > > > Apples       |    08-2005     |    09-2006     | John Smith
> > > > ---
> > > > Bananas    |    08-2005     |    09-2006     | John Smith
> > > > ---
> > > > Oranges     |    08-2005     |    09-2006     | John Smith
>
> > > > I'm trying to add the ability to toggleSlide a (initially) hidden div
> > > > under each individual [TITLE] without triggering the rest of the
> > > > hidden content *AND -- if possible* without assigning a unique ID to
> > > > each title/content pair (I could make it work that way, but these
> > > > update a lot, and keeping track of the last unique value is a chore).
>
> > > > For example, clicking on "Apples" would reveal:
>
> > > > Title           |  Release Date  |   Revised Date | Contact
> > > > ---
> > > > ---
> > > > Apples        |    08-2005        |    09-2006       | John Smith
> > > > Apples are  |
> > > > Tasty.         |
> > > > ---
> > > > Bananas     |    08-2005     |    09-2006     | John Smith
> > > > ---
> > > > Oranges     |    08-2005     |    09-2006     | John Smith
>
> > > > SO... I need some way of saying:
>
> > > > [click a title > reveal the corresponding content > click it again to
> > > > hide it] leaving the rest of the table in tact
>
> > > > Sound doable, or should I just go the unique ID route? Thanks in
> > > > advance!


[jQuery] Re: Multiple Instances of the same effect without unique IDs

2008-07-16 Thread Joe S

OK, spoke too soon... on further testing, I'm getting an unintended
(but really stupid, on my part) side effect...

if i put another anchor in the hidden content (a link to a file or
site, for example), the toggle is triggered on that click, too (since
it's in the wrapper DIV, right?). so, in a single table cell, i've
got:


   [TITLE of CONTENT]
  
 My File
 Another Site
  


I need to click the title > expose the extraContent > and click the
links in the extraContent without triggering the toggle. is there way
to either adjust what i'm listening for (the click of the [Title]) or
ignore clicks within the extraContent (again, without resorting to
unique IDs for each row)?

--joe





On Jul 16, 8:59 am, Joe S <[EMAIL PROTECTED]> wrote:
> Hi Karl,
> Thanks so much for the help - it definitely got me in the right
> direction. Here's what I ended up with inside the (document).ready
> function:
>
> $(".extraContent").hide();  // hide the extra stuff by default
>
> $('div.contentWrapper').click(function() {     // contentWrapper DIV,
> contains [TITLE] and .extraContent DIV
>   $(this).find('.extraContent').slideToggle();  // slide toggles
> the .extraContent DIV within the .contentWrapper
>
> });
>
> it all seems to work; clicking one leaves the others untouched;
> clicking multiple works as it should. i was getting weird thing
> happening with the 'td:first-child' approach. is anything i'm doing
> terribly bad form?
>
> again, thanks!
>
> On Jul 15, 7:51 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> > Hi Joe,
>
> > Assuming that the additional information that you're initially hiding  
> > is in a span tag, I'd do something like this:
>
> > $(document).ready(function() {
> >    $('td:first-child').click(function() {
> >      $(this).find('span').slideToggle();
> >    });
>
> > });
>
> > --Karl
> > 
> > Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> > On Jul 15, 2008, at 2:04 PM, Joe S wrote:
>
> > > I know this has got to be in here somewhere; I'm not familiar enough
> > > with jQuery syntax to know what a valid search string is (i keep
> > > looking for EACH and THIS and MULTIPLE but I'm not returning anything
> > > useful). So I apologize that my noob stripes are showing through...
>
> > > I've got (basically) a table looking like:
>
> > > Title          |  Release Date  |   Revised Date | Contact
> > > ---
> > > ---
> > > Apples       |    08-2005     |    09-2006     | John Smith
> > > ---
> > > Bananas    |    08-2005     |    09-2006     | John Smith
> > > ---
> > > Oranges     |    08-2005     |    09-2006     | John Smith
>
> > > I'm trying to add the ability to toggleSlide a (initially) hidden div
> > > under each individual [TITLE] without triggering the rest of the
> > > hidden content *AND -- if possible* without assigning a unique ID to
> > > each title/content pair (I could make it work that way, but these
> > > update a lot, and keeping track of the last unique value is a chore).
>
> > > For example, clicking on "Apples" would reveal:
>
> > > Title           |  Release Date  |   Revised Date | Contact
> > > ---
> > > ---
> > > Apples        |    08-2005        |    09-2006       | John Smith
> > > Apples are  |
> > > Tasty.         |
> > > ---
> > > Bananas     |    08-2005     |    09-2006     | John Smith
> > > ---
> > > Oranges     |    08-2005     |    09-2006     | John Smith
>
> > > SO... I need some way of saying:
>
> > > [click a title > reveal the corresponding content > click it again to
> > > hide it] leaving the rest of the table in tact
>
> > > Sound doable, or should I just go the unique ID route? Thanks in
> > > advance!


[jQuery] Re: Multiple Instances of the same effect without unique IDs

2008-07-16 Thread Joe S

Hi Karl,
Thanks so much for the help - it definitely got me in the right
direction. Here's what I ended up with inside the (document).ready
function:

$(".extraContent").hide();  // hide the extra stuff by default

$('div.contentWrapper').click(function() { // contentWrapper DIV,
contains [TITLE] and .extraContent DIV
  $(this).find('.extraContent').slideToggle();  // slide toggles
the .extraContent DIV within the .contentWrapper
});

it all seems to work; clicking one leaves the others untouched;
clicking multiple works as it should. i was getting weird thing
happening with the 'td:first-child' approach. is anything i'm doing
terribly bad form?

again, thanks!


On Jul 15, 7:51 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi Joe,
>
> Assuming that the additional information that you're initially hiding  
> is in a span tag, I'd do something like this:
>
> $(document).ready(function() {
>    $('td:first-child').click(function() {
>      $(this).find('span').slideToggle();
>    });
>
> });
>
> --Karl
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Jul 15, 2008, at 2:04 PM, Joe S wrote:
>
>
>
> > I know this has got to be in here somewhere; I'm not familiar enough
> > with jQuery syntax to know what a valid search string is (i keep
> > looking for EACH and THIS and MULTIPLE but I'm not returning anything
> > useful). So I apologize that my noob stripes are showing through...
>
> > I've got (basically) a table looking like:
>
> > Title          |  Release Date  |   Revised Date | Contact
> > ---
> > ---
> > Apples       |    08-2005     |    09-2006     | John Smith
> > ---
> > Bananas    |    08-2005     |    09-2006     | John Smith
> > ---
> > Oranges     |    08-2005     |    09-2006     | John Smith
>
> > I'm trying to add the ability to toggleSlide a (initially) hidden div
> > under each individual [TITLE] without triggering the rest of the
> > hidden content *AND -- if possible* without assigning a unique ID to
> > each title/content pair (I could make it work that way, but these
> > update a lot, and keeping track of the last unique value is a chore).
>
> > For example, clicking on "Apples" would reveal:
>
> > Title           |  Release Date  |   Revised Date | Contact
> > ---
> > ---
> > Apples        |    08-2005        |    09-2006       | John Smith
> > Apples are  |
> > Tasty.         |
> > ---
> > Bananas     |    08-2005     |    09-2006     | John Smith
> > ---
> > Oranges     |    08-2005     |    09-2006     | John Smith
>
> > SO... I need some way of saying:
>
> > [click a title > reveal the corresponding content > click it again to
> > hide it] leaving the rest of the table in tact
>
> > Sound doable, or should I just go the unique ID route? Thanks in
> > advance!


[jQuery] Closures, Callbacks, Return Values and Google Maps API!!!

2008-07-15 Thread Joe

I have 2 js files.  1 is the jquery jmaps plugin (jmaps.js) (basically
porting the google maps api to make creating google maps easier) and
then the other file is all the actionable code (agency.js) to do
stuff.

I've been extending the plugin to add some features the original
author did not put in the plugin, but am having an issue with the
callback function from google.  Take a look:

from agency.js.

 for (i = 0; i < officeArray.length; i++) {
var lat1 = officeArray[i][0];
var lng1 = officeArray[i][1];

// Radial search
res[i] = LatLon.distHaversine(lat1.parseDeg(),
lng1.parseDeg(), lat2.parseDeg(), lng2.parseDeg()).toPrecision(4) + '
Miles';

// If it is within range, then grab it's address and
place a marker.
if (parseFloat(res[i]) <= maxRadius) {

// Check to see if we should add streetview --
THIS IS THE FUNCTION I'M HAVING ISSUES WITH

$jmap2.jmap("checkForStreetView", {lat: lat1, lng:
lng1});

var htmlType = $j('#directions p').text();

alert(htmlType); // Whenever this alert goes out,
the first iteration is blank and the second alert's value is the
actual value of the first...clearly a callback related issue.

//$j('#directions p').text('');

} // End for loop


from jmaps.js.

// this is the function I extended:


$.jmap.checkForStreetView = function(options, callback)
{
var codeNum = 0;
options = $.extend({}, $.jmap.JStreetViewDefaults, options);
var location = new GLatLng(options.lat, options.lng);
panoClient = new GStreetviewClient();
panoClient.getNearestPanorama(location, processReturnedData);

function processReturnedData(panoData){

if (panoData.code != 200) {
$('#directions').append(''+panoData.code+'');
return;
}
else{
$('#directions').append(''+panoData.code+'');
return;
}
}

if (typeof callback == 'function')
   return callback(panoData, options);
} // End checkForStreetView



The issue is with the processReturnedData() function.  As you can see
it is a callback function for the 'getNearestPanorama' method of the
GStreetviewClient object.  The code property is just a response code
from google's server.  Ultimately I would like the checkForStreetView
function to return its callee the value of panoData, but for the time
being I'm just having it append it's value to a paragraph inside a
div.

However, the value, in the above for loop, is always one value behind
when I trigger the alert.  Any insight on this?  I seem to have tried
all kinds of things like wrapping the functions, etc. but nothing
seemed to work.

I would be happy with just appending the text and using it later for
my other code down the line, but is there any way to have the
checkForStreetView function return the panoData.code value?  That's
really what I need access to.

Thanks a million in advance.


[jQuery] Multiple Instances of the same effect without unique IDs

2008-07-15 Thread Joe S

I know this has got to be in here somewhere; I'm not familiar enough
with jQuery syntax to know what a valid search string is (i keep
looking for EACH and THIS and MULTIPLE but I'm not returning anything
useful). So I apologize that my noob stripes are showing through...

I've got (basically) a table looking like:


Title  |  Release Date  |   Revised Date | Contact
---
---
Apples   |08-2005 |09-2006 | John Smith
---
Bananas|08-2005 |09-2006 | John Smith
---
Oranges |08-2005 |09-2006 | John Smith


I'm trying to add the ability to toggleSlide a (initially) hidden div
under each individual [TITLE] without triggering the rest of the
hidden content *AND -- if possible* without assigning a unique ID to
each title/content pair (I could make it work that way, but these
update a lot, and keeping track of the last unique value is a chore).


For example, clicking on "Apples" would reveal:

Title   |  Release Date  |   Revised Date | Contact
---
---
Apples|08-2005|09-2006   | John Smith
Apples are  |
Tasty. |
---
Bananas |08-2005 |09-2006 | John Smith
---
Oranges |08-2005 |09-2006 | John Smith


SO... I need some way of saying:

[click a title > reveal the corresponding content > click it again to
hide it] leaving the rest of the table in tact

Sound doable, or should I just go the unique ID route? Thanks in
advance!


[jQuery] Re: Superfish 1.4.5 released - now with drop shadows!

2008-07-10 Thread Joe

Joel,

Love the plugin, but it unfortunately isn't terrible accessible,
particularly the non-Javascript enabled IE6 user.  At work, we have to
make our sites accessible to even this unfortunate user and have found
it to be very difficult and nearly impossible to replicate the true
Sucker/Superfish style.  Any insight on this?  Have you tried it out
for the non-JS, IE6 user?

Joe

On Jul 10, 10:44 am, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Okay, so the drop shadows are not applied in IE6 or 7 - will continue
> to ponder workarounds there. Other than that, just a general clean-up
> and further optimisations of the code.
>
> Check out them drop shadows... are they not perdy? If you think "not"
> then you can disable them completely via the options 
> object.http://users.tpg.com.au/j_birch/plugins/superfish/#examples
>
> The next feature I will be adding is "click main item to activate
> instead of hover".
>
> Joel Birch.


[jQuery] Re: Combining Animation Methods: fadeOut and slideUp

2008-07-09 Thread Joe

Karl's tuts are priceless.  Definitely read up on those.  Helped me
many a time.

I would say if you wanted to do one after the other, you could do it
as a callback function after the current function had completed, but
that seems counterintuitive as you don't want to slide something up
after it's been faded out:

$('#someElement').fadeOut('slow',function(){
 $(this).slideUp('fast');
});


On Jul 9, 4:05 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I wrote a tutorial on Learning jQuery about how to create a slide-fade  
> toggle animation plugin:
>
> http://www.learningjquery.com/2008/02/simple-effects-plugins
>
> If you don't want to create a plugin, you can just use the .animate()  
> method:
>
> $('something').animate({opacity: 'hide', height: 'hide'}, 'fast');
>
> Hope that helps.
>
> --Karl
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Jul 9, 2008, at 4:29 PM, JipThePeople wrote:
>
>
>
> > Is it possible to execute both a fadeOut() as well as a slideUp()
> > methods on an object? If so, what is the syntax? Any feedback will be
> > greatly appreciated.
>
>


[jQuery] Re: Links injected with jQuery not active in IE6

2008-07-07 Thread Joe

Can you post a link?

On Jul 6, 11:13 pm, "M. Miller" <[EMAIL PROTECTED]> wrote:
> I am using jQuery to insert a series of links into a containing div.
> Upon insertion, these links are active in Firefox and Safari, but are
> not active (clickable) in IE6 (what a surprise.) While Internet
> explorer 6 does visually render the inserted code, it seems that the
> html elements are not recognized. If the same html is included in the
> initial code, the links work fine. However, when the are inserted
> after the DOM is loaded, they are not.
>
> Has anyone encountered similar problems, or is there a known
> workaround to this problem?
>
> Thanks in advance,
> Matt


  1   2   >