[jQuery] Re: help with menu and show/hide divs

2009-03-15 Thread mkmanning
As long as you have a one-to-one relationship between your links and your divs, you don't need to worry about IDs or hrefs, etc. Just use the index position: first second third test1 test2 test3 var links = $('#links a').click(function(){

[jQuery] Re: Simple toggle between slide up slide down and changing paragraph html contents not working...

2009-03-15 Thread mkmanning
You don't need .each(), and if you want reduce your code you can, with chaining, do it all in a one line of jQuery: CSS (to initially hide all the contents): p.contents{ display:none; } HTML ('contents' class added for easier selecting): Item 1 Hidden contents 1

[jQuery] Working with hash?

2009-03-15 Thread Jonas
I need some advice on working with the hash, are there any good plugins or alike that I could use? The bestw ould be something like mysite.com#name=jonas&phone=12345 Then I'd do something like var myHash = getHashObject(); the object would then be soemthing like { name: 'jonas', phone: 12345 }

[jQuery] Re: move simplemodal popUp ?!

2009-03-15 Thread Richard D. Worth
jQuery UI Dialog: http://jqueryui.com/demos/dialog/ - Richard On Sat, Mar 14, 2009 at 4:12 PM, globe wrote: > > hi , > > plz i wanted to ask if it's possible to simplemodal popup movabe > across the page , instead of having him fix in a definite position ? > if not , is there a modale plugin w

[jQuery] Repeating background with a radial gradient?

2009-03-15 Thread Tabbu
There are many examples in flash where you can use a full screen tiled background image and a radial gradient to hide the tiled effect. Here is a link to one of those examples: http://www.flashden.net/item/pack-20-backgrounds-wood/12504?ref=solo1artist How would I get this kind of effect with jQu

[jQuery] Need clicking twice to trigger click event

2009-03-15 Thread Ice
I'm doing a dropdown menu witch shows on click. If one is already open it should close when another one is opened. I've currently got it working on the first click, but afterward I need to click twice to trigger the event. A slimmed down version of the html looks like this: Link1 Link2

[jQuery] why coding like this:(function(){})();

2009-03-15 Thread lovespring
(function(){})(); does it conform to the grammar?

[jQuery] what's the good things coding like this:(function(){})();

2009-03-15 Thread lovespring
(function(){})(); what's the first () means? is this a standard grammar?and why coding like this?

[jQuery] Re: wrap some tag around group of table rows for hide and show

2009-03-15 Thread Lwangaman
Well, I didn't wrap my tr's in any tags, I had already read that in the old thread which now seems to be archived or something. I just tried the multiple tbody's. I guess you're right that fadeIn("fast") seems to work, and I have to use fadeOut("fast") too, otherwise hide("fast") still makes sort

[jQuery] Re: jQuery each problem

2009-03-15 Thread macgyver47
Unfortunatly it doesn't work if ($(this).val() = 'yes') returns nothing $(this).val() returns "on" no matter if you click on button Yes or button No I have been ckecking jquery doc the best I could and cannot find answer to my question: how to I know if user clicked on button Yes or button No Any

[jQuery] TextArea CountDown

2009-03-15 Thread shapper
Hello, Does anyone knows a good JQuery countdown that displays the number of remaining characters on a text box? Thank You, Miguel

[jQuery] Show/Hide element

