[jQuery] Re: Livequery and iFrames

2008-08-25 Thread hubbs

Ok, lets take a step back.  Lets say I want to just try and bind the
events, rather than using Livequery to see if this fixes the problem.

Since I want to bind the draggable UI, how would I do this?  What kind
of event does the draggable get, click?

$("#adminEditListingB .itemHolder a").draggable({
helper: 'clone',
appendTo: 'body',
cursor: 'move'
});

How could I rebind this, and hopefully fix the cross frame problem?

On Aug 24, 6:25 pm, hubbs <[EMAIL PROTECTED]> wrote:
> I worked on another, simpler example of reloading the listing with a
> link, and I get the same unwanted results.
>
> In the iframe:
>     $("#refreshB").click(function() {
>         $.ajax({
>             type: "GET",
>             url: "http://www.mysite.com";,
>             beforeSend: function() {
>                 $("#adminToolsListingB .scroll",
> parent.document).html("");
>                 $("#adminToolsListingB .ajaxLoading",
> parent.document).show();
>             },
>             success: function(html) {
>                 $("#adminToolsListingB .ajaxLoading",
> parent.document).hide();
>                 $("#adminEditListingB .scroll",
> parent.document).html(html);
>             }
>         });
>         return false;
>     });
>
> The link:
> Refresh
>
> Still not rebinding the events in the parent frame.  I am missing
> something here?  It seems that this should work, as it is updating the
> DOM in the parent frame correctly, and I would expect Livequery to see
> that, and rebind.
>
> On Aug 24, 4:02 pm, hubbs <[EMAIL PROTECTED]> wrote:
>
> > I am trying to track down a problem, and I am wondering if it has to
> > do with iFrames.
>
> > I use livequery to rebind some the jQuery UI draggable event to a list
> > of links.  I have an ajax refresh button, which refreshes the list,
> > and livequery rebinds the draggable events, which works great.
>
> > But, I have an iFrame on the page which will create a new link within
> > that list.  So, after the form is submitted in the iframe, it uses
> > the .ajax() GET method to reload the list of links in the parent
> > window, exactly how the ajax refresh button works.  But, it seems that
> > livequery is not rebinding the UI draggable events, and I am wondering
> > if it is because the change came from the iFrame.
>
> > Does this seem like it could be the problem, or should I keep digging?
>
> > This one works:
> >                    $.ajax({
> >                         type: "GET",
> >                         url: "http://www.mysite.com";,
> >                         beforeSend: function() {
> >                             $("#adminToolsListingA .scroll").html("");
> >                             $
> > ("#adminToolsListingA .ajaxLoading").show();
> >                         },
> >                         success: function(html) {
> >                             $
> > ("#adminToolsListingA .ajaxLoading").hide();
> >                             $
> > ("#adminEditListingA .scroll").html(html);
> >                         }
> >                     });
>
> > This one does not:
> >                     $.ajax({
> >                         type: "GET",
> >                         url: "http://www.mysite.com";,
> >                         beforeSend: function() {
> >                             $("#adminToolsListingB .scroll",
> > parent.document).html("");
> >                             $("#adminToolsListingB .ajaxLoading",
> > parent.document).show();
> >                         },
> >                         success: function(html) {
> >                             $("#adminToolsListingB .ajaxLoading",
> > parent.document).hide();
> >                             $("#adminEditListingB .scroll",
> > parent.document).html(html);
> >                         }
> >                     });
>
> > Livequery binding draggable UI:
> >     $("#adminEditListingB .itemHolder a").livequery(function() {
> >         $(this).draggable({
> >             helper: 'clone',
> >             appendTo: 'body',
> >             cursor: 'move'
> >         });
> >     });


[jQuery] Re: Superfish: Gap between top level menu and popup..

2008-08-25 Thread Joel Birch

Hi ccollie,

I can't visualise exactly what your issue is. Can you post an example please?

Cheers
Joel Birch.


[jQuery] Re: Using instead of with Superfish

2008-08-25 Thread Joel Birch

Hi Joe,

Be aware that by using spans instead of anchors you will be breaking
keyboard access to the submenus. Maybe using an anchor without a href
attribute would be a better option? If you still want to use spans
then you could probably change this line:

 if (o.autoArrows) addArrow( $('>a:first-child',this) );

to this:

 if (o.autoArrows) addArrow( $('>:first-child',this) );

I just removed the 'a' from before ':first-child'.

Good luck.
Joel Birch.


[jQuery] Re: Superfish CSS question Position Static

2008-08-25 Thread Joel Birch

Hi,

I can't visualise your issue - can you please post a liink to the
working example?

Cheers
Joel Birch.


[jQuery] Re: SUPERFISH Supersubs problem in mozilla firefox

2008-08-25 Thread Joel Birch

Hi Andy,

Sorry you are still having issues, but I still haven't had time to
look at this. If you could package up a set of files showing the
problem that I can debug locally I may get to it sooner. Supersubs is
still in a "use-at-your-own-risk" phase at the moment.

Joel Birch.


[jQuery] Re: Finding form tag wrapping around image

2008-08-25 Thread Duncan
Sorry I got cut off.

Using sDumper( $(this).parents('form') ); to dump the result visually

I can see that length = 0, and there is only one parent object - tagName =
'IMG'

So to me at least it doesnt look like its doing what it should?

Any further help would be great - thanks!

On Tue, Aug 26, 2008 at 11:57 AM, Duncan <[EMAIL PROTECTED]> wrote:

> Thanks chaps, there is no nesting of forms, I know thats invalid. Here is
> what the code looks like
>
>  action="admin_ecom_product.cfm?Stage=ViewProduct" method="get" 
> onsubmit="return _CF_checkSearchForm(this)">
>
>
>   
>
>   Shop > Active Products 
>src="/media/pics/site/excel.jpg" name="downloadToExcel" 
> id="downloadToExcel"> value="0" />
>
>   
>   
> 
> 
>  width="62" height="16" alt="Display" class="xButton"/>
>
>src="/media/pics/cms/showall.gif" width="62" height="16" alt="Show All" 
> class="xButton" onclick="ResetSearch();document.SearchForm.ShowAll.value=1;"/>
>
>src="/media/pics/cms/reset.gif" width="62" height="16" alt="Reset" 
> class="xButton" onclick="ResetSearch();document.SearchForm.ShowAll.value=0;"/>
>
> 
>   
>name="PageProductStatus" value="Active">
>
>name="ShowAll" value="1">
>
>   
>   
>   
>
>
> Now in my js I have:
> $().ready(function() {
> $("#downloadToExcel").click(function(){
> $("#Export").val(1);
>  alert( $(this).parents('form').attr('id'));//returns undefined
> alert( $(this).parents('form').eq(0).attr('id') );//returns undefined
> });
> $(".xButton").click(function(){
> $("#Export").val(0);
> });
> });
>
> Using sDumper( $(this).parents('form') );
>
> I can see that length = 0,
>
> Does it make a difference that this site is using jquery 1.2.5?
>
>
>
> On Wed, Aug 13, 2008 at 6:46 PM, Matt <[EMAIL PROTECTED]> wrote:
>
>>
>>
>>
>> On Aug 13, 5:46 am, Duncan <[EMAIL PROTECTED]> wrote:
>> > How do I find the id of the parent form?
>> >
>>
>> Try:
>>
>> $(this).parents('form').attr('id');
>>
>> You shouldn't have a form nested inside another form, so you should
>> only get one form element back.
>>
>> If you do have the nested, you can reduce the result set to the first
>> form element (the immediate parent) with eq(0):
>>
>> $(this).parents('form').eq(0).attr('id');
>>
>>
>
>
> --
> Duncan I Loxton
> [EMAIL PROTECTED]
>



-- 
Duncan I Loxton
[EMAIL PROTECTED]


[jQuery] Re: Finding form tag wrapping around image

2008-08-25 Thread Duncan
Thanks chaps, there is no nesting of forms, I know thats invalid. Here is
what the code looks like



 

Shop > Active Products 

















Now in my js I have:
$().ready(function() {
$("#downloadToExcel").click(function(){
$("#Export").val(1);
 alert( $(this).parents('form').attr('id'));//returns undefined
alert( $(this).parents('form').eq(0).attr('id') );//returns undefined
});
$(".xButton").click(function(){
$("#Export").val(0);
});
});

Using sDumper( $(this).parents('form') );

I can see that length = 0,

Does it make a difference that this site is using jquery 1.2.5?


On Wed, Aug 13, 2008 at 6:46 PM, Matt <[EMAIL PROTECTED]> wrote:

>
>
>
> On Aug 13, 5:46 am, Duncan <[EMAIL PROTECTED]> wrote:
> > How do I find the id of the parent form?
> >
>
> Try:
>
> $(this).parents('form').attr('id');
>
> You shouldn't have a form nested inside another form, so you should
> only get one form element back.
>
> If you do have the nested, you can reduce the result set to the first
> form element (the immediate parent) with eq(0):
>
> $(this).parents('form').eq(0).attr('id');
>
>


-- 
Duncan I Loxton
[EMAIL PROTECTED]


[jQuery] Re: weird behavior with show()

2008-08-25 Thread clrockwell

Got it.  I used stop() to halt the animation but it leaves all the
styles so some manual clean-up does the trick

On Aug 24, 10:14 pm, clrockwell <[EMAIL PROTECTED]> wrote:
> Is it possible to stop (or reverse) show() if someone hovers over an
> element and then mouses out before the show() is complete?
>
> On Aug 24, 2:39 pm, clrockwell <[EMAIL PROTECTED]> wrote:
>
> > Hello all, I could really use some insight in this.  I am using the
> > following jquery to show a menu on hover.  The issue is that if you do
> > not hover the link until the menu is completely shown, it pops up
> > underneath.  It's probably best if you just see what it 
> > does:http://www.chrisrockwell.com/csphoto.  The portfolio and information
> > links will behave very weirdly if you just run the mouse across them.
>
> > I really appreciate any help that is offered.
>
> > Thanks much.
>
> > $(document).ready(function() {
> > // find class .sub-menu-present and add hover
> > $('lo#portfolio-link').css('display', 'none');
> > $('lo#information-link').css('display', 'none');
> > $('li#portfolio-link').hover(
> > function() {
> > $('ul.portfolio').css('display', 'none').show(1000);
> > },
> > function() {
> > $('ul.portfolio').css('display', 'none');
> > }
>
> > );
> > $('li#information-link').hover(
> > function() {
> > $('ul.information').css('display', 
> > 'none').show(1000);
> > },
> > function() {
> > $('ul.information').css('display', 'none');
> > }
>
> > );
>
> > })


[jQuery] Re: weird behavior with show()

2008-08-25 Thread clrockwell

Nobody has any insight on this?  If more information is needed, please
don't hesitate to let me know.  It just doesn't seem logical that this
behavior is unavoidable because it would render the show function
useless as a hover; I have to be doing something wrong.

On Aug 24, 10:14 pm, clrockwell <[EMAIL PROTECTED]> wrote:
> Is it possible to stop (or reverse) show() if someone hovers over an
> element and then mouses out before the show() is complete?
>
> On Aug 24, 2:39 pm, clrockwell <[EMAIL PROTECTED]> wrote:
>
> > Hello all, I could really use some insight in this.  I am using the
> > following jquery to show a menu on hover.  The issue is that if you do
> > not hover the link until the menu is completely shown, it pops up
> > underneath.  It's probably best if you just see what it 
> > does:http://www.chrisrockwell.com/csphoto.  The portfolio and information
> > links will behave very weirdly if you just run the mouse across them.
>
> > I really appreciate any help that is offered.
>
> > Thanks much.
>
> > $(document).ready(function() {
> > // find class .sub-menu-present and add hover
> > $('lo#portfolio-link').css('display', 'none');
> > $('lo#information-link').css('display', 'none');
> > $('li#portfolio-link').hover(
> > function() {
> > $('ul.portfolio').css('display', 'none').show(1000);
> > },
> > function() {
> > $('ul.portfolio').css('display', 'none');
> > }
>
> > );
> > $('li#information-link').hover(
> > function() {
> > $('ul.information').css('display', 
> > 'none').show(1000);
> > },
> > function() {
> > $('ul.information').css('display', 'none');
> > }
>
> > );
>
> > })


[jQuery] Custom plugin needed

2008-08-25 Thread jwells00

Hello all,

I'm not sure if this is the right list for this posting, but Christian
Bach, creator of the tablesorter plugin, recommended I "email the
jquery list" to ask if anyone was interested in developing a custom
plugin or customizing the tablesorter plugin for a some work I need to
get done.  I need a hierarchical table sorting solution and I've
looked at a couple of javascript based solutions that are close, but
not quite there:

http://www.pengoworks.com/workshop/jquery/tablesorter/tablesorter.htm
http://www.hanpau.com/jquery/unobtrusivetreetable.php

