[jQuery] Re: JSON and variables

2010-01-14 Thread T.J. Simmons
Bah, of course the other way 'round. Thanks. - T.J. On Jan 14, 2:45 pm, MorningZ wrote: > Loop through the data, not the inputs > > so like: > > $.each(data, function(k, v) { >      var txt = document.getElementById(k); >      if (txt) { >           $(this)

[jQuery] JSON and variables

2010-01-14 Thread T.J. Simmons
t:text").each(function(){ part = $(this).attr("id"); $(this).val(data.part); }); } but that obviously doesn't work, since it's trying to retrieve "part" from the data object, instead of using the variable's value. Does anyone have a way of doing this? Thanks. -- T.J.

[jQuery] Ajax serialize()

2010-01-14 Thread T.J. Simmons
Office: Save and I'm using var data = $("#details").serialize(); to serialize the data. Thanks. -- T.J.

[jQuery] Re: Plugin Authoring and $.extend

2009-12-30 Thread T.J. Simmons
You know, I didn't even realize there was two differing sets of documentation; that would explain why I was confused as to the multitude of arguments passed when the documentation listed only one. I appreciate the help; you guys cleared that up for me. Thanks. -- T.J. On Dec 30, 4:04 pm,

[jQuery] Re: Plugin Authoring and $.extend

2009-12-30 Thread T.J. Simmons
things, I just wasn't seeing the why; now I do. Thanks for the help. Makes a lot more sense now. -- T.J. On Dec 30, 12:21 pm, MorningZ wrote: > oops.. that should say: > > "the third: $.extend(obj2, obj3);"

[jQuery] Plugin Authoring and $.extend

2009-12-30 Thread T.J. Simmons
why. I've read the documentation for $.extend and it doesn't seem to make much sense with the way it's used within that walkthrough, at least not to me. Is anyone able to put it in a more understandable way, other than what the documentation has? Thanks, T.J.

[jQuery] Re: Passing a string via variable results in NaN

2009-12-22 Thread T.J. Simmons
When you use + like you are there, it's trying to add your string to something.. which isn't a number, hence NaN. Could you not do ppost : { 'Path' : $FilePath, 'File' : $FileName } ? That would be my suggestion. -- T.J. On Dec 22, 1:58 pm, Adrian Maleska wrot

[jQuery] Re: Does jquery have problems with webkit browsers?

2009-12-22 Thread T.J. Simmons
I'd provide more detail; $.ajax should work in every browser. There's more than likely an issue with the script or the response. An example of what you're doing would work wonders for helping us figure it out. - T.J. On Dec 22, 7:45 am, kumari Manohar wrote: > Remove > >

[jQuery] Re: How do I unbind all onclick events from a button?

2009-12-15 Thread T.J. Simmons
THING, just use .unbind(); otherwise if you want to unbind a click binding, use .unbind("click"); You only need to pass a function if you want to unbind the bound event that calls on that function. - T.J. On Dec 15, 4:11 pm, "laredotorn...@zipmail.com" wrote: > I saw thi

[jQuery] Re: How do I unbind all onclick events from a button?

2009-12-15 Thread T.J. Simmons
Try $("#id").unbind("click"); I've never used it before, but according to http://docs.jquery.com/Events/unbind#typefn that oughta do the job pretty nicely. - T.J. On Dec 15, 3:38 pm, "laredotorn...@zipmail.com" wrote: > Hi, > > I'm using JQue

[jQuery] Re: Plugin Questions

2009-12-15 Thread T.J. Simmons
hat I need right now. Perhaps someone will point me to a better way of doing this in the future. - T.J. On Dec 15, 11:30 am, "T.J. Simmons" wrote: > Well that's certainly one thought. :) > > Luis, to unsubscribe to gohttp://groups.google.com/group/jquery-en, > Edit my M

[jQuery] Re: Plugin Questions

