[jQuery] jQuery Twitter Full API Plugin - Help Needed Testing

2009-08-18 Thread Eric Garside
Hey guys, I've been working on a full implementation of the twitter API through, primarily, jQuery, with a simple relay script server side for securely signing and keeping auth details. I've just finished the library, and am looking for some developers who know either the twitter API and jQuery

[jQuery] Re: Remove an element but not it's content

2009-08-06 Thread Eric Garside
If you want a cleaner look, you can always just throw together a quick plugin to handle things: $.unwrap = function(){ return this.each(function(){ var el = $(this); el.before( el.html() ).remove(); }) } Then, simply call: $('a.tester').unwrap(); And it will unwrap all

[jQuery] Re: Loading jQuery without blocking

2009-08-06 Thread Eric Garside
Honestly, I'd load jQuery regularly, and use the getScript function to load the rest of the files after domready. I don't know that you're getting a big performance increase in loading the jquery library in this method, and it is causing an unknown error, which isn't an ideal thing to debug. :P

[jQuery] Re: More fun with decrementing on click

2009-08-03 Thread Eric Garside
The problem is in how you're applying the decrement operator. If you put it at the end of the number, as in: number-- Then, the current number will be returned, THEN decremented. That's what's happening here. Simply put the operator before the number, so it is decremented THEN returned.

[jQuery] Re: function running 2X