They are tantalizingly close to what I need but do not meet all the
requirements.  The only working example I've found that pretty much
meets the requirement is at

http://scand.com/products/awtx/treetable/

but this is a full blown Java Applet, not at all a technology that I
want to introduce into our application.  We've standardized on jquery
(and tablesorter) and I'd like to keep it that way.

Is anyone available to do some consulting work now, modifying the
tablesorter plugin or developing one from scratch that will sort like
the example I cited above?

Thanks,
Jack
---
Jack Wells
Niche Applications | Consulting
Better Direct Selling Solutions
+1.561.893.9300, ext. 102
[EMAIL PROTECTED]
---


[jQuery] Re: JSON in jQuery

2008-08-25 Thread Michael Geary

I don't know, what do you want to do there? You said this is for feedback,
so I assume you may want to display some kind of message after you receive
it.

Your server should send back a JSONP response of some sort. You can put any
kind of data you want in it, maybe a status code and an HTML message string?

For example, if your feedback URL receives this query string:

?callback=js1234&feedback=Great%20site%21

it could send back this JSONP response:

js1234({
"error": false,
"message": "Thanks for your feedback!"
})

And then in your getJSON callback, you would use response.error and
response.message to get that data.

You can extend it from there any way you want.

-Mike

> From: Sam
> 
> Thanks Mike!  I understand now why I need to do a GET and 
> can't do a POST.  What would I do in the function(response){} part?
> 
> On Aug 25, 4:13 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> > You can't do a cross-domain POST. JSON or JSONP don't add 
> this capability.
> > You just can't do it.
> >
> > You can do a cross-domain GET, of course, and use query 
> parameters to 
> > pass data to your server.
> >
> > So, you can use $.getJSON with query parameters in the URL and the 
> > callback= option for JSONP, and have your server return a JSONP 
> > payload with the results of your request.
> >
> >     $.getJSON(
> >         'http://example.com/feedback?callback=?&feedback='+
> >             encodeURIComponent(feedback),
> >         function( response ) {
> >             ...
> >         }
> >     );
> >
> > -Mike
> >
> > > From: Sam
> >
> > > I am creating a widget where someone can post a note 
> about the page 
> > > (feedback).  I am currently using AJAX to pass the 
> information to my 
> > > server, but I want to now use JSON, so that I can put it 
> on one of 
> > > my other domains and still send the info to my original domain.  
> > > This is the function I currently have:
> >
> > > function saveNote(obj, cancel) {
> > >     var note_html = $(obj).parents(".note");
> > >     var page_id = getPageId($(obj));
> > >     if(!cancel) {
> > >         var t = note_html.find("textarea").val();
> > >         var url = G_MAIN_DOMAIN + "/page/addNote";
> > >         $.post(url, { page_id: page_id, note: t 
> },function(data){});
> > >     } else {
> > >         var t = cancel;
> > >     }
> > >     if(t=='') t='(click to add text)';
> > >     note_html.html("" + t + " > > a>");
> > > }
> >
> > > I want to change the $.post to something that sends out a JSON 
> > > object.  Do I need to create another function or how do I do this?
> > > Thanks for the help!
> 



[jQuery] Re: Release: Tooltip Plugin 1.3

2008-08-25 Thread MorningZ

I don't really follow on the bodyHandler option

for instance, there are my links:

Link 1
Link 2

and to wire it up have:

$(".PN_Link").tooltip({
track: true,
delay: 0,
showURL: false,
opacity: 1,
fixPNG: true,
extraClass: "pretty fancy",
top: 5,
left: 5,
bodyHandler: function() {
return $(this).attr("title");
 }
});

and the tooltip is empty   what should be in the function there?


[jQuery] Re: [autocomplete] Auto populate form input field based on another

2008-08-25 Thread Jörn Zaefferer
The autocomplete plugin
(http://plugins.jquery.com/project/autocompletex) can do that. Set the
one up as usual, and configure the other one with a dynamic extra
paramter:

$("#second").autocomplete("url", {
extraParams: {
first: function() {
return $("#first").val();
}
}
});

Jörn

On Mon, Aug 25, 2008 at 11:22 PM, Mattl <[EMAIL PROTECTED]> wrote:
>
> Hi,
> Anyone know of a jQuery plugin similar to the Autocomplete that could
> do the following?
>
> I have a mysql db with two columns, 'Lot No' and 'Description'.
>
> I have a form with two input fields, 'Lot No' and 'Description' and
> I'd like the 'Description' input field to be auto-populated from the
> database based on the entry the user puts into the 'Lot No' input
> field.
>
> ie if they typed in '1' into the 'Lot No' field then the 'Description'
> input field would call up the corresponding row entry to '1' from the
> database.
>
> Hope I've explained this clearly enough...
>
> Many thanks
> Matt
>


[jQuery] Re: AutoComplete -bassistance

2008-08-25 Thread Jörn Zaefferer
Look:

$(function() {
  $("#name").autocomplete("someurl");
});

That does nothing but bind a few event handlers. It doesn't create DOM
elements, nor does it load any records.

As soon as the user starts typing, the keyup-event-handler loads some
data via ajax - how many rows are returned is up to your serverside.
It then creates the necessary DOM elements to show the result list and
adds event handlers to that (for keyboard navigation etc.).

I hope that gives you a better idea how it works.

Jörn

On Mon, Aug 25, 2008 at 8:22 PM, kreiss <[EMAIL PROTECTED]> wrote:
>
> First of all...thanks for the help!
> I have about 4500 records in the database  (its an employee
> database)...if I understand correctly...on the document ready should I
> bring in all 4500 records?  Would the autocomplete be slow to respond
> due to all the records
>
> The reason I was doing an onKeyUp is so I could limit the number of
> records that the servlet brought back, keeping the array in javascript
> smaller..
>
> My question is am I supposed to bring back ALL records on the document
> ready?
>
> Thanks so much.
>
>
>
>
>
>
> Jörn Zaefferer wrote:
>> You're binding the autocomplete on keyup, which binds another keyup
>> event - every time. Remove your inline event handler and initialize
>> the autocomplete just once on document ready.
>>
>> Jörn
>>
>> On Mon, Aug 25, 2008 at 4:52 PM, kreiss <[EMAIL PROTECTED]> wrote:
>> >
>> > Following the documentation, it seems I'm doing it correctly...I'm
>> > getting data back from my database, but I just have to click out of
>> > the textbox first before I see the data, other than that it works
>> > great.
>> >
>> > Jörn Zaefferer wrote:
>> >> Please take a look at the examples here:
>> >> http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/
>> >>
>> >> The "remote" examples are based on PHP, but still show the essential
>> >> stuff. You've got it all mixed up.
>> >>
>> >> Jörn
>> >>
>> >> On Fri, Aug 22, 2008 at 9:57 PM, kreiss <[EMAIL PROTECTED]> wrote:
>> >> >
>> >> > I'm close to getting the autocomplete to finally work...but.
>> >> >
>> >> > First of all, I'm using Java / .jsp to query a database for results
>> >> >
>> >> > I'm sending the url to my servlet, my servlet passes the data back to
>> >> > the .jsp pageNothing appears in my dropdown UNLESS I use my mouse,
>> >> > click outside of the textbox and then click back into it.  Then the
>> >> > autocomplete works great and displays the data from the database
>> >> >
>> >> > I've tried IE, Opera, Firefox and everyone of them requires me to
>> >> > start typing in the text box, click out, click back in then the
>> >> > autocomplete displays.
>> >> >
>> >> > Is this a bug or am I'm doing something wrong.
>> >> >
>> >> > I've read something in this form about a guy wanting to know if there
>> >> > was a "reinitialize" function that could be called in the javascript
>> >> > once the data was brought back from the servlet...I didn't see a
>> >> > solutions, but think maybe this is what I need.
>> >> >
>> >> > Here is sample code:
>> >> >
>> >> > //JavaScript Code
>> >> > function getNames()
>> >> > {
>> >> >  $("#name").autocomplete("employeedirectory?command=ajax&q=" +
>> >> > document.forms[0].test.value + "&limit=10");
>> >> > }
>> >> >
>> >> > //HTML
>> >> > Name:
>> >> > 

[jQuery] Re: JSON in jQuery

2008-08-25 Thread Sam

Thanks Mike!  I understand now why I need to do a GET and can't do a
POST.  What would I do in the function(response){} part?

On Aug 25, 4:13 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> You can't do a cross-domain POST. JSON or JSONP don't add this capability.
> You just can't do it.
>
> You can do a cross-domain GET, of course, and use query parameters to pass
> data to your server.
>
> So, you can use $.getJSON with query parameters in the URL and the callback=
> option for JSONP, and have your server return a JSONP payload with the
> results of your request.
>
>     $.getJSON(
>         'http://example.com/feedback?callback=?&feedback='+
>             encodeURIComponent(feedback),
>         function( response ) {
>             ...
>         }
>     );
>
> -Mike
>
> > From: Sam
>
> > I am creating a widget where someone can post a note about
> > the page (feedback).  I am currently using AJAX to pass the
> > information to my server, but I want to now use JSON, so that
> > I can put it on one of my other domains and still send the
> > info to my original domain.  This is the function I currently have:
>
> > function saveNote(obj, cancel) {
> >     var note_html = $(obj).parents(".note");
> >     var page_id = getPageId($(obj));
> >     if(!cancel) {
> >         var t = note_html.find("textarea").val();
> >         var url = G_MAIN_DOMAIN + "/page/addNote";
> >         $.post(url, { page_id: page_id, note: t },function(data){});
> >     } else {
> >         var t = cancel;
> >     }
> >     if(t=='') t='(click to add text)';
> >     note_html.html("" + t + " > a>");
> > }
>
> > I want to change the $.post to something that sends out a
> > JSON object.  Do I need to create another function or how do
> > I do this?
> > Thanks for the help!


[jQuery] Superfish CSS question Position Static

2008-08-25 Thread glowens

I am having an issue with the menu being extremely slow when I have
the following position set to static.

.sf-navbar li {
background: url('images/menu_tab.png') repeat-x;
height: 54px;
position:   satic;
margin: 41px 1px 0 0;
padding:8px 0 0 0;
border:1px solid red
}

It works fine in IE but not Firefox.  Any suggestions.

Below is the rest of my CSS


/*** adding the class sf-navbar in addition to sf-menu creates an all-
horizontal nav-bar menu ***/
.sf-navbar {
background: none;
height: 2.5em;
padding-bottom: 2.5em;
position:   relative;
padding-left:   251px;
}
.sf-navbar li {
background: url('images/menu_tab.png') repeat-x;
height: 54px;
position:   relative;
margin: 41px 1px 0 0;
padding:8px 0 0 0;
border:1px solid red
}
.sf-navbar a {
border-top: none;
display:block;
line-height:34px;
margin-top: -10px;

}
.sf-navbar li li a {
line-height: 110%;
border:1px solid green
}
.sf-navbar li ul {
width:  44em; /*IE6 soils itself without this*/
}
.sf-navbar li li {
background: none;
position:   static;
left:   1.5em; /*adjusts submenu left margin */
top:41px; /*adjusts vertical spacing for submenu*/
margin: 8px auto 0 auto;
}
.sf-navbar li li ul {
width:  13em;
}
.sf-navbar li li li {
width:  100%;
}
.sf-navbar ul li {
width:  auto;
float:  left;
}
.sf-navbar a, .sf-navbar a:visited {
border: none;
color:  #fff;
}
.sf-navbar li li a, .sf-navbar a:focus, .sf-navbar a:hover, .sf-navbar
a:active, .sf-navbar li li a:visited {
color:  #000;
}
#mainnav .sfHover a{color:#000;} /*fixes text change on hover when
hover is not directly over the text*/

.sf-navbar li.current {
background: pink;
}
.sf-navbar li:hover,
.sf-navbar li.sfHover,
.sf-navbar li li.current,
.sf-navbar a:focus,/*.sf-navbar a:hover,*/ .sf-navbar a:active {
background: url('images/menu_tab_selected.png') repeat-x;
}

#vids #mainnav .videos, #forum #mainnav .forums,
#group #mainnav .groups, #event #mainnav .events, #ads
#mainnav .classifieds{
background: url('images/menu_tab_selected.png') repeat-x;
}
#pics #mainnav .home {
background: url('images/menu_tab1_selected.png') repeat-x;
}
#pics #mainnav .home a, #vids #mainnav .videos a, #forum
#mainnav .forums a,
#group #mainnav .groups a, #event #mainnav .events a, #ads
#mainnav .classifieds a{
color: #000;
}
.sf-navbar #phover li.sfHover {
background: url('images/menu_tab1_selected.png') no-repeat
transparent;
}
.sf-navbar ul li:hover,
.sf-navbar ul li.sfHover,
ul.sf-navbar ul li:hover li,
ul.sf-navbar ul li.sfHover li,
.sf-navbar ul a:focus, .sf-navbar ul a:hover, .sf-navbar ul a:active {
background: none;
}
ul.sf-navbar li li li:hover,
ul.sf-navbar li li li.sfHover,
.sf-navbar li li.current li.current,
.sf-navbar ul li li a:focus, .sf-navbar ul li li a:hover, .sf-navbar
ul li li a:active {
background: navy;
}
ul.sf-navbar .current ul,
ul.sf-navbar ul li:hover ul,
ul.sf-navbar ul li.sfHover ul {
left:   0;
top:2.5em; /* match top ul list item height */
}
ul.sf-navbar .current ul ul {
top:-999em;
}