2009-12-15 Thread T.J. Simmons
legroups.com [mailto:jquery...@googlegroups.com] En nombre > de T.J. Simmons > Enviado el: martes, 15 de diciembre de 2009 12:02 > Para: jQuery (English) > Asunto: [jQuery] Plugin Questions > > Hi all, > > Got a question for you guys who're more knowledgeable than I am. I >

[jQuery] Re: rotate/loop using jquery

2009-12-15 Thread T.J. Simmons
t").css("background-color") == 'yellow') { $("#trafficLight").css("background-color", "red"); } else { $("#trafficLight").css("background-color", "green"); } }); That should do it for you.

[jQuery] Plugin Questions

2009-12-15 Thread T.J. Simmons
(function ($) { closure? Since script tags mingle together once they're loaded on the page, I assume that would work. Any thoughts or suggestions here would be greatly appreciated. Here's a link to the plugin code: http://jsbin.com/aweso3/edit It's in the Javascript tab.. I've commented the area I'm curious about. Thanks! - T.J.

Re: [jQuery] Re: .focus() and non-IE browsers.

2009-12-14 Thread T.J. Simmons
Appreciate it. My digging around online brought up old posts from 2007- ish, so I wasn't sure if this was just due to the implementation across different browsers or an actual bug. Thanks. T.J. Simmons Sent from my iPhone On Dec 14, 2009, at 9:49 PM, Dave Methvin wrote: For some r

[jQuery] Re: Can't get a block of HTML added to the DOM

2009-12-14 Thread T.J. Simmons
That's the part that had me a little confused, that it's showing up at all; as far as I can tell, the way .append() is used is correct. A page, like Mike said, that shows what you're using and the context in which you're using it would definitely go a long way towards figur

[jQuery] Re: Can't get a block of HTML added to the DOM

2009-12-14 Thread T.J. Simmons
who knows more will come in and blast my answer, but that's my thought. Hope that helps. - T.J. On Dec 14, 10:05 am, joseph7 wrote: > Hi, > > So, I'm attempting to add HTML to a document via Ajax, but when I get > back the content, I'm finding that no matter what I t

[jQuery] .focus() and non-IE browsers.

2009-12-14 Thread T.J. Simmons
if (a != b) { alert('Thing! Please fix.'); $(this).focus(); } }); where a and b are my two controls, and the alert is an actual error message. I'm trying to set the focus back to the text box () if it doesn't match, and this only works in IE. Thanks, T.J.

[jQuery] Re: Selecting a value from a SELECT field?

2009-12-11 Thread T.J. Simmons
So it works now? Glad to hear. Let us know if you need anything else. - T.J. On Dec 11, 10:44 am, youradds wrote: > haha think I may have worked it out :p > > Was missing this in the last one: > >                          jQuery("#catid3").html(options); >    

[jQuery] Re: Selecting a value from a SELECT field?

2009-12-11 Thread T.J. Simmons
Aye, must be something else on the page; I've never tried using the text of the option, good to know it works like that too. - T.J. On Dec 11, 10:27 am, Scott Sauyet wrote: > And your other syntax should also work as well: > >    http://jsbin.com/oredo(codehttp://jsbin.com/oredo/

[jQuery] Re: Selecting a value from a SELECT field?

2009-12-11 Thread T.J. Simmons
Have you tried putting the numeric value in quotes? It works fine like that.. here's a link so you can see. http://jsbin.com/iqiru Hope that helps. - T.J. On Dec 11, 9:59 am, youradds wrote: > Hi, > > I'm trying to make a bit of code, which will auto-select a value from &

[jQuery] Re: Traversing Help

2009-12-10 Thread T.J. Simmons
Back at work, and it works like a charm. Thanks very much. - T.J. On Dec 10, 12:41 pm, "T.J. Simmons" wrote: > Well the other errors don't exist in my live code; I just typed up the   > page on jsbin real quick before a meeting to show what my problem was.   > I ap

Re: [jQuery] Re: Traversing Help