2009-07-29 Thread Eric Garside
Pretty sure its because the event is bubbling up. Try: $('#cardcharges td').click(function(){ alert('execute once'); return false; }); On Jul 29, 2:38 pm, marksimon zen...@gmail.com wrote: no stupid ideas here, but changing to $(#cardcharges td).click( didn't fix the problem. On Jul 29,

[jQuery] Re: consistently unable to get return false to work, why?

2009-07-28 Thread Eric Garside
Try starting off with a simplifying your selectors and the code in general? .live(), in this case, isn't going to provide you much benefit, as you're binding it to an element based on an ID, which means there will only ever be a single element which this function triggers for. Try something

[jQuery] Re: Using replaceWith on a div / instead of a div/div causes text to be deleted

2009-07-28 Thread Eric Garside
The W3C has a list of valid self-closing tags, div of which is not one of them (for the sake of compatibility, I think). http://www.w3schools.com/xhtml/xhtml_ref_byfunc.asp Only the following tags should be self closed: area / base / basefont / br / hr / input / img / link / meta / On Jul 28,

[jQuery] Re: JQuery and XHTML in Firefox

2009-07-28 Thread Eric Garside
What doctype / mimetype are you specifying. If you're doing xhtml+xml, I'm pretty sure if you remove the +xml portion, things will play nicely again. On Jul 28, 12:55 pm, ScottSEA william.scott.ba...@gmail.com wrote: Until recently, I was humming along happily with my jQuery and HTML... life

[jQuery] Re: JQuery and XHTML in Firefox

2009-07-28 Thread Eric Garside
Can you give a sample of the output? How different is the result of the transform from valid xhtml? On Jul 28, 2:55 pm, ScottSEA william.scott.ba...@gmail.com wrote: On Jul 28, 9:55 am, ScottSEA william.scott.ba...@gmail.com wrote: Until recently, I was humming along happily with my jQuery

[jQuery] Re: Using data(name,value) to store additional information

2009-07-28 Thread Eric Garside
You could also do it with non-styling classes, as an alternative to locating them. $('div:first').data('foo', 'bar').addClass('foo'); $('.foo'); On Jul 28, 3:15 pm, Basdub dube.sebast...@gmail.com wrote: Thanks, that should do the trick. On Jul 23, 10:44 pm, Karl Swedberg

[jQuery] Re: Looking for some help converting this to jquery

2009-07-23 Thread Eric Garside
function setButtonClass(){ $(':submit,:reset,:button').each(function(){ var el = $(this), val = el.val(), word = (val.split(/[^A-Z\W]/).length/2) + val.length; el.addClass( word = 12 ? 'mb' : (word 4 ? 'sb' : (word 0 ? 'b' : '')) ); }) }

[jQuery] Re: Make width of inner div equal outer

2009-07-23 Thread Eric Garside
$('.secondLevel').css('width', $('#header').width()); On Jul 23, 1:16 pm, Paul Collins pauldcoll...@gmail.com wrote: Hi all, I've got a problem with IE6 and I need to basically find the width of the header DIV and make the secondLevel DIV match it. So, I guess I need to target IE6

[jQuery] Re: Binding of object

2009-07-21 Thread Eric Garside
In what situation in your code would more than a single event be bound to the element? On Jul 21, 11:22 am, Liam Potter radioactiv...@gmail.com wrote: Well the way you do it would really do anything, it will just unbind, then run the function again as it is chained? sken wrote: Would

[jQuery] Re: error jquery-1.3.2.js(line 3633)

2009-07-06 Thread Eric Garside
Well, firebug shouldn't have cared as much as IE would, because of a comma inside the list of params in your POST. The last element in an object can't have a comma. Also, could you post the HTML? On Jul 6, 8:49 am, Mark johanns.m...@gmail.com wrote: I have 3 drop down menu's where is post the

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread Eric Garside
Is there a particular reason you couldn't use classes to do this? Instead of the markup you provided, something like: input type=checkbox value=EventAcceleratedOptionVesting id=chkEventAcceleratedOptionVesting class=chkEvent / input type=checkbox value=AccountingChanges

[jQuery] Re: Traversing not

2009-06-30 Thread Eric Garside
Please provide the markup you're using that works for anchors and not imgs. On Jun 30, 8:58 am, Luciano lucianoffra...@gmail.com wrote: I'm trying to use the function Not (): when I run the command on the TAG A and works $ (this). find ( a). not ( '[href ^=/]'). attr ( target, ) when I

[jQuery] Re: how to ask questions

2009-06-26 Thread Eric Garside
If you need a place to host code for demonstration (because you're working offline, or need to expose only a fragment of code you can't get working), you have the BEST chance of getting an answer by posting your code on http://jsbin.com and dropping in a link. When people come in and post

[jQuery] Re: Problem with double submit of and form

2009-06-26 Thread Eric Garside
Your code is confusing. Why do you have the script tag wrapped inside of the form element? Why do you have two script tags a couple tags away from each other instead of inside your header definition? Your script is chock full of errors. Here's a couple of suggestions: 1. Move both of your

[jQuery] Re: extract data from this JSON encode using jQuery

2009-06-26 Thread Eric Garside
Well, lets assume you're getting the JSON you described from the following ajax call: $.post('/path/to/json.php', {params: 'go here, if you need them'}, function(data){ // data contains that JSON object you described // Also, I'm assuming your select box looks something like this: //

[jQuery] Re: Optimize object random generator

2009-06-26 Thread Eric Garside
I put together a plugin to handle this kind of thing that does okay in most browsers, called replicator. Give that a shot and see if it helps making your life any easier. http://eric.garside.name/docs.html?p=replicator On Jun 26, 10:11 am, chronotype thund3rb...@gmail.com wrote: Hello, i've

[jQuery] Re: call a method outside a jquery object

2009-06-26 Thread Eric Garside
Long story short, you can't do what you're trying to do. You have some massive scoping issues. first, anything within you document.ready function (as defined by $(funciton(){..});) that gets declared in there is accessible only inside that function itself. Now, I'm not sure what you're actually

[jQuery] Re: Protect images

2009-06-26 Thread Eric Garside
Just as an FYI, you do know that if the user can see the image on your website, it's already on their computer. Not to mention, anything you do that's purely a javascript fix can be avoided by merely turning off javascript. It's essentially a fool's errand to attempt to do this. On Jun 26, 11:27 

[jQuery] Re: use jQuery object of parent in an iframe

2009-05-29 Thread Eric Garside
Hi Beni, I've thrown together a pretty nifty plugin for handling this exact thing. (Neat problem to work on. :D ) Anyway, the plugin can be found here: http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/ There's a live proof-of-concept demo available here:

[jQuery] Re: calling functions between multiple document ready events

2009-05-29 Thread Eric Garside
It's a simple scoping problem. Anything you create inside an anonymous function will be accessible only within the function. If you need something to be accessible between the anon. functions, simply move it into a higher scope, like the global namespace (eh, not idea) or the jQuery namespace

[jQuery] [New Plugin] jQuery Generic Pagination

2009-05-26 Thread Eric Garside
I figured I'd drop a message out to the board about a new plugin I've finished documenting and released, called Pagination. It's a small, relatively simple jQuery plugin which makes rendering and managing Pagination controls very easy. It automatically generates groupable controls, which can be

[jQuery] Re: Custom JSON sanitizing during $.ajax

2009-05-07 Thread Eric Garside
Yea, that should fix the problem, return is a reserved word in javascript On May 7, 4:22 pm, Matt Critchlow matt.critch...@gmail.com wrote: try changing your parameter in the success method to something other than return and see what happens.. On May 7, 10:40 am, Eli Perelman

[jQuery] Re: Catch Errors from External Libraries

2009-05-07 Thread Eric Garside
Try using a try-catch block around the scriptaculous code? There's really no other way that I'm aware of to capture a javascript error and continue processing. Though, depending on how crucial the module is, you may consider using something else. 3 frameworks, 2 major ones, on a site at the same

[jQuery] Re: Is it possiblwe to use this in slection

2009-05-06 Thread Eric Garside
Yes, you can. this refers to the HTMLElement in the context of an event handler. Though, your syntax is a bit wonky, should be: $('#slickbox' + this.id).toggle(400); On May 6, 4:13 am, Christos tsam...@gmail.com wrote: Hi all, I wanted to ask whether we can use this for selecting in jquery.

[jQuery] Re: recursive dom walker

2009-05-06 Thread Eric Garside
Your recurse function is not a method of the jQuery.fn object, so it can't work on elements. The line: $.recurse = function(options) { should be $.fn.recurse = function(options) { On May 6, 9:00 am, AndyCramb andycr...@googlemail.com wrote: I am trying to write a plugin that will eventually

[jQuery] Re: refresh image?

2009-05-06 Thread Eric Garside
For reference, this php should properly force no-cache: Just be sure to replace $mime with the correct type for the image (jpg, gif, whatever you're sending) header('Content-Type: ' . $mime); header('Cache-Control: no-cache'); header('Pragma: no-cache'); On May 6, 2:30 pm, Ricardo

[jQuery] Re: recursive dom walker

2009-05-06 Thread Eric Garside
On May 6, 3:13 pm, Eric Garside gars...@gmail.com wrote: Your recurse function is not a method of the jQuery.fn object, so it can't work on elements. The line: $.recurse = function(options) { should be $.fn.recurse = function(options) { On May 6, 9:00 am, AndyCramb andycr

[jQuery] Re: The jQuery Object, Namespaces, and Program Modules -- Connecting the Dots Between jQuery and Javascript

2009-05-05 Thread Eric Garside
I'll give it a shot explaining, feel free to correct me if I'm off. :) Basically, the jQuery core is broken up into three major pieces: * The Sizzle Selector Library * The jQuery Cache * The jQuery Namespace The selector library, and code associated with implementing it, provides jQuery with a

[jQuery] Re: Serialize jQuery Objects ?

2009-04-29 Thread Eric Garside
Why not assign a set of IDs to the elements you want to export? That will allow jQuery to quickly recache the elements. On Apr 29, 11:41 am, tjholowaychuk tjholoway...@gmail.com wrote: Hello, I wrote a library which records / plays back DOM events with a faux cursor, its working great looks

[jQuery] Re: fadein thumbnails when loaded

2009-04-28 Thread Eric Garside
implementation?  Or is there a blog or tutorial somewhere? Thanks, Rick On Mon, Apr 27, 2009 at 11:33 PM, Karl Swedberg k...@englishrules.comwrote: On Apr 27, 2009, at 8:05 PM, Eric Garside wrote: A) the images very quickly load then disapper. I dont want to hide the images in css

