Re: [jQuery] Same-site Restrictions on Ajax: Does $.getScript help?

2007-03-26 Thread Michael Geary
> I want to make a remote request to a different server than > the current page is hosted on, in order to get JSON data > (padded with a callback). > > This is typically handled by inserting

Re: [jQuery] json deserialization

2007-03-17 Thread Michael Geary
> This works for me: > > $.ajax({ > url: 'email.pl', > type: "post", > data: { > rm: 'deleteLetter', > ID: myForm.letterSelect.value > }, > dataType: 'json', > success: function( ret ) { > alert( ret.a ); > } > }); > > I believe the order in whi

Re: [jQuery] window.undefined = "undefinedundefined"?

2007-03-15 Thread Michael Geary
> I was poking around the DOM looking for incorrectly scoped > variables and I found the following node: > > window.undefined = "undefinedundefined" > > What is this for? The window object has a property named "undefined" whose value is the undefined value. IOW, when you run code like this: i

Re: [jQuery] Advantages of adding functions to jQuery

2007-03-14 Thread Michael Geary
> I'm having trouble seeing the advantage of adding static > functions to jQuery as in: > > jQuery.log = { > error : function() { ... }, > warning : function() { ... }, > debug : function() { ... }, > }; > > as opposed to: > > function log() { ... } > log.prototype.error = function() { ..

Re: [jQuery] Dynamically change Document title

2007-03-08 Thread Michael Geary
> Is there a way to change the title of a document after an > ajax Call. I'm using an ajax history system and I would like > to view specific document title in the back button list. > > I've try this but doesn't seem to work : > $("title").html("Dynamic Title"); > > I can see the chang

Re: [jQuery] compare between display and visibility when hide anelement?

2007-03-06 Thread Michael Geary
Nothing to do with SEO. The display and visibility properties do two different things: http://www.w3.org/TR/CSS21/visuren.html#display-prop http://www.w3.org/TR/CSS21/visufx.html#visibility -Mike _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Microtoby Sent: Tuesd

Re: [jQuery] .next() bug?

2007-02-28 Thread Michael Geary
> Now, my mark-up is wrong. I should have wrapped the nested > in it's own , but I missed it. Testing looked good > in FF 2, .next() was returning the nested , and I didn't > even notice the problem. In IE6/7 however, > .next() returned the next , and not the which was in > fact next the n

Re: [jQuery] KICK-BUTT javascript based Zoom feature

2007-02-24 Thread Michael Geary
...and if I seem too much like a smart aleck today, my apologies! No offense intended. I was just having some fun with the juxtaposition of "that URL is busted" and "anyone know how to accomplish this in jQuery"... :-) _____ From: Michael Geary The actual code for the c

Re: [jQuery] KICK-BUTT javascript based Zoom feature

2007-02-24 Thread Michael Geary
ubject: Re: [jQuery] KICK-BUTT javascript based Zoom feature Wow. that looks simple. I guess the jQuery core has everything else needed to produce the close-up effect? Rick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Geary Sent: Saturday, February 24, 2007 2:07 PM T

Re: [jQuery] KICK-BUTT javascript based Zoom feature

2007-02-24 Thread Michael Geary
This is untested code, but it's one way you could do it with jQuery: $(function() { location = $('[EMAIL PROTECTED]')attr('href').replace( /_spam$/, '' ); }); _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Jordan Sent: Saturday, February 24, 2007 10:32

Re: [jQuery] Id of a textarea element

2007-02-19 Thread Michael Geary
> > You may use a period in an id still being valid XHTML, but in this > > case you cannot use the id as a (CSS) selector, because the > > period is a class selector. > I'm not convinced it's not a bug in jQuery because it doesn't > make sense to specify a class on an Id. I'm not going to make

Re: [jQuery] $.show() improvement

2007-02-14 Thread Michael Geary
nd .show() in Firebug with elements, and .show() only makes them elem.style.display="block" when there is a speed designated. Plain .show() returns them to inline. On Feb 14, 2007, at 5:37 PM, Michael Geary wrote: The real problem here is that there is *no such thing* as "

Re: [jQuery] $.show() improvement