.sf-navbar li li.current > a {
font-weight:bold;
}

/*** point all arrows down ***/
/* point right for anchors in subs */
.sf-navbar ul .sf-sub-indicator { background-position: -10px -100px; }
.sf-navbar ul a > .sf-sub-indicator { background-position: 0 -100px; }
/* apply hovers to modern browsers */
.sf-navbar ul a:focus > .sf-sub-indicator,
.sf-navbar ul a:hover > .sf-sub-indicator,
.sf-navbar ul a:active > .sf-sub-indicator,
.sf-navbar ul li:hover > a > .sf-sub-indicator,
.sf-navbar ul li.sfHover > a > .sf-sub-indicator {
background-position: -10px -100px; /* arrow hovers for modern
browsers*/
}

/*** remove shadow on first submenu ***/
.sf-navbar > li > ul {
background: transparent;
padding: 0;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-topright: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
}
/***ADDED BY CREATESEAN */
#mainnav {
min-height: 95px;
background: url('images/logo1.jpg') no-repeat transparent;
font-variant:   small-caps;
}


[jQuery] Re: JSON in jQuery

2008-08-25 Thread Sam

Thanks Mike!  I understand now why I need to do a GET and can't do a
POST.  What would I do in the function(response){} part?

On Aug 25, 4:13 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> You can't do a cross-domain POST. JSON or JSONP don't add this capability.
> You just can't do it.
>
> You can do a cross-domain GET, of course, and use query parameters to pass
> data to your server.
>
> So, you can use $.getJSON with query parameters in the URL and the callback=
> option for JSONP, and have your server return a JSONP payload with the
> results of your request.
>
>     $.getJSON(
>         'http://example.com/feedback?callback=?&feedback='+
>             encodeURIComponent(feedback),
>         function( response ) {
>             ...
>         }
>     );
>
> -Mike
>
> > From: Sam
>
> > I am creating a widget where someone can post a note about
> > the page (feedback).  I am currently using AJAX to pass the
> > information to my server, but I want to now use JSON, so that
> > I can put it on one of my other domains and still send the
> > info to my original domain.  This is the function I currently have:
>
> > function saveNote(obj, cancel) {
> >     var note_html = $(obj).parents(".note");
> >     var page_id = getPageId($(obj));
> >     if(!cancel) {
> >         var t = note_html.find("textarea").val();
> >         var url = G_MAIN_DOMAIN + "/page/addNote";
> >         $.post(url, { page_id: page_id, note: t },function(data){});
> >     } else {
> >         var t = cancel;
> >     }
> >     if(t=='') t='(click to add text)';
> >     note_html.html("" + t + " > a>");
> > }
>
> > I want to change the $.post to something that sends out a
> > JSON object.  Do I need to create another function or how do
> > I do this?
> > Thanks for the help!


[jQuery] Table Filter help

2008-08-25 Thread dduck1934

I have already received some feedback on this, but Im still stuck.
I am basically looking to add a table filter to a table by using a
dropdown or a series of dropdowns that will filter the data.   The
first link i was checking out is here.

http://book.learningjquery.com/bookstore/news/

i was using that and trying to conver it over to be a dropdown
instead, and I got it to work somewhat, but was extremely slow.  I can
post code if interested.

Ive looked at other plugins, but most of them dont do dropdowns and
only give you a text field where the user can type in text and it will
filter.  This is great, but if i could tie it to a dropdown instead,
then all is great!

Ive looked at the jquery quicksearch plugin as well as this one

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

there are some others on the plugins section that do the filtering as
well.

If any of you would like to assist me, id appreciate it.


[jQuery] [autocomplete] Auto populate form input field based on another

2008-08-25 Thread Mattl

Hi,
Anyone know of a jQuery plugin similar to the Autocomplete that could
do the following?

I have a mysql db with two columns, 'Lot No' and 'Description'.

I have a form with two input fields, 'Lot No' and 'Description' and
I'd like the 'Description' input field to be auto-populated from the
database based on the entry the user puts into the 'Lot No' input
field.

ie if they typed in '1' into the 'Lot No' field then the 'Description'
input field would call up the corresponding row entry to '1' from the
database.

Hope I've explained this clearly enough...

Many thanks
Matt


[jQuery] Re: Release: Tooltip Plugin 1.3

2008-08-25 Thread Jörn Zaefferer
You could use the bodyHandler-option to return exactly the content you
want to have. That automatically hides the header (h3).

Jörn

On Mon, Aug 25, 2008 at 8:07 PM, MorningZ <[EMAIL PROTECTED]> wrote:
>
> I was just messing around with this plugin yesterday, and i love it!
>
> http://i38.tinypic.com/30deagg.jpg (screenshot of me using it)
>
>
> Only thing i couldn't figure out was how to *not* generate 
> headers/tag...   my work around was setting:
>
>  #tooltip h3 { display: none; }
>
> and my titles had to be like this:
>
> link
>
>


[jQuery] Re: input:empty and remember password

2008-08-25 Thread Karl Rudd

Run your "is there anything in it" check again "on load". So something
like (untested):

$(document).ready(function() {
 $('#loginArea').addClass('active');

 function flagEmpty( elem ) {
   elem = $(elem || this);  // if "elem" isn't passed in then use "this"
   if (elem.val().length > 0)
 elem.addClass("nobg");
   else
 elem.removeClass("nobg");
 }

 $('#loginArea.active input')
   .each( flagEmpty )
   .focus( flagEmpty )
   .blur( flagEmpty );

 $(window).load(function() {
   $('#loginArea.active input').each( flagEmpty );
 });
});

Karl Rudd