[jQuery] Re: How to get css object of one element?

2009-04-27 Thread Eric Garside
Using the jQuery object as an array ($('.selector')[0]) returns the HTMLElement. Using jQuery's eq function returns the jQuery object of the HTMLElement at that position: $('a').eq(0).css('color'); On Apr 27, 3:38 pm, Ngoc Bui buitrungngo...@gmail.com wrote: Hi all, I wonder how to get css

[jQuery] Re: fadein thumbnails when loaded

2009-04-27 Thread Eric Garside
A) the images very quickly load then disapper. I dont want to hide the images in css incase people have js diasbled. You're out of luck, then. DOMReady will trigger after the images and html has loaded, so unless you hide them with CSS, there's no way to prevent the flash, afaik. B) all the

[jQuery] Re: Lavalamp Trouble

2009-04-23 Thread Eric Garside
Class is not defined var TableKit = Class.create(); tablekit.js (line 30) On Apr 23, 1:36 am, MauiMan2 cmzieba...@gmail.com wrote: Can anybody find quicker than I can why it’s not working on my blog? http://ocmexfood.blogspot.com/(the orange nav near the top) I’m pretty sure I have all the

[jQuery] Re: jQuery countdown with simple percentage bar display?

2009-04-22 Thread Eric Garside
I've got a clock plugin which can do countdown timers, called epiClock. http://code.google.com/p/epiclock With a pretty simple rendering function (covered in the docs here: http://eric.garside.name/docs.html?p=epiclock ), you should be able to hook it into a progress bar, or merely display a