2009-03-15 Thread shapper
Hello, I have a list of fieldsets and each one has a legend. I am thinking in having something like: Personal Data first element second element How can Show/Hide the ul when I click the legend? I would like to have many fielsets on a form and being able to Show/ Hide the cont

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread T.J. Crowder
Hi, On Mar 15, 12:55 pm, lovespring wrote: > (function(){})(); > does it conform to the grammar? Yes, it does. That line defines a function inline: (function(){}) ...and then calls it immediately using () like any other function: (function(){})(); (You need the parens around the de

[jQuery] Is jquery's position() function not browser independent?

2009-03-15 Thread sandee...@adpsconsulting.com
I wrote the following code - - var ref= $('span#timezone_edit').position(); ref_left = ref.left - 125; ref_top = ref.top - 45; //I want to display a div just over that span#timezone_edit var zonepickerBox = $('div#time_zone_picker'); $(zonepickerBox).css('display', 'block');

[jQuery] Photo Gallery, Thumbnail navigation

2009-03-15 Thread kmoll092
I am building a photo gallery for a friend using JQuery. I have div with thumbnails below a main picture that changes based on the thumbnail you click. I want to be able to add a next and previous button for the thumbnails, because there are a lot of them. I am relatively new to JQuery, but am

[jQuery] Re: what's the good things coding like this:(function(){})();

2009-03-15 Thread T.J. Crowder
See the reply in your duplicate thread: http://groups.google.com/group/jquery-en/browse_thread/thread/6366e26a7727a81d On Mar 15, 12:50 pm, lovespring wrote: > (function(){})(); > what's the first () means? is this a standard grammar?and why coding > like this?

[jQuery] Re: Cycle not working with other plugins

2009-03-15 Thread davidlef
Thank you sir, you are a scholar and a gentleman.

[jQuery] Re: Working with hash?

2009-03-15 Thread brian
On Sun, Mar 15, 2009 at 6:23 AM, Jonas wrote: > > I need some advice on working with the hash, are there any good > plugins or alike that I could use? The bestw ould be something like > mysite.com#name=jonas&phone=12345 > > Then I'd do something like > var myHash = getHashObject(); > > the object

[jQuery] Bassistance Accordion and Others

2009-03-15 Thread shapper
Hello, I have been trying JQuery's Bassistance Accordion and a few others but until now I wasn't able to make it work with a form ... For example, consider the following form structure: Personal Name: ... City: ... Contacts Email: ... Pho

[jQuery] Modifying href attribute values

2009-03-15 Thread Jonny Stephens
Can anyone provide guidance on how to modify href attributes in this way: Markup: Modify to: i.e. removing everything up to and including the #, prepending a fixed path value and appending ".html" Thanks Jonny

[jQuery] Re: move simplemodal popUp ?!

2009-03-15 Thread globe
Hi , thanks Richard , yeap that's what i was looking for , but do yu know how could i use on a jsp page ? and thanks

[jQuery] Superfish z-index issue

2009-03-15 Thread CMITWexford
I'm having trouble resolving the z-index issue. I tried the solution at http://webdemar.com/webdesign/superfish-jquery-menu-ie-z-index-bug/ but it did not help. You can see the problem at http://www418.pair.com/cmitwex1/www.reedandpetals.com/index.php?option=com_igallery&view=gallery&Itemid=15

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread mkmanning
Not sure what you mean "inline" or by "scope the vars inside"; variables declared inside the function are scoped "inside" (they have lexical scope to the function), as long as they are preceded with the var declaration (if not, they are global, even with this format). The closing/end parens creat

[jQuery] Re: TextArea CountDown

2009-03-15 Thread mkmanning
No, but it's pretty easy to write one :) $('textarea').keyup(function(){ if(this.value.length >= 100) { //handle the over the limit part here $(this).addClass('overlimit'); this.value = this.value.substring(0, 100); } else { $(this).remove

[jQuery] Find Element. Could someone, please, help me? Thank You

2009-03-15 Thread shapper
Hello, On a plugin I have the following: var legend = fieldset.find(':first'); var body = jQuery(document.createElement('div')); Instead of creating a div for the body I would like to get a existing OL in the fieldset and make it the body. How can I do this? Thanks, Miguel

[jQuery] Re: TextArea CountDown

2009-03-15 Thread shapper
Thank You! On Mar 15, 5:09 pm, mkmanning wrote: > No, but it's pretty easy to write one :) > > > > > $('textarea').keyup(function(){ >       if(this.value.length >= 100) { >            //handle the over the limit part here >            $(this).addClass('overlimit'); >            this.value = t

[jQuery] Superfish -- Licensing for shadow.png & arrows-ffffff.png?

2009-03-15 Thread pairofdi...@sabnzbd.org
The two images shadow.png & arrows-ff.png are included in the zip archive of Superfish. Are these also dual licensed under the MIT and GPL licenses? What about the stylesheet?

[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Brad
There is probably a more concise way to do this, but I'll break down the steps // regular expression pattern to get the hash value var patt = new RegExp("[^#]+$"); // The href of your attribute. This is a generic example, you will // probably need to provide a more specific jQuery selector to ge

[jQuery] Re: Working with hash?

2009-03-15 Thread mkmanning
If you mean the querystring as in: mysite.com?name=jonas&phone=12345 //note the ? instead of # Then you can use this plugin (it will parse the querystring into a hash like you want): http://plugins.jquery.com/project/parseQuery On Mar 15, 8:30 am, brian wrote: > On Sun, Mar 15, 2009 at 6:23 AM,

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread T.J. Crowder
> Not sure what you mean "inline" or by "scope the vars inside"; > variables declared inside the function are scoped "inside" Yes. Isn't that what I said? Re inline: I meant inline as in...well...inline. ;-) I'm not sure how else to say it; within the flow of the text rather than outside it.

[jQuery] Re: Working with hash?

2009-03-15 Thread T.J. Crowder
@brian, @mkmanning: FWIW, looked to me from his example like he really did mean hash (what some use as a synonym for the anchor portion of the URI), not query string. Perhaps he's doing some history stuff... -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting se

[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens
Thanks Brad, that's perfect! Jonny On Mar 15, 5:29 pm, Brad wrote: > There is probably a more concise way to do this, but I'll break down > the steps > > // regular expression pattern to get the hash value > var patt = new RegExp("[^#]+$"); > > // The href of your attribute. This is a generic e

[jQuery] Re: Working with hash?

2009-03-15 Thread brian
On Sun, Mar 15, 2009 at 1:43 PM, T.J. Crowder wrote: > > @brian, @mkmanning:  FWIW, looked to me from his example like he > really did mean hash (what some use as a synonym for the anchor > portion of the URI), not query string.  Perhaps he's doing some > history stuff... mysite.com#name=jonas&p

[jQuery] Re: test for .is(":visible") fails in Safari

2009-03-15 Thread Jon Crump
Ricardo, Thanks so much for responding. That's very helpful. My use of events has been very rudimentary so far; your .bind() example has helped me understand them more fully. And now that I know what I'm looking for, various approaches to the problem have been illuminating as well. for exam

[jQuery] Re: jQuery each problem

2009-03-15 Thread macgyver47
What works is var yes_or_no=jQuery(this).attr("value"); if(yes_or_no=="yes"){ do something } else { do something else } Thanks for helping all the way to a fine solution On 15 mar, 15:10, macgyver47 wrote: > Unfortunatly it doesn't work > if ($(this).val() = 'yes') > returns nothing > $(this).v

[jQuery] Re: Working with hash?

2009-03-15 Thread mkmanning
The querystring refers to the name/value pairs following the ? The hash follows the # and is an anchorname; it's not conventional to load it up with name/ value pairs, and in fact would result in an invalid anchorname: you'd be targeting an element named "name=jonas&phone=12345" which wouldn't be

[jQuery] jquery each help

2009-03-15 Thread Tom Shafer
I have articles in a group of divs POSTED: 15 MARCH 2008 1400 HOURS > SNEAK PREVIEW OF NO CHILD... Lorem ipsum dolor sit am

[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens
Oops. Wrote too soon. Works fine for a single anchor. With multiples, all receive the same href value as the first. Needs an .each() somewhere? On Mar 15, 5:44 pm, Jonny Stephens wrote: > Thanks Brad, that's perfect! > > Jonny > > On Mar 15, 5:29 pm, Brad wrote: > > > There is probably a more

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread mkmanning
"withn the flow of text"? Still not getting the usage, maybe you can point me to a specific reference of "inline" as common usage in JavaScript. Inline in common JavaScript usage (since it is 99.9% of the time DOM related) usually refers to javascript (usually event related) within markup, such as

[jQuery] Re: Photo Gallery, Thumbnail navigation

2009-03-15 Thread Jon Crump
kmoll, third slot. It seems like this would be pretty easy, but it is killing me trying to figure it out. I have spent weeks on it with no Turns out, it's not really that easy, as you've discovered; however, the hard work has been done for us in jCarousel.(I know there are other libraries

[jQuery] MVC for javascript application - Or, what works best?

2009-03-15 Thread runnr
Hi, I need to create an application which shall be interacting with a webserver that shall primarily serve all data as xml. The application is more like a CRUD application - it shall parse xml, display the values as form fields. Also, it needs to submit the form fields as xml with the same schema

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread mkmanning
"withn the flow of text"? Still not getting the usage, maybe you can point me to a specific reference of "inline" as common usage in JavaScript. Inline in common JavaScript usage (since it is 99.9% of the time DOM related) usually refers to javascript (usually event related) within markup, such as

[jQuery] Re: jquery-corner plugin not working anymore?

2009-03-15 Thread j0llyr0g3r
Hi Mike, well, when i "corner" the div itself like this: CODE: // something funny happens:

[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens
This seems to work: $('a').each(function() { $(this).attr('href','path/to/' + RegExp("[^#]+$").exec($(this).attr ('href')) + '.html'); }); On Mar 15, 7:03 pm, Jonny Stephens wrote: > Oops. Wrote too soon. > > Works fine for a single anchor. With multiples, all receive the same > href value

[jQuery] Re: move simplemodal popUp ?!

2009-03-15 Thread globe
well found a workaround, even if not a clean solution :(

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread Matt Kruse
On Mar 15, 12:00 pm, mkmanning wrote: > Not sure what you mean "inline" or by "scope the vars inside"; > variables declared inside the function are scoped "inside" (they have > lexical scope to the function), as long as they are preceded with the > var declaration (if not, they are global, even w

[jQuery] Re: jquery each help

2009-03-15 Thread Josh Powell
read up on the .animate() jQuery effect, this might be what you are looking for. http://docs.jquery.com/Effects/animate On Mar 15, 11:46 am, Tom Shafer wrote: > I have articles in a group of divs > >                         width="11" > height="211"/> >                         >            

[jQuery] Re: jquery-corner plugin not working anymore?

2009-03-15 Thread donb
I would give jQuery 1.2.6 a try. Some plugins have trouble with 1.3.x On Mar 15, 3:24 pm, j0llyr0g3r wrote: > Hi Mike, > > well, when i "corner" the div itself like this: > > CODE: > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > >   >     >     >     >     //

[jQuery] Re: jQuery each problem

2009-03-15 Thread Josh Powell
Glad I could help. That's an interesting thing you ran into, first, i assume that instead of $(this).val() = 'yes'; you meant $(this).val() == 'yes' or $(this).val() === 'yes' because the first one meant you are trying to store 'yes' in $ (this).val()... which wouldn't work anyway. Actually b

[jQuery] fadeOut / fadeIn

2009-03-15 Thread andreacfm
Hi, A fast question. This code run in 1.2.6 but fails in 1.3 ++. Why??? $('.showPasswordForm').click(function(event){ $('#signinPanel').fadeOut(function(){ $('#passwordPanel').fadeIn(); }); return false; });

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread mkmanning
" x=3; // This does _not_ change the global x!" No, it doesn't change the global, because it's declared with var in the function first, so x in the function isn't global, it's lexically scoped to the function; x in the inner function is lexically scoped to the containing function (x within the ou

[jQuery] Re: trying to add a 'class' to a link based on the value of the link's href

2009-03-15 Thread vintagetwitch
Hmmm... Still no luck. I suspect this has more to do with me. Also to give a little background, I have 40 html pages that I'm using a jquery styleswitcher script on to be able to switch between 4 different font treatments. I am generated the nav html with Javascript like this if that makes any d

[jQuery] [validate]Trigger validation before form submit?

2009-03-15 Thread yellow1912
I'm using this fantastic validation module: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ and I wonder if there is a way to force validation before form submission. I have a button, which my users have to click first, and if the validation goes through then I will use window:prin

[jQuery] Re: Need example of dynamic validation

2009-03-15 Thread JT
Here's an example from a site I worked on. I'll explain the code first. This site has a form with required fields for First Name, Last Name and Email by default. If one clicks on the Send a hard copy check box, the form expands, revealing the address fields. These are now required. The rules for

[jQuery] Re: trying to add a 'class' to a link based on the value of the link's href

2009-03-15 Thread mkmanning
You could have an issue with the ondomready code executing before you're included file builds the navigation, depending upon how you're including it. I'd suggest using Firebug for Firefox instead of the alert() and adding console.log() in your code to make sure you've actually got the DOM you thin

[jQuery] Re: [validate]Trigger validation before form submit?

2009-03-15 Thread Jörn Zaefferer
Try this: var form = $("#myform"). form.validate(); $("#mybutton").click(function() { if (form.valid()) { // do something } }); Jörn On Mon, Mar 16, 2009 at 12:02 AM, yellow1912 wrote: > > I'm using this fantastic validation module: > http://bassistance.de/jquery-plugins/jquery-plugin-

[jQuery] are # superfish-vertical.css & # superfish-navbar.css required?

2009-03-15 Thread programguru
I was not able to find any indication that these two files below are required, but I wanted to confirm. Does anyone have any idea why they are separated out? # superfish-vertical.css # superfish-navbar.css Thanks

[jQuery] Re: [validate]Trigger validation before form submit?

2009-03-15 Thread yellow1912
Perfect, I think there is a small type there, should be var form = $("#myform"); form.validate(); $("#mybutton").click(function() { if (form.valid()) { // do something } }); But other than that it works perfectly. Thanks so much Jörn Regards Raine On Mar 15, 6:40 pm, Jörn Zaefferer

[jQuery] Button Actions

2009-03-15 Thread MonkeyBall2010
I'm still trying to figure out how to make actions happen with an AJAX button submit. Right now I am using the jQuery Validation plugin to validate my form and then the Forms plugin to perform an AJAX submit. I have the validation and AJAX submit working perfectly right now but I was hoping to add

[jQuery] Jquery Autocomplete Problem

2009-03-15 Thread deafGuru
Hi, I have a bug with JQuery Autocomplete plugin. I don't know whether it's a bug or feature by design. The bug is easy to produce on-demand. Step-by-step to produce a bug. . Click to add new Author textbox. . Select second Author textbox to focus. . Type first two characters, says, 'La'. . Auto

[jQuery] Re: Button Actions

2009-03-15 Thread brian
On Sun, Mar 15, 2009 at 8:24 PM, MonkeyBall2010 wrote: > > I'm still trying to figure out how to make actions happen with an AJAX > button submit. Right now I am using the jQuery Validation plugin to > validate my form and then the Forms plugin to perform an AJAX submit. > I have the validation a

[jQuery] Re: Jquery Autocomplete Problem

2009-03-15 Thread brian
Don't pass true to clone() as you're copying the event handlers. I suspect that's the problem. On Sun, Mar 15, 2009 at 8:26 PM, deafGuru wrote: > > Hi, > > I have a bug with JQuery Autocomplete plugin. I don't know whether > it's a bug or feature by design. The bug is easy to produce on-demand.

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread mkmanning
I think this post has gone way off course, and yet there really isn't any disagreement among us; it's mostly imprecision in language giving rise to ambiguity :P My apologies to lovespring for making a simple question require so much scolling :) So to try and bring this back to the OP: 1.does it

[jQuery] Validate, Remote and Custom Rules -- disable and enable a submit button.

2009-03-15 Thread Louie Miranda
I tried to make a remote validation with custom rules (return true or false) on a input field. I do wanted to disable the submit button, I already did. $("#submit").attr("disabled", "disabled"); However, I am clueless how could I enable it back again? Upon return of true? Here's my js code:

[jQuery] Re: Update DIV

2009-03-15 Thread so.phis.ti.kat
Question. I have it working right now but i can't get it to work more than once. I am using $.ajax(); and $("a").click(); to initiate this. 5 menu buttons, the first one always works, no matter which one, but after it refreshes, the other buttons don't work. I am wondering if it is because I am

[jQuery] Re: Update DIV

2009-03-15 Thread so.phis.ti.kat
I simplified my code and remove $("a) code too.. function updateNav(param) { $.ajax({ type: "POST", cache: false, url: "assets/ajax/updatenav.php", data: "opt="+param, success: function(d){

[jQuery] fonts aliasing issue with opacity overly over cycle plugin

2009-03-15 Thread kevinm
Hi I am having an issue in FF where I have a DIV that I am animating from off the screen and overlaying part of the page. on the page I have the cycle plugin running. If I move the mouse from the overlay to the where the cycle plugin is used (I initiate it on mouseover), the text in the overlay

[jQuery] Re: Update DIV

2009-03-15 Thread mkmanning
You're losing the bound events when you update the html of #nav. JavaScript in the href's is pretty much frowned at this point in web development. You can either use event delegation on the UL, or as of jQuery 1.3 you can use live() (http://docs.jquery.com/Events/ live#typefn); it will bind to all

[jQuery] Re: Button Actions

2009-03-15 Thread MonkeyBall2010
This may sound like a simple question but where would I place this callback function? Does it go within my validation function: $(#form).validate({ $(#form).ajaxForm(function() {do stuff}); }); or would it go outside of this function? Currently my submitHandler is inside of the my validatio

[jQuery] Re: Button Actions

2009-03-15 Thread MonkeyBall2010
ok, I got it... If you place the callback function within the validation script then it fires twice for some reason... I have placed it outside of the function and now it works properly. I'll see how I fair on the rest of it. Thanks! On Mar 15, 10:20 pm, MonkeyBall2010 wrote: > This may sound l

[jQuery] JQuery Plug in For Client side Pagination

2009-03-15 Thread .Nil
Hi, I'm looking for a Paging functionality to be achieved using the Plug- Ins. Could you please provide me the list of such Plug ins for Client side Pagination? Appreciate, if you provide the comparisions with pro and cons of each such available plug-ins? ~.Nil

[jQuery] Re: jquery each help

2009-03-15 Thread Tom Shafer
Im getting the effects I want just not in the right order. I think im going the right way with each, im just not using it the right way. Any other thoughts? -TJ On Mar 15, 4:20 pm, Josh Powell wrote: > read up on the .animate() jQuery effect, this might be what you are > looking for. > > http:/

[jQuery] Chainclude (include css / js sequentially)

2009-03-15 Thread a.karimzadeh
include multiple css /js in a sequence. read more @ http://arashkarimzadeh.com/jquery/18-chainclude-jquery-pluign-for-including-js-and-css-in-a-sequence.html Best regards, Arash Karimzadeh

[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable

2009-03-15 Thread delphilynx
Also not the solution requested, I should post in the jQuery-UI group. Thanks for the help!

[jQuery] Re: Validate, Remote and Custom Rules -- disable and enable a submit button.

2009-03-15 Thread Louie Miranda
help :( -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Quality Web Hosting - www.axishift.com Pinoy Web Hosting, Web Hosting Philippines On Mon, Mar 16, 2009 at 9:57 AM, Louie Miranda wrote: > I tried to make a remote validation with custom rules (return true or > false) on