On Tue, Aug 26, 2008 at 6:26 AM, sperks <[EMAIL PROTECTED]> wrote:
>
> I have a script that displays username and password as background
> images in the input fields when the field is empty and they removes it
> when on focus (or when there's content left in the field). I then came
> up against the issue where if someone's browser populates the input
> fields after their browser is asked to remember their password and I
> end up with both the input fields being populated and the background
> showing.  Here's my initial script:
>
> $(document).ready(function() {
>  $('#loginArea').addClass('active');
>  $('#loginArea.active input')
>.focus(function() {
>  $(this).addClass("nobg");
>})
>.blur(function() {
>  if ($(this).val() == '') {
>$(this).addClass("nobg");
>  };
>   });
> });
>
> I tried using
>  $('#loginArea.active input:empty').removeClass("nobg");
> but FF doesn't add the username/password until after the page has
> loaded (I don't know what other browsers are doing), and thus the
> decision to addClass is based on empty cells.
>
> Anyone have an idea of how to resolve this one?
>


[jQuery] Re: Something equivalent to Prototype's Class.create() ??

2008-08-25 Thread Rey Bango


LowPro would probably be th ebest solution for you.

Rey...

Shao Kang Tat wrote:

Hello all,

I've googled this topic...
I found one page that was an April Fool's joke but I'm not entirely
sure if it's legit or not?
http://ejohn.org/blog/classy-query/

Then there's Low Pro at:
http://www.danwebb.net/2008/2/3/how-to-use-low-pro-for-jquery

So is there a final version that's included in jQuery or does it have
to be included separately (i.e. one of the two above - or is there an
even better version out there?)

Thanks,
Shao



[jQuery] Re: Enabling a button depending on checkboxes...

2008-08-25 Thread Karl Rudd

document.getElementById("someId") returns a plain old DOM node.
$("#someId") returns a jQuery "wrapped" DOM node, which you can use
all the jQuery functions on.

So to use jQuery to remove the attribute you'd do this:

  $("#DeleteButton").removeAttr("disabled");

Note the shortened function name: "setAttribute" becomes "attr",
"removeAttribute" becomes "removeAttr".

The advantage of the jQuery method is that you can easily do the same
thing to a collection of objects. For instance, remove the "disabled"
attribute from all the "input" elements in a particular form:

  $("form#myForm input").removeAttr("disabled");

Karl Rudd

On Mon, Aug 25, 2008 at 11:39 PM, MBaas <[EMAIL PROTECTED]> wrote:
>
> At least I can answer my own question #1 now: disabled-attribute needs
> to be removed if it shouldn't be applied, setting it to blank does not
> help. So my code was changed to:
>
> function SetDeleteStatus()
> {
>var foo="disabled";
>   $("#gvFolderItems input:checkbox").attr("checked",function()
>{if (this.checked) {foo="";}
>}
>)
>
>if (foo=="") {
>// $("#DeleteButton").removeAttribute("disabled");
>//  error: object does not support selected property or 
> method!
>
> document.getElementById("DeleteButton").removeAttribute("disabled");
>} else {
>
> document.getElementById("DeleteButton").setAttribute("disabled","disabled");
>}
>
>
>alert("deletebutton=" + foo);
> }
>
> There was a surprise along the way, as $("#DeleteButton") led to an
> error "Object does not supported property or method" whereas it works
> fine with document.getElementById - I thought the two were
> interchangeable...?
>


[jQuery] paralax plugin _ wow !

2008-08-25 Thread Alexandre Plennevaux
just spotted this new entry in the plugin rss feed, an impressive effect
plugin !

http://webdev.stephband.info/parallax_demos.html



Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: JSON in jQuery

2008-08-25 Thread Michael Geary

You can't do a cross-domain POST. JSON or JSONP don't add this capability.
You just can't do it.

You can do a cross-domain GET, of course, and use query parameters to pass
data to your server.

So, you can use $.getJSON with query parameters in the URL and the callback=
option for JSONP, and have your server return a JSONP payload with the
results of your request.

$.getJSON(
'http://example.com/feedback?callback=?&feedback=' +
encodeURIComponent(feedback),
function( response ) {
...
}
);

-Mike

> From: Sam
> 
> I am creating a widget where someone can post a note about 
> the page (feedback).  I am currently using AJAX to pass the 
> information to my server, but I want to now use JSON, so that 
> I can put it on one of my other domains and still send the 
> info to my original domain.  This is the function I currently have:
> 
> function saveNote(obj, cancel) {
> var note_html = $(obj).parents(".note");
> var page_id = getPageId($(obj));
> if(!cancel) {
> var t = note_html.find("textarea").val();
> var url = G_MAIN_DOMAIN + "/page/addNote";
> $.post(url, { page_id: page_id, note: t },function(data){});
> } else {
> var t = cancel;
> }
> if(t=='') t='(click to add text)';
> note_html.html("" + t + " a>");
> }
> 
> 
> I want to change the $.post to something that sends out a 
> JSON object.  Do I need to create another function or how do 
> I do this?
> Thanks for the help!
> 



[jQuery] Re: Can't get css png fix plugin to work....

2008-08-25 Thread Adam Weis
Arron,

You'll need to do the initialization in the DOM ready block.  Take a look at
http://docs.jquery.com/How_jQuery_Works under the section titled "Launching
Code on Document Ready".  In your case, you probably need something like
this -

 $(document).ready(function(){
 $('div#logo').cssPNGFix();
 });


Hope that helps.

-Adam

On Mon, Aug 25, 2008 at 4:37 PM, Aaron <[EMAIL PROTECTED]> wrote:

>
> what do you mean initialize the script???  I added it to the html file
> using the 

[jQuery] Re: Animate and Toggle

2008-08-25 Thread René

Thanks Mike, that works well.

Further to this, I am trying to have a function called only when the
toggle is "open" or active, e.g.:

$('#rides_button').click(function () {
$('#rides').slideToggle("slow", function () {
$.getJSON("rides.php", function(data) {

[...]

});
});
});


As you can see, the rides.php script only really needs to be called
when the DIV opens (slideDown), but in this case it's called on
slideUp as well. ... Not sure of the proper approach to use here...

...Rene


On Aug 11, 7:22 pm, mikebob <[EMAIL PROTECTED]> wrote:
> The animatefunctionhas a callback parameter that you can use when
> the animation completes.  Then you must rebind the click event to
> something different.  Try something like this Rene.
>
>     $("#go1").click(function(){
>       $("#block1").animate( { width:"90%" }, 1500, "",function() {
>                 $("#go1").unbind("click").click(function(){
>                         $("#block1").css({width:""});
>                 });
>           });
>     });
>
> On Aug 11, 5:19 am, René <[EMAIL PROTECTED]> wrote:
>
> > I have a similar question... I want to animate atogglebetween two
> > widths, a la:
>
> >     $("h2").click(function(){
> >                 $(this).toggleClass("active");
> >                 $("div#panel").animate({ width: "200px" });
> >                 $(this).next("ul").slideToggle("fast");
> >         });
>
> > This works on the first click--the div#panel smoothly widens. But of
> > course when h2 is clicked again, it doesn't change. Can anyone suggest
> > how to add the animation in reverse, that is back to the starting
> > width?
>
> > ...Rene
>
> > On Aug 10, 10:46 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
>
> > > Do you have a sample page up? It would help to diagnose what's going on.
>
> > > --John
>
> > > On Sun, Aug 10, 2008 at 3:00 PM, Russell <[EMAIL PROTECTED]> wrote:
>
> > > > Hi there,
>
> > > > I am pretty new to JQuery. I hope someone can answer these questions
> > > > for me.
>
> > > > I have some links on top of the page that are fixed in the center and
> > > > a single division
> > > > that is fixed in the middle of the page bellow them. I wanted to know
> > > > how I could animate
> > > > the division to resize itself and populate it with text, images, etc.
> > > > when I click on a link.
> > > > The links are external .html
>
> > > > I tried using this just to test:
>
> > > > $(document).ready(function() {
> > > >        $("li.action-one").click(function(){
> > > >                $("#content").animate({
> > > >                        width: "300px"
> > > >                });
> > > >        });
> > > >        $("li.action-one").click(function(){
> > > >                $("#topic").toggle();
> > > >        });
> > > > });
>
> > > > The topic div is in the content div and is hidden. I cant seem to make
> > > > animate andtoggle
> > > > to work on the same link...if I take out one, it works.


[jQuery] jQuery 1.2.X's .clean() mangles namespaced elements

2008-08-25 Thread Antonio Collins


The .clean() method tries to replace empty elements defined as  with
.  Here's the code from .clean():

   // Convert html string into DOM nodes
   if ( typeof elem == "string" ) {
  // Fix "XHTML"-style tags in all browsers
  elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
 return
tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
all :
front + ">";
  });

If the element is namespaced like this:
   
the manufactured closing tag is incorrect:
   

Changing the regular expression's (\w+) to ([A-Za-z0-9_:]+) fixes the
problem.  

-- 
View this message in context: 
http://www.nabble.com/jQuery-1.2.X%27s-.clean%28%29-mangles-namespaced-elements-tp19151160s27240p19151160.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Can't get css png fix plugin to work....

2008-08-25 Thread Aaron

what do you mean initialize the script???  I added it to the html file
using the 

[jQuery] Superfish: Gap between top level menu and popup..

2008-08-25 Thread ccollie

i have a menu where each top level  is preceded by an icon image.
I also use supersub.

The menu renders fine, except there is a gap between the top level
items and the popups. Anyone has any insight ?


ccollie


[jQuery] Re: Problems with Content-Type header set to text/xml

2008-08-25 Thread BBrian


I was having similar problems today and it turned out I had blank
lines in my php script, before I had http://ie2.php.net/header has an example that uses  on the line
before .

You can check the content type returned by hitting CTRL+I in Firefox,
though it will be pretty apparant if it is the correct XML.

B.


On Aug 23, 3:07 pm, Arun Kumar <[EMAIL PROTECTED]>
wrote:
> No solutions???
>
> On Aug 17, 2:42 pm, Arun Kumar <[EMAIL PROTECTED]>
> wrote:
>
> > A small correction,
>
> > If I set that header, it is not working in FF. If I remove that
> > header, it is not working in IE 7.
>
> > Than I added another parameter to my ajax request, dataType: "text/
> > xml". This time, If I set the header, it is working in FF and not
> > working in IE 7 and If I remove that header, then it is not working in
> > FF and working in IE 7.
>
> > On Aug 17, 2:21 pm,ArunKumar<[EMAIL PROTECTED]>
> > wrote:
>
> > > If I( don't set thatheader, Ajax requests are not working in FF. If I
> > > set thisheader, Ajax request is not working in IE.
>
> > > On Aug 15, 12:22 am, Bil Corry <[EMAIL PROTECTED]> wrote:
>
> > > >ArunKumarwrote on 8/14/2008 1:08 PM:
>
> > > > > I am using PHP as server side language and I am sending Ajax request
> > > > > to that page and if I set
> > > > >header("Content-Type: text/xml");
> > > > > Then, in jQuery, I am not able to parse the response object even
> > > > > though I use dataType: "xml".
>
> > > > > If I remove theheader, then it is working in Ajax( I am able to use
> > > > > the response in jQuery). But if I remove thatheaderfunction, then
> > > > > browser is displaying that XML as a text file(When accessed using
> > > > > normal HTTP protocol, not Ajax).
>
> > > > If nothing else, you can detect if the request contains the 
> > > > "X-Requested-With"header, if so, that's jQuery so don't use text/xml, 
> > > > otherwise, you can use the text/xml content type.
>
> > > > - Bil


[jQuery] Re: Email Validation

2008-08-25 Thread Hasse R. Hansen

I would start with splitting the list of emails, and then loop the
array and in every instance of the loop validate the email adress

/Hasse

On Aug 25, 9:05 pm, koolkat <[EMAIL PROTECTED]> wrote:
> Is it possible to use jquery to validate a comma separated list of
> emails? If yes, how should this be done?
> Thanks


[jQuery] Re: input:empty and remember password

2008-08-25 Thread Andy Matthews

This is what someone on this list gave me about 2 weeks ago:

// the focus / blur functionality of the text input
// fields for the email a friend form.
$('#input.email').bind('focus', function() { 
// Set the default value if it isn't set 
if ( !this.defaultValue ) this.defaultValue = this.value; 
// Check to see if the value is different 
if ( this.defaultValue && this.defaultValue != this.value ) return; 
// It isn't, so remove the text from the input 
this.value = ''; 
}) 
.bind('blur', function() { 
// If the value is blank, return it to the defaultValue 
if ( this.value.match(/^\s*$/) ) 
this.value = this.defaultValue; 
});

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sperks
Sent: Monday, August 25, 2008 3:26 PM
To: jQuery (English)
Subject: [jQuery] input:empty and remember password


I have a script that displays username and password as background images in
the input fields when the field is empty and they removes it when on focus
(or when there's content left in the field). I then came up against the
issue where if someone's browser populates the input fields after their
browser is asked to remember their password and I end up with both the input
fields being populated and the background showing.  Here's my initial
script:

$(document).ready(function() {
  $('#loginArea').addClass('active');
  $('#loginArea.active input')
.focus(function() {
  $(this).addClass("nobg");
})
.blur(function() {
  if ($(this).val() == '') {
$(this).addClass("nobg");
  };
   });
});

I tried using
  $('#loginArea.active input:empty').removeClass("nobg");
but FF doesn't add the username/password until after the page has loaded (I
don't know what other browsers are doing), and thus the decision to addClass
is based on empty cells.

Anyone have an idea of how to resolve this one?




[jQuery] input:empty and remember password

2008-08-25 Thread sperks

I have a script that displays username and password as background
images in the input fields when the field is empty and they removes it
when on focus (or when there's content left in the field). I then came
up against the issue where if someone's browser populates the input
fields after their browser is asked to remember their password and I
end up with both the input fields being populated and the background
showing.  Here's my initial script:

$(document).ready(function() {
  $('#loginArea').addClass('active');
  $('#loginArea.active input')
.focus(function() {
  $(this).addClass("nobg");
})
.blur(function() {
  if ($(this).val() == '') {
$(this).addClass("nobg");
  };
   });
});

I tried using
  $('#loginArea.active input:empty').removeClass("nobg");
but FF doesn't add the username/password until after the page has
loaded (I don't know what other browsers are doing), and thus the
decision to addClass is based on empty cells.

Anyone have an idea of how to resolve this one?


[jQuery] Forum to display full JS Browser apps

2008-08-25 Thread lorlarz

I am hoping several jQuery people will post examples of their
programs, with explanations.  In any case, you can share
and learn from others on this group, if things go well.
(See the first 7 posts for the rationale for the new group.)

New group to display and share and explain examples of interactive
javascript programs for the Internet (i.e. full-blown browser
programs)

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

This group should do a lot to clarify things about the major
libraries and to promote them as well. I am sure jQuery
will be seen well, if some show some apps using it here.

Please feel free to invite anyone who might be able to contribute


[jQuery] Something equivalent to Prototype's Class.create() ??

2008-08-25 Thread Shao Kang Tat

Hello all,

I've googled this topic...
I found one page that was an April Fool's joke but I'm not entirely
sure if it's legit or not?
http://ejohn.org/blog/classy-query/

Then there's Low Pro at:
http://www.danwebb.net/2008/2/3/how-to-use-low-pro-for-jquery

So is there a final version that's included in jQuery or does it have
to be included separately (i.e. one of the two above - or is there an
even better version out there?)

Thanks,
Shao


[jQuery] coda slider on .mac with FF2

2008-08-25 Thread roxstyle

I am trying to use the coda slider with jquery here:
http://www.roxstyle.com/projects/blssi/blssi-portal/v1-e/product-tss.html

And i'll preface this by saying that i am much more of a designer than
scripter(much more). the problem is that using mac with Firefox
2.0.0.14, on the "products" area
1. go to products area- any product
2. in the slider - any of the links opens the remote site in the same
window
3. click the browser back button
4. the stripNav has now added a second stripNav.

is there something in the coda-slider.1.1.1js, I need to change?

I was able to put an overflow: hidden along with a z-index to
essentailly hide these menus, but i know that is only like pushing the
dust under the rug.
I would be glad for any help, or a point in the right direction on
this.


[jQuery] Re: combining clearing default value with validate plugin

2008-08-25 Thread [EMAIL PROTECTED]

I created a plugin for assigning default values to form fields and it
has the same functionality you are looking for.  Check it out:
http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/

On Jul 24, 5:30 pm, Janine <[EMAIL PROTECTED]> wrote:
> I am quite new to jquery and in particular the excellent validate
> plugin. I have the validate plugin validating my form ok (on submit
> only).
>
> However, a few textarea fields in my form have default values (just
> using standard html value, not labels etc). I have found several nice
> little plugins to clear the default value on focus, and put it back
> again if the field is left empty etc like coolinput, toggleval etc. I
> can get these working on their own too.
>
> However, when I try to combine the 2 plugins, things don't work
> properly. The default values are cleared on focus alright, but then
> when I enter a new value (replacing the placeholder), the validator
> fires (if necessary) as soon as I lose focus, rather than waiting for
> me to click submit. Then, I need to click submit twice to get
> validation to fire. This effect happens regardless of which default
> value plugin I use.
>
> Here is a bit of the code I am using (using toggleVal plugin for
> default valuehttp://toggleval.kuzemchak.net/):
> $().ready(function() {
>         $("#field-with-default").toggleVal();
>         $("#myform").validate();
>
> });
>
> Is there a way of adding the extra form field default value
> functionality I need into the Validate plugin, or is there a way of
> making Validate and another plugin work together on this?
>
> Thanks for your time,
> Janine.


[jQuery] Accessing JQuery from frames

2008-08-25 Thread Bob Gregg

My apologies if this has been asked before; but in searching I can't
see that anyone asked quite the same thing in the past.  I have a
frame-based website with two frames: UPPER and LOWER.  The UPPER frame
contains a static navigation bar that rarely changes during a user's
session; the LOWER frame constantly changes to the current page.  What
I would like to do is to load JQuery during the *frameset* load, and
have the functions available to all applications that might appear in
the lower frame.  That gives me the benefits of JQuery in all pages of
our site, without having to pay the performance penalty of loading it
over and over.

Ignoring any possible cross-domain/document.domain issues, JQuery
seems to have an issue in at least IE due to the context of the calls.

Example 1:

* frameset.html loads JQuery normally.
* topframe.html does... well, nothing.
* bottomframe.html contains the following:
...

$=top.jQuery;
$(document).ready(function(){$("p").fadeIn("slow");});

...
Here's the text!

Needless to say, this doesn't work - when calling $, the context is
the *frameset* document, not the bottom frame.  So, for attempt number
2, I replaced the local $ definition with a wrapper to always pass the
correct context to JQuery:

$=function jQuery(o,c){return top.jQuery(o,(c)?c:document);}

That is, by default, pass the current page's document object as the
context; but if I explicitly pass another local context, use that
instead.  Now, this works like a champ in Firefox - I can use JQuery
exactly as though it were loaded right into the bottom frame, same
syntax and all.  But in IE (either 6 or 7), it treats the frameset
page as the context, regardless of what I pass in for the context
parm.  In fact, even when I do this explicitly in the bottom frame, it
still fails in IE:

$("*",document).each(function(i){alert(i+": "+this);});

This code should list all the DOM nodes in the current document.  Run
just this code in Firefox, and it iterates over the elements of the
bottom page.  Run it in IE, though, and it iterates over the elements
of the *frameset* page, even though I've explicitly passed the bottom
frame's document object as context.  I've tried several variations of
this (like explicitly passing top.frames['LOWER'] (which should wind
up identical), but it makes no difference.

Is there something I'm missing, or is there something inherent in IE's
treatment of frames that will always prevent this from working?



[jQuery] Email Validation

2008-08-25 Thread koolkat

Is it possible to use jquery to validate a comma separated list of
emails? If yes, how should this be done?
Thanks


[jQuery] Re: AutoComplete -bassistance

2008-08-25 Thread kreiss

First of all...thanks for the help!
I have about 4500 records in the database  (its an employee
database)...if I understand correctly...on the document ready should I
bring in all 4500 records?  Would the autocomplete be slow to respond
due to all the records

The reason I was doing an onKeyUp is so I could limit the number of
records that the servlet brought back, keeping the array in javascript
smaller..

My question is am I supposed to bring back ALL records on the document
ready?

Thanks so much.






Jörn Zaefferer wrote:
> You're binding the autocomplete on keyup, which binds another keyup
> event - every time. Remove your inline event handler and initialize
> the autocomplete just once on document ready.
>
> Jörn
>
> On Mon, Aug 25, 2008 at 4:52 PM, kreiss <[EMAIL PROTECTED]> wrote:
> >
> > Following the documentation, it seems I'm doing it correctly...I'm
> > getting data back from my database, but I just have to click out of
> > the textbox first before I see the data, other than that it works
> > great.
> >
> > Jörn Zaefferer wrote:
> >> Please take a look at the examples here:
> >> http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/
> >>
> >> The "remote" examples are based on PHP, but still show the essential
> >> stuff. You've got it all mixed up.
> >>
> >> Jörn
> >>
> >> On Fri, Aug 22, 2008 at 9:57 PM, kreiss <[EMAIL PROTECTED]> wrote:
> >> >
> >> > I'm close to getting the autocomplete to finally work...but.
> >> >
> >> > First of all, I'm using Java / .jsp to query a database for results
> >> >
> >> > I'm sending the url to my servlet, my servlet passes the data back to
> >> > the .jsp pageNothing appears in my dropdown UNLESS I use my mouse,
> >> > click outside of the textbox and then click back into it.  Then the
> >> > autocomplete works great and displays the data from the database
> >> >
> >> > I've tried IE, Opera, Firefox and everyone of them requires me to
> >> > start typing in the text box, click out, click back in then the
> >> > autocomplete displays.
> >> >
> >> > Is this a bug or am I'm doing something wrong.
> >> >
> >> > I've read something in this form about a guy wanting to know if there
> >> > was a "reinitialize" function that could be called in the javascript
> >> > once the data was brought back from the servlet...I didn't see a
> >> > solutions, but think maybe this is what I need.
> >> >
> >> > Here is sample code:
> >> >
> >> > //JavaScript Code
> >> > function getNames()
> >> > {
> >> >  $("#name").autocomplete("employeedirectory?command=ajax&q=" +
> >> > document.forms[0].test.value + "&limit=10");
> >> > }
> >> >
> >> > //HTML
> >> > Name:
> >> > 

[jQuery] JSON in jQuery

2008-08-25 Thread Sam

I am creating a widget where someone can post a note about the page
(feedback).  I am currently using AJAX to pass the information to my
server, but I want to now use JSON, so that I can put it on one of my
other domains and still send the info to my original domain.  This is
the function I currently have:

function saveNote(obj, cancel) {
var note_html = $(obj).parents(".note");
var page_id = getPageId($(obj));
if(!cancel) {
var t = note_html.find("textarea").val();
var url = G_MAIN_DOMAIN + "/page/addNote";
$.post(url, { page_id: page_id, note: t },function(data){});
} else {
var t = cancel;
}
if(t=='') t='(click to add text)';
note_html.html("" + t + "");
}


I want to change the $.post to something that sends out a JSON
object.  Do I need to create another function or how do I do this?
Thanks for the help!


[jQuery] [validate] Bold normal label text when using error message container

2008-08-25 Thread socratesone

The code:
 $("#formID").validate({
  errorLabelContainer: $('#error_list'),
  }
});

The html:

 The following errors have occurred...
 Please enter the first name



  First Name:
  


When submitting, everything seems to be working as it should, the
"error" class is being appended to the input and is changing per the
input.error css definition in the css file.

However, I need the label to be bold. For some reason, the input tag
has the "error" class appended to it, but not the label for that
input. Is there any way to do this while using two labels (one for the
error list container, another for the form element itself)?




[jQuery] Re: Cluetip not displaying on first mouseover

2008-08-25 Thread T-Bone

Have you solved this problem?  I'm having the same issue.   Thanks.



On Aug 7, 4:30 pm, sprak <[EMAIL PROTECTED]> wrote:
> The issue seems to be rooted in trying to do some cross-site AJAX
> magic.  I need one site in our domain (foo.bar.com) to be able to
> fetch the cluetip HTML from another site in our domain (bar.bar.com).
> I've tried fetching the cluetip by
>
> 1.  Setting up an Apache ProxyPass rule (http://httpd.apache.org/docs/
> 2.0/mod/mod_proxy.html#proxypass)
>
> 2.  Having cluetip use a local PHP file for the AJAX call; this file
> simply echoes a file_get_contents on the actual AJAX URL.
>
> Both of these work; the cluetip text is fetched.  However, when you
> first mouseover the item, the waiting image appears, but the cluetip
> never does.  Mousing out and back in gets it to display.
>
> Any idea on why this might be happening?
>
> Cheers.
>
> - luis


[jQuery] Re: Release: Tooltip Plugin 1.3

2008-08-25 Thread MorningZ

I was just messing around with this plugin yesterday, and i love it!

http://i38.tinypic.com/30deagg.jpg (screenshot of me using it)


Only thing i couldn't figure out was how to *not* generate 
headers/tag...   my work around was setting:

 #tooltip h3 { display: none; }

and my titles had to be like this:

link



[jQuery] Re: Appreciation

2008-08-25 Thread Aaron Heimlich
On Mon, Aug 25, 2008 at 11:20 AM, GLP <[EMAIL PROTECTED]> wrote:
>
> Huh, what Javascript groups  :) ??


For those of you wondering, I believe the "javascript group" that john6630
was referring to is the comp.lang.javascript newsgroup[1]
[1] http://groups.google.com/group/comp.lang.javascript/topics

-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]


[jQuery] Re: getJSON timing problem (probably a simple newbie problem)

2008-08-25 Thread cbandes

I do load it immediately, but I have other functions which rely on the
data being loaded, and currently they are firing before the getJSON
function is completed. I need some way to check that the data has been
loaded before executing those functions. I'm sure there's some sort of
event I should be checking, Ijust don't know which/how.

On Aug 22, 2:52 pm, GLP <[EMAIL PROTECTED]> wrote:
> Just load your JSON data as early as possible.  What are you waiting
> for to not load the data immediately after the 'document is ready' ?
>
> cbandes schreef:
>
> > Hi -
>
> > I have a simple json file which contains a list of key/path pairs, the
> > idea is that I will use this to update the links in a nav menu.
>
> > In order to do this, I am usinggetJSONto load and parse the data,
> > like so:
>
> > var pathAssoc = new Array();
> > var pathVar = null;
>
> > function getPathData(){
> >    $.getJSON("js/paths.js", function(data){ //gets the json object
> >                    //alert(data.paths[1].name);
> >                    //pathArray = data.paths; //creates an array out of our 
> > returned
> > data
> >                    for( var i in data.paths){
> >                            var name = data.paths[i].name;
> >                            var path = data.paths[i].path;
> >                            pathAssoc[name]=path;
> >                    }
> >                    if((page!="")&&(path!="")){
> >                            restoreLocation();
> >                    }
> >            });
> > }
>
> > My problem is that since it's an asynchronous request, other functions
> > are trying to access pathAssoc before it is ready. What event should I
> > be using/listening for in order to make sure pathAssoc is populated
> > before continuing?
>
> > Current dependent functions:
>
> > function getPagePath(name){
> >    pathVar = pathAssoc[name];
> >    }
>
> > So if I call getPagePath() before getPathData() is finished,
> > everything (predictably) breaks...


[jQuery] Re: possible bug in each()? moving from 1.2.3 to 1.2.6

2008-08-25 Thread mausch

Nevermind, it was executing prototype's each() (I was also including
prototype on the same page) instead of jQuery's.
Why this changed from 1.2.4 to 1.2.6 (everything else being equal)
remains a mystery to me.

On Aug 25, 1:12 pm, mausch <[EMAIL PROTECTED]> wrote:
> I'm having the same problem here. If I execute the following in a
> firebug console in one of our pages:
>
> jQuery('input').each(function() {console.log(this)})
>
> With 1.2.4 I get the individual elements:
>
> 
>  size="10" name="currentSearch">
> 
> 
> ...
>
> With 1.2.6 I get one array containing all matching elements:
>
> [input, input#InputSearch, input#btnSearch, input,
> input#impressionsToAdd, input#checkAllHigh on, input#checkAllBold on,
> input#checkAllFeatured on, input#checkAllSponsored on,
> input#save1.save, input#chkHigh_1.chkStyle 1, input#chkBold_1.chkStyle
> 1, input#chkFeatured_1.chkStyle 1, input#chkSponsored_1.chkStyle 1,
> input#chkHigh_2.chkStyle 2, input#chkBold_2.chkStyle 2,
> input#chkFeatured_2.chkStyle 2, input#chkSponsored_2.chkStyle 2,
> input#chkHigh_3.chkStyle 3, input#chkBold_3.chkStyle 3,
> input#chkFeatured_3.chkStyle 3, ...]
>
> Any ideas? Can anyone confirm that this is a bug or a new behavior?


[jQuery] Re: combining results

2008-08-25 Thread Jonathan C. Dietrich

Thanks Karl.

On Aug 25, 12:21 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Or, if you want to do it in one fell swoop:
>
> var z = $('div, span');
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Aug 25, 2008, at 12:14 PM, Karl Swedberg wrote:
>
> > Hi Jonathan,
>
> > Try this:
>
> > var x = $('span');
> > var y = $('div');
> > var z = x.add(y);
>
> > z.each(function(){alert('yo');})
>
> > --Karl
>
> > 
> > Karl Swedberg
> >www.englishrules.com
> >www.learningjquery.com
>
> > On Aug 25, 2008, at 11:19 AM, Jonathan C. Dietrich wrote:
>
> >> What is the easiest way to combine the results from multiple jquery
> >> objects.
>
> >> for instance if i want to do an operation with each span and div tag
>
> >> x = $('span');
> >> y = $('div');
>
> >> x.each(function(){alert('yo');})
> >> y.each(function(){alert('yo');})
>
> >> is there a way that i can combine x and y in z so that i can just  
> >> call
> >> the following once instead of multiple times?
>
> >> z.each(function(){alert('yo');})


[jQuery] Re: Appreciation

2008-08-25 Thread GLP

Huh, what Javascript groups  :) ??  I learned much more about JS
reading this group and playing with jQuery than anything else.
Besides a few good links to explain that associative arrays really
don't exist in JS but you can use them anyway, never needed much
more.  This is indeed a fine place to be.


[jQuery] Re: Replace multiple select box options with images

2008-08-25 Thread GLP

Images in in option lists are not conform HTML standards and won't
work if you stick to them.   You need a solution to mimic the behavior
of an optionlist using style sheets and use of tags like  for
example.

There are a few different approaches to find about here.

P schreef:
> I have a select box that looks like this:
>
> 
>
> 
> 1
> 2
> 3
> 4
> 5
> 6
> 
>
> 
>
> Now instead of showing it as an regular select box I'd like to present
> images to the user.
>
> I have one image prepared if the option is selected:
> rating_x_selected.gif (where X is the number 1-6)
>
> And one image if the option isnt selected: rating_x.gif
>
> Can I solve this with jQuery?


[jQuery] Re: Validation Plugin Issue/Bug ??

2008-08-25 Thread xxkylexx

Got it. Thanks.

On Aug 25, 10:33 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> You can use the highlight-option to remove the success class.
>
> Jörn
>
> On Mon, Aug 25, 2008 at 4:16 AM, xxkylexx <[EMAIL PROTECTED]> wrote:
>
> > Hey guys,
> > I am using JQuery Validation Plugin and am getting a bug that I can't
> > seem to figure out.
>
> > When the user inputs a correct input, it shows my success class, but
> > if you create an error after the success class has been triggered, the
> > success class stays there with the error message as well.
>
> > For example, view my registration form 
> > here:http://www.new.imagenerd.com/register/
>
> > For username, enter a name 3 characters or more (triggers success
> > class)
> > Then, for username, erase it, or enter a username less than 3
> > characters (triggers error)
>
> > My success/valid check icon stays there with the newly triggered error
> > message. The error icon should be showing up, as is done if you create
> > an initial error.
>
> > You can do the same kind of things with the other fields and it does
> > the same. You can also view my source on the page to see how I am
> > implementing it.
>
> > Any ideas?
>
> > Thanks,
> > Kyle


[jQuery] My site asks for a pswd if JQuery is activated

2008-08-25 Thread MBaas

Hi,

I discovered JQuery today and would like to try it out in my current
ASP-Project. So I downloaded the JS, added it to the ASP-File - and
when I now launch the page, I'm asked for a password - this is not
foreseen and clearly only happens when I include the script. What's
going on?

Thanks

Michael



[jQuery] Re: jQuery countdown

2008-08-25 Thread [EMAIL PROTECTED]

Nice it works great. Thx for you help!

On 24 aug, 13:56, Sarbesh <[EMAIL PROTECTED]> wrote:
> instead of "div" you can use "span"
>
> Je mag weer spelen over  span>!


[jQuery] Re: [Validate] Use id instead of name when defining rules for jQuery.Validate Plugin

2008-08-25 Thread Jörn Zaefferer
No, names are required. You'd have to modify all occurences of
element.name, which I can't recommend.

Jörn

On Mon, Aug 25, 2008 at 6:10 PM, Gabriel Schenker <[EMAIL PROTECTED]> wrote:
>
> Hi, is it possible to use the id attribute of an input element instead
> of the name attribute to identify an element when defining a rule,
> e.g. 'SetLengthRange'?
> If not, could the code of the plugin be easily modified (by myself)?
> Where would I have to look?
>


[jQuery] Re: Release: Tooltip Plugin 1.3

2008-08-25 Thread Matt

Thanks jorn!

On Aug 24, 3:10 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'd like to announce a small update for the  href="http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/";>jQuery
> tooltip plugin. The support for image maps is back, the deprecated
> $.fn.Tooltip is gone (just use tooltip() instead), and two new
> features: A fade option, which takes the duration to fade in/out a
> tooltip in milliseconds. And the positionLeft-option, which configures
> the plugin to display the tooltip on the left of the cursor.
>
> From the changelog:
>
> 
>         Added fade option (duration in ms) for fading in/out tooltips; IE
> <= 6 is excluded when bgiframe plugin is included
>         Fixed imagemaps in IE, added back example
>         Added positionLeft-option - positions the tooltip to the left of
> the cursor
>         Remove deprecated $.fn.Tooltip in favor of $.fn.tooltip
> 
>
> Have fun!
>
> Jörn


[jQuery] Re: combining results

2008-08-25 Thread Karl Swedberg

Or, if you want to do it in one fell swoop:

var z = $('div, span');

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Aug 25, 2008, at 12:14 PM, Karl Swedberg wrote:


Hi Jonathan,

Try this:

var x = $('span');
var y = $('div');
var z = x.add(y);

z.each(function(){alert('yo');})

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Aug 25, 2008, at 11:19 AM, Jonathan C. Dietrich wrote:



What is the easiest way to combine the results from multiple jquery
objects.

for instance if i want to do an operation with each span and div tag

x = $('span');
y = $('div');

x.each(function(){alert('yo');})
y.each(function(){alert('yo');})

is there a way that i can combine x and y in z so that i can just  
call

the following once instead of multiple times?

z.each(function(){alert('yo');})











[jQuery] [Validate] Use id instead of name when defining rules for jQuery.Validate Plugin

2008-08-25 Thread Gabriel Schenker

Hi, is it possible to use the id attribute of an input element instead
of the name attribute to identify an element when defining a rule,
e.g. 'SetLengthRange'?
If not, could the code of the plugin be easily modified (by myself)?
Where would I have to look?


[jQuery] Re: possible bug in each()? moving from 1.2.3 to 1.2.6

2008-08-25 Thread mausch

I'm having the same problem here. If I execute the following in a
firebug console in one of our pages:

jQuery('input').each(function() {console.log(this)})

With 1.2.4 I get the individual elements:





...

With 1.2.6 I get one array containing all matching elements:

[input, input#InputSearch, input#btnSearch, input,
input#impressionsToAdd, input#checkAllHigh on, input#checkAllBold on,
input#checkAllFeatured on, input#checkAllSponsored on,
input#save1.save, input#chkHigh_1.chkStyle 1, input#chkBold_1.chkStyle
1, input#chkFeatured_1.chkStyle 1, input#chkSponsored_1.chkStyle 1,
input#chkHigh_2.chkStyle 2, input#chkBold_2.chkStyle 2,
input#chkFeatured_2.chkStyle 2, input#chkSponsored_2.chkStyle 2,
input#chkHigh_3.chkStyle 3, input#chkBold_3.chkStyle 3,
input#chkFeatured_3.chkStyle 3, ...]

Any ideas? Can anyone confirm that this is a bug or a new behavior?


[jQuery] Re: combining results

2008-08-25 Thread Karl Swedberg

Hi Jonathan,

Try this:

var x = $('span');
var y = $('div');
var z = x.add(y);

z.each(function(){alert('yo');})

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Aug 25, 2008, at 11:19 AM, Jonathan C. Dietrich wrote:



What is the easiest way to combine the results from multiple jquery
objects.

for instance if i want to do an operation with each span and div tag

x = $('span');
y = $('div');

x.each(function(){alert('yo');})
y.each(function(){alert('yo');})

is there a way that i can combine x and y in z so that i can just call
the following once instead of multiple times?

z.each(function(){alert('yo');})









[jQuery] Re: finding next tr from td

2008-08-25 Thread Karl Swedberg

Hi,

You need to go up and then over. Inside your click handler, do this:

$(this).parent().next();

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Aug 25, 2008, at 5:17 AM, Sarbesh wrote:



is it possible to find the next tr from td using next() or any other
events.


Show

..
.


so when i click at "Show" i need its immediate tr, in this case tr
with id 2 to hide/show




[jQuery] Re: Doc's site down?

2008-08-25 Thread Rey Bango


The site is responsive now and we're looking to see how we can work to 
minimize these issues. We're equally as frustrated as everyone.


Rey...

Sudara wrote:

Hi there!

Anyone else have somewhat regular issues with http://docs.jquery.com/
being regularly slow and/or unavailable over the last few months?

Especially during PST mornings, it seems to consistently drag.


Sudara



[jQuery] Re: adding a radio button (Firefox vs. IE)

2008-08-25 Thread Chris Hall

Thanks a million, Karl!



On Aug 25, 11:14 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hey Chris,
>
> The problem is that you have an improperly nested form element. It  
> should work if you do this ...
>
> 
>         
>         ...
>         
> 
>
> instead of this ...
>
> 
>         
>                 
>                 ...
>                 
>         
> 
>
> I took the html from your page and pasted it up here with that  
> modification:
>
> http://test.learningjquery.com/radios.html
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Aug 25, 2008, at 9:34 AM, Chris Hall wrote:
>
>
>
> > Thanks
>
> > That has been corrected, but just as you guessed that was not the
> > issue.
>
> > The code has been updated here:
>
> >http://www.leaguefighter.com/test.php
>
> > Select any of the radio buttons, then click the link TEST and click on
> > the new radio button.
>
> > It works for me in IE but not Firefox.  I'm sure I'm doing something
> > wrong, but haven't been able to find it so far.


[jQuery] Replace multiple select box options with images

2008-08-25 Thread P

I have a select box that looks like this:




1
2
3
4
5
6




Now instead of showing it as an regular select box I'd like to present
images to the user.

I have one image prepared if the option is selected:
rating_x_selected.gif (where X is the number 1-6)

And one image if the option isnt selected: rating_x.gif

Can I solve this with jQuery?


[jQuery] combining results

2008-08-25 Thread Jonathan C. Dietrich

What is the easiest way to combine the results from multiple jquery
objects.

for instance if i want to do an operation with each span and div tag

x = $('span');
y = $('div');

x.each(function(){alert('yo');})
y.each(function(){alert('yo');})

is there a way that i can combine x and y in z so that i can just call
the following once instead of multiple times?

z.each(function(){alert('yo');})







[jQuery] Re: Selecting text nodes

2008-08-25 Thread Balazs Endresz

I think this will do it: 
http://flesler.blogspot.com/2008/05/textnode-translator-for-javascript.html

Or alternatively you can try: 
http://code.google.com/p/jquery-translate/wiki/NodesContainingText
This is a part of the Translate plugin, so it's a bit larger. A main
diference is if an element contains textnodes and other elements too
then its .html() will be returned and can parse the document
asynchronously (useful on large documents, no browser freeze).


On Aug 24, 11:46 pm, "Tom B." <[EMAIL PROTECTED]> wrote:
> Thanks for the quick response, Karl.  I'm not sure if this would quite
> do it--It looks like you can get an array of the contents of the text
> nodes, and you could do a .replace() on those array elements, but I'm
> not sure how you would then insert the new text back into the text
> nodes.  It seems like a selector like the ones in the Selectors part
> of the API doc would be the ideal route.  Any ideas?
> -Tom
>
> On Aug 24, 5:28 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> > I wrote a plugin that may help:
>
> >http://plugins.learningjquery.com/textchildren/
>
> > --Karl
>
> > 
> > Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> > On Aug 24, 2008, at 4:20 PM, Tom B. wrote:
>
> > > Does anyone have code for a text node selector?  I saw this post:
> > >http://groups.google.com/group/jquery-en/browse_thread/thread/2dda271...
>
> > > but the function textNodes didn't seem to work with the current
> > > version of jQuery.  I'm a bit new to jQuery, but I ultimately want to
> > > do a regex find and replace on all of the text nodes in a tree (the
> > > function needs to select children, grandchildren, etc), so any tips on
> > > the best way to do that would be greatly appreciated.
>
> > > Many thanks,
> > > Tom


[jQuery] Re: adding a radio button (Firefox vs. IE)

2008-08-25 Thread Karl Swedberg

Hey Chris,

The problem is that you have an improperly nested form element. It  
should work if you do this ...




...



instead of this ...




...




I took the html from your page and pasted it up here with that  
modification:


http://test.learningjquery.com/radios.html



--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Aug 25, 2008, at 9:34 AM, Chris Hall wrote:



Thanks

That has been corrected, but just as you guessed that was not the
issue.

The code has been updated here:


http://www.leaguefighter.com/test.php

Select any of the radio buttons, then click the link TEST and click on
the new radio button.

It works for me in IE but not Firefox.  I'm sure I'm doing something
wrong, but haven't been able to find it so far.




[jQuery] jquery is not defined (newbie)

2008-08-25 Thread Scott Phillips

I am trying to get datepicker plugin (http://eyecon.ro/datepicker/
#about) to work on a page, and I can't get it to work for some reason.
I keep getting the following 2 errors:

jQuery is not defined
datepicker.js()()datepicker.js (line 819)
[Break on this error] })(jQuery);

datepicker.js (line 819)
$("#inputDate").DatePicker is not a function
[Break on this error] onChange: function(formated, dates){

I'm positive that the paths to jquery, etc.. are correct. This is the
code I am using to call the datepicker:


$(document).ready(function(){


$('#inputDate').DatePicker({
format:'m/d/Y',
date: $('#inputDate').val(),
current: $('#inputDate').val(),
starts: 1,
position: 'r',
onBeforeShow: function(){
$('#inputDate').DatePickerSetDate($('#inputDate').val(), true);
},
onChange: function(formated, dates){
$('#inputDate').val(formated);
}
});

 });


Any help is greatly appreciated!


[jQuery] Re: AutoComplete -bassistance

2008-08-25 Thread Jörn Zaefferer
You're binding the autocomplete on keyup, which binds another keyup
event - every time. Remove your inline event handler and initialize
the autocomplete just once on document ready.

Jörn

On Mon, Aug 25, 2008 at 4:52 PM, kreiss <[EMAIL PROTECTED]> wrote:
>
> Following the documentation, it seems I'm doing it correctly...I'm
> getting data back from my database, but I just have to click out of
> the textbox first before I see the data, other than that it works
> great.
>
> Jörn Zaefferer wrote:
>> Please take a look at the examples here:
>> http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/
>>
>> The "remote" examples are based on PHP, but still show the essential
>> stuff. You've got it all mixed up.
>>
>> Jörn
>>
>> On Fri, Aug 22, 2008 at 9:57 PM, kreiss <[EMAIL PROTECTED]> wrote:
>> >
>> > I'm close to getting the autocomplete to finally work...but.
>> >
>> > First of all, I'm using Java / .jsp to query a database for results
>> >
>> > I'm sending the url to my servlet, my servlet passes the data back to
>> > the .jsp pageNothing appears in my dropdown UNLESS I use my mouse,
>> > click outside of the textbox and then click back into it.  Then the
>> > autocomplete works great and displays the data from the database
>> >
>> > I've tried IE, Opera, Firefox and everyone of them requires me to
>> > start typing in the text box, click out, click back in then the
>> > autocomplete displays.
>> >
>> > Is this a bug or am I'm doing something wrong.
>> >
>> > I've read something in this form about a guy wanting to know if there
>> > was a "reinitialize" function that could be called in the javascript
>> > once the data was brought back from the servlet...I didn't see a
>> > solutions, but think maybe this is what I need.
>> >
>> > Here is sample code:
>> >
>> > //JavaScript Code
>> > function getNames()
>> > {
>> >  $("#name").autocomplete("employeedirectory?command=ajax&q=" +
>> > document.forms[0].test.value + "&limit=10");
>> > }
>> >
>> > //HTML
>> > Name:
>> > 

[jQuery] Re: AutoComplete -bassistance

2008-08-25 Thread kreiss

Following the documentation, it seems I'm doing it correctly...I'm
getting data back from my database, but I just have to click out of
the textbox first before I see the data, other than that it works
great.

Jörn Zaefferer wrote:
> Please take a look at the examples here:
> http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/
>
> The "remote" examples are based on PHP, but still show the essential
> stuff. You've got it all mixed up.
>
> Jörn
>
> On Fri, Aug 22, 2008 at 9:57 PM, kreiss <[EMAIL PROTECTED]> wrote:
> >
> > I'm close to getting the autocomplete to finally work...but.
> >
> > First of all, I'm using Java / .jsp to query a database for results
> >
> > I'm sending the url to my servlet, my servlet passes the data back to
> > the .jsp pageNothing appears in my dropdown UNLESS I use my mouse,
> > click outside of the textbox and then click back into it.  Then the
> > autocomplete works great and displays the data from the database
> >
> > I've tried IE, Opera, Firefox and everyone of them requires me to
> > start typing in the text box, click out, click back in then the
> > autocomplete displays.
> >
> > Is this a bug or am I'm doing something wrong.
> >
> > I've read something in this form about a guy wanting to know if there
> > was a "reinitialize" function that could be called in the javascript
> > once the data was brought back from the servlet...I didn't see a
> > solutions, but think maybe this is what I need.
> >
> > Here is sample code:
> >
> > //JavaScript Code
> > function getNames()
> > {
> >  $("#name").autocomplete("employeedirectory?command=ajax&q=" +
> > document.forms[0].test.value + "&limit=10");
> > }
> >
> > //HTML
> > Name:
> > 

[jQuery] Re: Best practices for including Jquery

2008-08-25 Thread Rick Faircloth

Sounds like a really good idea.

Rick

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> GasGiant
> Sent: Monday, August 25, 2008 9:49 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Best practices for including Jquery
> 
> 
> I load site wide code in the , but since the header is an
> include file that is the same for every page, I also use .getScript()
> to load page specific code for forms, plug ins, etc. where they are
> needed. I put the page content in a  with an id element specific
> to that page and only load the code if that id is found in the page,
> e.g. if the page has a form then I load the validate plug-in, and if
> that form has a date field I might load the datepicker plug-in, too.
> 
> Example: In this site I use the accordion menu and some of the element
> inside of the section have hidden elements, so jquery.js and
> accordion.js (and .css) are load in the head of all pages. When the
> document is ready, I hide the hidden menu items, give them a toggle
> event, and then look to see if there is an id="orderform" in the page.
> If there is, that's when the order.js script gets loaded with the code
> to handle the form. The validation and datepicker scripts are loaded
> from inside of the order.js. I find this very efficient. I think of it
> as "cascading javascript" :-)
> 
> $(document).ready(function() {
> 
>   $('.hide').hide();
>   $('[EMAIL PROTECTED]').click(function()
>   {
>   $(this).next().toggle();
>   return false;
>   });
>   if($("#orderform").length) {
>   $.getScript("order.js");
>   }
> });
> 
> 
> 
> On Aug 24, 9:28 am, ripple <[EMAIL PROTECTED]> wrote:
> >
> > But I think it also might have to factor into how a webpage is built. If 
> > you have a header, left
nav,
> right nav, but only need a script for the main content and not for every 
> page than I might write
the
> script inside of the content(include) page, although I don't like doing that 
> cause it's
considered, non-
> compliant.
> 
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.138 / Virus Database: 270.6.7/1632 - Release Date: 8/25/2008 
> 7:05 AM



[jQuery] Re: idiot alert!!! stupid jeditable question

2008-08-25 Thread Chris Hall

Thanks Mike.  It appears I'm just not understanding something very
basic about this great plugin.

My goal is exactly what you are doing here:
http://www.appelsiini.net/projects/jeditable/default.html

on the Textile Render portion.

When the HTML is displayed the line breaks are exactly like when the
editor is displayed.

That is what I am trying to accomplish (the text displaying the same
in HTML as well as in the editor).


[jQuery] Re: Validation Plugin Issue/Bug ??

2008-08-25 Thread Jörn Zaefferer
You can use the highlight-option to remove the success class.

Jörn

On Mon, Aug 25, 2008 at 4:16 AM, xxkylexx <[EMAIL PROTECTED]> wrote:
>
> Hey guys,
> I am using JQuery Validation Plugin and am getting a bug that I can't
> seem to figure out.
>
> When the user inputs a correct input, it shows my success class, but
> if you create an error after the success class has been triggered, the
> success class stays there with the error message as well.
>
> For example, view my registration form here: 
> http://www.new.imagenerd.com/register/
>
> For username, enter a name 3 characters or more (triggers success
> class)
> Then, for username, erase it, or enter a username less than 3
> characters (triggers error)
>
> My success/valid check icon stays there with the newly triggered error
> message. The error icon should be showing up, as is done if you create
> an initial error.
>
> You can do the same kind of things with the other fields and it does
> the same. You can also view my source on the page to see how I am
> implementing it.
>
> Any ideas?
>
> Thanks,
> Kyle
>


[jQuery] Re: Appreciation

2008-08-25 Thread GasGiant

I'll second this. Good group, here. Don't get old and cranky. If you
get sick of answering our noob questions here you can flame the
javascript lists to get it out of your system ;-)

On Aug 24, 8:54 pm, john6630 <[EMAIL PROTECTED]> wrote:
> As a newbie, I want to express my appreciation to the code authors and
> the members who provide such fantastic support. As a newbie, I also
> joined the javascript group and am amazed at the difference. Here all
> is positive and supportive while over there they are negative and
> contentious (not to mention they bad mouth jQuery a lot).


[jQuery] Re: idiot alert!!! stupid jeditable question

2008-08-25 Thread Mika Tuupola



On Aug 25, 2008, at 4:31 PM, Chris Hall wrote:


However, using this example, when I click on the text area to edit it
I see that it looks correct (no br tags and the line breaks are
present).  However when I save the text area the display isn't
correct  The breaks aren't there (it appears they are still newlines
and not br tags?).



Jeditable displays whatever your saving scrip echoes back. If you send  
newlines, but after saving you want to show  tags instead of  
newlines, saving script needs to convert newlines to  tags  
before echoing them back.


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



[jQuery] Re: Jquery Ajax usage question

2008-08-25 Thread Karl Swedberg

Hi Peter,

This FAQ topic should answer your question:

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

It describes the problem and provides a couple typical ways to  
overcome it, in addition to pointing out a few jQuery plugins that do  
the work for you.


If you still have problems after reading through it and trying one of  
the many solutions, let us know.


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Aug 25, 2008, at 1:19 AM, peter wrote:



Currently, I use jquery's ajax function to create dymanic pages. But I
don;t think I understand to to correctly make jquery event listners
respond to the the DOM elements that I added via ajax response.  I'll
give an abrevated example below

The function of the below script is to pop an alert box with the id of
the  that was clicked form the list


$(document).ready(function(){
$('.a').click(function(){
alert(this.id);
 });
$('#bAdd').click(function(){
 $.ajax({ . Abrevated .})
  });
});


Original HTML
Add one more Link to click


Click here (1)
Click here (2)
Click here (3)


When the  link withe id bAdd is clicked it gets and additioanl 
line form the server and inserts it at the bottom of the list

NEW DOM HTML


Click here (1)
Click here (2)
Click here (3)
Click here (4) 


The issue is that the jquery select "$('.a').click()" does to see
the newly inserted  line # 4... So clicked it will not yeild the
desired function, pop an alert pop. I've been getting around this but
including id specific event handling code in the injected ajax dom
element. But that mean I have to maintain to diffrent Jquery
functions; on the main page and in side the ajax responce function.

this there a way where I can my use of jquery class selections, inject
dom element via ajax and still maitn just one set of JS jquery
functions.

Thanks




[jQuery] Re: idiot alert!!! stupid jeditable question

2008-08-25 Thread Chris Hall

Thanks for that example.  It is starting to make sense to me.

However, using this example, when I click on the text area to edit it
I see that it looks correct (no br tags and the line breaks are
present).  However when I save the text area the display isn't
correct  The breaks aren't there (it appears they are still newlines
and not br tags?).

Thanks again for the help.


[jQuery] Re: Jquery Ajax usage question

2008-08-25 Thread GasGiant

Have you tried using the callback methods for adding the events to the
Ajax-inserted markup? See .ajaxStop(), etc.


[jQuery] Re: Best practices for including Jquery

2008-08-25 Thread GasGiant

I load site wide code in the , but since the header is an
include file that is the same for every page, I also use .getScript()
to load page specific code for forms, plug ins, etc. where they are
needed. I put the page content in a  with an id element specific
to that page and only load the code if that id is found in the page,
e.g. if the page has a form then I load the validate plug-in, and if
that form has a date field I might load the datepicker plug-in, too.

Example: In this site I use the accordion menu and some of the element
inside of the section have hidden elements, so jquery.js and
accordion.js (and .css) are load in the head of all pages. When the
document is ready, I hide the hidden menu items, give them a toggle
event, and then look to see if there is an id="orderform" in the page.
If there is, that's when the order.js script gets loaded with the code
to handle the form. The validation and datepicker scripts are loaded
from inside of the order.js. I find this very efficient. I think of it
as "cascading javascript" :-)

