[jQuery] Re: JQuery variable usage with single/double quote problem

2009-03-31 Thread Ricardo
The quotes in the attr selector are not required, try: $('select[name=ddlViewSelector_'+idCurrent+'] option:selected').text (); On Mar 31, 2:47 pm, LinkGuru i...@legalanalytics.co.uk wrote: Can anyone help on this one? . The following statement is proven to work:

[jQuery] Re: simplemodal help - dynamic load of modal content breaks close button

2009-03-31 Thread dbonneville
I tried this to...no luck with the binding on the close button yet... $(#button-sales).click(function(event) { $(#modalContentInstSales).load(includes/institutional- sales.html); $('#modalContentInstSales').modal({ onClose: modalClose, onOpen:

[jQuery] Re: simplemodal help - dynamic load of modal content breaks close button

2009-03-31 Thread dbonneville
I tried this to...no luck with the binding on the close button yet... $(#button-sales).click(function(event) { $(#modalContentInstSales).load(includes/institutional- sales.html); $('#modalContentInstSales').modal({ onClose: modalClose, onOpen:

[jQuery] Re: How can I disable a button if a form using JQuery Validate plugin passes validation?

2009-03-31 Thread Gigi
That worked. Thanks!

[jQuery] Re: How can I disable a button if a form using JQuery Validate plugin passes validation?

2009-03-31 Thread Gigi
That worked. Thanks!

[jQuery] Re: Cannot call a function within the callback part of $.get in IE7

2009-03-31 Thread Jacob
I replied earlier that I had the same problem. I got my problem resolved - the issue was in my external function, which had the IE extra comma problem. Maybe there is a similar situation with your code. On Mar 22, 6:40 pm, zephyr marc.at.comp...@gmail.com wrote: Hi, I make Ajax ($.get)

[jQuery] will two JQuery libs conflicts?

2009-03-31 Thread Xu
Let say I have one web page that contains html/js snippets from another web site. If we both use JQuery. The two JQuery libs might be same version or might be different version. Will it cause conflicts? If so, how to avoid it? Will jQuery.noConflict () help here?

[jQuery] Re: Modifying CSS classes with jQuery (or '.live()' for '.css')

2009-03-31 Thread cschams
Since you want the style to update when the color changes and when you add or modify elements, why not dynamically create style tags in the document head and let the browser do the work? $('head').append('style type=text/css.cat_1 {color: #ff}/ style') You could leave it at that and keep

[jQuery] How to use in an IFrame?

2009-03-31 Thread wackyph...@yahoo.com
I have an IFrame that loads another page. But that page that is in the Iframe can't seem to use JQuery. Any ideas how I can do this? Thanks for any help.

[jQuery] selecting spans with an attribute of for

2009-03-31 Thread Captain Betty
Hi everyone. I have a weird issue with selecting spans with the “for” attribute. jQuery doesn’t seem to want to select it if the span is physically on the page. Physical test (fails): I have span for=”lid”Some text here/span in on the page. My jQuery: $(“span[for=lid]”).css(“background”,

[jQuery] jQuery Menu Show / Hide Question:

2009-03-31 Thread Slackzer
I have a listing of objects as links: [div: id=listing] First Second Third [div: id=description] [Object description goes here, initially hidden, contents displayed based upon which object is clicked above] [Upon click of new object, hide contents, if displayed, and then display new contents

[jQuery] Firefox 3 (Win) bug in slide animation

2009-03-31 Thread ender
To see this bug in action, visit: http://www.keytosavannah.com and/or http://keytosavannah.dev.emarketsouth.com and click on one of the days in the calendar (top of the left column on most any page). A div will use the slide animation to display on top of the calendar with that day's events.

[jQuery] Calendar App recommendations?

2009-03-31 Thread kozEfx
Looking for a jquery calendar app. Main requirements include Month/Day/Event views; Add/Delete Event, with date/time ranges; Next/Previous functionality for Month/Day/Event views; Database integration; source code available and extensible. Nice to have: Ajax enabled/integrated. Currently

[jQuery] jQuery BlockUI Plugin v2, problems overriding default messages /getting them to show

2009-03-31 Thread javahollic
Hi, I'm looking at using this plugin to put up a blocking 'please wait' indicator during form submission in Confluence, however, the defaults always seem to apply, changing the defaults ($.blockUI.default.message='my custom message') or providing my own map of values, (eg including (message :

[jQuery] Superfish jQery menu dividers

2009-03-31 Thread Janno
Hello! We are using Superfish v1.4.8 jQuery plugin to display horizontal dropdown menu on my companys website. We would like to extend Superfish functionality and use dividers to separate first level menu items. It can be done using left and right border, but not in case if you would like to

[jQuery] Re: jQuery BlockUI Plugin v2, problems overriding default messages /getting them to show

2009-03-31 Thread Mike Alsup
I'm using BlockUI 1.33 and JQuery 1.2.3 That's the problem. 'message' is a 2.0+ option. If you need to use the old version of blockUI, consult the old docs: http://www.malsup.com/jquery/block/index-old.html

[jQuery] distinguishing between clicks on an outer container vs an inner link

2009-03-31 Thread james.kirin40
Hi everyone! A brief question from a newbie. I have a table row which I want to be clickable, but I have a specific link within one cell. Something like: a id=row33 href=# tr td a id=innerXX href=#inner link!/a /td /tr /a I want to have the clicks on the inner link call a certain

[jQuery] Re: JQuery variable usage with single/double quote problem

2009-03-31 Thread LinkGuru
Apologies. A couple of silly errors. 1) its dllViewSelector not ddlViewSelector (I do cut and paste a lot to save such mistakes, normally - honest). And (thanks James), there was a missing underscore. Thanks for all the other contributions to this including Michael Geary's sensible advice. It's

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Eric Garside
Right, but the problems with that approach is inefficiency. It's more efficient to grab the entire set of elements via $('.event-phase') and comparing their rel attribute than it is to throw a loop around $ ('.event-phase-' + i); I use ref/rel for the same basic semantic ideas behind their

[jQuery] [validate] Validating a date

2009-03-31 Thread Erich93063
I am using the jquery validate plugin and using the date validation, but it doesn't seem to be working right. If I enter dfsdfs I will get Please enter a valid date, but if I enter 65/65/6565 which obvisouly is NOT a valid date, it will pass the validation just fine. ???

[jQuery] Re: distinguishing between clicks on an outer container vs an inner link

2009-03-31 Thread Blaine
Hey James, Your anchor tag for the table row is not needed. Simply add the id to the table row. $( document ).ready( function(){ var allowClick = 1; $(#row33).bind(click, function(e) { if (allowClick){ alert( outer ); } }); $(#innerXX).bind( click,

[jQuery] Re: How to use in an IFrame?

2009-03-31 Thread Jonathan
Don't use IFrames, try and redesign your page to just use AJAX and load the response into a div instead. If for whatever reason you are locked into an IFrame you would need to include a script tag for jQuery in the IFrame in order to use jQuery since it's basically a new page within your page.

[jQuery] Re: $.fadeTo() vs. MSIE6 through 8

2009-03-31 Thread Nekura Neko
Okay, nevermind, got it. The lines: // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level elem.zoom = 1; are referring to the .hasLayout property of

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Jonathan
That approach is only more efficient because the original design was lacking. Also, you can just use the starts(^) attribute selector $(div [id^='event-phase']) to retrieve all IDs that start with 'event-phase'. You don't get to make up new meaning for existing attributes because you think it

[jQuery] Re: distinguishing between clicks on an outer container vs an inner link

2009-03-31 Thread mkmanning
Get rid of the anchor (it's not valid anyway), and you don't need to bind two click functions; your event delegation is fine--almost: You need to wrap the event with $() to use the attr() method. $(#row33).click( function(e) { if( $(e.target).attr(id) == innerX) { ; // do inner link

[jQuery] How to go to top of page after form validation fails (using jQuery validation plugin)

2009-03-31 Thread Kathryn
I'm using the validation plugin at http://bassistance.de. When form validation fails, focus goes to the first invalid element. But I have a summary error message at the top of the page which I want the user to see. If the first invalid field is too far down, they don't see the message. How can I

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread RobG
On Apr 1, 7:42 am, Eric Garside gars...@gmail.com wrote: Right, but the problems with that approach is inefficiency. It's more efficient to grab the entire set of elements via $('.event-phase') and comparing their rel attribute than it is to throw a loop around $ ('.event-phase-' + i); I

[jQuery] Re: will two JQuery libs conflicts?

2009-03-31 Thread brian
If you're only including some functions from the other site, rather than the actual jquery file, there *might not* be a problem. On Tue, Mar 31, 2009 at 2:16 PM, Xu bobxu1...@gmail.com wrote: Let say I have one web page that contains html/js snippets from another web site. If we both use

[jQuery] Re: selecting spans with an attribute of for

2009-03-31 Thread RobG
On Apr 1, 4:44 am, Captain Betty mcwilliams...@gmail.com wrote: Hi everyone. I have a weird issue with selecting spans with the “for” attribute. jQuery doesn’t seem to want to select it if the span is physically on the page. [...] Is this a bug? What am I doing wrong in trying to select a

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread brian
On Tue, Mar 31, 2009 at 5:42 PM, Eric Garside gars...@gmail.com wrote: Right, but the problems with that approach is inefficiency. It's more efficient to grab the entire set of elements via $('.event-phase') and comparing their rel attribute than it is to throw a loop around $

[jQuery] Re: Modifying CSS classes with jQuery (or '.live()' for '.css')

2009-03-31 Thread Ricardo
You can modify the CSS rules directly, see this plugin: http://flesler.blogspot.com/2007/11/jqueryrule.html I wrote this a while back, not thorougly tested. I guess adding a new class rule to the end of the stylesheet will override previous rules (this only adds to the first stylesheet in the

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Mauricio (Maujor) Samy Silva
Right, but the problems with that approach is inefficiency. It's more efficient to grab the entire set of elements via $('.event-phase') and comparing their rel attribute than it is to throw a loop around $ ('.event-phase-' + i); I think it depends upon the context. If the loop is needed for

[jQuery] jQuery/ HTML help needed

2009-03-31 Thread Warfang
Alright, heres the situation: I'm creating a tabbed box with jQuery and with some HTML tricks. The code that I came up with works great but is considered invalid markup by W3 standards. HTML: div id=tab_links a href=# id='#tab_1' class=activeslide 1/a a href=# id='#tab_2'slide

[jQuery] Re: distinguishing between clicks on an outer container vs an inner link

2009-03-31 Thread RobG
On Apr 1, 3:15 am, james.kirin40 james.kiri...@gmail.com wrote: Hi everyone! A brief question from a newbie. I have a table row which I want to be clickable, but I have a specific link within one cell. Something like: a id=row33 href=#    tr         td a id=innerXX href=#inner link!/a

[jQuery] Re: jQuery/ HTML help needed

2009-03-31 Thread James
a href=# id='#tab_1' class=activeslide 1/a is suppose to be: a href=# id=tab_1 class=activeslide 1/a On Mar 31, 1:36 pm, Warfang warfang...@gmail.com wrote: Alright, heres the situation: I'm creating a tabbed box with jQuery and with some HTML tricks. The code that I came up with works great

[jQuery] Re: selecting spans with an attribute of for

2009-03-31 Thread Ricardo
Even being invalid this is unexpected. Sizzle maps for to htmlFor, because in labels the for value is held in the htmlFor property (for being a reserved word). If you had span htmlFor=tea/span you could get it with $('span[for=tea]') in example. In your case you have to resort to

[jQuery] Re: distinguishing between clicks on an outer container vs an inner link

2009-03-31 Thread Ricardo
Or access the id property directly: $(#row33).click( function(e) { if( e.target.id == innerX) { ; // do inner link things } else { ; // do outer click things } }); You can also stop propagation to isolate the inner click: $('#row33').click(function(){ // do stuff

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Ricardo
You can store data in the class attribute. See the jquery.metadata plugin: http://docs.jquery.com/Plugins/Metadata. You can also use the data() method in jQuery, it's meant for this. - ricardo On Mar 31, 6:42 pm, Eric Garside gars...@gmail.com wrote: Right, but the problems with that approach

[jQuery] Re: jQuery/ HTML help needed

2009-03-31 Thread Warfang
Yes, but I explained why... I, though, used single quote marks so that it worked with the second line of script that I showed you. I just need to know what to put in the var line so that I can remove those quotes. On Mar 31, 7:49 pm, James james.gp@gmail.com wrote: a href=# id='#tab_1'

[jQuery] Re: jQuery/ HTML help needed

2009-03-31 Thread James
I'm not sure I understand what you're trying to do. Having the # and single-quotes in the id is invalid. I'm not sure how having it there is suppose to make things work. Similar to jQuery UI Tabs, maybe you should consider putting tab_1 inside the a's 'title' attribute instead: a href=#

[jQuery] Re: Validation Success Callback

2009-03-31 Thread MonkeyBall2010
setTimeout(window.location = http://www.google.com;, 5000); It seems that the script just completely ignores the timeout but executes the code anyways... What is really weird is that if I put some other code on a timer then it works correctly so maybe I am doing the redirect wrong?? On Mar 30,

[jQuery] Re: Validation Success Callback

2009-03-31 Thread James
In some common ways, you'd have to either do it: setTimeOut(function() { window.location = 'http://www.google.com'; }, 5000); or: setTimeOut(doSomething, 5000); doSomething() { window.location = 'http://www.google.com'; } or: setTimeout('window.location = http://www.google.com;',

[jQuery] Re: Validation Success Callback

2009-03-31 Thread James
Slight typo on the second option: setTimeOut(doSomething, 5000); function doSomething() { window.location = 'http://www.google.com'; } On Mar 31, 2:31 pm, James james.gp@gmail.com wrote: In some common ways, you'd have to either do it: setTimeOut(function() {      window.location

[jQuery] Re: jQuery/ HTML help needed

2009-03-31 Thread Jonathan
ID's have to start with a letter like the validator and james said. You didn't really explain why, you just showed a block of code. I think I get what you're trying to do but you really shouldn't be using IDs like that. ID's are a unique way to IDentify an element, not to get tricky with linking

[jQuery] Re: jQuery/ HTML help needed

2009-03-31 Thread Warfang
Sorry for not explaining this well. In the first line, (this) is the link that you click. The the id is used as a selector to select the tab that relates to that link. What I'd like to do is something like this: var activeTab = [single quote here] $(this).attr(id) [single quote here]; Is

[jQuery] Re: jQuery/ HTML help needed

2009-03-31 Thread Warfang
Could I do something like this?... var activeTab = $(this).attr('id'); $(''#(activeTab)'').fadeIn(500); Those are two single quotes by the way. That is what I would like to accomplish.

[jQuery] Re: selecting spans with an attribute of for

2009-03-31 Thread Captain Betty
Thanks everyone. Yes, I know the for attribute is reserved for labels. Reason I ask is that I'm using Validator and was trying to target a span for a group of check boxes where at least one needed to be selected to validate the form. I'll probably switch back to a label (which semantically

[jQuery] Re: jQuery/ HTML help needed

2009-03-31 Thread James
You're making it more complicated than it really is. Using something similar to Jonathan's method: // Change your id to something like 'link_1', like here: a href=# id=link_1 class=activeslide 1/a var activeTabID = $(this).attr('id'); // - link_1 var activeTab = activeTabID.split('_')[1]; //

[jQuery] IE freez when I open a page with tabs.

2009-03-31 Thread amit
Hi All, I am having a problem recently. I am using jQuery-1.3.2.min and my page freeze. It force me to kill the IE from task manager. But strange thing is, it was working fine earlier, all of sudden I don't know why its creating problems. My content page is huge and I thought may be its lot of

[jQuery] Append asterisk to required field labels

2009-03-31 Thread Baum
Hi, I am looking to use jQuery in conjunction with xVal for validation. One of the cool things I though jQuery would allow me to do is append an asterisk (*) to the label of ALL my fields that have a css class of required. The example below only applies the asterisk to the first field. How can

[jQuery] Re: Append asterisk to required field labels

2009-03-31 Thread Baum
One note the javascript included in the original post is incorrect...I was playing around and pasted the wrong copy...remove the each(). Also var size = $(.required).size(); is equal to 1 but var size = $ (input).size(); is equal to 2. Thanks. On Mar 31, 7:56 pm, Baum dbau56...@gmail.com wrote:

[jQuery] Re: can someone take a look please...

2009-03-31 Thread Steven Yang
do you have anything in the html also with name=partnum?because in IE the getElementById actually get the name first if you use jQuery simply try $(#partnum).val(result)

[jQuery] Re: Append asterisk to required field labels

2009-03-31 Thread James
How about something like: $required = $(.required); // list of elements with 'required' class. $.each($required, function(i) { var id = $(this).attr('id'); var $label = $(label[for=+id+]); $label.text( $label.text()+'*' ); }); The requirement is that all your .required input's ID

[jQuery] Re: can someone take a look please...

2009-03-31 Thread Jack Killpatrick
When I use firebug to see what's in the HTML I only see: input type=text value= name=partnum/ - Jack webguy262 wrote: Jack I think I've got that, don't I? From my post... input type=text name=partnum id=partnum readonly Am I missing something? Jack Killpatrick wrote: try

[jQuery] Re: can someone take a look please...

2009-03-31 Thread Ricardo
Didn't notice the link, jack's right: input type=text name=partnum value= should be input type=text name=partnum id=partnum value= / (as you declared your page XHTML 1.0 Transitional, you must close the input element) cheers, - ricardo On Mar 31, 11:18 pm, Jack Killpatrick j...@ihwy.com

[jQuery] Re: jQuery/ HTML help needed

2009-03-31 Thread Ricardo
Actually this is the perfect opportunity to put those href's into use: div id=tab_links a href=#tab_1 class=activeslide 1/a a href=#tab_2slide 2/a a href=#tab_3slide 3/a /div div id=tabs div id=tab_1slide 1/div div id=tab_2slide 2/div div

[jQuery] Select elements with a prefix for id

2009-03-31 Thread iceangel89
how can i select all elements with a prefix of Lab i have textboxes with ids like Lab1, Lab2, Lab3 ...

[jQuery] A Tree which can be filtered or searched....

2009-03-31 Thread Ravish
Hi, I've been looking for a tree widget which can be filtered or searched by typing keyword in a textbox. When trees have thousands of nodes, its very difficult for users to browse manually. Has anyone ever seen such a widget (jquery based ideally but other will do as well). I am surprised to

[jQuery] Re: Append asterisk to required field labels

2009-03-31 Thread Baum
Thanks James. I am just getting started with jQuery so the syntax is rather new. What I found is that the jquery-1.3.2.js file that I am using as part of the asp.net MVC release does not appear to work with each syntax (I only get the first input field back). I reverted back to 1.2.6 and it

[jQuery] Re: selecting spans with an attribute of for

2009-03-31 Thread RobG
On Apr 1, 9:55 am, Ricardo ricardob...@gmail.com wrote: Please only reply to me if you are commenting on something I posted (which is difficult to do as you continuously top post). Otherwise, reply to the OP (or whichever post you are replying to). Even being invalid this is unexpected.

[jQuery] Re: distinguishing between clicks on an outer container vs an inner link

2009-03-31 Thread RobG
On Apr 1, 10:03 am, Ricardo ricardob...@gmail.com wrote: Or access the id property directly: $(#row33).click( function(e) {     if( e.target.id == innerX) { That is certainly more efficient and less problematic than using attr (), but not a very good strategy. I think you mean to reply to

[jQuery] Re: Select elements with a prefix for id

2009-03-31 Thread Charlie Griefer
On Tue, Mar 31, 2009 at 8:30 PM, iceangel89 iceange...@gmail.com wrote: how can i select all elements with a prefix of Lab i have textboxes with ids like Lab1, Lab2, Lab3 ... $(textarea[id^='Lab']) http://docs.jquery.com/Selectors/attributeStartsWith#attributevalue -- I have failed as

<    1   2