[jQuery] Re: Modifying jQuery to decrease file size.

2009-04-22 Thread Eric Garside
If you're really that concerned about transfers from your own server, you could always just use google's Ajax APIs and include it dynamically from google's servers rather than your own. http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js On Apr 22, 4:10 pm, Ricardo

[jQuery] Re: Cross server check if a pdf file exists

2009-04-22 Thread Eric Garside
If you have access to PHP, I'd just throw up a script on your local server to request the headers of files on any server, and then just call that from your own domain using regular ajax calls, instead of jsonp. Jsonp doesn't actually make an ajax call, it includes a javascript file on the page,

[jQuery] Re: JSON datastore

2009-04-22 Thread Eric Garside
Check out the jStore plugin. It's designed to handle client-side storage on all modern browsers. http://code.google.com/p/jquery-jstore On Apr 22, 11:10 pm, shavin shavinderpalsi...@gmail.com wrote: Is there anything similar to dojo's datastore in jQuery? I wish to try build an elementary kind

[jQuery] Re: Data() method, just changing value of one hash element

2009-04-16 Thread Eric Garside
Try: $j.data(item, 'attributes').WarehouseKey = $j('# %=ItemWarehouseList.ClientId%').val(); On Apr 16, 8:12 am, Richard D. Worth rdwo...@gmail.com wrote: On Wed, Apr 15, 2009 at 1:50 AM, Dhana sldh...@gmail.com wrote: I am using the jQuery Data method to store data for dynamically

[jQuery] Re: JQuery.isReady property

2009-04-16 Thread Eric Garside
The jQuery isReady property was designed to do exactly what you're trying to accomplish. If you call: $(function(){}); before the DOMReady, it will trigger the function once it occurs. If you call it after the DOMReady, it will trigger immediately. The isReady property exists so, when it's

[jQuery] Re: jQuery sessions (persisting data across pages)

2009-04-15 Thread Eric Garside
Depending on the user's browser version, you could use some of the new client-side storage. I've got a plugin called jStore which was designed to do just this. Maybe it'll get you where you're going? http://eric.garside.name/docs.html?p=jstore On Apr 15, 3:10 pm, gibble gib...@gmail.com wrote:

[jQuery] Re: Plugin does not bind to jQuery object

2009-04-15 Thread Eric Garside
It's the order of your includes. In the first page, you're including the validation plugin before you're including jQuery. The result is that, when validation attempts to enter itself into the jQuery namespace, jQuery is undefined, so it just dies within it's enclosure. On Apr 15, 4:30 pm,

[jQuery] Re: Plugin does not bind to jQuery object

2009-04-15 Thread Eric Garside
the order of those two, two exceptions are thrown, one for the missing jQuery object, and another for the validate method. Ignore the reference to validate.js in the head, that's not being used here. Thomas On Apr 15, 4:39 pm, Eric Garside gars...@gmail.com wrote: It's the order of your

[jQuery] Re: Ajax request -- passing additional paramters to success method

2009-04-15 Thread Eric Garside
$.ajax({ type: GET, dataType: json, url: tUrl, success: function(data){ GotNewData(data, 'custom string'); }, error: GetDataError, complete: AjaxRequestComplete }); On Apr 15, 4:53 pm, Nic Hubbard nnhubb...@gmail.com wrote: I am interested in

[jQuery] Re: Adding incremental numbered classes to divs

2009-04-14 Thread Eric Garside
I just finished documentation on a new plugin I think might help you in this situation. Check out: http://eric.garside.name/docs.html?p=replicator On Apr 13, 11:04 pm, Brain Lava nic...@brainlava.com wrote: Thanks everyone!  You've definitely made some great points for me to consider.  I'm

[jQuery] Re: how to call 1 function from many buttons by passing parameters

2009-04-13 Thread Eric Garside
Take a look at the jQuery UI Accordion plugin. http://ui.jquery.com On Apr 13, 6:30 am, HISSAM hissam.sher...@gmail.com wrote: Hey I'm new to JQuery I have 5 divs At a time only 1 div should be expanded the others must be hidden I'm using the show and hide function But I want to function

[jQuery] Re: Adding incremental numbered classes to divs