$(document).ready(function() {

$('.hide').hide();
$('[EMAIL PROTECTED]').click(function()
{
$(this).next().toggle();
return false;
});
if($("#orderform").length) {
$.getScript("order.js");
}
});



On Aug 24, 9:28 am, ripple <[EMAIL PROTECTED]> wrote:
>  
> But I think it also might have to factor into how a webpage is built. If you 
> have a header, left nav, right nav, but only need a script for the main 
> content and not for every page than I might write the script inside of the 
> content(include) page, although I don't like doing that cause it's 
> considered, non-compliant.


[jQuery] Re: adding a radio button (Firefox vs. IE)

2008-08-25 Thread Chris Hall

Thanks

That has been corrected, but just as you guessed that was not the
issue.

The code has been updated here:


http://www.leaguefighter.com/test.php

Select any of the radio buttons, then click the link TEST and click on
the new radio button.

It works for me in IE but not Firefox.  I'm sure I'm doing something
wrong, but haven't been able to find it so far.


[jQuery] Re: Enabling a button depending on checkboxes...

2008-08-25 Thread MBaas

At least I can answer my own question #1 now: disabled-attribute needs
to be removed if it shouldn't be applied, setting it to blank does not
help. So my code was changed to:

function SetDeleteStatus()
{
var foo="disabled";
   $("#gvFolderItems input:checkbox").attr("checked",function()
{if (this.checked) {foo="";}
}
)

if (foo=="") {
// $("#DeleteButton").removeAttribute("disabled");
//  error: object does not support selected property or 
method!

document.getElementById("DeleteButton").removeAttribute("disabled");
} else {

document.getElementById("DeleteButton").setAttribute("disabled","disabled");
}


alert("deletebutton=" + foo);
}

