Re: [jQuery] Newbie Question: Finding and manipulating an element

2010-03-01 Thread Aaron Johnson
Greg, Nathan, Thanks very much for your help!

On 1 March 2010 14:58, Nathan Klatt  wrote:

> On Mon, Mar 1, 2010 at 5:06 AM, Aaron Johnson
>  wrote:
> > The top level list has an ID and associated css, I'd like to add a class
> to
> > each of the nested  elements in order to style them differently. I
> > cannot manually add a class so wondered if I could do it with jQuery.
> >
> > I'm looking for a result like this:
> >
> > 
> >  > class="portal-navigation-label">Home
> > 
>
> If all of the inner uls are styled the same you don't need a class,
> just add a rule to your css:
>
> ul.foo > li > ul {
>  /* style stuff */
> }
>
> Nathan
>


[jQuery] Newbie Question: Finding and manipulating an element

2010-03-01 Thread Aaron Johnson
Hello...

I have an unordered list containing nested lists...


Home

Announcements
Announcements
Announcements


Home

Announcements
Announcements
Announcements


Home

Announcements
Announcements
Announcements




The top level list has an ID and associated css, I'd like to add a class to
each of the nested  elements in order to style them differently. I
cannot manually add a class so wondered if I could do it with jQuery.

I'm looking for a result like this:


Home

Announcements
Announcements
Announcements


Home

Announcements
Announcements
Announcements


Home

Announcements
Announcements
Announcements




Thanks for your help!

Aaron


[jQuery] (validate) Validation following server-side submit

2010-01-30 Thread Aaron Gusman
As you all know, validating on the client-side only can be easily
hijacked by disabling javascript.  For this type of validation I am
using the jquery validator plugin http://docs.jquery.com/Plugins/Validation.
When all client-side validations are successful, and the form is
submitted to the server, I reapeat the same validations on the
server.  But does any one of you know how I can invoke the client-side
validator of the client to show errors that have been detected on the
server?

Validating on the client side shows me nice error messages beneath
each input field and an error summary at the top.  But let's say I
want to validate the username field upon registration.  On the client
I check whether the field has been left empty or if it follows the
correct format but I cannot check if the username already exists.  I
can only check for such occurrence when the data arrives at the
server.

How can I show the same error layout after the submission takes place?

Thanks for your ideas.


[jQuery] Re: Accordian functionality

2009-12-08 Thread Aaron Gusman
Thank you for that.  This suits my requirements.  However, is there a
way to do .. sort of... subqueries???  First a selector, than another
selection filter over the result.

Example:
var AllSideBoxes = $(".SideBox"); //gets all sideboxes
var SomeItems = $(AllSideBoxes).SubQuery(".SideItem"); //gets all
SideItems from the result of the previous query

Thanks
Aaron