2009-04-09 Thread Eric Garside
What's the advantage of assigning the identifier to the class? Like, how are you using it once you create the classes. I'm assuming there's an easier solution, especially if you're doing it dynamically. On Apr 9, 2:54 pm, Brain Lava nic...@brainlava.com wrote: Thanks Ralph!  I'll give that a

[jQuery] Re: Get var out of ajax scope

2009-04-09 Thread Eric Garside
Well, you've got two basic options. You can do a straightforward global variable like Hector suggested, or you can create and use a custom storage object in the jQuery namespace. Try adding to your code: $.__customStorage = {}; $.get({ url: 'some.page.php', complete: function(data){

[jQuery] Re: JQuery Payload

2009-04-09 Thread Eric Garside
As long as you specify the daa type as html, it should work automatically. From the docs: dataTypeString Default: Intelligent Guess (xml or html) The type of data that you're expecting back from the server. If none is specified, jQuery will intelligently pass either responseXML or

[jQuery] Re: Managing scripts in AJAX applications

2009-04-09 Thread Eric Garside
I put together a pretty basic DOMBuilder tool for this purpose, called HSJN (HTML Snippet Javascript Notation). You can view/get the source here: http://code.google.com/p/hsjn It gives you the ability to specify jQuery chains within it's syntax, and will parse it out into dom nodes you can

[jQuery] Re: Get var out of ajax scope

2009-04-09 Thread Eric Garside
as an argument. You can still put the data in a global variable, but there may not be any need to do that since you have to make a function call anyway. -Mike -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Eric Garside Sent

[jQuery] Re: Debugging jQuery in Firebug

2009-04-07 Thread Eric Garside
I've also got a nice wrapper method for jQuery to interface directly with the firebug plugin. Check here for the snippet: http://snipplr.com/view/10358/jquery-to-firebug-logging/ On Apr 7, 7:22 am, Chuck Harmston cpharms...@gmail.com wrote: There are a few cool methods for debugging Javascript

[jQuery] Re: How do I access global variables for id's, etc.?

2009-04-07 Thread Eric Garside
What are you actually trying to achieve here? Through all the code posted, I'm still a bit unclear on the actual goal you're trying to achieve. On Apr 7, 3:20 pm, Jonathan jdd...@gmail.com wrote: I know global variables seem convenient but they are really quite evil. Once your project grows to

[jQuery] Re: get reference to nested appended element

2009-04-07 Thread Eric Garside
parent.append(tabletrtdtable/table/td/tr/table); var table = $('table table', parent); Be sure to close your inner table tag. IE doesn't like when you try and generate fragments of code, iirc. On Apr 7, 12:28 pm, Jonathan Sharp, Out West Media jquery- li...@outwestmedia.com wrote: Another

[jQuery] Re: first child

2009-04-07 Thread Eric Garside
I think I understand what you want. Try this: $('#content :first-child')[0].tagName.toLowerCase(); // Will return a if it's an anchor, div for a div, img for an image tag, etc. On Apr 7, 12:37 pm, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: var $el = xx.is('h2'); //if it

[jQuery] Re: Learning about functions and methods (I am confused)

2009-04-07 Thread Eric Garside
Yes. You can add methods to any function, but ideally, if you're calling sub functions, you should use $.myPlugin as an object, rather than a function. (function($){ $.myPlugin = { myMethod: function(){ alert('called'); } } })(jQuery); $.myPlugin.myMethod(); On Apr 7, 12:03 pm,

[jQuery] Re: dont waste ur time with this it dont work

2009-04-06 Thread Eric Garside
Phone:  1-828-355-5544 E-mail:  mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.'   From:       Eric Garside gars...@gmail.com

[jQuery] Re: dont waste ur time with this it dont work

2009-04-06 Thread Eric Garside
, and don't harm yourself or others, only then should you accept them.' [image: Inactive hide details for Eric Garside ---04/06/2009 11:48:58 AM---Do you have a test page you can show? jQuery does, indeed, w]Eric Garside ---04/06/2009 11:48:58 AM---Do you have a test page you can show

[jQuery] Re: Selectively load js files