There was a surprise along the way, as $("#DeleteButton") led to an
error "Object does not supported property or method" whereas it works
fine with document.getElementById - I thought the two were
interchangeable...?


[jQuery] Re: Adding Values (Sum) of TD.

2008-08-25 Thread Dan G. Switzer, II

Scott,

>I am trying to do a footer at the bottom of the table, and I would
>love to use jquery to provide a total in the footer, something like
>this:
>
>1 | 1 | 3
>2 | 1 | 4
>--
>2 | 2 | 7 (JQuery added the TDs above)
>
>
>Is it possible? And can anyone point me in the right direction.

You should be able to do this pretty easily using my Calc plug-in:

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

-Dan



[jQuery] Re: Best practices for including Jquery

2008-08-25 Thread Scott González

The only reason to include JavaScript files at the end of the body
instead of the head is because scripts block other downloads.  If
you're not experiencing any long page load problems, you can just
leave the includes in the head.

There was a good post about this on the YUI blog:
http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/


On Aug 24, 8:50 am, bradvin <[EMAIL PROTECTED]> wrote:
> I have been wondering where others feel its best to include jquery and
> other .js files in the html.
>
> Include it in the HEAD or at the end of the html document just before
> you close the BODY tag?
>
> There are arguments for including it at the end of the document so
> that the dom is fully loaded by the time the javascript loads, but
> that argument falls away with jquery's ready event. So is it truly
> beneficial at the end?
>
> So far i have been including all my .js files in the HEAD with no
> problems, as well as all my page specific ready script.
>
> what are others doing and why do you choose to do it that way?