2009-12-10 Thread T.J. Simmons
not the best at traversing; haven't used .prev() before. Thanks! T.J. Simmons Sent from my iPhone On Dec 10, 2009, at 12:38 PM, Scott Sauyet wrote: On Dec 10, 12:36 pm, "T.J. Simmons" wrote: Sorry, the right link ishttp://jsbin.com/ekuyo It would probably be better to fix t

Re: [jQuery] Re: Traversing Help

2009-12-10 Thread T.J. Simmons
Even fixed my code to traverse is wrong somehow; that's the core of the issue. The code in the example page was more to show the body of the problem, but I'll get that fixed when I return from lunch. Thanks. T.J. Simmons Sent from my iPhone On Dec 10, 2009, at 12:19 PM, "Ma

[jQuery] Re: Traversing Help

2009-12-10 Thread T.J. Simmons
Sorry, the right link is http://jsbin.com/ekuyo On Dec 10, 11:32 am, "T.J. Simmons" wrote: > Hi all, > > I'm pretty bad at DOM traversing (can't get hierarchies right in my > head, I guess) and I'm in a situation where it's basically my only > option

[jQuery] Traversing Help

2009-12-10 Thread T.J. Simmons
basic formula of MID: and the following div being able to be repeated many times. What I'm trying to do is go into everything with a class of thingS, and go to the hdnMID before it to get the value. And it's giving me 'undefined' as the value I'm getting. Any help please? Thanks, T.J.

[jQuery] Re: Multiple responses from a single Ajax call

2009-12-09 Thread T.J. Simmons
I'll do the same. Thanks! T.J. On Dec 9, 4:45 pm, kingunderscore wrote: > Yeah these things happen oh well. > > T.J. > I will let you know if i find a more graceful way around it. > > Thanks for the help! > Michel Belleville > > And in reference to your question

[jQuery] Re: Multiple responses from a single Ajax call

2009-12-09 Thread T.J. Simmons
then i pull the .html() from that and then wipe it > out again after i get what i need. > > On Dec 9, 1:57 pm, "T.J. Simmons" wrote: > > > > > It needs a root element, that's what I just ran into an issue with > > (I'm trying something v

[jQuery] Re: Ajax error handling & textStatus

2009-12-09 Thread T.J. Simmons
No problem, glad to help. -T.J. On Dec 9, 1:12 pm, Cameron van den Bergh wrote: > Thank you for this information, indeed, i was using $.get. > > On 9 déc, 18:13, "T.J. Simmons" wrote: > > > > > Are you using $.ajax or one of the other AJAX functions? $.g

[jQuery] Re: Multiple responses from a single Ajax call

2009-12-09 Thread T.J. Simmons
It needs a root element, that's what I just ran into an issue with (I'm trying something very similar). However, for some reason IE returns null when you try to get the information inside of the tag, but Firefox (and Chrome and Safari) return the correct information. Have you seen that before? O

[jQuery] Re: Linked Menus Help

2009-12-09 Thread T.J. Simmons
Haha, no problem. I've been having one of those weeks. Glad it works. -T.J. On Dec 9, 11:42 am, rob wrote: > Nevermind... I found the error... I'm having one of those mornings... > Thanks for you help tho > > On Dec 9, 10:30 am, rob wrote: > > > > > I switc

Re: [jQuery] Re: Replacing brs in a div

2009-12-09 Thread T.J. Simmons
. see what you're getting and do a replace on all possible combos, that's my thought. Hope that helps. T.J. On Wed, Dec 9, 2009 at 11:02 AM, Mad-Halfling wrote: > Thanks for the suggestions folks, I tried > var $html = $("#DivID").html(); > $("br", $html).r

[jQuery] Re: Performance Problems with Suggestion Plugin

2009-12-09 Thread T.J. Simmons
which seems to have fixed a good deal of the problems. Thanks, T.J. On Dec 9, 11:14 am, Cameron van den Bergh wrote: > Hi, > > To improve efficiency, try using contexts in order to restrict the > parsed DOM elements. > > For example, if you know that all targeted elemen

[jQuery] Re: Ajax error handling & textStatus

