[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, GLSmythgeorge.sm...@gmail.com 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:

    script type=text/javascript
    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);
    /script

 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: 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 = 
'ptrue/p';
}


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

On Sat, Jun 6, 2009 at 3:47 AM, grand_unifierjijodasgu...@gmail.com wrote:


 !-- this is the javascript json parser function --

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

    script type=text/javascript

    $(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 = 'ptrue/p';
                                    }

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

                                });
                        });
                });

          function urlencode(str) {
            return escape(str).replace(/\+/g,'%2B').replace(/%20/g,
 '+').replace(/\*/g, '%2A').replace(/\//g, '%2F').replace(/@/g, '%40');
          }
    });

    /script

 !-- javascript ends here --

 i dont understand wats wron wth this code...could anyone plz correct
 itplzits very frustratin...
 any help wil be appreciated...



[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.comd...@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
 li id=set_1 class=entry
   dl
     dtHeading/dt
     dd class=skills Sample here/dd
   /dl
 /li
 div class=edit_profile Edit/div
 div class=clear/div

 li id=set_2 class=entry
   dl
     dtHeading/dt
     dd class=skills Sample here/dd
   /dl
 /li
 div class=edit_settings Edit/div
 div class=clear/div

 same thing as above for 3 other sections..

 Click edit loads an ajax submitted form (jQuery form Plugin from malsup)
 into the  li id=set_XXX class=entry/div so all the dl is replaced
 by the form..submit and the new dl 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: 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, lysholmtaylorjperk...@gmail.com 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: 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(div /)

On Fri, Jun 5, 2009 at 9:07 AM, Lidelnlid...@gmail.com 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: 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 radioactiv...@gmail.com 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?




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 s.flemin...@googlemail.com 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
 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?

 p
 form action=ajax/forms.php method=post id=myform
 Title: input type=text name=title /
 input type=submit value=Submit name=submit /
 /form
 /p
 script type=text/javascript
 // 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;

 });

 /script

 In the above, i only get an alert saying Javascript in firefox. Any
 other browser and it does not work.

 Please help!




[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 cakeordeat...@gmail.com 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 aaron.gun...@gmail.com 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 cakeordeat...@gmail.com 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 form 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 rg...@iinet.net.au wrote:
  On Feb 9, 8:30 am, Jon cakeordeat...@gmail.com 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.

   span id=ctl00_Control_LeftColumn_CF_Contact class=ContactForm
   p class=SuccessMessageSubmitted/p
   span class=Field
   span class=LabelName /span
   span class=Validation
   span id=ctl00_Control_LeftColumn_CF_Contact_ctl01_ctl04
   style=display: none;/
   /span
   input id=ctl00_Control_LeftColumn_CF_Contact_ctl01_TB_TextBox
   class=TextBox Name type=text name=ctl00$Control_LeftColumn
   $CF_Contact$ctl01$TB_TextBox/
   /span
   span class=Field
   /span
   span class=Field
   /span
   a id=ctl00_Control_LeftColumn_CF_Contact_LB_Submit class=Submit
   href=javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact
   $LB_Submit','') style=background-color: rgb(51, 51, 51);Submit/a
   /span

  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-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 cakeordeat...@gmail.com 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 form 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 rg...@iinet.net.au wrote:
 On Feb 9, 8:30 am, Jon cakeordeat...@gmail.com 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.

  span id=ctl00_Control_LeftColumn_CF_Contact class=ContactForm
  p class=SuccessMessageSubmitted/p
  span class=Field
  span class=LabelName /span
  span class=Validation
  span id=ctl00_Control_LeftColumn_CF_Contact_ctl01_ctl04
  style=display: none;/
  /span
  input id=ctl00_Control_LeftColumn_CF_Contact_ctl01_TB_TextBox
  class=TextBox Name type=text name=ctl00$Control_LeftColumn
  $CF_Contact$ctl01$TB_TextBox/
  /span
  span class=Field
  /span
  span class=Field
  /span
  a id=ctl00_Control_LeftColumn_CF_Contact_LB_Submit class=Submit
  href=javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact
  $LB_Submit','') style=background-color: rgb(51, 51, 51);Submit/a
  /span

 Invalid markup, there is no form.

  And here is my javascript:

  $(document).ready(function(){
  $(#aspnetForm).validate({

 Where is #aspnetForm?

 --
 Rob


[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 tareq.m...@gmail.com 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 geuis.te...@gmail.com 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: [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 de...@ashwebstudio.com 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: 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 minhle0...@yahoo.com 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?

 table
   tr id=trContactInfo
  tdFull Name:/td
  tdinput type=text name=FullName size=40/td
   /tr
   tr id=trContactInfo
  tdE-mail:/td
  tdinput type=text name=Email size=40/td
   /tr
   tr id=trContactInfo
  tdPhone:/td
  tdinput type=text name=Phone size=40/td
   /tr
   tr
  tdField 4:/td
  tdinput type=text name=Field4 size=40/td
   /tr
   tr
  tdField 5:/td
  tdinput type=text name=Field5 size=40/td
   /tr
   tr
  tdField 6:/td
  tdinput type=text name=Field6 size=40/td
   /tr
 /table

 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: 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 cakeordeat...@gmail.com 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.

 span id=ctl00_Control_LeftColumn_CF_Contact class=ContactForm
 p class=SuccessMessageSubmitted/p
 span class=Field
 span class=LabelName /span
 span class=Validation
 span id=ctl00_Control_LeftColumn_CF_Contact_ctl01_ctl04
 style=display: none;/
 /span
 input id=ctl00_Control_LeftColumn_CF_Contact_ctl01_TB_TextBox
 class=TextBox Name type=text name=ctl00$Control_LeftColumn
 $CF_Contact$ctl01$TB_TextBox/
 /span
 span class=Field
 /span
 span class=Field
 /span
 a id=ctl00_Control_LeftColumn_CF_Contact_LB_Submit class=Submit
 href=javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact
 $LB_Submit','') style=background-color: rgb(51, 51, 51);Submit/a
 /span


 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: 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 tribe...@gmail.com 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('span id=newsletter_types/span');//
 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 id=newsletter_types/
 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 joshua.d.mich...@gmail.com 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: 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 brianwoodr...@gmail.com 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

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 brianwoodr...@gmail.com 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 brianwoodr...@gmail.com 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 brianwoodr...@gmail.com 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 aaron.gun...@gmail.com 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 brianwoodr...@gmail.com 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: 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 august.massive...@gmail.com 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-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\\/')