2007-02-14 Thread Michael Geary
> What if I specify a div as display:inline in my css? Hiding > then showing this div using the above script would change > it's display to block. Good point! I was about to suggest making a list of the block level elements to avoid having to create DOM elements to test, but either approach wou

Re: [jQuery] how to simplify this

2007-02-12 Thread Michael Geary
There are several ways you could refactor that code. Here's one approach: $('#normal, #standard, #profi').click( function() { var idnums = { normal:1, standard:2, profi:3 }; $('#bereit').ScrollTo( 800 ); for( var id in idnums ) { var n = idnums[id];

Re: [jQuery] Issues with non FF browsers

2007-02-12 Thread Michael Geary
> > $.get("parser.php", > > { > > type: type, > > user: user, > > }, > trailing commas only work in firefox! > user: user, > > has a trailing comma! Great catch, Jake. Here's a tip - use ActiveState Komodo for your JavaScript editing, and get syntax check

Re: [jQuery] Issues with non FF browsers

2007-02-12 Thread Michael Geary
> I'm trying to get some simple things to work using jquery, > and everything currently works the way I'd like it to in > Firefox. However, in Opera, Safari, and Internet Explorer, > nothing works right -- and I haven't been able to figure out > where the hang up is. > > My entire jquery code

Re: [jQuery] jQuery for President

2007-02-10 Thread Michael Geary
It is my privilege and honor to nominate Glen Lipka as our great state's representative in the Selectoral College. _ From: Glen Lipka Subject: [jQuery] jQuery for President Alot of new snazzy sites are being launched for candidates running for president. Only one candidate is clearly

Re: [jQuery] iframe and designmode

2007-02-10 Thread Michael Geary
As you can see from your first (presumably working?) example, .contentWindow is a property of an HTML element. Therefore, the real question is, "How do I get the HTML Element?" If you are inside an $('foo').each() callback function, then "this" is the HTML element. So, you could use: this.con

Re: [jQuery] Finding parent iframe?

2007-02-09 Thread Michael Geary
> I was able to take what you sent me and simplify it down to this: > > var frameWindow = document.parentWindow || document.defaultView; > var outerDiv = $(frameWindow.frameElement.parentNode); > cls = $('div.tb_close', outerDiv).get(0); > > Because I actually want to operate o

Re: [jQuery] Finding parent iframe?

2007-02-09 Thread Michael Geary
> I have a quandary. I open an iframe with some arbitrary > content in it. I want to be able to click on something within > the iframe to cause the iframe (and the div tag that contains > the iframe) to go away. I am having trouble getting to the > iframe. I know it's possible as I've seen it e

Re: [jQuery] jQuery and Object Notation... confused with "this"

2007-02-04 Thread Michael Geary
> Recently I've been trying to use ON with jQuery. I met with obstacle. > I couldn't use "this" keyword in certain cases to get my main object > reference... > > var myObject = { > > layout: { 'align': '' }, > start: function() { > $('form').bind('submit', this.buildLayo

Re: [jQuery] rewriting the browser address (without refresh)?

2007-02-02 Thread Michael Geary
If you change only the hash, it won't reload the page - but it won't create a unique URL for search engines. If you change anything else in the URL, it will reload the page. Changing the hash does get you a URL get people can copy and bookmark. But Google won't see the hash. It really is a case o

Re: [jQuery] Animate font weight

2007-02-01 Thread Michael Geary
> I'm trying to get animate() to fade font-weight but it's not working. > I've tried the following: > > $('a').mouseover(function() { > $(this).animate({fontWeight: 'bold'}, 'slow'); }); > > But that doesn't work - I've also tried to put quotes around > the fontWeight and tried font-weight.

Re: [jQuery] Custom borders

2007-01-30 Thread Michael Geary
> $.fn.border = function(prefix){ >var classNames = [ 'north', 'east', 'south', 'west', 'northeast', 'southeast', 'southwest', 'northwest']; >return this.each(function(){ > for (var index in classNames){ > className = (prefix || '')+ classNames[index]; > $(this).wrap

Re: [jQuery] I broke it - Why is it doing this?

2007-01-26 Thread Michael Geary
> Ok did you try: > > http://imaptools.com/sm/index-003.html > > it should work in FF2, this is what I'm using. Should I see something happen when I click the GO text? Nothing happens. I didn't try setting a breakpoint in the click handler, just tried clicking on the GO text to see if something

Re: [jQuery] I broke it - Why is it doing this?

2007-01-26 Thread Michael Geary
> > I see the word GO along with PREV/SAVE/NEXT, but none of them are > > buttons, just plain text. > Right, they are aren't buttons yet, but they all have click > events on them so you can just click the text. I plan to > change them to buttons, I'm not sure why I did do that in the > first p

Re: [jQuery] I broke it - Why is it doing this?

2007-01-26 Thread Michael Geary
> I appreciate the correction. I was a little dumb founded by > the only explanation that I could come up with and decided > over dinner that I should test it out an verify it. I > probably should have done that before posting. All the good > thoughts seem to come after hitting Send! Not to wo

Re: [jQuery] I broke it - Why is it doing this?

2007-01-26 Thread Michael Geary
> When you create a named function is is basically a static > object stored in funcname of the scope it was defined in. > when you declare a var in a function it is also a static > object attached to the function object. As such mydata is a > single static object and effectively a single object

Re: [jQuery] External or anonymous function - which is best?

2007-01-25 Thread Michael Geary
> $(document).ready(function(){ > > function resizeDiv(that){ > var x = $(that); > if(x.height() < 600){ >x.css("height","600px"); > } > }; > > $("#mydiv").each(function(){resizeDiv(this)}); > > }); > > My question: is it better to define this function as above > and pass

Re: [jQuery] OT: CSS Conditional Comments

2007-01-24 Thread Michael Geary
> >

Re: [jQuery] OT: CSS Conditional Comments

2007-01-24 Thread Michael Geary
> } ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] JQuery in Google Maps Info Windows

2007-01-24 Thread Michael Geary
I'm not very familiar with InnerFade, but wouldn't you do this inside your marker click handler, right after you call marker.openInfoWindowHtml? That's when you have the list items available. > I'm new to jQuery and am trying to figure this out, but was > wondering if anyone has had any luck embe

Re: [jQuery] make a div disappear after 2seconds?

2007-01-23 Thread Michael Geary
> > $(document).ready(function() { > > setTimeout("divDisappear()", 2000); }); > > > > function divDisappear() { > > $('div#id').hide(); > > } > Those should be equivalent: > > $(function() { > setTimeout("$('div#id').hide()", 2000); }); > > Or: > > $(function() { > setTimeout(d

Re: [jQuery] What tools should I use to troubleshoot jqueryproblems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Michael Geary
That's a nice trick, Jake - thanks for posting it! Both approaches have their use. Your log plugin is great for console logging, while breaking up the chain is great for interactive debugging because you can set a breakpoint between lines. -Mike > Mike, I don't like breaking the chains... I just

Re: [jQuery] Trivial use

2007-01-23 Thread Michael Geary
The DOM updates immediately when you add new elements. But "updating the DOM" does not mean "copying event handlers from deleted DOM elements to newly added DOM elements". That appears to be the problem here: You need to assign the click handler again after replacing the DOM element, because the cl

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Michael Geary
> Is there a way to just return the jquery object (so I could > see it in firebug's watch section) then pass it to another > jquery function then join them all up when I know > everything works? > > $('#test :textarea').before('Current length: '+this.value.length+' characters').keypress( fu

[jQuery] Junior Programmers (RE: Proper OOP paradigm / please be friendly)

2007-01-17 Thread Michael Geary
> > From: Michael Geary > > Just to clarify, my daughters don't actually read the > > jQuery list - yet. Their goal is to make an online > > computer game for some of their friends to play. > > Right now they're just learning about variables and > &

Re: [jQuery] Proper OOP paradigm / please be friendly

2007-01-17 Thread Michael Geary
> Guys, I don't appreciate the profanity. My 10 and 11 year old > daughters are learning JavaScript. I don't want them to be > subjected to language like that. Just to clarify, my daughters don't actually read the jQuery list - yet. Their goal is to make an online computer game for some of their

Re: [jQuery] Proper OOP paradigm / please be friendly

2007-01-17 Thread Michael Geary
> // this is .n much too complicated! Guys, I don't appreciate the profanity. My 10 and 11 year old daughters are learning JavaScript. I don't want them to be subjected to language like that. When you've offended some people already, offending more is probably not the best way to fix it. :-

Re: [jQuery] click and dblclick-problem

2007-01-16 Thread Michael Geary
> but i think that there should be a click or dblClick event > (depending on the doubleclick delay > parameter) but *never* both. if i doubleclock to slow, the > this results in two clicks, but if i click fast enough then > this shold trigger a doubleClick event and no single click. The only wa

Re: [jQuery] what's the difference betweendocument.getElementById('id') and $('#id') ?

2007-01-16 Thread Michael Geary
> Now that it is laid out in front of me it's pretty obvious, > but when you come into the thing cold, these things are not > obvious. I think it would be a good idea to explicitly state > what the object is, and that $ refers to it (I think that's > right ... now I mention it I'm not quite sur

Re: [jQuery] what's the difference between document.getElementById('id') and $('#id') ?

2007-01-16 Thread Michael Geary
> (If there is a better way to look at the Object, please post here) The very best way to understand what JavaScript code is going and explore objects is to use any JavaScript debugger, such as Firebug or Venkman for Firefox, or the Microsoft Script Editor for IE. If you don't have a JavaScript d

Re: [jQuery] Testing for presence of ID

2007-01-15 Thread Michael Geary
> A jQuery object is an array of 1 or more objects. Not exactly... A jQuery object is an array of *zero* or more objects. If no elements match the selector, you'll get an empty array. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/

Re: [jQuery] IDs of all checked checkboxes

2007-01-11 Thread Michael Geary
> > > var a[]; > > > $(':checkbox').each(function() { > > > if (this.id) a.push(this.id); > > > }); > > > > > > > > I get this error: > > missing ; before statement > > var a[]; > > > > (curse my rudimentary javascript skills!) > OK... It says there is a missing ; before the statement "var

Re: [jQuery] IDs of all checked checkboxes

2007-01-11 Thread Michael Geary
> > var a[]; > > $(':checkbox').each(function() { > > if (this.id) a.push(this.id); > > }); > > > > > > I get this error: > missing ; before statement > var a[]; > > (curse my rudimentary javascript skills!) OK... It says there is a missing ; before the statement "var a[];". What is befo

Re: [jQuery] How to get element when it's ID contains bank space.

2007-01-11 Thread Michael Geary
> > Scripting on top of an invalid HTML document won't make > > your life easier (obviously). I'd try to replace spaces given > > by the user to "_" in the backend. > > And then do what with underscores given by the user? > Come on, that was just an idea. You can leave underscores the > way the

Re: [jQuery] 1 Function, Multiple Events?

2007-01-11 Thread Michael Geary
> Thanks for the assistance. Yes, I was basically trying to > assign a click and dblclick to the same function (to prevent > users from double-clicking and firing the func twice). Hmm... If you assigned both click and dblclick to the same function, then the function *would* be called twice on ea

Re: [jQuery] List of jQuery-Powered Sites

2007-01-11 Thread Michael Geary
Forgot to add us to the list... Zvents: http://www.zvents.com/ This is a Rails site and we completely replaced prototype.js with jQuery and our own code. We're using thickbox, a homegrown autocompleter, my DOM plugin, and lots of custom code. This also puts jQuery on our partner sites: The Bost

Re: [jQuery] 1 Function, Multiple Events?

2007-01-11 Thread Michael Geary
> if have some thing like this that is called by document.ready(): > > function init_top_level() { > $(".top_folder").click(function(i) { > // Do a ton of stuff here > }); > } > > I not only want to assign the "click" event to my ".top_folder" > elements, but assign "dbl

Re: [jQuery] Passing values to a custom function

2007-01-08 Thread Michael Geary
Do you want getPost to be called during the execution of initialiseForm, or later in response to the 'submit' event? For the latter, use this (added code in red): function initialiseForm(formId) { $(formId).bind('submit', function() { getPost(formId) } ); } -Mike _ From: [EMAIL

Re: [jQuery] setting an attribute... I *thought* this was how to doit...

2007-01-05 Thread Michael Geary
Chris, it's like this... ;-) $() returns a jQuery object, which is an array of DOM elements with jQuery methods that apply either to the entire array or to the first element in the array, depending on the method. One of those methods is .each(), which loops through the DOM element array and cal

Re: [jQuery] setting an attribute... I *thought* this was how to doit...

2007-01-05 Thread Michael Geary
> $(function(){ > > $("div.OrderEntryListRow").not(".Selected").each(function(i){ > alert("before: " + $(this).attr("id")); > $(this).attr("id", "Row_" + (i+1)); > $(this).html($(this).html() + ': ' + (i+1)); > alert("after: " + $(this).attr("id")); > }); >

Re: [jQuery] Another simple question...

2007-01-04 Thread Michael Geary
this.id = 'NewValue'; alert( this.id ); I've got another simple question. Is this not how you set an element's attribute? [from inside an .each()] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-04 Thread Michael Geary
> > That looks really dodgy, sorry. > > > > What if the browser downloads script and script2 at the > > same time, and script2 finishes first? > > It doesn't. script2 is not downloaded at all, it is like a > inline script. Ah, I wasn't paying close enough attention to the code. :-) > As you mi

Re: [jQuery] Dynamically removing an inline script block

2007-01-04 Thread Michael Geary
That would remove all script tags, but it sounds like that won't help. Removing a script tag is just a memory optimization - it may free up the memory that the script's source code took. It won't unexecute the JavaScript code that has already been run, and it won't undo any DOM changes that the co

Re: [jQuery] break in $.each

2007-01-04 Thread Michael Geary
> > Andreas, if I remember correctly, the following should work: > > > > $.each(object, function() { > > > > return false; > > }); > That isn't supported. The necessary code was removed due to > unsolved problems. Actually the stuff that Michael just > posted would help a lot to solve it, t

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-04 Thread Michael Geary
> > I'm afraid that I simply don't take Safari users into > > account. Hardly a great thing, but I focus on three > > browsers: Firefox and IE7, and then IE6. > > In that order. The work I do is targetted at corporate > > users who run Windows 2000 and Firefox, and all the > > JS work I do is f

Re: [jQuery] break in $.each

2007-01-04 Thread Michael Geary
> Would you like an Array iterator that works the way you'd > expect? Here is a simple one: > > Array.prototype.each = function( yields ) { > for( var i = 0, n = this.length; i < n; i++ ) { > if( yields( this[i], i ) === false ) > break; > } >

Re: [jQuery] break in $.each

2007-01-04 Thread Michael Geary
> Done a test (requires Firebug - or Firebug lite (which I presume would > also work)). > > var foo = ["one", 2, "three", new Date()]; > $.each(foo, > function() > { > if(this === 2) return false; > console.log(typeof this); > } > ) > > This logs: >

Re: [jQuery] Having an issue accessing a node.

2006-12-31 Thread Michael Geary
> ...since the spec requires name and ID to be > identical, it's technically illegal to have a name with "[" > and an ID as well (since IDs cannot contain "["). Um, where does it say the name and id have to be the same? -Mike ___ jQuery mailing lis

Re: [jQuery] Having an issue accessing a node.

2006-12-29 Thread Michael Geary
> $('#blog[headline]').val('newvalue'); > > value="" /> > > It seems i cant access the node for [] in the name breaks the > ability to access it unless i am doing something wrong? [] are not valid characters in an id attribute: http://www.w3.org/TR/html4/types.html#type-name Browsers and jQu

Re: [jQuery] dynamic plugin loading

2006-12-28 Thread Michael Geary
> From: Michael Geary > > If you're just trying to load a stylesheet dynamically, all > you need to do is this... Just to be clear, I wasn't disparaging jsPax! It just depends on whether you need a full-featured package system or a simple lo

Re: [jQuery] dynamic plugin loading

2006-12-28 Thread Michael Geary
If you're just trying to load a stylesheet dynamically, all you need to do is this: function addSheet( url, doc ) { doc = doc || document; var link = doc.createElement( 'link' ); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = url; d

Re: [jQuery] msie closures syntax

2006-12-27 Thread Michael Geary
"this" doesn't work like a local variable. Inside a nested function, "this" is not the same as in the outer function. That's what is messing things up. If I understand your code, you can write it more simply like this: (function($) { $.fn.Tooltip = function(settings) { var $all = this

Re: [jQuery] msie closures syntax

2006-12-27 Thread Michael Geary
Not only not related to jQuery, but not related to closures either. :-) The problem is that setTimeout doesn't accept the additional arguments you are passing it. Is there any reason you can't do this: setTimeout( function() { doStuff( "stuff", 1, 2 ); }, 100 ); That would work in any browser.

Re: [jQuery] (no subject)

2006-12-19 Thread Michael Geary
Try this (untested): $(function() { $('.y').html( (new Date).getFullYear() ); }); -Mike p.s. Could we avoid profanity on the mailing list? Thanks. _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kristaps Ancans Sent: Tuesday, December 19, 2006 12:44 AM To: discu

Re: [jQuery] Remove from JSON

2006-12-17 Thread Michael Geary
Goodness, I didn't mean for the answer to shame or humble you! :-) There was nothing wrong with the question, just wanted to show a way to track down the answer. -Mike > Slightly ashamed. > Very good answer, I'm humbled. Thank you. > > Well, JSON is just a notation. Once you evaluate it, it's

Re: [jQuery] Remove from JSON

2006-12-15 Thread Michael Geary
> > I suppose this touches on off topic, but ... is it possible > > to remove an entry completely from a JSON hash? > > > > say I have > > { > > firstString: 'first', > > secondString: 'second' > > } > > > > and evaluate this into a json object, and I want to remove > > firstString, could I do so

Re: [jQuery] Remove from JSON

2006-12-14 Thread Michael Geary
> I suppose this touches on off topic, but ... is it possible > to remove an entry completely from a JSON hash? > > say I have > { > firstString: 'first', > secondString: 'second' > } > > and evaluate this into a json object, and I want to remove > firstString, could I do something like > json

Re: [jQuery] Dynamically added "click" registration always returns the last value added

2006-12-13 Thread Michael Geary
You're using the variable "j" to hold a reference to each element of the jobs array as you go through the loop. After the loop finishes, "j" is a reference to the last element of that array. Later, when the click function gets called, "j" still refers to that last element - regardless of which ele

Re: [jQuery] passing functions

2006-12-11 Thread Michael Geary
> I had to do something similar today, and I did something like > > function myfunction(f){ > $(element).click(function(){eval(f+"();");}); > } > that was off the cuff, but that should work. That would be the ticket if f is a string containing the name of a function. But why not just pass a

Re: [jQuery] Trouble with $(expr, context) and iframe documents

2006-12-11 Thread Michael Geary
> From: Adam Skinner > > I'm trying to reference an element from within an iframe. > > The following normal javascript code works: > > var iframeDoc = window.frames[iframeName].document; > var data = iframeDoc.getElementById(iframeElement); > > I'm trying to jqueryize the "data" var

Re: [jQuery] Thickbox + ads + FF = broken..

2006-11-26 Thread Michael Geary
Try the svn version of jQuery. I had the same problem with 1.0.3 and the svn version fixed it. Let me know if that doesn't do it - next thing to check is the onload handler. > I'm having trouble with thickbox on pages that also have banner ads.. > I've made two examples: > > http://dev.twokings

Re: [jQuery] [OT] Firefox 2.0 Annoying Errors

2006-11-25 Thread Michael Geary
> Thanks Mike and Jake. I will try the uninstall and reinstall. > Sounds like that might help. I had thought of doing just > that, but it seemed a little heavy handed but hey, if it > works that would be great. On the contrary, the uninstall and reinstall is about the least heavy-handed thing y

Re: [jQuery] [OT] Firefox 2.0 Annoying Errors

2006-11-25 Thread Michael Geary
> > This has nothing to do with jQuery, but I'm hoping that some of you > > might have seen this and figured out how to make it go away. I have > > googled for it, but nothing helpful showed up. > not jquery. I get a bunch of errors each time I start up ff > 2... they don't recur. do yours? D

Re: [jQuery] closure and name conflict

2006-11-24 Thread Michael Geary
> From: Michael Geary > > Also, that comma after the } shouldn't be there. It looks like you > > picked up the use of the comma from object literals... > From: Jörn Zaefferer > Actually there is a single "var" at the top, therefore the > problem must

Re: [jQuery] closure and name conflict

2006-11-24 Thread Michael Geary
> I really have no idea what is the correct name(I'm not a > javascript guru), handle is a function in function(or jQuery?) scope? > You know , i just copy your code structure. xD > > Demo page: > http://61.191.26.228/jQuery/plugins/modal/test.html Your functions named plugin, modal_handle, mod

Re: [jQuery] getScript error

2006-11-23 Thread Michael Geary
> > Why not use document.createElement("script") !? > Because we want jQuery to wait until the script is loaded and > evaluated, so it's possible to do something upon completion, > like continuing the normal flow of the program. This is > necessary for example for writing a require like the one

Re: [jQuery] OT: fQuery

2006-11-23 Thread Michael Geary
> From: Steven Wittens > ... > Implementing a jQuery like query system has opened up a whole > new way of dealing with forms in Drupal. It's a really cool > technique. The best part is that it's relatively easy to > adapt the code to custom structures, as the parsing is > separate from the oper

Re: [jQuery] Off topic: which programming language for webdevelopment

2006-11-22 Thread Michael Geary
> Our company is looking for a way for 'quick' web-development. > Small webapps consisting of a few webpages with some minimal > database interaction. > > We currently develop everything in Java (including webapps), > but I find the whole cycle of developing, compiling (java > class files, EJB

Re: [jQuery] Next generation WYSIWYG editor... maybe? am Imissing something?

2006-11-16 Thread Michael Geary
> I'm no expert for lincenses. But I remember that jQuery had > to be dual-licensed to allows the Drupal guys to integrate > jQuery into their core. Dunno why that was necessary or what > the idea is behind it. Only GPL code is allowed in the Drupal repository. Don't ask why! It just is. (There

Re: [jQuery] jQuery 1.1 by the end of Nov

2006-11-16 Thread Michael Geary
> > But, I would be sad to see .click, .hover, and .toggle go away, if > > they are among the "helper" functions you plan to put into a an > > external plugin. They just make so much more sense than "bind" to > > people new to programming/javascript/jQuery. > I am not a fan of "bind" either, I

Re: [jQuery] parsing JSON with $.each

2006-11-15 Thread Michael Geary
> From: Kevin Old > > I'm parsing some json successfully below, but I'd like to be > able access the contents of the json object like > "this.["id"]" or "this.["name"]". > > function processData(json) { > $.each(json, function(i) { > $("#names").append("I

Re: [jQuery] Object vs. Array looping

2006-11-14 Thread Michael Geary
> In the .css method an array is created by: > > d = ["Top","Bottom","Right","Left"]; > > Then it is looped through using object looping: > > for ( var i in d ) { > > This probably isn't a problem for most people, but we have > added functions to the Array prototype, so whenever the .css >

Re: [jQuery] Why won't this work?

2006-11-13 Thread Michael Geary
> So...the lesson is...the jquery.js file always has to be > included for the jQuery code to work and it has to be > referenced first...correct? It doesn't have to be *first*, but it does have to be before any code that uses jQuery. Think about it this way... Would this code work: alert( x

Re: [jQuery] How do I add a js array of jquery objects toajqueryobject?

2006-11-13 Thread Michael Geary
> > From: Michael Geary > > Yeah, all that DOM creation will take a while - especially > > if you use a convenience plugin like mine. > > > > I get much better performance across browsers with > > [].join('') and innerHTML. > From: Dave Methvin &g

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Michael Geary
> From: Andrea Ercolino > > I have got an array of 50 urls templates, and want to make a > proper url out of each one, adding also a special click, and > then append all these urls to a div in a specific position. > All this should be done many times in a page, "many" could be > 50, just to sa

Re: [jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread Michael Geary
One more comment... As you probably figured out from looking at the generated source, the culprit is likely to be the animation code, which sets those unwanted attributes when it animates an item. So one good test would be to remove all animation and see if it generates better code. It will also

Re: [jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread Michael Geary
> I moved "Testnode" up and then moved it to the right, then > used FireBug's Inspect tool to reveal the generated HTML. > This is what I saw: Actually I left out part of it by mistake. Here's the entire UL:

Re: [jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread Michael Geary
When you have a problem like this, your first thought should be to look at the generated HTML using Microsoft's DevToolBar in IE or either FireBug or View Source Chart for Firefox. I moved "Testnode" up and then moved it to the right, then used FireBug's Inspect tool to reveal the generated HTML.

Re: [jQuery] Element tagName

2006-11-12 Thread Michael Geary
> From: Truppe Steven > > my view of the things is a big different. I think jquery > should stay as small as possible so adding functions for > basic dom attributes is a bit overhead i think .. I agree. How do you decide which of the many DOM attributes to turn into jQuery methods? All of them?

Re: [jQuery] OO programming is confusing to old functional programmers

2006-11-11 Thread Michael Geary
I don't think this approach will work quite the way you'd like. In your example: > // I access my plugin via: > $("#myMap").Map({ }); > > // later I can access a public function on this object like: > $("#myMap").Map.recenter(x, y, dxy); Those two $("#myMap") calls are going to result in differ

Re: [jQuery] Since updating to 1.0.3 & converting to getJSON

2006-11-11 Thread Michael Geary
> And to make it valid JSON, you have to quote all keys anyway > (using double quotes): > > { "asJSON": 1, "class": "jlink", "id": htmlDoc } > > http://json.org/ Naw, that wouldn't be valid JSON. JSON doesn't allow named references like htmlDoc. But this object doesn't need to be JSON anyway.

Re: [jQuery] Element tagName

2006-11-10 Thread Michael Geary
> > From: Laurent Yaish > > > > I couldn't find a way using jQuery to get the tagName of an element. > > > > Let's say I have this: > > > > test > > $('span').parent().tag() would return 'div' > From: Brandon Aaron > > You could do two things ... write yourself a plugin that > would look someth

Re: [jQuery] Plugin Release: Tooltip

2006-11-10 Thread Michael Geary
> > From: Michael Geary > > > > (function($) { > > // plugin code here > > })(jQuery); > From: Sam Collett > > I've seen that used before, but can it have memory leak > or other issues? Sorry about the very slow reply, Sam. That's

Re: [jQuery] return this.each

2006-11-10 Thread Michael Geary
Sorry about the slow reply, guys. Been a busy week! > From: Rexbard > > Mike, I already knew the mechanics of this, but I got caught > up in your description and had to read your entire post. > > Beautifully written, Mike. This has to be the clearest > description of the jQuery vs. DOM variabl

Re: [jQuery] this.name

2006-11-06 Thread Michael Geary
> why doesn't this work: > > $('#text-field').val(this.name); What is "this"? You haven't given it a value. So it depends on the context of this code. If the code is not in an object method, then "this" is the window object. > when this does: > > $('#text-field).click( function() { alert(this.n

Re: [jQuery] return this.each

2006-11-06 Thread Michael Geary
> From: Simon Corless > Thanks for the help Mike, it's starting to come together. > I've been testing it just now. > > If I do use return this.each() then how do I reference the > jQuery methods? without this.hover() etc? Obviously as this > is no longer what I am expecting this.hover (as you s

Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Michael Geary
> From: Paul McLanahan > > The only suggestion I have deals with displaying the tips > close to the right side of the screen. You do an excellent > job of handling the width of the tip when it is close to the > right edge of the window, but if a word is too long inside of > the tip it will pu

Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Michael Geary
> > http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/ > A suggestion - perhaps you should use 'jQuery' instead of '$' > as isn't that the convention for plugin authoring? The code does use jQuery instead of $. Jörn used the trick I suggested a while back to get the best of bo

  1   2   >