[jQuery] Autocomplete data lookup from DB

2008-08-25 Thread DineshRao

I am trying to populate the autocomplete with list fetched from DB
(SQL server 2005), i am using ajax to do this.
But, i am facing some problem in which format the list fetch from DB
should be passed to the jquery.autocomplete.js
By the by i am using Java and Jsp. I have tried to pass as string,
arraylist.
Can some one please help me.


[jQuery] Re: adding a radio button (Firefox vs. IE)

2008-08-25 Thread Mike Alsup

>  var myinput = '' +
> response + '';

That is not a valid input tag.  Per the DTD, input tags should not
have any "content":

'
 + response + '';


[jQuery] Enabling a button depending on checkboxes...

2008-08-25 Thread MBaas

Hi,

I have a table (GridView from ASP.NET) which has a checkbox in every
row and a Delete-Button in the header. Now this button should only be
enabled when at least one checkbox is checked, without any elements
being checked, it should be disabled.

So here's the button:
   

And here's my js:
function SetDeleteStatus()
{
var foo="disabled";
   $("#gvFolderItems input:checkbox").attr("checked",function()
{if (this.checked) {foo="";}
}
)
$("#DeleteButton").disabled=foo;
alert("deletebutton=" + foo);
}

...and the Checkboxes have an onClick="SetDeleteStatus();".