On Dec 8, 5:02 pm, MorningZ  wrote:
> Here's a simple example based on your class names
>
> http://jsbin.com/ayate/edit
>
> On Dec 8, 9:40 am, Aaron Gusman  wrote:
>
>
>
> > I'd like to create my own type of accordian however I am finding
> > difficulty with creating the query for selection.
>
> > Say I have a div with another two divs inside - I will call this
> > parent div as the SideBox.
>
> > The first child div is the header and it is the one that will be
> > clicked - I will call this div the SideBoxHeader as even the CSS class
> > will have this name .
> > The second div will contain other things and it is the one that will
> > hide when the the Header is clicked - I will call this div the
> > SideBoxContent .
>
> > I am trying to create jquery syntax to associate code to the header
> > div so that it hides the Content div when clicked the first time and
> > shows it back when clicked a second time.  Note that we will have more
> > than one SideBox on the same page.
>
> > $(".SideBox .SideBoxHeader").toggle(function () {  }, function
> > () {# });
>
> > How will I find the .SideBoxContent sibling of the SideBoxHeader that
> > was clicked??
>
> > I do not know how to write a selector that works on another
> > selection.  In one of the toggle functions how can I find the sibling
> > of the SideBoxHeader I clicked??? $(this)(???)


[jQuery] Accordian functionality

2009-12-08 Thread Aaron Gusman
I'd like to create my own type of accordian however I am finding
difficulty with creating the query for selection.

Say I have a div with another two divs inside - I will call this
parent div as the SideBox.

The first child div is the header and it is the one that will be
clicked - I will call this div the SideBoxHeader as even the CSS class
will have this name .
The second div will contain other things and it is the one that will
hide when the the Header is clicked - I will call this div the
SideBoxContent .

I am trying to create jquery syntax to associate code to the header
div so that it hides the Content div when clicked the first time and
shows it back when clicked a second time.  Note that we will have more
than one SideBox on the same page.

$(".SideBox .SideBoxHeader").toggle(function () {  }, function
() {# });

How will I find the .SideBoxContent sibling of the SideBoxHeader that
was clicked??

I do not know how to write a selector that works on another
selection.  In one of the toggle functions how can I find the sibling
of the SideBoxHeader I clicked??? $(this)(???)



[jQuery] Slow-loading jCarousel

2009-11-23 Thread Aaron
I'm currently working on a site for a client who requested the
jCarousel script. I didn't have any trouble getting it to work...
however, it seems like the script hesitates before it loads. (You can
see the  bullets and all of the images before it snaps into
place.) Here's the test site: http://identitypr.com/2010/

Any ideas?

Thanks!!

Aaron


[jQuery] How to keep two items having the same value

2009-11-09 Thread Aaron
Hi all,
I have two  tags which have the same  in the
different positions of a page:
For example,

1
2
3
4
5

...
...


1
2
3
4
5



What I want is: When the user choose an item from the number1
, the number2 will automatically change to the same
value to the number2.
Is there any one who can provide a solution?
Thanks


[jQuery] Re: Select the inverse of what you're looking for

2009-10-31 Thread Aaron Gusman
Thanks my friend, works fine..however i'm finding difficulty
understanding the code for next time...Couldn't imagine opening
brackets and writing a filter straight away :not(:contains

On Oct 31, 5:04 am, mkmanning  wrote:
> Try this:
>
> $("tr:not(:contains(Brown))").css("background-color", "Red");
>
> On Oct 30, 12:58 pm, Aaron Gusman  wrote:
>
>
>
> > I have a table with 2 columns and four rows.  I am currently able to
> > highlight the row which contains a specific piece of text.  But what I
> > want to do is to highlight the rows that DO NOT have that piece of
> > text.  Here's the code:
>
> > This line highlights the row that contains a cell with the text
> > "Brown":
> >         var found = 
> > $("tr:has(td:contains('Brown'))").css("background-color",
> > "Red");
>
> > However, I do not want to highlight the row with the text but all the
> > others..so I tried this:
> >         var found = $("tr:has(td:contains('Brown'))");
> >         $("tr:not(found)").css("background-color", "Red").css("background-
> > color", "Red");
> > I thought the :not filter was supposed to invert the selection however
> > this does not work..all rows get highlighted.
>
> > Were am I wrong??  And how can I do this?  Here's the HTML just in
> > case you want to try it.
>
> > 
> >   
> >     English
> >     Italian
> >   
> >   
> >     White
> >     Bianco
> >   
> >   
> >     Yellow
> >     Giallo
> >   
> >   
> >     Brown
> >     Marrone
> >   
> >   
> >     Black
> >     Nero
> >   
> > 
>
> > Thanks


[jQuery] Select the inverse of what you're looking for

2009-10-30 Thread Aaron Gusman
I have a table with 2 columns and four rows.  I am currently able to
highlight the row which contains a specific piece of text.  But what I
want to do is to highlight the rows that DO NOT have that piece of
text.  Here's the code:


This line highlights the row that contains a cell with the text
"Brown":
var found = $("tr:has(td:contains('Brown'))").css("background-color",
"Red");

However, I do not want to highlight the row with the text but all the
others..so I tried this:
var found = $("tr:has(td:contains('Brown'))");
$("tr:not(found)").css("background-color", "Red").css("background-
color", "Red");
I thought the :not filter was supposed to invert the selection however
this does not work..all rows get highlighted.

Were am I wrong??  And how can I do this?  Here's the HTML just in
case you want to try it.



  
English
Italian
  
  
White
Bianco
  
  
Yellow
Giallo
  
  
Brown
Marrone
  
  
Black
Nero
  


Thanks


[jQuery] using jquery ui plugin to make carousel effect

2009-10-10 Thread Aaron

Hi, I am trying to use this plugin:http://jquery-ui.googlecode.com/svn/
branches/labs/carousel/demo/index.html

I don't know what the function name to use to make a carousel effect.

I even looked at the source code of those demos and tried to use the
function carousel.

I have firefox debugger  installed and it spits our one error saying
that carousel isn't a function.

I would like to know what the name of the function that I should be
using to create the carousel effect.

I have asked on jquery irc and one person said he can help me out only
if I am willing to pay him some . I refused and decided to post it
on here. He flat out did told me that  I am using the wrong function
name yet it's the same function that I see used in the demos.



[jQuery] Using jquery ui plugin. Don't know what functions name to use.

2009-10-10 Thread Aaron

HI, I am using this:  
http://jquery-ui.googlecode.com/svn/branches/labs/carousel/demo/index.html

plugin to  jquery ui.  The problem is that it's not working at all.

I downloaded the firefox debugger  and it's spitting out a error
saying that it can't find the function of carousel.

 I am not sure what the function is called. Their is no documentation
but their are demos  that I can look at the source code. I see them
using .carousel as a function  so I used that same function call. Yet
I can't get my carousel to work.



[jQuery] Re: Trying to use fadein and fade out with mouseover and mouseout functions.

2009-09-25 Thread Aaron

Hi,  what I want is  to use a IF statement on the mouseout function.

So based on the conditions it will  use the fade out function when the
mouseout effect occures according to those conditions.

That means that  the conditions are  that  if the mouse moved off the
menus background  then as long it's not over a image link on the menu
background then fade out.

If the mouse is over a image link that is on the menu background then
don't fade out.

That is what I want.

The problem is that  currently  when the mouse goes over  the image
links that are on the menu background  the menu and image links would
fade out as if the mouse moved off the menu background.  I don't want
them I want the users to be able to put the mouse over image links
without the menu fading out .


[jQuery] Re: Trying to use fadein and fade out with mouseover and mouseout functions.

2009-09-25 Thread Aaron

no, the problem I have is that I set a mouseout function from jquery
on the menus background.

This background is a box blue square. On this square is buttons that
once clicked takes you to different pages. These buttons are more
linke image links.

Well when the mouse moves over to the image links the menu background
and image links fades out because of the function mouseout. The
mouseout function is used on the menus background  so if the mouse is
not over the menus background  then it fades out the menu.

So when the mouse goes over the image links it detects the mouse is
not over the menu background causing a menu fade out.

What I want to do is make a if statement condition that will only make
the fade out function only if the mouse moved off the menus
background  that is not on any of the image links on the menus
background.  So  I want a if statement that will fade out the menu
only if the mouse moved off the menus background  and onto anything
else then the menus background and the image links on the menus
background.


I am making nothing but a fade in menu. when the person puts the mouse
over the users image a menu fades in.

I got a plain blank blue box that has image links on this box. THe
problem is that  I want the blank box with the image links to fade
out  only when the mouse went over the menu box and then goes out of
that box. I don't want a fade out when the mouse is over the box and
if the mouse goes over the image links then it would fade out.



On Sep 25, 5:41 am, "ryan.j"  wrote:
> if i'm reading your question right, on the menu button'smouseover
> function you could call $('#menu').stop() to end any animation
> effects.
>
> http://docs.jquery.com/Effects/stop
>
> copy paste some code in jsbin.com if you can, it's always easier to
> sort stuff like this with code to look at.
>
> On Sep 25, 4:55 am, "shyhockey...@gmail.com" 
> wrote:
>
> > Hi, I am  usingthe fade in and fade out  and mouse over and mouse
> > out.
>
> > What I am doing is creating a menu that fades in when the mouse if
> > over the users image.
>
> > The problem I run into is that when the background of the menu fades
> > in with the buttons which are links. I notice that if you move the
> > mouse over the buttons/links the menu and buttons fade out.
>
> > I have 2 elements one is the menus background and the other element is
> > the buttons/links on top of the background.
>
> > I have a fade out command when the mouse it off the menu background.
> > So I am guessing when the mouse goes over the links/buttons it acts as
> > if the mouse isn't no longer over the menu background element causing
> > a fade out effect.
>
> > What can I do to prevent  the menu fading out when the mouse is over
> > the buttons that are links.
>
> > I want the users to be able to put their mouses on the buttons and be
> > able to click on the buttons without the menu fading out but only fade
> > out if the mouse is not longer on the background of the menu and is
> > not over any of the buttons on the menus background.
>
> > I was woundering if I should do a if statement to check the conditions
> > which would be where the mouse is over.
>
> > If the mouse is over either the menu background meaning the menu or is
> > over the buttons on the menu background meaning the opitions in the
> > menu. Then don't do a fade out  only do a fade out if the mouse is not
> > over  either the buttons or the menu itself.
>
> > how   could I do this?


[jQuery] Re: Validate Plugin - Charcode Warning in Firebug

2009-09-09 Thread Aaron Kreider


On Sep 9, 7:40 pm, Geoffrey  wrote:
> My first question is why are you using a development version of
> Firebug? I copied and pasted the jQuery example into an html file and
> tested it and I get no error in FF 3.5.2 with the current release
> version of Firebug 1.4.2
There was a problem with google maps api and firebug that is fixed in
the development version.  I used to get stuck on "waiting for
gg.google.com".

So I guess I can just wait and hope it gets fixed by firebug...


[jQuery] Re: Validate Plugin - Charcode Warning in Firebug

2009-09-09 Thread Aaron Kreider

This happens on the example demo:
http://docs.jquery.com/Plugins/Validation#Example

Firefox 3.5.2
Firebug 1.5X.0a22


[jQuery] Form Serialize - Not replace space with plus

2009-09-04 Thread Aaron Kreider

I'm using $("form").serialize(), and then doing an AJAX request.

JQuery automatically replaces spaces with the + character.

How can I keep my spaces?

(I couple replace the + character with a space on the server side, but
I want the users to be able to enter the + character when they submit
forms.)


[jQuery] Validate Plugin - Charcode Warning in Firebug

2009-09-04 Thread Aaron Kreider

I'm using the jQuery Validate plugin.

I have a basic form that asks for someone's name:



When I enter the first character into the field, I get a Firebug
warning:
"The 'charCode' property of a keyup event should not be used. The
value is meaningless."

Is there a way to fix this?


[jQuery] Re: Callback Not Working

2009-08-24 Thread Aaron Gundel

Hi George,

It appears that your code isn't working because the context of your
this pointer changes in the callback inside of your fadeout effect.
it becomes your section title.  So when you do a find on it, you find
only children of the section title that are of the class explanation
-- which don't exist, hence your problem.  Using "siblings" should
solve the issue.  Try the following code.  Note that I've changed your
mouseove to a mouseleave, since mouseover appears to fire too
frequently.  Hope this helps, or at least gets you on your way

function() {
$('li').mouseover(
  function() {
$(this).find('div.SectionTitle').fadeOut('fast', function() {
  $(this).siblings('div.Explanation').fadeIn('slow');
});
});
$('li').mouseleave(
  function() {
$(this).find('div.Explanation').fadeOut('fast', function () {
    $(this).siblings('div.SectionTitle').fadeIn('slow'); });
});
  }

Aaron

On Mon, Aug 24, 2009 at 5:16 AM, GLSmyth wrote:
>
> I am looking to fade text out when the mouse passes over it and
> replace it with text that is faded in. My understanding is that this
> needs to be done through a callback, as the text needs to fade out
> completely before fading in. However, when I try to implement this
> idea the content does not fade in, so I must be doing something wrong.
>
> My code is:
>
>    
>    var Tips = {
>      ready: function() {
>        $('ul#SiteNav li').mouseover(
>          function() {
>            $(this).find('div.SectionTitle').fadeOut('fast', function
> () {
>              $(this).find('div.Explanation').fadeIn('slow');
>            });
>        });
>        $('ul#SiteNav li').mouseout(
>          function() {
>            $(this).find('div.Explanation').hide();
>            $(this).find('div.SectionTitle').show();
>        })
>      }
>    };
>    $(document).ready(Tips.ready);
>    
>
> I left the mouseout part unchanged, as that is an example of what I am
> changing from. What happens is that the mouseover text fades out, but
> the replaced text does not fade back in. Additionally, the shown text
> flashes before fading out if the mouse rolls over the text (as opposed
> to the containing box), which is not really a problem, but I am not
> understanding why that is happening. All works fine with hide/show.
>
> Full code can be found at http://dripinvesting.org/Default_test.asp.
>
> I am apparently missing something basic, so a pointer to a beginner
> would be appreciated.
>
> Cheers -
>
> george


[jQuery] Re: On mouse events / style switch

2009-08-04 Thread Aaron Johnson
It was my understanding that toggle required two clicks.

Thanks for your help.

On Tue, Aug 4, 2009 at 9:09 AM, Liam Potter  wrote:

>
> $("div").toggleClass('className');
>
> http://docs.jquery.com/Main_Page
> Everything you need right now is in there, only ask questions if it isn't
> on there, or google.
> I'm not trying to be an ass but too many people expect to have their hand
> held while learning anything, and being told the answers all the time isn't
> fun, you miss out on that "eureka" feeling.
>
> Nothing better then being stuck for an hour or so, then just having that
> idea hit you and away you go fixing your problems.
>
>
> Aaron Johnson wrote:
>
>> Hi
>>
>> Is it possible to do an 'on click' event that changes a css selector, then
>> an 'off click' that switches it back?
>>
>> I am working on a touch screen app and need to replicate a css hover
>> state.
>>
>> If anyone can point me towards an example or a tutorial, I 'd really
>> appreciate it.
>>
>> Thanks!
>>
>> A
>>
>>
>>
>>
>


[jQuery] On mouse events / style switch

2009-08-04 Thread Aaron Johnson
Hi

Is it possible to do an 'on click' event that changes a css selector, then
an 'off click' that switches it back?

I am working on a touch screen app and need to replicate a css hover state.

If anyone can point me towards an example or a tutorial, I 'd really
appreciate it.

Thanks!

A


[jQuery] Re: :visible fails in MSIE8 (in a ThickBox)

2009-06-26 Thread Brandon Aaron

This is (finally) fixed in latest SVN and will be in jQuery 1.3.3.

--
Brandon Aaron

On Fri, Jun 26, 2009 at 1:50 PM, Nekura Neko wrote:
>
> Okay, so jQuery 1.3.2 defines the visible filter like this:
>
> Sizzle.selectors.filters.visible = function(elem){
>        return elem.offsetWidth > 0 || elem.offsetHeight > 0;
> };
>
> Now I've got a table of hidden (style="display: none") rows.  The user
> will click something that will .show() a specific row, and the whole
> table -- along with a lot of other stuff -- will be displayed in a
> lovely thickbox.
>
> The problem is that MSIE 8 assigns offsetWidths and offsetHeights to
> the rows; even those with "display: none" active on them.  In
> "compatibility mode," MSIE will set the offsetHeight to 0, but there
> will still be an offsetWidth.
>
> Firefox doesn't have this problem; Chrome doesn't have this problem.
>
> I'm not sure if MSIE got wildly confused by moving hidden rows into a
> thickbox.  I know I've broken MSIE's rendering of other similar tables
> on the page, but I doubt those have anything to do with jQuery.
>
> I've gotten around it by using .addClass and .removeClass and
> filtering on that new class instead of :visible, but I'd rather know
> that :visible is working as intended in the long run.
>
> Cheers,
> JM (wanders off to lunch)


[jQuery] jQuery virtual keyboard

2009-06-08 Thread Aaron Johnson

Hello

I googled around for an onscreen keyboard that I could use as part of
a touch screen application, and came across...

http://designshack.co.uk/tutorials/creating-a-virtual-jquery-keyboard

which is very nearly perfect for what I want.

However, I need the keyboard to stay visible and be in a specific position.

Do I really need to be using jQuery?

Can anyone suggest other examples?

Thanks

AMWJ


[jQuery] Re: urgent json parsing error!!!! very important

2009-06-06 Thread Aaron Gundel

My guess is that you're not building an extension for twitter that
will run on their site, so you're violating the cross domain request
rule.  You cannot directly request from twitter.com, you'd have to
proxy through a page on your site (some page that forwarded this
request to twitter and returned the same result) or you can use jsonp
to achieve the same effect, which is probably what you're looking for.
 Hopefully this will help you.

$(document).ready(function(){
   $.ajax( {
   url: 
'http://twitter.com/friendships/exists.json?user_a='+
usera + '&user_b=' + userb,
   dataType: "jsonp",
   success: function(data)
   {
if(data == true)
{
var newDiv = 
'true';
}


$('#content').append(newDiv);
   }
   })});

On Sat, Jun 6, 2009 at 3:47 AM, grand_unifier wrote:
>
>
> 
>
>    
>    
>
>    
>
>    $(document).ready(function()
>     {
>                $('form#search').bind("submit", function(e)
>                {
>                        e.preventDefault();
>                        $('#content').html('');
>
>                        var query1 = urlencode($('input[name="user_a"]').val
> ()); //userA
>                        var query2 = urlencode($('input
> [name="user_b"]').val()); //userB
>
>
>                        $.getJSON('http://twitter.com/friendships/exists.json?
> user_a='+query1+'&user_b='+query2,
>                        function(data)
>                        {
>
>
>                                  if(data.text == 'true')
>                                    {
>                                      var newDiv = '

true

'; >                                    } > >                             $('#content').append(newDiv); > >                                }); >                        }); >                }); > >          function urlencode(str) { >            return escape(str).replace(/\+/g,'%2B').replace(/%20/g, > '+').replace(/\*/g, '%2A').replace(/\//g, '%2F').replace(/@/g, '%40'); >          } >    }); > >     > > > > i dont understand wats wron wth this code...could anyone plz correct > itplzits very frustratin... > any help wil be appreciated... >

[jQuery] Re: document.body is null or is not an object

2009-06-05 Thread Aaron Gundel

What is your doctype for the page?  strict doctypes will render under
document.documentElement rather than document.body.

Not sure if there's any particular reason you're doing it this way
though.  It would probably be much simpler to do something like

jQuery("body").append("")

On Fri, Jun 5, 2009 at 9:07 AM, Lideln wrote:
>
> Hi !
>
> I have an issue... What is weird, is that my colleagues don't have
> it ! (and I did not have it this morning)
> It happens only on IE6... Everything is fine under Firefox (3), Safari
> (4 beta) and Opera (9.64).
>
> When logging in into my application, IE tells me "document.body is
> null or is not an object".
> I have the IE6 debugger installed, and it points me toward : (I used
> the "normal" jquery version to show the plain text code)
>
> [code]
> // Figure out if the W3C box model works as expected
> // document.body must exist before we can do this
> jQuery(function(){
>        var div = document.createElement("div");
>        div.style.width = div.style.paddingLeft = "1px";
>
>        document.body.appendChild( div ); <--- error happens here
>        jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
>        document.body.removeChild( div ).style.display = 'none';
> });
> [/code]
>
> How can this be possible ?
>
> Thank you for any possible lead that could help me get rid of this
> error...
>
> Kind regards,
>
>


[jQuery] Re: jquery.ui.cascade null/not an object/undefined, etc etc.

2009-06-05 Thread Aaron Gundel

Is it possible to include some more code with this?  It's difficult to
tell what's going on when we can't see the source.

Thanks.

On Fri, Jun 5, 2009 at 2:11 PM, lysholm wrote:
>
> So I'm sure I'm just missing something simple, but I'm having a
> problem with the cascade plug in.  When debugging in visual studio, it
> stops on the "if($.ui.cascade.ext) {" line (line 35), and says it is
> null or not an object.  When debugging in firebug, it says
> "$.ui.cascade is undefined".  Can someone help me?  This is killing
> me... thanks!
>


[jQuery] Re: Complicated setup help.

2009-06-05 Thread Aaron Gundel

Hi Dave,

It appears that your method signature for attr function is incorrect.
See http://docs.jquery.com/Attributes for details (Looks like you're
passing in an anonymous function as the third parameter of the attr
function...this won't work.  You'd need to pass it in as the second
value -- this function serves to return a value to which the attribute
can be set.  So you'd omit 'true' in your case and replace with the
function that would return true or false -- that's why that function
is there.)  I suspect this is why your javascript execution stops
early

http://www.w3.org/TR/REC-html40/struct/links.html#edef-A Also note
that disabled is not a valid attribute for the anchor tag.  If you
want to disable a link, you might try creating another tag (a
paragraph tag perhaps) that contained your link text and swap them
out.  This would have the effect that it seems you're looking for.

Perhaps someone else will have something else to add.

Aaron

On Thu, Jun 4, 2009 at 4:50 PM, Dave Maharaj ::
WidePixels.com wrote:
> OK forget previous post
>
> How can I disable all links with $('a[class^="edit_"]') after one is
> clicked?
>
> what I did was fade the other buttons out when 1 is clicked. But how can I
> disable the buttons temporarily?
>
> I added$('a[class^="edit_"]').attr("disabled",true , function() {  to my
> script but thats stops the action and nothing happens after that line is
> run.
>
> $('a[class^="edit_"]').click(function(){
>  var url_id = $(this).attr('href');
>  var x = $(this).attr('id').split('_');
>  var y = x[0];
>  var z = x[1];
>
>    $('a[class^="edit_"]').fadeTo('slow' , 0.25 , function() {
> $('a[class^="edit_"]').attr("disabled",true , function() {
> $('#resume_'+z).slideUp( 500 , function(){
>  $('#loading_'+z).show('fast', function() {
>   $('#resume_'+z).load( url_id , function(){
>    $('#loading_'+z).hide(function(){
> $('#resume_'+z).slideDown( 500 , function() {
>  $('#resume_'+z).fadeTo('fast', 1, function() {
>   $('#resume_'+z).fadeIn('slow');
>   });
>  });
> });
>    return false;
>    });
>   });
>  });
> });
>    });
>    });
>
> 
> From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com]
> Sent: June-04-09 8:50 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Complicated setup help.
>
> I have run into a problem.
>
> I have
> 
>   
>     Heading
>      Sample here
>   
> 
>  Edit
> 
>
> 
>   
>     Heading
>      Sample here
>   
> 
>  Edit
> 
>
> same thing as above for 3 other sections..
>
> Click edit loads an ajax submitted form (jQuery form Plugin from malsup)
> into the   so all the  is replaced
> by the form..submit and the new  data is updated.
>
> But if a user clicks edit for set 1 then edit for set 2,3,4,and 5 all 5 divs
> are updated with forms, the page is now long and ugly and the forms will not
> submit. Easiest way would be to close each set+xx if they click on another
> edit link but how can i tell a set has an open form and how can i return the
> original data?
>
> I was thinking of an accordian style setup where if user clicks on another
> edit any open sets will be closed.
>
> Ideas? Thoughts? Suggestions?
>
> thanks,
>
> Dave


[jQuery] Re: question re: .live() and .empty()

2009-05-30 Thread Brandon Aaron

The .live() method binds event handlers at a higher level than the
node(s) selected. So, in other words the events aren't actually bound
to specific nodes so they won't be removed when you call empty.

If you need to remove a live event, just call .die(). It is like
.unbind() but for .live() events.
http://docs.jquery.com/Events/die#typefn

--
Brandon Aaron

On Fri, May 29, 2009 at 10:06 PM, Jack Killpatrick  wrote:
>
> I'm guessing that once a .live() instantiation occurs it's there for good.
> If that's the case, is there a way to destroy it? (in particular as it
> pertains to a selector).
>
> I'm debating using it in a plugin, but am wary because of what could happen
> with multiple instances of the plugin and maybe no ability to destroy it
> completely.
>
> Thanks,
> Jack
>
> Jack Killpatrick wrote:
>>
>> Hi All,
>>
>> Wondering if someone knows the answer to this:
>>
>> Using jQuery 1.3.2, if some items inside a div have events bound to them
>> via .live() and then .empty() is called on the div will the events that were
>> bound via .live() get removed? The .empty() doc says:
>>
>> http://docs.jquery.com/Manipulation/empty
>>
>> Note that this function starting with 1.2.2 will also remove all event
>> handlers and internally cached data.
>>
>> But something I'm working on makes me think that the .live() events are
>> not removed. I haven't nailed it down yet.
>>
>> Thanks,
>> Jack
>>
>>
>
>
>


[jQuery] Print functionality

2009-05-28 Thread Aaron Johnson

Hello...

I would like to have a "print this page" link that when clicked, opens
up a new window with specific content and print css, in the same way
that gmail does it.

Can anyone point me in the direction of a tutorial or advice?

Thanks for your help...

AMWJ


[jQuery] Re: Reverse a collection of jQuery elements.

2009-05-27 Thread Brandon Aaron

$.fn.reverse = [].reverse;

$('#some_selector').parents('li').reverse();


:)

--
Brandon Aaron

On Wed, May 27, 2009 at 4:51 PM, simshaun  wrote:
>
> I need to reverse the collection jQuery returns when I use
>
>    $("#some_selector").parents("li");
>
> in order to build a path.
>
> Is this doable? It'd be nice if jQuery had a reverse() method.
>


[jQuery] Re: Javascript error on IE

2009-05-19 Thread Aaron Lee
Thanks!
I tracked it down to the use of curvycorner
http://www.curvycorners.net/(which btw causes IE to pop up operation
aborted error when you visit the
site)

I did
$(".class_name").corner()

and comment out that line works.

So the mystery is solved but I wonder if anyone can recommend a good jQuery
plugin for rounded corner which works across browsers?

-Aaron

On Tue, May 19, 2009 at 6:07 AM, ryan.j wrote:

>
> it's going to be one of your selectors -
>
> if you're at a loss where to start maybe just chop out functions until
> it starts working, and then look more closely at what it was doing in
> that function.
>
> On May 19, 7:00 am, Aaron Lee  wrote:
> > Hi,
> >
> > I got the following error when I render the page using
> > jquery-1.3.2.min.js
> >
> > Line: 20
> > Char: 2424
> > Error: Exception thrown and not caught
> > Code: 0
> > URL: ...
> >
> > I then replaced it with jquery-1.3.2.source.js and the exception was
> > thrown at:
> >
> > Sizzle.filter = function(expr, set, inplace, not){
> >  
> > // Improper expression
> > if ( expr == old ) {
> > if ( anyFound == null ) {
> > throw "Syntax error, unrecognized
> > expression: " + expr;
> > } else {
> > break;
> > }
> > }
> > 
> >
> > }
> >
> > Any ideas?
> >
> > -Aaron
>


[jQuery] Javascript error on IE

2009-05-19 Thread Aaron Lee

Hi,

I got the following error when I render the page using
jquery-1.3.2.min.js

Line: 20
Char: 2424
Error: Exception thrown and not caught
Code: 0
URL: ...

I then replaced it with jquery-1.3.2.source.js and the exception was
thrown at:

Sizzle.filter = function(expr, set, inplace, not){
 
// Improper expression
if ( expr == old ) {
if ( anyFound == null ) {
throw "Syntax error, unrecognized
expression: " + expr;
} else {
break;
}
}

}

Any ideas?

-Aaron


[jQuery] Re: scrollTop on jQuery object

2009-05-18 Thread Brandon Aaron

There are two ways to get the DOM element out of the jQuery object.
Assuming $msgs from your code example, you could get the first message
as a DOM element like this:

var msg = $msgs.get(0);
// or
var msg = $msgs[0];
// then get scrollHeight
msg.scrollHeight

--
Brandon Aaron

On Mon, May 18, 2009 at 12:36 PM, Arrviasto  wrote:
>
> Hi!
> I have to use scrollTop and scrollHeight properties, but on jQuery
> object it returns `undefined`. Is there any method to get this
> property from jq object?
>
> It doesn't matter, but my object looks like this:
>
> var $win = $(this) // div on my page
> var $msgs = $win.find('.msgs');
>
>
> $msgs.scrollHeight returns 'undefined'
>
> Thanks,
> Arrviasto (Poland)
>


[jQuery] Re: Events - Live -v- Livequery

2009-05-18 Thread Brandon Aaron

Only Live Query supports calling a function when an element is matched
(or unmatched). If you need this functionality, then you'll need to
stick with Live Query.

--
Brandon Aaron


On Mon, May 18, 2009 at 9:58 AM, Meander365  wrote:
>
> Hi all,
>
> I normally do this with livequery:
>
>                $('.mylink').livequery(function(event) {
>                        $(this).mycustomFunction();
>                });
>
> So any new .mylink's on a page would also be bound with my custom
> function.
>
> How can I do this with the new LIVE event?  or is it even possible?
>
> Thanks in advance!
>
>


[jQuery] Re: Best book to learn jQuery?

2009-05-18 Thread Brandon Aaron

On Mon, May 18, 2009 at 8:35 AM, Karl Swedberg  wrote:
> I've heard Learning jQuery 1.3 is a great read, too. ;-)

HAHAHA... I think you forgot your disclaimer. :p  Karl is a co-author
of Learning jQuery.

Nonetheless, Learning jQuery 1.3 would be a great choice. :)

--
Brandon Aaron


[jQuery] Re: jQuery-way for filtering self + all children

2009-05-04 Thread Brandon Aaron
Yeah, I see what you mean. What about .findAndSelf(selector)? Trying to
stick with existing naming conventions...
Do you have some sample scenarios to go along with this need? Like actual
HTML, etc. Would you mind filing a new enhancement ticket for this?
http://dev.jquery.com/newticket

--
Brandon Aaron

On Mon, May 4, 2009 at 6:57 PM, Pappy  wrote:

>
> While it will be nice to pass in a selector to andSelf, it's a shame
> you'll have to repeat the selector in both the 'find' and 'addSelf'.
> I'd still rather there be only one function necessary.  It's an
> awfully common pattern.  Honestly, I wish 'find' had been this way
> from the start, and there was a descendants function that works like
> 'find' today... it seems much more sane to me.
>
> Hmm... other possible interfaces/names -
> jObject.search(selector)
> jObject.findAll(selector)
> jObject.findInclusive(selector) // my favorite
> jObject.find(selector, "andSelf")
>
> On May 4, 4:47 pm, Brandon Aaron  wrote:
> > FYI... There is an open enhancement ticket that proposes adding an
> optional
> > selector to the .andSelf() method.http://dev.jquery.com/ticket/4446
> > --
> > Brandon Aaron
> >
> > On Mon, May 4, 2009 at 5:11 PM, Pappy  wrote:
> >
> > > Just curious... what's the jQuery-way of saying "Give me all children
> > > that match a filter and include myself if I happen to match as well."?
> >
> > > I've been using -
> >
> > > element.find("*").andSelf().filter([myfilter])
> >
> > > but that seems kludgy.  Is there a better way? If not, I'll just wrap
> > > this as "findInclusive" or "find([filter], true)" or something.
>


[jQuery] Re: jQuery-way for filtering self + all children

2009-05-04 Thread Brandon Aaron
FYI... There is an open enhancement ticket that proposes adding an optional
selector to the .andSelf() method. http://dev.jquery.com/ticket/4446
--
Brandon Aaron

On Mon, May 4, 2009 at 5:11 PM, Pappy  wrote:

>
> Just curious... what's the jQuery-way of saying "Give me all children
> that match a filter and include myself if I happen to match as well."?
>
> I've been using -
>
> element.find("*").andSelf().filter([myfilter])
>
> but that seems kludgy.  Is there a better way? If not, I'll just wrap
> this as "findInclusive" or "find([filter], true)" or something.


[jQuery] Cross-domain request - getJSON

2009-04-23 Thread Aaron Kreider

I've got a ajax request that I'm trying to modify so that it will work
cross domain.  I'm calling this from another domain (localhost to be
precise).

 $.post("http://www.energyjustice.net/map/server-test/webservice/
searchserver-new.php?"+str,
{ giAjax: "1", gsSearchtype: "nationalmap" },

function (data)
{
   //it does stuff with the data
}
);

Now I know that I should be using $.getJSON, but I haven't been able
to get it to work.


I'm guessing I need to do something like:
 $.getJSON("http://www.energyjustice.net/map/server-test/webservice/
searchserver-new.php?"+str+"jsoncallback=?",
{ giAjax: "1", gsSearchtype: "nationalmap" },

function (data)
{
   //it does stuff with the data
}
);

I'm confused about whether I should use "jsoncallback=?" or
"jsoncallback=function_name"?

Also, do I need to add something to my server-side php code (like the
name of the callback function)?  It currently just sends back an array
of JSON data.

Thanks!


[jQuery] Re: Loading before dom = ready - Best Practices.

2009-04-23 Thread Brandon Aaron
On Thu, Apr 23, 2009 at 3:42 PM, Adam  wrote:

>
> On Apr 23, 2:57 pm, Brandon Aaron  wrote:
> > You could use $.getScript to load in the slow loading scripts. Any
> scripts
> > loaded this way will be non-blocking (asynchronous).
> > --
> > Brandon Aaron
>
>
> That could certainly cut down some of the time, but I suspect there's
> same-origin policy limitations here?
>

Nope. http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback

--
Brandon Aaron


[jQuery] Re: Loading before dom = ready - Best Practices.

2009-04-23 Thread Brandon Aaron
You could use $.getScript to load in the slow loading scripts. Any scripts
loaded this way will be non-blocking (asynchronous).
--
Brandon Aaron


On Thu, Apr 23, 2009 at 2:13 PM, hedgomatic  wrote:

>
> While virtually every site in existence trumpets using the jQuery DOM-
> ready shortcut as an absolute must, I've come across situations which
> I feel frustrate the user, particularly when using jQuery to create a
> navigational element.
>
> I often work on sites which are going to have a lot of external
> content (ads, feeds, analytics), and if even one of them is sluggish
> to load, none of my interactive elements are responsive for that time.
>
> There seem to be three options:
>
> 1] liveQuery (disadvantage: overhead)
> 2] popping a loading message over the whole page (disadvantage:
> ridiculous)
> 3] nesting an image inside the portion of the DOM we need, and using
> an onLoad event (disadvantage: poor semantics).
>
>
> Anyone else come across any novel ways around this seemingly under-
> discussed issue?
>
>
>


[jQuery] Re: Questions about $.live, Live Query and performance

2009-04-20 Thread Brandon Aaron
LiveQuery when used for events does not use event delegation. It binds the
event directly to the matched elements. The reason the latest version of
LiveQuery depends on 1.3.x is to take advantage of some internal changes to
jQuery, not because it uses live. The live method in jQuery uses event
delegation.
If you use LiveQuery *a lot* then you will most likely see slow downs. Live
Query tries to be non-invasive about its operations but if it is a large dom
with lots of queries, then it will be slow. You can minimize these affects
by using a context and good selectors.

The reason to use LiveQuery over live is if you need to do something more
than bind an event or if event delegation just doesn't work for the event
you are binding. Otherwise you should use live if you need to bind events to
a large number of dom elements that may or may not be in existence at
runtime. If it is a small number of elements and they exist at runtime then
you should still use bind.

--
Brandon Aaron


On Sun, Apr 19, 2009 at 11:16 AM, Geoffrey wrote:

>
> $.live and Live Query are both wonderful. I am hoping to put them to
> extensive use in my projects.
>
> I have a few questions about $.live and Live Query and their effect on
> performance.
>
> Background: If I recall correctly, the original release of Live Query
> could have some performance problems. I don't remember if things
> bogged down when the DOM had a lot of elements, when you added a large
> number of Live Query events, did a lot of updating or exactly what.
>
> Question 1:
> What were the specific concerns around performance with the 1.0.x
> releases of Live Query?
>
> Now with jquey 1.3, there is $.live. $.live does not do everything
> that Live Query does, but does do some of it.
>
> Question 2:
> Does $.live use a different technique for handling events than Live
> Query?
>
> Question 2a:
> If it is different, are there any performance concerns using $.live
> like there used to be with Live Query?
>
> Live Query 1.1.x requires jquery 1.3. I am guessing that the new
> version uses $.live internally.
>
> Question 3a:
> Is the performance of Live Query better in the 1.1.x version?
>
> Question 3b:
> Are there some selectors that have better performance than others? or
> to say it another way, do all of the selectors perform the same or,
> for example, does
> $('input').livequery('click', function() { });
> perform better than
> $('input').livequery('change', function() { });?
>
> Using $.live or Live Query.
> Question 4:
> Is there any difference in performce between using
> $('input').livequery('click', function() { });
> vs
> $("input").live("click", function(){ });?
>
>
> I am thinking of really diving in to using $.live and/or Live Query. I
> am trying to get a complete understanding of all of the issues that
> may arise.
>
> Thanks
> -Geoff
>
>
>
>


[jQuery] Get a hold of collection inside $.each?

2009-04-03 Thread Aaron

I am wondering if it is possible to get a hold of a jQuery collection
inside the each function without two expressions, like this:

jQuery('p').each( function(i) {
if (i === 0) {
// alert the length of the expression jQuery('p')
}
});


I could of course do this:

var els = jQuery('p');

els.each( function(i) {
if ( i===0) {
alert(els.length);
}
});

But for other reasons, I'd rather do it with one expression.


[jQuery] Re: Flash within a Tab | Always reloads when you revisit the tab

2009-03-17 Thread Aaron Barker

If you are referring to Firefox there is this bug that I submitted
years ago that hasn't been looked at yet
https://bugzilla.mozilla.org/show_bug.cgi?id=262354

On Mar 17, 7:48 am, Sridhar Kuppalli 
wrote:
> Hi All,
>
>    - I have jquery tabs, where I have a flash movie under tab1.
>    - User will play the movie for a while, pause the movie.
>    - Moves from tab1 => tab2 and come back to tab1.
>    - The flash movie will begin from the beginning. why is it so?
>
> Is there any solution for this?
>
> Thanks & Regards
>
> Sridhar K N


[jQuery] Re: What can we use in place of $.browser?

2009-02-25 Thread Aaron Gundel

http://docs.jquery.com/Utilities/jQuery.support

jQuery now uses feature detection.  There are some good links to
explain in the post above.  It is still possible to detect which
browser is being used (plain old js) but jQuery support will probably
be removed at some point in the future.

On Wed, Feb 25, 2009 at 5:23 AM, Liam Potter  wrote:
>
> I thought this as well, $.browser still works, as many plugins use it, but
> I'm interested in what we should be using.
>
> fambi wrote:
>>
>> Having just upgraded to 1.3.2, I've realised that the  $.browser
>> utility has been deprecated.
>>
>> Does this mean it is no longer possible to identify which browser is
>> being used?
>>
>


[jQuery] Re: Minified and Gzip?

2009-02-19 Thread Brandon Aaron
Here is what I've added to my Apache Config to support mod_deflate of my
html, css and js. I just dropped this in at the bottom of my httpd.config.
# Create the output filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
## Don't compress for IE5.0
BrowserMatch "MSIE 5.0" no-gzip
# Don't compress images, flash, PDFs
SetEnvIfNoCase Request_URI.(?:gif|jpe?g|png|swf|pdf)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

Hope that helps...

--
Brandon Aaron

On Tue, Feb 17, 2009 at 7:00 PM, ScottChiefBaker wrote:

>
> How do I setup JQuery to be server Gzipped? Using apache I installed
> mod_deflate and set it up to serve .js files as gzipped, but it
> doesn't seem to be working. Does anyone have any example
> configurations I could steal from?
>
> - Scott
>


Re: FW: [jQuery] Re: Returning Javascript

2009-02-17 Thread Aaron Gundel

eval is only for javascript.  You cannot eval the whole response.  If
you want to put javascript in other files, it is possible to load them
dynamically at runtime.  See the following for more information about
On-Demand Javascript... It's foundational to several other concepts
floating around on the web, so you'll want to get a handle on it.

http://ajaxpatterns.org/On-Demand_Javascript

On Tue, Feb 17, 2009 at 1:35 PM, Sam Fleming  wrote:
>
> Basically, my ajax loads each page. If i want to put javascript in that page
> the javascript does not run. Can i eval the whole response? Html and
> everything? Or do i have to filter out the javascript? Maybe it would be
> easier to make the jquery load another script in a file? If this is
> possible?
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of James
> Sent: 17 February 2009 21:25
> To: jQuery (English)
> Subject: [jQuery] Re: Returning Javascript
>
>
> I'm not understanding what you're trying to do.
> You just want your AJAX to return Javascript code and have it
> executed?
>
> If so, you can use the eval() function, but be careful of the source
> of your Javascript.
>
> On Feb 16, 10:30 pm, "s.flemin...@googlemail.com"
>  wrote:
>> I am trying to write my first application, and am trying to use jquery
>> to help me along my travels.
>>
>> I have setup my application to work so all pages are loaded via ajax,
>> using anchor's as navigation. However on some pages that i return
>> using the AJAX i want to be able to run code.
>>
>> This works on firefox, however it does not work on anything else. So
>> really my question is:
>>
>> How do i run javascript code from an ajax response?
>>
>> 
>> 
>> Title: 
>> 
>> 
>> 
>> 
>> // attach handler to form's submit event
>> alert("Javascript");
>> $('#myform').submit(function() {
>> // submit the form
>> alert("form submitted");
>> // return false to prevent normal browser submit and page
>> navigation
>> return false;
>>
>> });
>>
>> 
>>
>> In the above, i only get an alert saying "Javascript" in firefox. Any
>> other browser and it does not work.
>>
>> Please help!
>
>


[jQuery] Re: Why does $.width return innerWidth but set outerWidth?

2009-02-13 Thread Brandon Aaron
This isn't the normal behavior. Could you create a test case for this?

--
Brandon Aaron

On Fri, Feb 13, 2009 at 5:07 AM, [rob desbois] wrote:

>
> Hi all,
>
> I was just writing a bit of JS to set the width of some buttons to the
> width of the largest.
> While doing this I found that the largest one would shrink!
>
> Doing this in a debugger gives:
> $("#x").width(); // 222
> $("#x").width(222); // makes element shrink
> $("#x").width(); // 216
>
> The number returned from $.width() is equal to the innerWidth() (at
> least it is on my button, which has a border but no padding).
> When you set it though, if you set it to the value returned, it will
> shrink! It won't do this if you pass the return from $.outerWidth().
>
> This seems backwards; I would never expect that passing the return of
> a getter to its corresponding setter to change the return from the
> getter!
>
> Can someone tell me if this is a bug or is by design - and if by
> design, why?
> TIA,
> --rob
>


[jQuery] Re: Using jQuery Validation with Dot Net

2009-02-11 Thread Aaron Gundel

After looking this over, I found that the validator wasn't picking up
your submit button, which isn't really a button.  It's the link you
use to submit.  the validation plugin won't catch this because it
[your link] appears to do a straight up call to form.submit().  I
popped a submit button in there and all your rules started working.
Hope this helps,

Aaron

On Tue, Feb 10, 2009 at 11:14 AM, Jon  wrote:
>
> I've set up a test site here:
> http://test.sunshine-design.co.uk/
>
> I hope you can point me in the right direction, i've not had any
> further luck solving this!
>
> Thanks
>
> On Feb 9, 3:10 pm, Aaron Gundel  wrote:
>> Yes, it would be helpful.  Can't really see what's going on in the
>> snippet you provided.  As Rob mentioned, there's no mention of the
>> form (even though it is there on the page).  It might give some
>> additional clues as to where things have gone wrong.
>>
>> On Mon, Feb 9, 2009 at 3:46 AM, Jon  wrote:
>>
>> > @ RobG: #aspnetForm is the form that wraps the whole of adotnet
>> > page. I simply posted the html snippet from the form itself.
>> > Individual forms do not have their own  tags, there is one large
>> > one that encloses the whole page - part of thedotnetinfrastructure.
>>
>> > @ Aaron Grundel: No, but i will put one up tonight if it will help.
>> > I'm eager to use this validation plugin!
>>
>> > On Feb 9, 2:14 am, RobG  wrote:
>> >> On Feb 9, 8:30 am, Jon  wrote:
>>
>> >> > I'm having issues getting the validation plugin (http://bassistance.de/
>> >> > jquery-plugins/jquery-plugin-validation/) to work withdotnet.
>> >> > Whatever i try i can't stop the form from submitting. I've tried
>> >> > several things i've found on this group and the web. Can anyone help
>> >> > me getting this to work?
>>
>> >> > Here's my html.
>>
>> >> > 
>> >> > Submitted
>> >> > 
>> >> > Name 
>> >> > 
>> >> > > >> > style="display: none;"/>
>> >> > 
>> >> > > >> > class="TextBox Name" type="text" name="ctl00$Control_LeftColumn
>> >> > $CF_Contact$ctl01$TB_TextBox"/>
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > > >> > href="javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact
>> >> > $LB_Submit','')" style="background-color: rgb(51, 51, 51);">Submit
>> >> > 
>>
>> >> Invalid markup, there is no form.
>>
>> >> > And here is my javascript:
>>
>> >> > $(document).ready(function(){
>> >> > $("#aspnetForm").validate({
>>
>> >> Where is #aspnetForm?
>>
>> >> --
>> >> Rob


[jQuery] Re: [tooltip]

2009-02-09 Thread Aaron Gundel

Hey there,

in your tooltip div, add the style... white-space: nowrap;

This will cause your text to appear on the same line.

Hope this helps,

Aaron

On Mon, Feb 9, 2009 at 6:00 PM, sccr410  wrote:
>
> Having issues with the tooltip plugin - 
> http://bassistance.de/jquery-plugins/jquery-plugin-tooltip
>
> You can see a page here - 
> http://www.erikaashauerphoto.com/photos/scenic-travel/
>
> The page scrolls horizontally for style reasons. As you use the
> tooltip on images after scrolling horizontally, it always stacks
> vertically and looks really ugly - one word per line. Is there any way
> to force this to display on a single line?


[jQuery] Re: test for css selector capability?

2009-02-09 Thread Aaron Gundel

jQuery.browser is deprecated in 1.3 + (don't use it).

JQuery now uses feature detection.  This is a more extensible way of
detecting which browser is being utilized.

See the following page for more details...
http://docs.jquery.com/Utilities/jQuery.support

On Mon, Feb 9, 2009 at 4:02 AM, Mohd.Tareq  wrote:
>
> Hi Geuis,
>
> Ther is a function with alias ($.browser) it will gives u functionality to
> identify browser name
> like this $.browser.mozilla , $.browser.msie , $.browser.opera ,
> $.browser.safari.
> & if u wana return the version of browser , then u have use below function
> $.browser.version it will return version of current browser according to ur
> problem ie6 u can add css on the fly.
>
> hope this will work .
>
> cheers & cioa
>
>
> On Mon, Feb 9, 2009 at 11:47 AM, Geuis  wrote:
>>
>> I'm working on a project where I need to detect if the browser
>> natively supports a given CSS selector.
>>
>> For example, if I am using the selector 'ul li:first-child', this is
>> supported by IE7, FF, and Safari but not by IE6 and below. Is there a
>> way that I can test that selector to see if the current browser
>> supports it? A feature that returns a simple boolean status would be
>> awesome.
>
>
> --
> ---| Regard |---
>
> Mohd.Tareque
>


[jQuery] Re: Using jQuery Validation with Dot Net

2009-02-09 Thread Aaron Gundel

Yes, it would be helpful.  Can't really see what's going on in the
snippet you provided.  As Rob mentioned, there's no mention of the
form (even though it is there on the page).  It might give some
additional clues as to where things have gone wrong.

On Mon, Feb 9, 2009 at 3:46 AM, Jon  wrote:
>
> @ RobG: #aspnetForm is the form that wraps the whole of a dot net
> page. I simply posted the html snippet from the form itself.
> Individual forms do not have their own  tags, there is one large
> one that encloses the whole page - part of the dot net infrastructure.
>
> @ Aaron Grundel: No, but i will put one up tonight if it will help.
> I'm eager to use this validation plugin!
>
> On Feb 9, 2:14 am, RobG  wrote:
>> On Feb 9, 8:30 am, Jon  wrote:
>>
>>
>>
>> > I'm having issues getting the validation plugin (http://bassistance.de/
>> > jquery-plugins/jquery-plugin-validation/) to work with dot net.
>> > Whatever i try i can't stop the form from submitting. I've tried
>> > several things i've found on this group and the web. Can anyone help
>> > me getting this to work?
>>
>> > Here's my html.
>>
>> > 
>> > Submitted
>> > 
>> > Name 
>> > 
>> > > > style="display: none;"/>
>> > 
>> > > > class="TextBox Name" type="text" name="ctl00$Control_LeftColumn
>> > $CF_Contact$ctl01$TB_TextBox"/>
>> > 
>> > 
>> > 
>> > 
>> > 
>> > > > href="javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact
>> > $LB_Submit','')" style="background-color: rgb(51, 51, 51);">Submit
>> > 
>>
>> Invalid markup, there is no form.
>>
>> > And here is my javascript:
>>
>> > $(document).ready(function(){
>> > $("#aspnetForm").validate({
>>
>> Where is #aspnetForm?
>>
>> --
>> Rob


[jQuery] Re: Using jQuery Validation with Dot Net

2009-02-08 Thread Aaron Gundel

Do you have an internet facing page set up to view this?

On Sun, Feb 8, 2009 at 2:30 PM, Jon  wrote:
>
> I'm having issues getting the validation plugin (http://bassistance.de/
> jquery-plugins/jquery-plugin-validation/) to work with dot net.
> Whatever i try i can't stop the form from submitting. I've tried
> several things i've found on this group and the web. Can anyone help
> me getting this to work?
>
> Here's my html.
>
> 
> Submitted
> 
> Name 
> 
>  style="display: none;"/>
> 
>  class="TextBox Name" type="text" name="ctl00$Control_LeftColumn
> $CF_Contact$ctl01$TB_TextBox"/>
> 
> 
> 
> 
> 
>  href="javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact
> $LB_Submit','')" style="background-color: rgb(51, 51, 51);">Submit
> 
>
>
> And here is my javascript:
>
> $(document).ready(function(){
>$("#aspnetForm").validate({
>rules: {
>ctl00$Control_LeftColumn$CF_Contact$ctl01$TB_TextBox:
> "required",
>ctl00$Control_LeftColumn$CF_Contact$ctl02$TB_TextBox: {
>required: true,
>email: true
>},
>ctl00$Control_LeftColumn$CF_Contact$ctl04$TB_TextBox:
> "required"
>}
>});
> });
>
>
>
> As i say above, the form just submits regardless so i'm lost on a
> solution!
>


[jQuery] Re: hide()

2009-02-08 Thread Aaron Gundel

http://www.w3.org/TR/html4/struct/global.html#adef-id

HTML standards state that the id attribute should be unique in an html
document.  Use "class" or somesuch.  Then you can do something
like $(".trContactInfo").hide() and it will hide everything.

A. Gundel

On Sun, Feb 8, 2009 at 1:30 PM, WebAppDeveloper  wrote:
>
>
> Hi,
>
> If I have an html table with 3 rows each with the same id, for example,
> id="trContactInfo", as in the html code below. Using jQuery, if I want to
> hide these 3 rows with the same id, i would do something like
> $("tr#trContactInfo").hide().next().hide().next().hide. My question is:
> Instead of running hide() 3 times, is there a way to hide all the rows with
> the same id by looping thru all the rows, basically these 3 rows plus any
> new rows that may be added to the table with the same id in the future?
>
> 
>   
>  Full Name:
>  
>   
>   
>  E-mail:
>  
>   
>   
>  Phone:
>  
>   
>   
>  Field 4:
>  
>   
>   
>  Field 5:
>  
>   
>   
>  Field 6:
>  
>   
> 
>
> Thanks very much in advance.
>
> --
> View this message in context: 
> http://www.nabble.com/hide%28%29-tp21886844s27240p21886844.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: simple checkbox and display text problem

2009-02-07 Thread Aaron Gundel

Bob,

Not sure exactly what you're trying to do here.  You might wish to
elaborate more.  However, I can already tell you that you're going to
have issues with putting out multiple spans with the same id.  You
should use a class or some other attribute to store the identification
information.

Aaron

On Fri, Feb 6, 2009 at 5:50 PM, coworkerbob  wrote:
>
> Hi all, having trouble getting each checkbox selected to display a
> text element.
>
> This works below, but of course i want it for all checkboxes and not
> just one
>
>  $(document).ready(function()
>{
>var total = 0;
>var a = 0;
>
> //morning is the name of one the checkboxes
>
> $("inp...@name=morning]").click(function(){
> if ($(this).is(":checked")) //if check assign value and append to
> span, else uncheck remove
> {
>
> $('#newsletters').append('');//
> create span
>  var a = 500;
>  total = a;
> $('#newsletter_types').append(total + '.00');
> }
> else
> $("#newsletter_types").remove();
>
>   });
> });
>
> This isn't working for me.
>
>  $(document).ready(function()
>  {
>var total = 0;
>
> $("inp...@type=checkbox]:checked").each(function(){ // read that
> each is like for loop
>
>  count = $("inp...@type='checkbox']:checked").length;  //get
> how many checked
>
>   total = count * 500;
>
>   $('#newsletters').append(' span>'); //create span
>   $('#newsletter_types').append(total + '.00');
>
>}):
>
> });
>
> Any hints is greatly appreciated. Thanks!
>


[jQuery] Re: Superfish Help

2009-02-05 Thread Aaron Gundel

if you're logged in?

On Thu, Feb 5, 2009 at 5:32 PM, Josh  wrote:
>
> Hello,
>
> I have installed the Superfish module and can get it to display on my
> site, but I can't seem to get the drop-down to look good.  In fact it
> looks pretty awful.  Any help would be great.  You can see it at
> eslbasics.com
>


[jQuery] Re: setting focus to the first empty field

2009-02-04 Thread Aaron Gundel

Something like this, perhaps?

$(input :not([value])).focus()

On Wed, Feb 4, 2009 at 11:57 AM, Massiverse  wrote:
>
> Hello
>
> I'm a newbie, here's what I need to do (searched the forums first but
> couldn't find the answer).
>
> 1. Search form for an empty input field.
> 2. If an empty field exists, set the focus on the field.
> 3. If no empty fields exist, do nothing.
>
> Thanks,
>
> August
>


[jQuery] Re: Select empty textbox fields

2009-02-04 Thread Aaron Gundel

You may wish to file a bug report on this.  The selector engine did
change in 1.3

On Wed, Feb 4, 2009 at 11:04 AM, brnwdrng  wrote:
>
> It's something in jQuery 1.3 ... the code works in Chrome and Safari
> when I use jQuery 1.2.x.
>
> On Feb 4, 10:59 am, brnwdrng  wrote:
>> Interesting postnote:
>>
>> The solutions given seem to work for the latest versions of Firefox,
>> IE, and Opera; but fail in Chrome and Safari.  They don't seem to be
>> able to distinguish the empty text boxes from populated ones.
>>
>> On Feb 4, 8:53 am, brnwdrng  wrote:
>>
>> > I got the second suggestion to work (Aaron's); though there was a
>> > minor typo that had to be fixed - the ending double quote
>> > before ).toggleClass
>>
>> > I fixed my secondary problem by removing the class from all the fields
>> > prior to applying the shade effect on each user submit.  So, it ends
>> > up looking like this, for future viewers:
>>
>> > $("#<%= this.pnlInputFields.ClientID %> input").removeClass
>> > ('inputFields_empty');
>> > $("#<%= this.pnlInputFields.ClientID %> input[class='inputFields']:not
>> > ([value])").toggleClass('inputFields_empty');
>>
>> > or, my lamer iteration version now works with the remove statement
>> > preceding it:
>>
>> > $("#<%= this.pnlInputFields.ClientID %> input").removeClass
>> > ('inputFields_empty');
>> > $("#<%= this.pnlInputFields.ClientID %> input
>> > [class='inputFields']").each(function(i) { $(this).toggleClass
>> > ('inputFields_empty', $.trim($(this).val()).length < 1); });
>>
>> > Thanks for the help!
>>
>> > On Feb 4, 7:22 am, Aaron Gundel  wrote:
>>
>> > >  $("#<%= this.pnlInputFields.ClientID %>
>> > > input[class='inputFields']:not([value])).toggleClass('inputFields_empty');
>> > > should do the trick.
>>
>> > > On Tue, Feb 3, 2009 at 2:57 PM, brnwdrng  wrote:
>>
>> > > > I have a set of text box inputs in a div, and want to color the empty
>> > > > ones red (css) when a user attempts to submit incomplete fields. I've
>> > > > tried this with and without an explicit iterator, as shown in the two
>> > > > examples below.
>>
>> > > > (a)
>> > > > $("#<%= this.pnlInputFields.ClientID %> input[class='inputFields']
>> > > > [value='']").toggleClass('inputFields_empty');
>>
>> > > > (b)
>> > > > $("#<%= this.pnlInputFields.ClientID %> input
>> > > > [class='inputFields']").each(function(i) { $(this).toggleClass
>> > > > ('inputFields_empty', $.trim($(this).val()).length < 1); });
>>
>> > > > The first one fails with an error message indicating that [value='']
>> > > > is an unrecognized expression (Firebug), though [value='helloworld']
>> > > > works, correctly toggling the inputFields_empty class on (but not off)
>> > > > wherever it finds "helloworld" in a text box.  I've tried countless
>> > > > variations on this, and can't seem to get it right for an empty field
>> > > > (tried :empty too).
>>
>> > > > The second one (b) works, at least initially, highlighting the empty
>> > > > text boxes. Not as elegant as something like (a) might be, but I'll
>> > > > use it if (a) is infeasible.  Note that it only works the first time
>> > > > my button is pushed; subsequent changes in the textbox fields (like
>> > > > the user erasing them) fail to remove the inputField_empty class (not
>> > > > posting back, just have a onclick call that runs this validator
>> > > > method).
>>
>> > > > Any suggestions?


[jQuery] Re: Select empty textbox fields

2009-02-04 Thread Aaron Gundel

 $("#<%= this.pnlInputFields.ClientID %>
input[class='inputFields']:not([value])).toggleClass('inputFields_empty');
should do the trick.

On Tue, Feb 3, 2009 at 2:57 PM, brnwdrng  wrote:
>
> I have a set of text box inputs in a div, and want to color the empty
> ones red (css) when a user attempts to submit incomplete fields. I've
> tried this with and without an explicit iterator, as shown in the two
> examples below.
>
> (a)
> $("#<%= this.pnlInputFields.ClientID %> input[class='inputFields']
> [value='']").toggleClass('inputFields_empty');
>
> (b)
> $("#<%= this.pnlInputFields.ClientID %> input
> [class='inputFields']").each(function(i) { $(this).toggleClass
> ('inputFields_empty', $.trim($(this).val()).length < 1); });
>
> The first one fails with an error message indicating that [value='']
> is an unrecognized expression (Firebug), though [value='helloworld']
> works, correctly toggling the inputFields_empty class on (but not off)
> wherever it finds "helloworld" in a text box.  I've tried countless
> variations on this, and can't seem to get it right for an empty field
> (tried :empty too).
>
> The second one (b) works, at least initially, highlighting the empty
> text boxes. Not as elegant as something like (a) might be, but I'll
> use it if (a) is infeasible.  Note that it only works the first time
> my button is pushed; subsequent changes in the textbox fields (like
> the user erasing them) fail to remove the inputField_empty class (not
> posting back, just have a onclick call that runs this validator
> method).
>
> Any suggestions?
>
>
>
>
>


[jQuery] Re: Select empty textbox fields‏

2009-02-03 Thread Aaron Gundel

Hey Brian,

Try this for a...

$("#<%= this.pnlInputFields.ClientID %>
input[class='inputFields']:not([value])").toggleClass('inputFields_empty');

A. Gundel


[jQuery] Re: Can't select an id containing '/' ? ‏

2009-02-02 Thread aaron . gundel
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F

This is what you're looking for...

$('#\\/about\\/')


[jQuery] Re: live Problem

2009-01-29 Thread Brandon Aaron
Stick with Live Query but grab the latest version of Live Query from GitHub:
http://github.com/brandonaaron/livequery/tree/master

--
Brandon Aaron

On Thu, Jan 29, 2009 at 7:59 PM, Pedram  wrote:

>
> Dear FOlk ,
> I'm going to upgrade my liveQuery code , I figured out that LIVE in
> jQuery 1.3.1 doesn't Support Focus and Blur and also it doesn't
> support the no-event Style callback that liveQuery provides...
> what is the solution.
>


[jQuery] API Browser for your iPhone and iPod Touch

2009-01-28 Thread Brandon Aaron
I wrote an API Browser as a "Web App" for the iPhone and iPod touch. It
downloads the docs to a local sqlite database for quick browsing of the API.
It is basically a proof of concept right now (the code is ugly and a little
buggy). However, if enough people like it I'll go ahead and take the time
the polish it up and fix the quirks/bugs. Let me know what you think, how it
performs, etc. BTW... If you add it to your home screen it will launch
without the Safari chrome.

Beware the first time you visit this site it will download the docs in XML
format (368KB) and then store them in the database. So be patient, the setup
screen will let you know what is going on and there will be a big "Continue"
button that shows up once everything is done.

http://brandonaaron.net/iphone/index.html

One bug I know is fairly annoying is that if you click the back button to a
long page it won't scroll. Just click back one more time and then go to that
page again and it will magically scroll again. I tweaked the iUI framework
to use CSS transforms for the slide animation and it seems to be causing the
issue.

--
Brandon Aaron


[jQuery] Re: [autocomplete] Problem with .result

2009-01-26 Thread Aaron Jensen

Yeah, we've run into this same trouble as well. It would be nice if
there was a hook to handle this built into Autocomplete.


On Mon, Jan 26, 2009 at 3:18 AM, Styx  wrote:
>
> It dosen't work.
> For example: I use tab key to navigate. If focus is set to input, id
> will be empty. If I don't want change my input, id also shouldn't be
> change.
> IAnother example: If my result work and set id properly, if I keypress
> shift or ctrl, id field will be cleared.
>
> On 24 Sty, 00:20, Jörn Zaefferer 
> wrote:
>> You could add another keyup-event-handler to the input field, and
>> clear the id field. As long as that runs before the result-handler is
>> setting the data, it should give you the result you need.
>>
>> Jörn
>>
>> On Fri, Jan 23, 2009 at 5:09 PM, Styx  wrote:
>>
>> > Hi.
>>
>> > I have two fileds. For exmple:
>>
>> > $("#name").autocomplete('seatch.php');
>> > $("#id").result(function(event, data, formatted) {
>> >  if (data) {
>> >$("#id").val(data[1]);
>> >  }
>>
>> > If i select sometfing in autocomplete field, my id field will have id
>> > of this item. After submit I have two fields - one wieth name, and one
>> > with id. I can for example update dabase use id.
>>
>> > But if I write in autocomplete somethig, which isn't in result, my
>> > function isn't triggered. If i edit existing data, after submit I have
>> > field "id" with some value, and filed "name" with new value. I don't
>> > know, that I shoul add my "name" to database, or do something else.
>>
>> > What I should do to clear field "id" when "name" is write by me and
>> > dosen't exist in result of 'search.php'?
>>
>> > regards,
>> > pch


[jQuery] Re: I love jQuery fan logos

2009-01-23 Thread Brandon Aaron
Cool! BTW... You can find the official jQuery and jQuery UI logos here:
http://docs.jquery.com/Design_and_Identity  :)
--
Brandon Aaron

On Fri, Jan 23, 2009 at 7:35 AM, chrispie  wrote:

>
> hey, i love jQuery so i made some "i love jQuery" logos for blogs or
> what ever.
> be proud and be a fan ;)
>
> http://www.chrispie.de/apple/i-love-jquery-300/
>


[jQuery] Re: When to use LiveQuery plugin

2009-01-21 Thread Brandon Aaron
What is the issue you are having? Which version of Live Query are you using?
Try using the very latest/edge version of Live Query that you can download
from github. http://github.com/brandonaaron/livequery/tree/master
--
Brandon Aaron


On Wed, Jan 21, 2009 at 12:15 PM, Rics  wrote:

>
> Karl,
>
> There is a bug somewhere between JQuery 1.3 and LiveQuery Plugin.
> I just can't put LiveQuery Plugin to work with JQuery 1.3. It's odd.
>
> I will use previous JQuery version until they implement all the
> events. Untill there I need to use LiveQuery...
>
> =(((
>
> On 19 jan, 14:43, Karl Swedberg  wrote:
> > If you need to bind events that .live() currently doesn't handle, such
> > as mouseenter, mouseleave, focus, blur, and change, you should keep
> > Live Query around. In subsequent versions, .live() is supposed to
> > handle these, but for now it doesn't.
>


[jQuery] Re: jquery ui tabs 3 problem

2009-01-21 Thread aaron

Come on, seriously, don't you think I tried that beforehand.



[jQuery] jquery ui tabs 3 problem

2009-01-21 Thread aaron

I am using jQuery UI Tabs 3 from http://stilbuero.de/jquery/tabs_3/.
The problem I have is the delay before the JS loads.  You can see all
the tabs for a couple of seconds, then they line up.  Is there some
way to set display:none or some equivalent to hide these even before
the scripts load?


[jQuery] Re: When to use LiveQuery plugin

2009-01-19 Thread Brandon Aaron
It really depends on how you are using LiveQuery. If you are using it only
to bind events to new elements then you should switch over to live. That is
unless one of the events you are binding is one of the event types that does
not bubble. Check the documentation for the events that are currently not
supported by live. http://docs.jquery.com/Events/live#typefn

If you are using the function based livequeries then you should stick with
LiveQuery and upgrade to the git version.
http://github.com/brandonaaron/livequery/tree/master

--
Brandon Aaron


On Mon, Jan 19, 2009 at 10:23 AM, Terry  wrote:

>
> Is it known when one might wish to continue to use the LiveQuery
> plugin itself with version 1.3+ of the jQuery library? That is, if I
> upgrade, is there any reason to keep the LQ plugin around?
>
> On Jan 14, 3:16 pm, MorningZ  wrote:
> > first off all...  the purpose (and advantage of)LiveQueryis that
> > when new matching items are added, they will automatically be wired
> > up...
> >
> > secondly, one thing to look at is the just-released-today version of
> > jQuery (1.3), it now has a ".live" handler that will effectively do
> > what the plugin does
> >
> > http://docs.jquery.com/Events/live#typefn
> >
> > On Jan 14, 3:07 pm, ocptime  wrote:
> >
> > > Hi all,
> >
> > > I had seen a new plugin called "LiveQuery" and i have some questions
> > > that are not yet completely answered when i read its documentation.
> >
> > > I am using jquery.form.plugin, My questions is when to uselivequery
> > > and what is it's advantages.
> > > is it possible to uselivequeryin conjention with the form plugin.
> >
> > > can u pls cite me a small sample code or some pointers on the web
> > > where both are used.
> >
> > > Thanks in advance
> > > ocptime
>


[jQuery] Re: $(' Expert jQuery & JS synatx ' ).show

2009-01-18 Thread Brandon Aaron
It works by referencing the method with bracket or array notation. You can
reference properties and methods of an object this way. For example:
var obj = { test1: 'test_one', test2: 'test_two' };
alert( obj['test1'] ) // alerts test_one
alert( obj.test1 ) // also alerts test_one


The other code doesn't work because your aren't looking for a property on an
object. To make it work you evaluate the expression and then call the method
like this.

(expr ? 'a' : 'a')();

However, since your function 'a' is global it is a method of the window. You
could use bracket notation to reference the method like this.

window[ (expr ? 'a' : 'a') ]()

--
Brandon Aaron

On Sun, Jan 18, 2009 at 9:48 PM, Ami  wrote:

>
> Thank you.
> It's working :)
>
> Can you put a function name in an array ?!
>
> May you explain me WHY it's working?
>$('div')[ (true? 'next' : 'before') ]().hide()
>
> I tried also this:
>function a() {alert('Function a')}
>[expr ? 'a' : 'a']()
> but it's didn't work. why?
>
> On Jan 19, 5:15 am, Brandon Aaron  wrote:
> > I believe you are looking for the following syntax:
> > $(selector)[ (expr ? 'next' : 'before') ]().show();
> >
> > --
> > Brandon Aaron
> >
> > On Sun, Jan 18, 2009 at 9:12 PM, Ami  wrote:
> >
> > > Sorry about my grammar, English isn't my lang.
> >
> > > I am trying to write code like that:
> > >var expr=true,selector='div';
> > >$(selector) (expr ? .next() : .before() ). show();
> >
> > > But it's not JS syntax. So how can I do it?
> >
> > > I know,that I can do it like that:
> > >if (expr) $(selector)..before(),show() else
> > > $(selector).next().show()
> >
> > > But I am trying to find a solution, that return a jQuery object.
> >
> > > Thank you.
>


[jQuery] Re: $(' Expert jQuery & JS synatx ' ).show

2009-01-18 Thread Brandon Aaron
I believe you are looking for the following syntax:
$(selector)[ (expr ? 'next' : 'before') ]().show();

--
Brandon Aaron

On Sun, Jan 18, 2009 at 9:12 PM, Ami  wrote:

>
> Sorry about my grammar, English isn't my lang.
>
> I am trying to write code like that:
>var expr=true,selector='div';
>$(selector) (expr ? .next() : .before() ). show();
>
> But it's not JS syntax. So how can I do it?
>
> I know,that I can do it like that:
>if (expr) $(selector)..before(),show() else
> $(selector).next().show()
>
>
> But I am trying to find a solution, that return a jQuery object.
>
> Thank you.
>
>


[jQuery] Re: Weirdest thing on Firefox 3 on MacOSX

2009-01-16 Thread Aaron Barker

If you are still in need of the error messages send me the link.  I
can't give you tons of times, but can give you screenshots of the
errors or something.

Aaron

On Jan 14, 10:23 pm, yellow1912  wrote:
> I still desperately need help for this, since I dont have Mac to test
> and debug it. If you can help please let me know, I will pay for your
> time or donate the amount to jquery, whichever method you wants.
>
> Thanks so much for your help
>
> Regards
>
> Raine
>
> On Jan 13, 6:01 pm, yellow1912  wrote:
>
> > I encounter a rather weird problem where my plugin would run on all
> > platforms except Firefox 3 on MacOSX, and since I don't have Mac I can
> > not debug it.
> > (this plugin uses jquery 1.2.6 and jq form, jq validation and
> > livequery plugins.)
>
> > This is still under development I can not post the link directly here,
> > but if you can email me at yellow1...@gmail.com I will send you a link
> > along with the steps to reproduce the problem right away
>
> > I desperately need help here, I suspect this is somewhat a small
> > glide, if you have firebug and can catch the error message on it then
> > it would be easy to work it out. If you can just check the problem and
> > send me the bugs reported that would help greatly as well.
>
> > I understand that this will cost your time and effort, and I'm willing
> > to pay for your help.
>
> > Thank you all! Love Jquery (\/)
>
> > Regards
>
> > Raine


[jQuery] How to use if statements with jquery???

2009-01-09 Thread Aaron

HI, I  am working on a website. A social networking site.

I am making the account page.  I  need to fade in a menu when the user
mouse is on the users image.

Now I want to  check if the  users mouse is either on the user image
or on the menu to not fade out else if the user mouse is not on either
user image or the menu then the menu should fade out.

how can I do this??? should I just use a if statement?

any help??


[jQuery] Re: jQuery 1.3 + live/livequery + draggable problem

2009-01-07 Thread Brandon Aaron
I'm currently using the SVN Trunk version of jQuery and jQuery UI and the
sortables, which use drag and drop, are working for me. If you are willing
to live on the edge, which I'm guessing you are since you are trying to use
preview releases, you might want to try trunk to see if that fixes your
issue.
--
Brandon Aaron

On Wed, Jan 7, 2009 at 9:28 PM, Richard D. Worth  wrote:

> I'm not sure you'll have success (yet) combining a (preview) released
> version of jQuery UI 1.6 with a (preview) released version of jQuery 1.3.
> Here's a summary
>
> jQuery UI 1.5.3 will only work with jQuery 1.2.6 (not 1.3)
> jQuery UI 1.6 final will only work with jQuery 1.3 final (not 1.2.6)
>
> The problem is jQuery UI 1.6rc4 works only with 1.2.6. So we're in kind of
> an in-between state. From now until that release is final, we're working on
> switching over and testing against 1.3pre. That work is in jQuery UI trunk,
> but not 1.6rc4. The plan is to release 1.6rc5 the day after 1.3 final is
> released. It will be tested against and ship with 1.3. We'll have one week
> of testing, then finalize jQuery UI 1.6.
>
> If you're interested, you're more than welcome to help us test the interim
> scenario I've described above. It would mean checking out the jQuey UI
> trunk. But should be simple otherwise as that contains the version of jQuery
> 1.3pre we're testing against (r6065, a little later than 1.3b2 - r6056).
>
> - Richard
>
>
> On Wed, Jan 7, 2009 at 5:29 PM, Joshua Uziel  wrote:
>
>> Through the wonders of jQuery 1.2.6, jQuery UI 1.6rc2/4 and LiveQuery, I
>> am able to make divs that are generated after the page load be draggable via
>> something like so:
>>
>> $(".results_container").livequery(function() {
>> $(this).draggable({
>> helper: 'clone',
>> cursor: 'move',
>> revert: 'invalid',
>> start: function(ev, ui) {
>> var title = $.trim(
>> $(this).children("div.results_title").text() );
>>
>> $(ui.helper).addClass("my_dragged").html(draggedObj)
>> .data("title", title);
>> }
>> });
>> });
>>
>> Now I'm trying to convert to jQuery 1.3b2 and haven't yet had any luck.
>> My first step was to simply replace 1.2.6 with 1.3b2 and continue using
>> LiveQuery.  It feels like the events get registered, but when I drag, it
>> seems as though the start function isn't being called (which is confirmed by
>> setting Firebug breakpoints within the function that aren't triggered).
>>
>> I'd of course prefer to use the new $.live functionality, but can't figure
>> out how.  There are other events in my code that I register as:
>>
>>   $(".foo").livequery("click", function() { ...
>>
>> that I can convert to
>>
>>   $(".foo").live("click", function() { ...
>>
>> and they work both ways with 1.2.6 and 1.3b2.  It's just that
>>
>>   $(".foo").livequery(function() { $(this).draggable({ ...
>>
>> that I can't seem to get working either way (LiveQuery or $.live).
>> Besides the helper not being generated, the drop event isn't caught either,
>> so the whole drag & drop is broken.
>>
>> Anyone have any ideas?  Thanks!
>>
>
>


[jQuery] [autocomplete] Show all options regardless

2009-01-07 Thread Aaron Jensen

I'm trying to find an autocomplete/potentially combobox plugin that
does everything we're looking for so I don't have to roll our own. So
far the Jörn's is working the best but I can't seem to make it do
exactly what I want. Here's the behavior I desire, perhaps there are
some options I'm missing or another plugin that would be better
suited.

* When the input box has the focus, I want it to display the choices
* I want all choices to be displayed regardless of what is typed in
the box.
* It should highlight (and maybe autocomplete) the best match while
typing
* I should be able to name the input (some plugins use hidden inputs
w/ their own naming)

I think that's about it. I can't seem to get Jörn's plugin to do the
first two, it always pares choices and I have to click or tab to it
twice in order to show the dropdown.

Any advice welcome.

Thanks,

Aaron


[jQuery] Re: Hover and fade in and out jquery code....

2009-01-01 Thread Aaron

I still have the problem and been messing with the code to try and get
a fix to it.

I wonder if I can use a if statement  on events  something like   if
mouse is over image  then appear a menu else if  mouse is over menu
keep menu showing else if mouse is not over the image or menu then
fade out else menu hide.

I want something like this. DO you think it's possible to use jquery
functions in this way??

On Dec 29 2008, 12:43 pm, Aaron  wrote:
> HI, I am making a website kinda like a social networkng site.
>
> I am trying to make  a hover effect when the mouse is over the users
> image I want to pop up a image menu like upload image and edit image
> etc.
>
> I so far do have the codes working. The problem I face is... when the
> user puts the mouse over his image a menu pops up not into a new
> window but like a image is viewable which is supposed to happen.
>
> So  if your mouse dosen't go over the image meaning the new popup menu
> then the menu stays at that position until your mouse goes over the
> image and back out it would fade out the menu.
>
> What I want  is to have a menu to fade out when the mouse is either
> off the image or off the menu so then the menu would fade out.
>
> So in my code so far I was able to fade in the menu when the mouse is
> on the user image. But in order to fade out the menu you will have to
> put your mouse on the menu and then make the mouse go off the menu and
> it would fade out. If you had your mouse on the user image and slide
> the mouse off the user image no fade out effect will happen to the
> menu.
>
> Hope this explains what I want.  Which is to have a fade out effect on
> 2 events  I wounder if I should use  a IF statement.
>
> I want to fade out only if  the mouse is not on either the user image
> or the menu itself.


[jQuery] How to make a layout work with firefox and IE and look the same?

2009-01-01 Thread Aaron

Question is in the subject. I  notice with jquery and also css, that
the position is different on different internet browsers.

I seek a solution that would make one layout to be the same with all
browsers or at least the popular used ones.

like firefox or IE.

I want a solution that would make the position system and jquery be
able to be viewed the same with any browser.

Currently I notice that jquery looks fine in firefox since I am using
firefox when making my website.

I notice that in IE that the  menu I created that appears when your
mouse is over the user image that  it would appear on the far right of
the screen when it supposed to be on the left side of the screen but
right of the image.

So the layout is differnet between firefox and IE.

so I wonder if there is any solution to this???


[jQuery] Hover and fade in and out jquery code....

2008-12-29 Thread Aaron

HI, I am making a website kinda like a social networkng site.

I am trying to make  a hover effect when the mouse is over the users
image I want to pop up a image menu like upload image and edit image
etc.

I so far do have the codes working. The problem I face is... when the
user puts the mouse over his image a menu pops up not into a new
window but like a image is viewable which is supposed to happen.

So  if your mouse dosen't go over the image meaning the new popup menu
then the menu stays at that position until your mouse goes over the
image and back out it would fade out the menu.

What I want  is to have a menu to fade out when the mouse is either
off the image or off the menu so then the menu would fade out.

So in my code so far I was able to fade in the menu when the mouse is
on the user image. But in order to fade out the menu you will have to
put your mouse on the menu and then make the mouse go off the menu and
it would fade out. If you had your mouse on the user image and slide
the mouse off the user image no fade out effect will happen to the
menu.

Hope this explains what I want.  Which is to have a fade out effect on
2 events  I wounder if I should use  a IF statement.

I want to fade out only if  the mouse is not on either the user image
or the menu itself.



[jQuery] Re: JSON support in flash plugin?

2008-12-18 Thread Aaron

Did you ever get anywhere with this?  I just stumbled upon a similar
requirement.


On Dec 8, 5:50 am, mikael  wrote:
> Hi
>
> I have aflash(swf) file that needs rather extensive input in form 
> offlash-vars. Myflashcolleague would like to recieve theflash-vars as
> an object (JSON). Have any of you tried that - or maybe even extended
> Luke's (great!)plugin? This is how you feedflash-vars to the movie
> 'out of the box':
>
> $('#example').flash( {
>     src: 'example.swf',
>     width: 720,
>     height: 480,
>     flashvars: { foo: 'bar', baz: 'zoo' }
>     },
>     { version: 8 }
> );
>
> This is what I need:
>
> $('#example').flash( {
>     src: 'example.swf',
>     width: 720,
>     height: 480,
>     flashvars: {
>         'my-object': {
>             'foo': 'bar',
>             'baz': 'zoo'
>         }
>     },
>     { version: 8 }
> );


[jQuery] Re: How beneficial is chaining methods?"

2008-12-03 Thread Brandon Aaron
Just a quick clarification on this. The this keyword within the "newMethod"
plugin you just made is already the jQuery object. All you need to do is
return this;

--
Brandon Aaron

On Wed, Dec 3, 2008 at 1:01 PM, 703designs <[EMAIL PROTECTED]> wrote:

>
> There's nothing special about chaining methods. You can do it in most
> decent languages (in PHP, you could design methods to allow something
> like: $toys->addNew("Block")->delete();) and all it involves is
> returning an instance of the current object. It's not a performance
> hit by any means.
>
> A chainable method, in jQuery, is written:
>
> $.fn.newMethod = function() {
>// Function body...
>return $(this);
> }
>
> As you can see, all that's happening is "this" is being converted to a
> jQuery object (defined by jQuery and its alias "$") and returned.
>
> Thomas
>
> On Dec 3, 1:54 pm, MorningZ <[EMAIL PROTECTED]> wrote:
> > "I can see it saving time as there is less
> > code to write; but on the flip side, I can see how it can becomes
> > harder to manage especially if there is an excess amount chaining
> > going on"
> >
> > That's your decision to make, and you can have the choice to do it one
> > way or the other
> >
> > One advantage to doing this
> >
> > $("#Results").html("Some Text").show();
> >
> > over this
> >
> > $("#Results").html("Some Text");
> > $("#Results").show();
> >
> > would be that the script doesn't have to retrieve that wrapped set a
> > second time
> >
> > On Dec 3, 12:55 pm, SLR <[EMAIL PROTECTED]> wrote:
> >
> > > I'm new to jQuery and I'm trying to learn some more about jQuery's
> > > chaining feature. Chaining methods seems to be one of jQuery's best
> > > features (at least this is how I see it described all over over the
> > > web).
> >
> > > From a developer standpoint, I can see it saving time as there is less
> > > code to write; but on the flip side, I can see how it can becomes
> > > harder to manage especially if there is an excess amount chaining
> > > going on.
> >
> > > Also, how does this affect performance? Does chaining use more, less,
> > > or the same amount of resources?
> >
> >
>


[jQuery] Re: Use of getBoxObjectFor() is deprecated. Try to use element.getBoundingClientRect() if possible.

2008-11-29 Thread Brandon Aaron
What plugins are you using? getBoxObjectFor is a XUL method but
getBoundingClientRect isn't available for older version of Firefox. I'd just
suggest using the .offset() method from jQuery core. At any rate it is just
a deprecation warning. I imagine whatever plugin uses it checks to see if it
exists first and then uses it. When Firefox finally removes it, the code
should jump to the next branch. Unless they did browser detection :(
--
Brandon Aaron

On Thu, Nov 27, 2008 at 9:40 AM, edzah <[EMAIL PROTECTED]> wrote:

>
> Searched around and found a old post here but there was no answer.
>
> Any idea what this is about and how I can squash it?
>
> Ed


[jQuery] Re: Hi all, jquery issue (major) with IE - all versions

2008-11-26 Thread Brandon Aaron
It sounds like you might be trying to set css properties via the .attr
method instead of the .css method.
--
Brandon Aaron

On Wed, Nov 26, 2008 at 10:23 AM, tukutela
<[EMAIL PROTECTED]>wrote:

>
> Hi all, I have some additional information which I hope might be of
> use.
>
> the function is passed the following variables:
> name = color
> value = inherit
>
> unfortunately I'm not able to get the elem to help out more, anyone
> have any suggestions on how to debug?
>
>
> On Nov 26, 9:42 am, tukutela <[EMAIL PROTECTED]> wrote:
> > HI all,
> >
> > This only happens with IE (all versions), on line 1120 in
> > jquery-1.2.6.js I get the following error.
> >
> > Line 1120:
> > Invalid Property Value
> >
> > The line in the js file is the following:
> >
> > elem[ name ] = value;
> >
> > It inside attr: function( elem, name, value )
> >
> > Does anybody have a problem similar to this?
>


[jQuery] Re: table striping performance with livequery

2008-11-24 Thread Brandon Aaron
When dealing with tables, event delegation is almost always the best way to
handle it. You might want to give jQuery.listen plugin a try.
http://plugins.jquery.com/project/Listen
--
Brandon Aaron

On Mon, Nov 24, 2008 at 8:36 AM, Carpii <[EMAIL PROTECTED]> wrote:

>
> Hi all, ive just started using jQuery, and also the livequery plugin
>
> I set up jQuery to automatically stripe a table, and also do a
> mouseover to highlight the current row.
> This works nicely, but I wanted to use it inside of a tabset which
> loads its pages dynamically
>
> To do this I started using livequery to bind the events after the tab
> is loaded.
>
> Ive noticed the performance of the row mouseover row highlight is now
> pretty poor, and wondered if Im doing something wrong?
>
> Pretty trivial code
>
> $(document).ready(function()
> {
>  $(".stripeMe tr")
>.livequery('mouseover', function() {
>$(this).addClass("over");
>})
>.livequery('mouseout', function() {
>$(this).removeClass("over");
>});
> }
>
> Is there a reason this technique would degrade performance ?
>
> Thanks
>


[jQuery] Re: Image Roll Oover Script

2008-11-18 Thread Aaron Rosenthal


Thanks that worked, but say I want to have the scroll spring back on  
roll out how would I implement that?





Scroll test


#container {
background-color: #000;
white-space: nowrap;
overflow: hidden;
height: 120px;
width: 160px;
margin-left: 40px;
}






$(document).ready(function() {

$('#container').autoscroll();
$('#container img').hover(
function() {$(this).addClass('hover');},
function() {$(this).removeClass('hover');}
);
});






>src="images/image2.jpg" width="160" height="120" alt="" />src="images/image3.jpg" width="160" height="120" alt="" />








On Nov 18, 2008, at 1:52 PM, donb wrote:



While the urge to editorialize on the design concept is almost
unbearable, I will restrict my comment to only the question:

http://plugins.jquery.com/project/autoscroll

Probably you could simplify that considerably since the fundamental
requirement is 'how many 1/6's (or other fraction) of the distance
across the container is my mouse.'

A simple mouse-move event captured across a div, which would load the
appropriate image into the background-image of the div, is all you
need.  An entire plug-in is not really necessary.  It's just not that
complex.

On Nov 18, 4:22 pm, idealer <[EMAIL PROTECTED]> wrote:

I am trying to re-create this album thumbnail gallery roll over.

http://gallery.me.com/idealer

When the cursor rolls over the image it displays other images  
within the
album. Is there a jquery script available that does this. I have  
not found

one yet...
--
View this message in context:http://www.nabble.com/Image-Roll-Oover-Script-tp20543666s27240p205436 
...
Sent from the jQuery General Discussion mailing list archive at  
Nabble.com.




[jQuery] Re: livequery not binding to ajax loaded links in ie6 and ie7?

2008-11-16 Thread Brandon Aaron
No worries! Glad you got it figured out and sorry I wasn't able to get back
to you sooner. :)
--
Brandon Aaron

On Sat, Nov 15, 2008 at 2:39 PM, n00bert <[EMAIL PROTECTED]> wrote:

>
> Got it sorted. ie doesn't like the selector. Now using a different
> method, but still with livequery. Sorry to have bothered you Brandon,
> and thanks for such a powerful plugin.
>
> Sameer
>
> On Nov 14, 9:50 pm, n00bert <[EMAIL PROTECTED]> wrote:
> > Hi Brandon,
> >
> > I've tried changing this code:
> >
> > $('#mainMenu ul li ul li a[href$="' + href + '"]').triggerHandler
> > ('click');
> >
> > to:
> >
> > $('#mainMenu ul li ul li a:first').triggerHandler('click');
> >
> > in order to see if it was the selector that's causing the problem. It
> > seems it is. The second line of code works as expected in ie6 and ie7.
> >
> > Is there another way of selecting a link with a href that matches the
> > clicked link's href?
> >
> > Thanks,
> >
> > Sameer
> >
> > On Nov 14, 3:31 pm, n00bert <[EMAIL PROTECTED]> wrote:
> >
> > > Hi Brandon,
> >
> > > no errors in ie at all. I've uploaded the site I'm working on
> athttp://rosiespencer.co.ukWhenit loads, click a small thumb. The menu
> > > should slide down and the contents of #content are replaced via ajax.
> > > Some larger thumbs appear. This is where it breaks in ie. In other
> > > browsers if you click one of the bigger thumbs, #content is replaced
> > > as expected.
> >
> > > Thanks again for your help,
> >
> > > Sameer
> >
> > > On Nov 14, 2:23 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> >
> > > > On Thu, Nov 13, 2008 at 10:26 PM, n00bert <[EMAIL PROTECTED]>
> wrote:
> >
> > > > > Hi Brandon,
> >
> > > > > I put an alert in like so:
> >
> > > > > $('#content div.thumb a').livequery('click', function(e) {
> > > > > alert ('clicked');
> > > > > e.preventDefault();
> > > > >var href = $(this).attr('href');
> > > > >$('#mainMenu ul li ul li a[href$="' + href +
> '"]').triggerHandler
> > > > > ('click');
> > > > >return false;
> > > > > });
> >
> > > > > Safari, Firefox and Opera all show the alert when clicked. ie6 and
> ie7
> > > > > do not. In firebug, there are no errors. Any clues?
> >
> > > > But are there any errors in IE?
> >
> > > > --
> > > > Brandon Aaron
>


[jQuery] Re: Tab divs disappear

2008-11-14 Thread aaron

Thanks, I did try wrapping the panel container and it caused the
javascript to stop working.  I guess I'll keep trying some other ideas
to try to fix this.  What your seeing now is a little improved,
because I gave the main container a fixed height.  Before that, the
entire page would move around when that panel disappeared.


On Nov 13, 6:12 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> I can't see how the disappearing lasts one second. Between the
> animations there has to take place a switch of course, that makes the
> tab navigation jump to the top. You could overcome that problem with
> some CSS trickery (like absolutely position the nav to the bottom of a
> container that has fixed height or alternatively - a bit easier
> moreover - just wrap the tab panels in a container that has fixed
> height.
>
> --Klaus
>
> On 13 Nov., 22:46, aaron <[EMAIL PROTECTED]> wrote:
>
> > Sorry, wrong links.
>
> >http://www.usm.edu/pr/web/beta/index.php
>
> >http://www.usm.edu/pr/web/beta/index2.php
>
> > On Nov 13, 3:26 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > In any case - as I already stated - rotate with Ajax tabs is not
> > > supported at the moment.
>
> > > --Klaus
>
> > > On 13 Nov., 22:25, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > Maybe I am just blind, but I couldn't find tabs, and got a "We
> > > > couldn't find your document." instead...?
>
> > > > --Klaus
>
> > > > On 13 Nov., 21:23, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > Unfortunately, that isn't working either.  Let me link my page and
> > > > > maybe you can see what is going on.  I have two versions.
>
> > > > > One is using Tabs 3 with the rotate option:  
> > > > > http://www.usm.edu/pr/web/index.php
>
> > > > > One is using jquery UI Tabs with the rotate option and 
> > > > > Ajax:http://www.usm.edu/pr/web/index2.php
>
> > > > > You can see how the entire div just disappears for a second before the
> > > > > new one is loaded.
>
> > > > > On Nov 12, 11:52 am, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > Ahh, thanks, the light bulb just clicked on.  In order for AJAX to
> > > > > > work, the html code is different, not the initialization code.  I
> > > > > > think I kept glossing over that in the documentation.
>
> > > > > > On Nov 12, 11:29 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Do your anchors inside the tabs list look like this:
>
> > > > > > > ...
>
> > > > > > > or like this:
>
> > > > > > > ...
>
> > > > > > > ?
>
> > > > > > > The initialization is the same, no matter if Ajax tabs or in-page.
>
> > > > > > > --Klaus
>
> > > > > > > On 12 Nov., 17:09, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > I'm not sure what you mean, what initialization code should I 
> > > > > > > > use?  I
> > > > > > > > tried putting the AJAX options in there, but got the same 
> > > > > > > > result.
>
> > > > > > > > On Nov 11, 3:48 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > And you're not using Ajax tabs? Rotate and Ajax together is 
> > > > > > > > > not
> > > > > > > > > supported right now.
>
> > > > > > > > > --Klaus
>
> > > > > > > > > On 11 Nov., 20:39, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > $(function() {
> > > > > > > > > >                 $('#tabs_container > ul').tabs( {fx: { 
> > > > > > > > > > opacity:
> > > > > > > > > > 'toggle' } }).tabs('rotate', 5000);
> > > > > > > > > >         });
>
> > > > > > > > > > On Nov 7, 4:20 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > > On 7 Nov., 21:43, subnet_rx <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > > > I'm using jQuery UI tabs and I'm rotating them 
> > > > > > > > > > > > automatically.  The problem
> > > > > > > > > > > > is, for half a second, the div disappears till the next 
> > > > > > > > > > > > one loads.  This
> > > > > > > > > > > > modifies the size of the page and the page jumps around 
> > > > > > > > > > > > while this is going
> > > > > > > > > > > > on.  The divs only contain static content, and I've 
> > > > > > > > > > > > tried AJAX cache
> > > > > > > > > > > > options, but they don't work.  I just want them to fade 
> > > > > > > > > > > > out and fade in.
> > > > > > > > > > > > What initialization code should I be using?
>
> > > > > > > > > > > What initialization code should do you use?
>
> > > > > > > > > > > --Klaus


[jQuery] Re: livequery not binding to ajax loaded links in ie6 and ie7?

2008-11-14 Thread Brandon Aaron
On Thu, Nov 13, 2008 at 10:26 PM, n00bert <[EMAIL PROTECTED]> wrote:

>
> Hi Brandon,
>
> I put an alert in like so:
>
> $('#content div.thumb a').livequery('click', function(e) {
> alert ('clicked');
> e.preventDefault();
>var href = $(this).attr('href');
>$('#mainMenu ul li ul li a[href$="' + href + '"]').triggerHandler
> ('click');
>return false;
> });
>
> Safari, Firefox and Opera all show the alert when clicked. ie6 and ie7
> do not. In firebug, there are no errors. Any clues?


But are there any errors in IE?

--
Brandon Aaron


[jQuery] Re: livequery not binding to ajax loaded links in ie6 and ie7?

2008-11-13 Thread Brandon Aaron
Well, to help debug the issue, try putting an alert within the click handler
to make sure the click event is being bound and it isn't livequery causing
the issue.
Are you getting any script errors on the page?

--
Brandon Aaron

On Thu, Nov 13, 2008 at 10:04 PM, n00bert <[EMAIL PROTECTED]> wrote:

>
> Hi Brandon,
>
> thanks for your speedy reply. I added the $ as shown below.
> Unfortunately, ie still doesn't recognise the links added to #content
> as clickable. I know I'm pushing it, but do you have any other ideas
> as to why this should be?
>
> Sameer
>
>
> On Nov 14, 3:27 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> > It is most likely an issue with selecting the a tag by the href
> attribute.
> > Sometimes the href attribute gets serialized by IE. Try using the $=
> > attribute selector (
> http://docs.jquery.com/Selectors/attributeEndsWith#attributevalue) to find
> > that a tag.
> >
> > $('#mainMenu ul li ul li a[href$="' + href +
> '"]').triggerHandler('click');
> >
> > --
> > Brandon Aaron
> >
> > On Thu, Nov 13, 2008 at 9:13 PM, n00bert <[EMAIL PROTECTED]>
> wrote:
> >
> > > Hi,
> >
> > > I have the following code:
> >
> > >//link is loaded via ajax into a div in #content
> >
> > >//when clicked find a link in #mainMenu with the same href and
> > > trigger a
> > > click on it
> > >$('#content div.thumb a').livequery('click', function(e) {
> > >e.preventDefault();
> > >var href = $(this).attr('href');
> > >$('#mainMenu ul li ul li a[href="' + href +
> > > '"]').triggerHandler('click');
> > >return false;
> > >});
> >
> > >//some code for what happens when a menu link is clicked
> >
> > > which works well in Safari 3, Firefox 3, Opera 9 on both win and mac.
> > > However, in ie6 and ie7 I'm guessing the click event is never bound
> because
> > > nothing happens if the link in a div in #content is clicked.
> >
> > > Can someone shed some light on this please? Perhaps internet explorer
> is
> > > not
> > > recognising the selector which has a variable in it? Or is it a
> livequery
> > > issue?
> >
> > > I'm stumped. Thanks for any help,
> >
> > > Sameer
> > > --
> > > View this message in context:
> > >http://www.nabble.com/livequery-not-binding-to-ajax-loaded-links-in-i.
> ..
> > > Sent from the jQuery General Discussion mailing list archive at
> Nabble.com.
>


[jQuery] Re: livequery not binding to ajax loaded links in ie6 and ie7?

2008-11-13 Thread Brandon Aaron
It is most likely an issue with selecting the a tag by the href attribute.
Sometimes the href attribute gets serialized by IE. Try using the $=
attribute selector (
http://docs.jquery.com/Selectors/attributeEndsWith#attributevalue ) to find
that a tag.

$('#mainMenu ul li ul li a[href$="' + href + '"]').triggerHandler('click');

--
Brandon Aaron

On Thu, Nov 13, 2008 at 9:13 PM, n00bert <[EMAIL PROTECTED]> wrote:

>
>
> Hi,
>
> I have the following code:
>
>//link is loaded via ajax into a div in #content
>
>//when clicked find a link in #mainMenu with the same href and
> trigger a
> click on it
>$('#content div.thumb a').livequery('click', function(e) {
>e.preventDefault();
>var href = $(this).attr('href');
>$('#mainMenu ul li ul li a[href="' + href +
> '"]').triggerHandler('click');
>return false;
>});
>
>//some code for what happens when a menu link is clicked
>
> which works well in Safari 3, Firefox 3, Opera 9 on both win and mac.
> However, in ie6 and ie7 I'm guessing the click event is never bound because
> nothing happens if the link in a div in #content is clicked.
>
> Can someone shed some light on this please? Perhaps internet explorer is
> not
> recognising the selector which has a variable in it? Or is it a livequery
> issue?
>
> I'm stumped. Thanks for any help,
>
> Sameer
> --
> View this message in context:
> http://www.nabble.com/livequery-not-binding-to-ajax-loaded-links-in-ie6-and-ie7--tp20494001s27240p20494001.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: Tab divs disappear

2008-11-13 Thread aaron

Sorry, wrong links.

http://www.usm.edu/pr/web/beta/index.php

http://www.usm.edu/pr/web/beta/index2.php

On Nov 13, 3:26 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> In any case - as I already stated - rotate with Ajax tabs is not
> supported at the moment.
>
> --Klaus
>
> On 13 Nov., 22:25, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > Maybe I am just blind, but I couldn't find tabs, and got a "We
> > couldn't find your document." instead...?
>
> > --Klaus
>
> > On 13 Nov., 21:23, aaron <[EMAIL PROTECTED]> wrote:
>
> > > Unfortunately, that isn't working either.  Let me link my page and
> > > maybe you can see what is going on.  I have two versions.
>
> > > One is using Tabs 3 with the rotate option:  
> > > http://www.usm.edu/pr/web/index.php
>
> > > One is using jquery UI Tabs with the rotate option and 
> > > Ajax:http://www.usm.edu/pr/web/index2.php
>
> > > You can see how the entire div just disappears for a second before the
> > > new one is loaded.
>
> > > On Nov 12, 11:52 am, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > Ahh, thanks, the light bulb just clicked on.  In order for AJAX to
> > > > work, the html code is different, not the initialization code.  I
> > > > think I kept glossing over that in the documentation.
>
> > > > On Nov 12, 11:29 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > Do your anchors inside the tabs list look like this:
>
> > > > > ...
>
> > > > > or like this:
>
> > > > > ...
>
> > > > > ?
>
> > > > > The initialization is the same, no matter if Ajax tabs or in-page.
>
> > > > > --Klaus
>
> > > > > On 12 Nov., 17:09, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > I'm not sure what you mean, what initialization code should I use?  
> > > > > > I
> > > > > > tried putting the AJAX options in there, but got the same result.
>
> > > > > > On Nov 11, 3:48 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > And you're not using Ajax tabs? Rotate and Ajax together is not
> > > > > > > supported right now.
>
> > > > > > > --Klaus
>
> > > > > > > On 11 Nov., 20:39, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > $(function() {
> > > > > > > >                 $('#tabs_container > ul').tabs( {fx: { opacity:
> > > > > > > > 'toggle' } }).tabs('rotate', 5000);
> > > > > > > >         });
>
> > > > > > > > On Nov 7, 4:20 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > On 7 Nov., 21:43, subnet_rx <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > I'm using jQuery UI tabs and I'm rotating them 
> > > > > > > > > > automatically.  The problem
> > > > > > > > > > is, for half a second, the div disappears till the next one 
> > > > > > > > > > loads.  This
> > > > > > > > > > modifies the size of the page and the page jumps around 
> > > > > > > > > > while this is going
> > > > > > > > > > on.  The divs only contain static content, and I've tried 
> > > > > > > > > > AJAX cache
> > > > > > > > > > options, but they don't work.  I just want them to fade out 
> > > > > > > > > > and fade in.
> > > > > > > > > > What initialization code should I be using?
>
> > > > > > > > > What initialization code should do you use?
>
> > > > > > > > > --Klaus


[jQuery] Re: Tab divs disappear

2008-11-13 Thread aaron

Sorry, wrong links.

http://www.usm.edu/pr/web/beta/index.php

http://www.usm.edu/pr/web/beta/index2.php

On Nov 13, 3:26 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> In any case - as I already stated - rotate with Ajax tabs is not
> supported at the moment.
>
> --Klaus
>
> On 13 Nov., 22:25, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > Maybe I am just blind, but I couldn't find tabs, and got a "We
> > couldn't find your document." instead...?
>
> > --Klaus
>
> > On 13 Nov., 21:23, aaron <[EMAIL PROTECTED]> wrote:
>
> > > Unfortunately, that isn't working either.  Let me link my page and
> > > maybe you can see what is going on.  I have two versions.
>
> > > One is using Tabs 3 with the rotate option:  
> > > http://www.usm.edu/pr/web/index.php
>
> > > One is using jquery UI Tabs with the rotate option and 
> > > Ajax:http://www.usm.edu/pr/web/index2.php
>
> > > You can see how the entire div just disappears for a second before the
> > > new one is loaded.
>
> > > On Nov 12, 11:52 am, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > Ahh, thanks, the light bulb just clicked on.  In order for AJAX to
> > > > work, the html code is different, not the initialization code.  I
> > > > think I kept glossing over that in the documentation.
>
> > > > On Nov 12, 11:29 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > Do your anchors inside the tabs list look like this:
>
> > > > > ...
>
> > > > > or like this:
>
> > > > > ...
>
> > > > > ?
>
> > > > > The initialization is the same, no matter if Ajax tabs or in-page.
>
> > > > > --Klaus
>
> > > > > On 12 Nov., 17:09, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > I'm not sure what you mean, what initialization code should I use?  
> > > > > > I
> > > > > > tried putting the AJAX options in there, but got the same result.
>
> > > > > > On Nov 11, 3:48 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > And you're not using Ajax tabs? Rotate and Ajax together is not
> > > > > > > supported right now.
>
> > > > > > > --Klaus
>
> > > > > > > On 11 Nov., 20:39, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > $(function() {
> > > > > > > >                 $('#tabs_container > ul').tabs( {fx: { opacity:
> > > > > > > > 'toggle' } }).tabs('rotate', 5000);
> > > > > > > >         });
>
> > > > > > > > On Nov 7, 4:20 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > On 7 Nov., 21:43, subnet_rx <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > I'm using jQuery UI tabs and I'm rotating them 
> > > > > > > > > > automatically.  The problem
> > > > > > > > > > is, for half a second, the div disappears till the next one 
> > > > > > > > > > loads.  This
> > > > > > > > > > modifies the size of the page and the page jumps around 
> > > > > > > > > > while this is going
> > > > > > > > > > on.  The divs only contain static content, and I've tried 
> > > > > > > > > > AJAX cache
> > > > > > > > > > options, but they don't work.  I just want them to fade out 
> > > > > > > > > > and fade in.
> > > > > > > > > > What initialization code should I be using?
>
> > > > > > > > > What initialization code should do you use?
>
> > > > > > > > > --Klaus


[jQuery] Re: Tab divs disappear

2008-11-13 Thread aaron

Sorry, wrong links.

http://www.usm.edu/pr/web/beta/index.php

http://www.usm.edu/pr/web/beta/index2.php

On Nov 13, 3:26 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> In any case - as I already stated - rotate with Ajax tabs is not
> supported at the moment.
>
> --Klaus
>
> On 13 Nov., 22:25, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > Maybe I am just blind, but I couldn't find tabs, and got a "We
> > couldn't find your document." instead...?
>
> > --Klaus
>
> > On 13 Nov., 21:23, aaron <[EMAIL PROTECTED]> wrote:
>
> > > Unfortunately, that isn't working either.  Let me link my page and
> > > maybe you can see what is going on.  I have two versions.
>
> > > One is using Tabs 3 with the rotate option:  
> > > http://www.usm.edu/pr/web/index.php
>
> > > One is using jquery UI Tabs with the rotate option and 
> > > Ajax:http://www.usm.edu/pr/web/index2.php
>
> > > You can see how the entire div just disappears for a second before the
> > > new one is loaded.
>
> > > On Nov 12, 11:52 am, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > Ahh, thanks, the light bulb just clicked on.  In order for AJAX to
> > > > work, the html code is different, not the initialization code.  I
> > > > think I kept glossing over that in the documentation.
>
> > > > On Nov 12, 11:29 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > Do your anchors inside the tabs list look like this:
>
> > > > > ...
>
> > > > > or like this:
>
> > > > > ...
>
> > > > > ?
>
> > > > > The initialization is the same, no matter if Ajax tabs or in-page.
>
> > > > > --Klaus
>
> > > > > On 12 Nov., 17:09, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > I'm not sure what you mean, what initialization code should I use?  
> > > > > > I
> > > > > > tried putting the AJAX options in there, but got the same result.
>
> > > > > > On Nov 11, 3:48 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > And you're not using Ajax tabs? Rotate and Ajax together is not
> > > > > > > supported right now.
>
> > > > > > > --Klaus
>
> > > > > > > On 11 Nov., 20:39, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > $(function() {
> > > > > > > >                 $('#tabs_container > ul').tabs( {fx: { opacity:
> > > > > > > > 'toggle' } }).tabs('rotate', 5000);
> > > > > > > >         });
>
> > > > > > > > On Nov 7, 4:20 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > On 7 Nov., 21:43, subnet_rx <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > I'm using jQuery UI tabs and I'm rotating them 
> > > > > > > > > > automatically.  The problem
> > > > > > > > > > is, for half a second, the div disappears till the next one 
> > > > > > > > > > loads.  This
> > > > > > > > > > modifies the size of the page and the page jumps around 
> > > > > > > > > > while this is going
> > > > > > > > > > on.  The divs only contain static content, and I've tried 
> > > > > > > > > > AJAX cache
> > > > > > > > > > options, but they don't work.  I just want them to fade out 
> > > > > > > > > > and fade in.
> > > > > > > > > > What initialization code should I be using?
>
> > > > > > > > > What initialization code should do you use?
>
> > > > > > > > > --Klaus


[jQuery] Re: Tab divs disappear

2008-11-13 Thread aaron

Unfortunately, that isn't working either.  Let me link my page and
maybe you can see what is going on.  I have two versions.

One is using Tabs 3 with the rotate option:  http://www.usm.edu/pr/web/index.php

One is using jquery UI Tabs with the rotate option and Ajax:
http://www.usm.edu/pr/web/index2.php

You can see how the entire div just disappears for a second before the
new one is loaded.


On Nov 12, 11:52 am, aaron <[EMAIL PROTECTED]> wrote:
> Ahh, thanks, the light bulb just clicked on.  In order for AJAX to
> work, the html code is different, not the initialization code.  I
> think I kept glossing over that in the documentation.
>
> On Nov 12, 11:29 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > Do your anchors inside the tabs list look like this:
>
> > ...
>
> > or like this:
>
> > ...
>
> > ?
>
> > The initialization is the same, no matter if Ajax tabs or in-page.
>
> > --Klaus
>
> > On 12 Nov., 17:09, aaron <[EMAIL PROTECTED]> wrote:
>
> > > I'm not sure what you mean, what initialization code should I use?  I
> > > tried putting the AJAX options in there, but got the same result.
>
> > > On Nov 11, 3:48 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > And you're not using Ajax tabs? Rotate and Ajax together is not
> > > > supported right now.
>
> > > > --Klaus
>
> > > > On 11 Nov., 20:39, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > > $(function() {
> > > > >                 $('#tabs_container > ul').tabs( {fx: { opacity:
> > > > > 'toggle' } }).tabs('rotate', 5000);
> > > > >         });
>
> > > > > On Nov 7, 4:20 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > On 7 Nov., 21:43, subnet_rx <[EMAIL PROTECTED]> wrote:
>
> > > > > > > I'm using jQuery UI tabs and I'm rotating them automatically.  
> > > > > > > The problem
> > > > > > > is, for half a second, the div disappears till the next one 
> > > > > > > loads.  This
> > > > > > > modifies the size of the page and the page jumps around while 
> > > > > > > this is going
> > > > > > > on.  The divs only contain static content, and I've tried AJAX 
> > > > > > > cache
> > > > > > > options, but they don't work.  I just want them to fade out and 
> > > > > > > fade in.
> > > > > > > What initialization code should I be using?
>
> > > > > > What initialization code should do you use?
>
> > > > > > --Klaus


[jQuery] Re: Tab divs disappear

2008-11-12 Thread aaron

Ahh, thanks, the light bulb just clicked on.  In order for AJAX to
work, the html code is different, not the initialization code.  I
think I kept glossing over that in the documentation.

On Nov 12, 11:29 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Do your anchors inside the tabs list look like this:
>
> ...
>
> or like this:
>
> ...
>
> ?
>
> The initialization is the same, no matter if Ajax tabs or in-page.
>
> --Klaus
>
> On 12 Nov., 17:09, aaron <[EMAIL PROTECTED]> wrote:
>
> > I'm not sure what you mean, what initialization code should I use?  I
> > tried putting the AJAX options in there, but got the same result.
>
> > On Nov 11, 3:48 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > And you're not using Ajax tabs? Rotate and Ajax together is not
> > > supported right now.
>
> > > --Klaus
>
> > > On 11 Nov., 20:39, aaron <[EMAIL PROTECTED]> wrote:
>
> > > > $(function() {
> > > >                 $('#tabs_container > ul').tabs( {fx: { opacity:
> > > > 'toggle' } }).tabs('rotate', 5000);
> > > >         });
>
> > > > On Nov 7, 4:20 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > On 7 Nov., 21:43, subnet_rx <[EMAIL PROTECTED]> wrote:
>
> > > > > > I'm using jQuery UI tabs and I'm rotating them automatically.  The 
> > > > > > problem
> > > > > > is, for half a second, the div disappears till the next one loads.  
> > > > > > This
> > > > > > modifies the size of the page and the page jumps around while this 
> > > > > > is going
> > > > > > on.  The divs only contain static content, and I've tried AJAX cache
> > > > > > options, but they don't work.  I just want them to fade out and 
> > > > > > fade in.
> > > > > > What initialization code should I be using?
>
> > > > > What initialization code should do you use?
>
> > > > > --Klaus


[jQuery] Re: Tab divs disappear

2008-11-12 Thread aaron

I'm not sure what you mean, what initialization code should I use?  I
tried putting the AJAX options in there, but got the same result.

On Nov 11, 3:48 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> And you're not using Ajax tabs? Rotate and Ajax together is not
> supported right now.
>
> --Klaus
>
> On 11 Nov., 20:39, aaron <[EMAIL PROTECTED]> wrote:
>
> > $(function() {
> >                 $('#tabs_container > ul').tabs( {fx: { opacity:
> > 'toggle' } }).tabs('rotate', 5000);
> >         });
>
> > On Nov 7, 4:20 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > On 7 Nov., 21:43, subnet_rx <[EMAIL PROTECTED]> wrote:
>
> > > > I'm using jQuery UI tabs and I'm rotating them automatically.  The 
> > > > problem
> > > > is, for half a second, the div disappears till the next one loads.  This
> > > > modifies the size of the page and the page jumps around while this is 
> > > > going
> > > > on.  The divs only contain static content, and I've tried AJAX cache
> > > > options, but they don't work.  I just want them to fade out and fade in.
> > > > What initialization code should I be using?
>
> > > What initialization code should do you use?
>
> > > --Klaus


[jQuery] Re: Tab divs disappear

2008-11-11 Thread aaron

$(function() {
$('#tabs_container > ul').tabs( {fx: { opacity:
'toggle' } }).tabs('rotate', 5000);
});

On Nov 7, 4:20 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On 7 Nov., 21:43, subnet_rx <[EMAIL PROTECTED]> wrote:
>
> > I'm using jQuery UI tabs and I'm rotating them automatically.  The problem
> > is, for half a second, the div disappears till the next one loads.  This
> > modifies the size of the page and the page jumps around while this is going
> > on.  The divs only contain static content, and I've tried AJAX cache
> > options, but they don't work.  I just want them to fade out and fade in.
> > What initialization code should I be using?
>
> What initialization code should do you use?
>
> --Klaus


[jQuery] Re: LiveQuery

2008-11-10 Thread Brandon Aaron
Here is how you'd write those utilizing Live Query.
$('.hover_info').livequery(function() { $(this).hide(); });

$('.file').livequery(funcion() {
$(this).hover(function() {
$(this).find('.hover_info').slideDown(220);
}, function() {
$(this).find('.hover_info').slideUp(220);
});

But ... let me see if I can help you optimize the hover a little. Instead of
using the hover helper method, I'd just bind the mouseenter and mouseleave
events manually like this.

$('.file').livequery('mouseenter mouseleave', function(event) {
$('.hover_info', this)[ "slide" + (event.type == "mouseenter" ? "Down" :
"Up") ](220);
});

And finally, I'd recommend that you use the technique found at this Learning
jQuery post to hide your .hover_info via CSS when JS is enabled.
http://www.learningjquery.com/2008/10/1-awesome-way-to-avoid-the-not-so-excellent-flash-of-amazing-unstyled-content

Hiding something should typically be the job of your CSS. :)

--
Brandon Aaron

On Mon, Nov 10, 2008 at 6:11 AM, elev3n <[EMAIL PROTECTED]> wrote:

>
> Hi All,
> I was wondering if someone could help me translate this code:
>
> $('.hover_info').hide();
>
> $('.file').hover(
>function() {
>$(this).find('.hover_info').slideDown(220);
>},
>function() {
>$(this).find('.hover_info').slideUp(220);
>}
> );
>
> into something that works with the livequery plugin (http://
> brandonaaron.net/docs/livequery/). Both of these are called on page
> load. Everything I try seems to be throwing errors. I have tried along
> the line of:
>
> $('.hover_info').livequery().hide();
> $('.hover_info').livequery('load',hide());
>
> Any tips would be greatly appreciated.
>
> Thanks
>


[jQuery] Re: Livequery not working with jQuery 1.2.6

2008-11-07 Thread Brandon Aaron
Yeah you'll need to grab the latest version of livequery.
--
Brandon Aaron

On Fri, Nov 7, 2008 at 2:48 PM, Alexandre Plennevaux
<[EMAIL PROTECTED]>wrote:

> how about using the latest version of livequery (1.0.2) ?
>
> http://plugins.jquery.com/node/1088
>
>
> I use it with jquery 1.2.6 on several projects without issue.
>
>
>
> On Fri, Nov 7, 2008 at 9:39 PM, ksimpson <[EMAIL PROTECTED]> wrote:
>
>>
>> I'm trying to use livequery 1.0.1 with jQuery 1.2.6 and am getting the
>> following errors
>>
>>  this.setArray is not a function => jquery.js (line 83)
>>  jQuery(document)[jQuery.fn.ready ? "ready" : "load"] is not a
>> function => (line 81)
>>  jQuery(document).triggerHandler is not a function => (line 2322)
>>
>> Livequery has work fine for me before in jquery 1.2.3.
>>
>
>


[jQuery] Re: LiveQuery with Tipsy (tooltip) help

2008-11-07 Thread Brandon Aaron
Are you using jQuery for the AJAX? Live Query really only works
automagically if you are using jQuery to modify the DOM. If you aren't using
jQuery for the AJAX, there are a few options. Live Query has an API doing
things a little more manual. After you load in the content from the AJAX
call run the following code:
jQuery.livequery.run();

That will invoke Live Query as if you modified the DOM with jQuery.

--
Brandon Aaron

On Fri, Nov 7, 2008 at 10:01 AM, idealists
<[EMAIL PROTECTED]>wrote:

>
> Hi Brandon
>
> Thanks, so much for your reply I had actually tried that too.
>
> And yes this does work..However, strangely, ONLY when I have mouse
> overed ANOTHER link (with title attrible a['title']) that is OUTSIDE
> the part of the page that is "refreshed" when the ajax pagination
> occurs.
>
> If I first mouseover a link (with title) in the updated content, then
> the tooltip doesn't work (until I mouseover such a link outside the
> updated content).
>
> Strange eh.
>
> Any ideas?
>
> On Nov 8, 2:43 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> > Your very close... Try this instead:
> > $('a[title]')
> > .livequery(function() {
> > $(this).tipsy({ fade: true, gravity: 'w' });
> >
> > });
> >
> > No need to return false.
> >
> > --
> > Brandon Aaron
> >
> > On Thu, Nov 6, 2008 at 9:14 PM, idealists <
> [EMAIL PROTECTED]>wrote:
> >
> >
> >
> > > Im got a section of my page which updates via ajax pagination.
> > > The jQuery tipsy tooltips work on the initial page load, but when I
> > > click Page "2" and so on, and the ajax containing div updates with new
> > > content the tipsy tooltips do no display.
> > > Solution (I thought) was to use the jQuery LiveQuery plugin.  However
> > > I am unable to get that to work.
> > > Im kind of new to jQuery.
> >
> > > This is what I have so far:
> > > 
> > > $('a[title]')
> > >.livequery(function() {
> > >$('a[title]').tipsy({fade: true, gravity: 'w'});
> > >   return false;
> > > });
> > > 
> >
> > > This seems to work on the initial page load, but doesn't bind any new
> > > a['title'] elements when the page is updated via ajax.
> >
> > > Any help would be appreciated.
> >
> > > Thanks
>


[jQuery] Re: LiveQuery with Tipsy (tooltip) help

2008-11-07 Thread Brandon Aaron
Your very close... Try this instead:
$('a[title]')
.livequery(function() {
$(this).tipsy({ fade: true, gravity: 'w' });
});

No need to return false.

--
Brandon Aaron

On Thu, Nov 6, 2008 at 9:14 PM, idealists <[EMAIL PROTECTED]>wrote:

>
> Im got a section of my page which updates via ajax pagination.
> The jQuery tipsy tooltips work on the initial page load, but when I
> click Page "2" and so on, and the ajax containing div updates with new
> content the tipsy tooltips do no display.
> Solution (I thought) was to use the jQuery LiveQuery plugin.  However
> I am unable to get that to work.
> Im kind of new to jQuery.
>
> This is what I have so far:
> 
> $('a[title]')
>.livequery(function() {
>$('a[title]').tipsy({fade: true, gravity: 'w'});
>   return false;
> });
> 
>
> This seems to work on the initial page load, but doesn't bind any new
> a['title'] elements when the page is updated via ajax.
>
> Any help would be appreciated.
>
> Thanks
>


[jQuery] Re: empty().append() slow

2008-11-06 Thread Brandon Aaron
It has to do more than just set innerHTML to a blank string to avoid memory
leaks. :(
--
Brandon Aaron

On Thu, Nov 6, 2008 at 6:28 PM, jquertil <[EMAIL PROTECTED]> wrote:

>
> thanks Karl,
>
> didn't make a difference. I suppose I'll have to preload everything
> and show/hide things... ugh.
>
> does empty() go through the entire element node tree and remove things
> one by one or something? I kept thinking it just sets innerHTML=''.


[jQuery] Re: jQuery, ASP.Net and Drop-Down-Lists

2008-11-06 Thread Brandon Aaron
First place to check would be the selector. Make sure the select element is
actually getting selected. I'd recommend using Firebug to help you see if
the selector you are using is working and to help you formulate one that
does if it isn't.
--
Brandon Aaron

On Thu, Nov 6, 2008 at 7:42 AM, Damien <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I am trying to use a DropDownLists and jQuery, I was trying to use the
> jQuery events and then call a function but it seems not to be working.
> No matter what event I choose nothing happens!
>
> Anyone got an idea of what could be causing it? Do drop down lists
> in .Net not have the standard events
>


  1   2   3   4   5   6   7   8   9   >