2009-04-03 Thread Eric Garside
If you get the developer build, each of the files is separated out into a: ui.core.js, ui.draggable.js, etc format. If you want to add a bit of spice: $.uinclude = function(){ var scripts = ['core'], counter, loaded = 0; scripts.push.apply(this, arguments); counter = scripts.length;

[jQuery] Re: Excluding some children in a selector

2009-04-02 Thread Eric Garside
$('button', $('#world tr').click(function(){ // Do stuff for #world tr onclick })).click(function(e){ e.stopImmediatePropagation(); return true; }); On Apr 2, 4:14 pm, Thierry lamthie...@gmail.com wrote: I have the following structure for tr: tr id=world    td/td    

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

2009-03-31 Thread Eric Garside
A best practice I've adopted is to utilize classes and ref/rel attributes on dom elements for situations like you're describing. div class=event-phase rel=1/div div class=event-phase rel=2/div div class=event-phase rel=3/div div class=event-phase rel=4/div div class=event-phase rel=5/div

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

2009-03-31 Thread Eric Garside
polluting the DOM with invalid markup.  Rel is not a valid attribute of the div tag. andy -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Eric Garside Sent: Tuesday, March 31, 2009 1:57 PM To: jQuery (English) Subject: [jQuery] Re

[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] Re: Catch generic events

2009-03-30 Thread Eric Garside
Nope. You have to specify the type of event you want to bind. On Mar 30, 8:04 am, julio antongiuli...@gmail.com wrote: Hi, in my code I use typically something like this to catch events in DOM elements: $wnd.$(document).bind('click', function(event) {...}

[jQuery] Re: handler is undefined error

2009-03-30 Thread Eric Garside
Could you give a bit more information? I'm not exactly understanding what your issue is. On Mar 30, 4:38 am, Macsig sigbac...@gmail.com wrote: Update: looks like the issue is related to the function hover: if I change it with click I don't get the error but I want to use hover instead click

[jQuery] Re: bind to front of event stack

2009-03-27 Thread Eric Garside
I'm not sure if there's an easy method to alter the event stack in jQuery, but I can think of a pretty straightforward workaround, providing you bind the forcestop function as the first event handler. $('#myTestEl').bind('click.forcestop', function(e){ var el = $(this), force =

[jQuery] Re: Collect all IDs in a DOM then act on specific ones

2009-03-27 Thread Eric Garside
You would probably have better luck assigning non-styling classes to the elements to search on instead of doing the regex check. So instead of finding all tags with id=edit-field-*, find all tags with the edit-field class On Mar 27, 4:30 pm, NapkinLinks d...@napkinlinks.com wrote: Thanks

[jQuery] Re: bind to front of event stack

2009-03-27 Thread Eric Garside
I've come up with a little plugin that will allow you to bind any event (including custom ones) into a specified position in the event stack. http://snipplr.com/view/13515/jstack--jquery-event-stack-management/ The plugin is currently very basic and only allows you to insert a new event into a

[jQuery] Re: bind to front of event stack

2009-03-27 Thread Eric Garside
into the stack, it bumps the event it's replacing to the end. That is, if I insert it at position 0, and then unbind it, the event firing order is now 2,3,4,1. Same if I insert it into position one, events are then restored to 1,3,4,2. Michael On Mar 27, 4:38 pm, Eric Garside gars...@gmail.com

[jQuery] Re: looping through json and adding dom elements (options)

2009-03-25 Thread Eric Garside
Ice, I just recently released a plugin that might suit your needs. It's basically a way to transmit HTML as JSON for this exact kind of thing. Check out: code.google.com/p/hsjn Taking the case you gave, if you change the JSON your returning to: [['option', {value: 1}, 'Physics'],['option',

[jQuery] New jQuery DomBuilder with Chain Functionality and JSON Style

2009-03-24 Thread Eric Garside
I just released a first milestone of HSJN, the Html Snippet Javascript Notation system for storing HTML snippets in a JSON-esque format. The parser is a straightforward jQuery DOM Builder, with support for custom attributes, styles, and neatest of all, jQuery chains. (Yup, you can put jQuery

[jQuery] Re: Wouldn't inArray() be more intuitive if called arrayPosition()?

2009-03-24 Thread Eric Garside
, with the risk breaking innumerable plugins and pages. On Mar 23, 10:58 pm, Eric Garside gars...@gmail.com wrote: If you'd prefer shortcut functionality, try: $.isInArray = function(arr){ return $.inArray(arr) -1 ? true : false } On Mar 23, 4:59 pm, Klaus Hartl klaus.ha

[jQuery] Re: Changing the ID of a cloned table row

2009-03-24 Thread Eric Garside
Do you have a live example of the code? Karl's stuff works fine for me, so I suspect it has something to do with other scripts on your page. On Mar 24, 12:56 pm, Karl Swedberg k...@englishrules.com wrote: On Mar 24, 2009, at 11:44 AM, rivkadr wrote: The add table row is being added with:

[jQuery] Re: modify pagination plugin to support ability to input page

2009-03-24 Thread Eric Garside
Claudes, I put together a pretty straightforward little Pagination plugin. I don't have a download package or documentation up yet, but you can fetch the jquery.pagination.js plugin from here: svn checkout http://jquery-curator.googlecode.com/svn/trunk/ jquery- curator-read-only var paginators

[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-23 Thread Eric Garside
=1870619 RentACoder Profile:http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro On Sun, Mar 22, 2009 at 4:56 AM, Eric Garside gars...@gmail.com wrote: Try something like the following: div class=mobileclass thru=class-state-one,class

[jQuery] Re: $(#id).attr(ondblclick, New Value); is not work in all browser.

2009-03-23 Thread Eric Garside
This is a horrible way to do what you're attempting. First, you should probably not be useing the inline events when you have jQuery readily accessible to you. Second, you should never, ever, ever, ever, ever write a callback using inline styling onclick handling. Third, you should really put all

[jQuery] Re: Click event is not captured by jQuery after the link to click is rendered by AJAX through jQuery

2009-03-23 Thread Eric Garside
It's because jQuery operates on the elements which already exist. Lets say for instance: a href=load.html class=ajax-clickery/a div id=ajax-content/div Loads this page into div#ajax-content: a href=load-another.html class=ajax-clickery-two/a When you first render the page, you're grabbing

[jQuery] Re: How Easy To Implement RPC Between jQuery And PHP

2009-03-23 Thread Eric Garside
There are a few. The $.ajax methods will end up doing 90% of your work. I'll show you a pretty quick process demonstrating checking if an email address is registered. First, the PHP servlet page, check-email.php: ?php echo json_encode( array('success' = mysql_num_rows( mysql_query(

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

2009-03-23 Thread Eric Garside
Or: jQuery.fn.switchClass( a, b ){ var t = this.hasClass(a); this.addClass( t ? b : a ).removeClass( t ? a : b ); } On Mar 23, 12:35 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, You're creating (or worse, overwriting) global variables 'remove' and 'add' there (because you

[jQuery] Re: Wouldn't inArray() be more intuitive if called arrayPosition()?

2009-03-23 Thread Eric Garside
Honestly, inArray and arrayPosition are equally intuitive to me. If the value has a position in the array, then it is, by definition, in the array. inArray returning the array position is a similar check, but with a more robust ouput. Again, as MorningZ said, you can simply check it's value using

[jQuery] Re: Regex Help for CSS Selector type deal

2009-03-23 Thread Eric Garside
); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 20, 2009, at 11:32 AM, Eric Garside wrote: I need to come up with a regex, or find some way to leverage Sizzle (which I'm not familiar with) to do a pretty simple task. Given strings like: div#some

[jQuery] Re: Wouldn't inArray() be more intuitive if called arrayPosition()?

2009-03-23 Thread Eric Garside
more inline with what it returns (like for instance, indexOf) makes more sense, but none the less the function kills two birds with one stone On Mar 23, 4:19 pm, Eric Garside gars...@gmail.com wrote: Honestly, inArray and arrayPosition are equally intuitive to me. If the value has

[jQuery] Re: Widgets stops working after i cache dom and render again.

2009-03-21 Thread Eric Garside
If you don't do: $('#selector').clone(true); Then none of your event handlers will be copied over. Additionally, when you clone the dom and reuse it, you lose any of the .data() elements jquery places in it. You should, instead of copying the dom then rendering it, simply hide the content when

[jQuery] Re: Preventing A link clicks before document.ready();

2009-03-21 Thread Eric Garside
There is a much simpler solution, I think. I'm not positive, but try: $('a').live('click.halt', function(){return false}); $(function(){ ... $('a').die('click.halt'); }); The theory being that the live event will bind the click pause as the enter the dom, then removing the pause when

[jQuery] Re: Rotating CSS classes each 5 sec

2009-03-21 Thread Eric Garside
Try something like the following: div class=mobileclass thru=class-state-one,class-state-two,class- state-three/div And the js: $(function(){ function rotateClass(){ var el = $(this), classes = el.data('classes'), cur = el.data ('current-class'), next = cur++; if (next+1

[jQuery] Re: height of hidden element

2009-03-21 Thread Eric Garside
The only way I can think of is to hide the element by moving it off the page. So instead of using display:none, use position: absolute; left: -99px So something like this semi-pseudocode: style .compatible-hider { position: absolute; left: -99px } .content-bloc { background:

[jQuery] Re: How do you iterate across elements with the same class name?

2009-03-20 Thread Eric Garside
Take a look at this page I threw up on jsbin: http://jsbin.com/uzecu/edit It uses a neat little random color generator I found years ago bound to an event. Seems pretty quick, too. The javascript: $(function(){ $('.colour') .bind('randomizeColor', function(){ this.style.background =

[jQuery] Re: Using PHP templates and jQuery, browser load problems

2009-03-19 Thread Eric Garside
Also, for reference, this is how your request are processed. 1. HTTP request from user for page.php 2. PHP parses the page 3. PHP includes header.php, PHP parses that page 4. PHP includes lets say content.php, PHP parses that page 5. PHP includes footer.php, PHP parses that page 6. The final

[jQuery] Re: findValue

2009-03-19 Thread Eric Garside
Also, pretty sure you just did it for development purposes, but you probably shouldn't use an alert in an autocomplete context. :P On Mar 19, 3:32 pm, ricardobeat ricardob...@gmail.com wrote: I guess the problem is this line: var ac = $(#operator)[0].autocompleter.findValue(); $(..)[0]

[jQuery] Re: jQuery.noConflict() and firefox 2: errors - is this a bug?

2009-03-17 Thread Eric Garside
Do you have a link to an accessible site? It would help substantially in debugging the issue. On Mar 17, 2:50 pm, mcologne blueameri...@web.de wrote: the path is correct... it works with firefox 3... and: if i remove the prototype.js, it works with firefox 2 too... On 17 Mrz., 19:07,

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread Eric Garside
The problem here appears to be the change jQuery made with 1.3.2 with how it determines visibility. http://jsbin.com/omavi/edit That link is a quick demonstration of how it works. A visible object to jquery is determined by if it takes up space in the page, and has nothing to do with the css

[jQuery] Re: JavaScript Loading Question

2009-03-17 Thread Eric Garside
Also, as an aside, I'm not sure the browser handles Javascript last, just asynchronously. If you have: link ... / link .../ script .../ link .../ I'm pretty sure it will fetch your css first, then wait on the JS, then load the next CSS file. On Mar 17, 8:40 pm, MonkeyBall2010

[jQuery] Re: how to prevent user input while the page is loading

2009-03-17 Thread Eric Garside
You could use css to display:hide the form users could submit from. Do you have a live example? It would help a bunch. On Mar 17, 8:54 pm, Adwin Wijaya adwin.wij...@gmail.com wrote: I have page that rely heavily on jquery for doing calculation. I need to prevent user to enter before the page

[jQuery] Re: Look for UL

2009-03-17 Thread Eric Garside
As an aside, you can use a different syntax for .find() which last I knew was a bit faster and less characters: $(this).find('.someclass') is equivilent to: $('.someclass', $(this)) On Mar 17, 8:58 pm, so.phis.ti.kat see.marlon@gmail.com wrote: Thanks for the tip. I started to use FF's

[jQuery] Re: Problem with class attribute: Why this work in 1.2.6 and doesn't work on 1.3.1???

2009-02-26 Thread Eric Garside
Can you provide some HTML to go along with this? There's not enough info present to properly determine the issue. On Feb 26, 12:47 pm, AndreMiranda acymira...@gmail.com wrote: Hi everyone!! Well... for me it's just the same thing, but I don't know why this works in 1.2.6 and doesn't in

[jQuery] Re: Problem with class attribute: Why this work in 1.2.6 and doesn't work on 1.3.1???

2009-02-26 Thread Eric Garside
!! On 26 fev, 14:50, Eric Garside gars...@gmail.com wrote: Can you provide some HTML to go along with this? There's not enough info present to properly determine the issue. On Feb 26, 12:47 pm, AndreMiranda acymira...@gmail.com wrote: Hi everyone!! Well... for me it's just the same

[jQuery] Re: Problem with class attribute: Why this work in 1.2.6 and doesn't work on 1.3.1???

2009-02-26 Thread Eric Garside
. On Feb 26, 1:18 pm, AndreMiranda acymira...@gmail.com wrote: Man, I really don't know why my code is working this way... it's frustrating... I really don't wanna go back to 1.2.6... On 26 fev, 15:08, Eric Garside gars...@gmail.com wrote: Do you have a demo page up somewhere that displays

  1   2   3   >