1) Using the alert, I have verified that foo is set correctly, yet
somehow it does not change the status of the button - it always
remains disabled. This is probably not even a JSQuery-prob, but maybe
somebody has an idea anyway? ;)

2) Currently I am looping through all checkboxes - this is probably
not the most efficient solution, as it could break after finding the
first checked checkbox. Or perhaps this could be done better by
checking the length of a filter()-statement's result? What do you
recommend?

Thanks

Michael


[jQuery] finding next tr from td

2008-08-25 Thread Sarbesh

is it possible to find the next tr from td using next() or any other
events.


Show

..
.


so when i click at "Show" i need its immediate tr, in this case tr
with id 2 to hide/show


[jQuery] Re: Quick Selector Question...

2008-08-25 Thread MorningZ

actually, more precise would be:

$("input[type='text][id$='date']")

and this is right off the jQuery documentation

here:
http://docs.jquery.com/Selectors/attributeEndsWith#attributevalue
and here:
http://docs.jquery.com/Selectors/attributeMultiple#attributeFilter1attributeFilter2attributeFilterN


[jQuery] Re: Quick Selector Question...

2008-08-25 Thread MorningZ

$("input[id$='date']")


[jQuery] Re: Re[jQuery] place text in array

2008-08-25 Thread roadtaken99


Greetings,

I'm trying to use Replace to work-around the fact that ".append()" and
".html()" strips any .. tag(and everything in between?).
ie. i was trying to do:

$.get("SOMEURLGIVINGdataOUTPUT,function(data){
$("li#SOMEid").append(data.replace(/script/g,"escape"));
$("li#SOMEid").html($("li#SOMEid").html().replace(/escape/g,"script"));

but .html() still manage to strip the 

[jQuery] adding a radio button (Firefox vs. IE)

2008-08-25 Thread Chris Hall

I have a weird issue that only seems to be a problem with Firefox, but
works ok in IE.

I'm adding a radio button using .appendTo and adding the button works
fine, but with Firefox it appears the button is not in the correct
group as selecting it will not deselect anything else in the group.

Selecting it in IE will correctly deselect anything else in the group.

I have reduced the code to just the bare essentials just for
troubleshooting, but you can see what happens.

Here is the HTML:






function responsePurchase2(response,status) {
var myinput = '' +
response + '
'; var myappend = 'div.gloves_wear'; $(myinput).appendTo(myappend); return false; } None (no bonus) speed company gloves (+1 Speed) speed company gloves (+1 Speed) speed company gloves (+1 Speed) TEST and you can see a test here: http://www.leaguefighter.com/test.php Select any of the radio buttons, then click the link TEST and click on the new radio button. It works for me in IE but not Firefox. I'm sure I'm doing something wrong, but haven't been able to find it so far.

[jQuery] Re: [TreeView] - How to collapse/expand with a link?

2008-08-25 Thread [EMAIL PROTECTED]

Hi, Jörn, thanks alot for the reply.

Yes, that's exactly what I've tried.

This icon of mine lines up with other elements and it disrupted the
layout.

I didn't spend too much time on that because I thought it might be
possible to call the collapse action from anywhere

But no sweat, then I know and just need to mark things up a little
differently and/or some CSS trickery to make it play nice.

I also know I *could* change the eq() code in the treeview to change
the order which the links get their actions etc.

So thanks again for your time and for this great plugin.

Regards, Victor

On Aug 19, 2:24 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> Hi Victor,
>
> the treecontrol feature doesn't provide lots of flexibility, and so
> far that worked well enough. I'm avoiding adding more features to it
> as long as possible.
>
> In this case, have you tried adding the necessary additional links the
> treecontrol expects, while hiding all of them but the collapse link?
> That way you should get just the one you need (visible).
>
> Let me know if that doesn't work. At some point I'm going to add
> programmatic tree controls anyway.
>
> Jörn
>
> On Tue, Aug 19, 2008 at 12:14 PM, [EMAIL PROTECTED]
>
> <[EMAIL PROTECTED]> wrote:
>
> > I have a UL list which i apply thetreeviewplugin. So far so good.
>
> > Thetreeviewcontrol works like it should, but I need to be able to
> > assign a link to collapse the tree. Any link without being inside a
> > treecontrol div. The treecontrol assigns actions according to order of
> > appearing links.
> > First link expands, next collapses and the third and last one toggles.
>
> > I need to be able to assign the collapse action to a link without
> > using treecontrol.
>
> > I imagine it would go something like this...
>
> > $("a.collapse").click(function() {
> >  $("#tree").doWhatever I need to do to collapse the tree.
> > });
>
> > I've looked at the demos, the code, the documentation (I can see the
> > properties which I can set when i apply thetreeviewto the list, but
> > can't see how I can call an action), tried searching.
>
> > I'm a beginner, so I can't figure out how or if it's possible.
>
> > Here's the 
> > plugin:http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
>
> > Regards, Victor


[jQuery] Re: how to get json or xml to be datasource of autocomplete

2008-08-25 Thread foxtrot

Hi again.

Forgot to show the error I get from my initial code:

$("").html(e.highlight(a, term)).addClass is not a function

I will look more closely to your code GLP, altough I didn't understand
it quite at the first glance :-)



[jQuery] Validation Plugin Issue/Bug ??

2008-08-25 Thread xxkylexx

Hey guys,
I am using JQuery Validation Plugin and am getting a bug that I can't
seem to figure out.

When the user inputs a correct input, it shows my success class, but
if you create an error after the success class has been triggered, the
success class stays there with the error message as well.

For example, view my registration form here: 
http://www.new.imagenerd.com/register/

For username, enter a name 3 characters or more (triggers success
class)
Then, for username, erase it, or enter a username less than 3
characters (triggers error)

My success/valid check icon stays there with the newly triggered error
message. The error icon should be showing up, as is done if you create
an initial error.

You can do the same kind of things with the other fields and it does
the same. You can also view my source on the page to see how I am
implementing it.

Any ideas?

Thanks,
Kyle


[jQuery] Re: My site asks for a pswd if JQuery is activated

2008-08-25 Thread MBaas

Sorry folks, I found out I was wrong, that authentication-prob. still
is there after removing jQuery. I still have no idea where it comes
from, but surely jQuery is not the source.

Apologies, my fault, should have checked better beforehand

Michael


[jQuery] Quick Selector Question...

2008-08-25 Thread Scott Phillips

How can I select all text inputs that have an ID that end in date?

Thanks
Scott.


[jQuery] ui core tabs

2008-08-25 Thread Michael Anckaert

Hello everyone,

I have a question regarding the Tabs UI that JQuery has.
At the moment when you select a tab you can't click it again. Is there
an option I can set (didn't find it) or a change I can make so that I
can click on a tab twice? Now the link gets removed from the DOM when
a tab is selected but I would like to keep it.

Kind regards,
Michael Anckaert


[jQuery] JQuery countdown problom

2008-08-25 Thread Tobin

I have wirted a countdown code like this:

 jQuery.extend({
  buildprocess: function(seconds,target,json) {
   var self=this;
  $("#"+target).append(""+json.t+json.l+"level")
  var ___timer=setInterval(CountDown,1000)
  function CountDown()
  {
 $("#bing_"+json.t+"_"+json.c
+"_1").html(__Seconds2Time(seconds));
 seconds--;
 if(seconds<=0)
 {
 clearInterval(___timer);
 $("#bing_"+json.t+"_"+json.c+"").remove();
 }
  }
  }
});
when i run it like this:
$.buildprocess(6,"ul1",{w:300,s:240,i:90,f:180,t:1004,c:1,l:1,dt:10});
it works well
but when i run it like this:
$.buildprocess(6,"ul1",{w:300,s:240,i:90,f:180,t:1004,c:1,l:1,dt:10});
$.buildprocess(12,"ul2",{w:300,s:240,i:90,f:180,t:1004,c:1,l:1,dt:
10});
it don't works well
has someone help me for this problem?


[jQuery] Re: weird behavior with show()

2008-08-25 Thread clrockwell

Is it possible to stop (or reverse) show() if someone hovers over an
element and then mouses out before the show() is complete?


On Aug 24, 2:39 pm, clrockwell <[EMAIL PROTECTED]> wrote:
> Hello all, I could really use some insight in this.  I am using the
> following jquery to show a menu on hover.  The issue is that if you do
> not hover the link until the menu is completely shown, it pops up
> underneath.  It's probably best if you just see what it 
> does:http://www.chrisrockwell.com/csphoto.  The portfolio and information
> links will behave very weirdly if you just run the mouse across them.
>
> I really appreciate any help that is offered.
>
> Thanks much.
>
> $(document).ready(function() {
> // find class .sub-menu-present and add hover
> $('lo#portfolio-link').css('display', 'none');
> $('lo#information-link').css('display', 'none');
> $('li#portfolio-link').hover(
> function() {
> $('ul.portfolio').css('display', 'none').show(1000);
> },
> function() {
> $('ul.portfolio').css('display', 'none');
> }
>
> );
> $('li#information-link').hover(
> function() {
> $('ul.information').css('display', 'none').show(1000);
> },
> function() {
> $('ul.information').css('display', 'none');
> }
>
> );
>
> })


[jQuery] Jquery Ajax usage question

2008-08-25 Thread peter

Currently, I use jquery's ajax function to create dymanic pages. But I
don;t think I understand to to correctly make jquery event listners
respond to the the DOM elements that I added via ajax response.  I'll
give an abrevated example below

The function of the below script is to pop an alert box with the id of
the  that was clicked form the list


$(document).ready(function(){
 $('.a').click(function(){
 alert(this.id);
  });
 $('#bAdd').click(function(){
  $.ajax({ . Abrevated .})
   });
});


Original HTML
Add one more Link to click


 Click here (1)
 Click here (2)
 Click here (3)


When the  link withe id bAdd is clicked it gets and additioanl 
line form the server and inserts it at the bottom of the list

NEW DOM HTML


 Click here (1)
 Click here (2)
 Click here (3)
 Click here (4) 


The issue is that the jquery select "$('.a').click()" does to see
the newly inserted  line # 4... So clicked it will not yeild the
desired function, pop an alert pop. I've been getting around this but
including id specific event handling code in the injected ajax dom
element. But that mean I have to maintain to diffrent Jquery
functions; on the main page and in side the ajax responce function.

this there a way where I can my use of jquery class selections, inject
dom element via ajax and still maitn just one set of JS jquery
functions.

Thanks


  1   2   >