2009-12-09 Thread T.J. Simmons
Are you using $.ajax or one of the other AJAX functions? $.get and the rest only execute a callback upon success; you'll need to use $.ajax if you want a callback for an error. http://docs.jquery.com/Ajax/jQuery.get#urldatacallbacktype has some more information on that. -T.J. On Dec 9, 6:

[jQuery] Re: Performance Problems with Suggestion Plugin

2009-12-09 Thread T.J. Simmons
w. Thanks. T.J. On Dec 9, 10:02 am, "T.J." wrote: > I just ran a page with an absurd amount of inputs through the Firebug > profiler and it seems that the majority of the time spent running > scripts is inside jQuery's (I'm using 1.4a1) Sizzle selector, which &

[jQuery] Re: Replacing brs in a div

2009-12-09 Thread T.J.
I guess that just depends on whether or not the .html() is treated as a string or as an object with HTML elements. If it's a straight up string, .replace like you said would work just fine. If it's a collection of HTML elements, the jQuery method should work. Again, I'm just fumbling around here,

[jQuery] Re: Replacing brs in a div

2009-12-09 Thread T.J.
Reading through the documentation, it seems that either would work, if you provide a selector... Try something like.. var $html = $("#DivID").html(); $("br", $html).replaceWith("\r\n"); could maybe work? I'm no expert on this at all, that's just my initial thought. On Dec 9, 9:49 am, Mad-Halfli

[jQuery] Re: Performance Problems with Suggestion Plugin

2009-12-09 Thread T.J.
tee is the case). Again, thanks. T.J. On Dec 9, 9:43 am, "T.J." wrote: > Hi all, > > I wrote a suggestion plugin to make suggestions as the user types, and > display a tooltip if they mouse over the suggestion. This is my first > jQuery plugin and I followed t

[jQuery] Performance Problems with Suggestion Plugin

2009-12-09 Thread T.J.
is any suggestions on how to improve the performance of it. If anyone has any ideas of where I could place the file, please let me know. Thank you. T.J.

[jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread T.J.
page. Thanks! T.J. On Dec 9, 8:56 am, "T.J." wrote: > Thanks for the link; I haven't heard of that site before. > > http://jsbin.com/axuwi3is my (very basic) example of what I'm trying > to attempt. What the button on my page actually does is quite > differen

[jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread T.J.
uot; wrote: > Could you share a live sample page? If you don't have a place to host one, > jsbin.com: > > http://jsbin.com/ > > That will allows us to see what you're seeing quite easily. > > - Richard > > > > On Wed, Dec 9, 2009 at 9:23 AM, T.J. wr

[jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread T.J.
For further clarification, the way I'm calling that is as follows: for (var x = 1; x <= count; x++) { $("#button").triggerHandler("click"); } which is inside of a function that I call on page load, and it isn't working at all. Thanks, T.J. On Dec 8, 1:32 p

Re: [jQuery] Linked Menus Help

2009-12-08 Thread T.J. Simmons
This is somewhere in the jQuery documentation, but use .live("click", function(){ instead of .click(function(){ to delegate the function to all matched elements on the page and loaded in via AJAX or otherwise. Hope that helps. T.J. Simmons Sent from my iPhone On Dec 8, 2009,

[jQuery] .trigger and .triggerHandler methods

2009-12-08 Thread T.J.
ger/.triggerHandler methods not be called from within a loop? The syntax I'm using is as follows: $("#button").triggerHandler("click"); Thanks, T.J.

[jQuery] Re: Is there a way to use this function without clicking the link twice?

2009-04-05 Thread T.J. Crowder
gree, they don't all have to be globals. JavaScript provides very powerful OOP features in the form of prototypical inheritance. You can also simulate class-based inheritance if you like, although JavaScript is not class-oriented; it's that flexible. :-) HTH, -- T.J. Crowder tj /

[jQuery] Re: jquery toggle class, I needed to switch class....

2009-03-23 Thread T.J. Crowder
Query.fn.switchClass = function(class1,class2) { if (this.hasClass(class1)) { this.removeClass(class1).addClass(class2); } else { this.removeClass(class2).addClass(class1); } }; [1] http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html FWIW, -- T.J. Cr

[jQuery] Re: submit form into shadowbox (or lightbox)

2009-03-23 Thread T.J. Crowder
(Sorry, premature click-itis.) I should have said that you would initiate the jQuery.ajax post from a submit handler on the form, passing the form data in as the 'data' parameter, and cancel the standard form submit (since that would refresh the entire page). -- T.J. :-) On Mar 2

[jQuery] Re: submit form into shadowbox (or lightbox)

2009-03-23 Thread T.J. Crowder
use jQuery.post [2] which is a simplified wrapper for it, but .post is missing out some important things IMHO, like a callback on failure.) [1] http://docs.jquery.com/Ajax/jQuery.ajax#options [2] http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype HTH, -- T.J. Crowder tj / crowder software / com

[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-22 Thread T.J. Crowder
ering up the global namespace. ;-) No, seriously, as I said to the OP, you'd want to wrap this up into some kind of module or class... -- T.J. :-) On Mar 22, 11:10 pm, mkmanning wrote: > Sorry, I should have written: > >  var div = $('div.img1')[0], //get with whatever se

[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-22 Thread T.J. Crowder
oing this for myself (which isn't likely), I'd probably use numbered styles like you did -- that approach makes more sense to me. It's just that after your earlier post, the OP expressly asked for an array-based approach... -- T.J. :-) On Mar 22, 7:50 pm, mkmanning wrote: > A

[jQuery] Re: Pointers to disable default function if JS is enabled

2009-03-22 Thread T.J. Crowder
tDefault(); } }); (You'll need to add in your animate logic, etc.) HTH, and apologies if I'm misreading. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 22, 2:28 pm, mike wrote: > folks, I am trying to puzzle something

[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-22 Thread T.J. Crowder
* * You would probably want to generalize that into a reusable module of some kind, but the logic is simple enough. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting s

[jQuery] Re: Help me solve this IE6 design issue

2009-03-21 Thread T.J. Crowder
bgiframe [3] http://www.google.com/search?q=iframe+site%3Adocs.jquery.com HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 21, 12:03 pm, "sandee...@adpsconsulting.com" wrote: > The problem in brief :- > In simple

[jQuery] Re: Is there anyway to grab the Children of an Element?

2009-03-19 Thread T.J. Crowder
text (no pun!) we can probably figure it out, if the above isn't helpful. FWIW, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 19, 1:20 pm, Martin wrote: > Hello, > >

[jQuery] Re: Using 1.3 this: [class!=whatever] doesn't work.

2009-03-19 Thread T.J. Crowder
Hi Ricardo, My guess is that he's using multiple class names and that's why it wasn't working originally (false positives); see my post a couple back. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 19, 12:54 am, ric

[jQuery] Re: Using 1.3 this: [class!=whatever] doesn't work.

2009-03-18 Thread T.J. Crowder
.6 code doesn't quite work in 1.3? HTH, sorry for missing != support earlier. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 18, 10:59 am, "T.J. Crowder" wrote: > Hi, > > Is there a != attribute operator?

[jQuery] Re: Using 1.3 this: [class!=whatever] doesn't work.

2009-03-18 Thread T.J. Crowder
.org/TR/CSS2/selector.html [2] http://www.w3.org/TR/css3-selectors [3] http://docs.jquery.com/Release:jQuery_1.3 [4] http://wiki.github.com/jeresig/sizzle HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 18, 10:21 am, will wrote

[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, consu

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

2009-03-15 Thread T.J. Crowder
;properties". Don't get me started on the horror of implicit globals.[1] ;-) [1] http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html -- T.J. On Mar 15, 5:00 pm, mkmanning wrote: > Not sure what you mean "inline" or by "scope the vars inside"; > variables decl

[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: why coding like this:(function(){})();

2009-03-15 Thread T.J. Crowder
the containing scope. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available