[jQuery] Combining plugins - jEditable and treeview

2007-12-29 Thread sharp
Hi Im brand new to jQuery, and so far impressed. I have a vision to create a tree structured menu, using the treeview plugin, with nodes that each are editable text elements, using jEditable. So far I have had some trouble integrating these two plugins, and I am wondering if it is possible to use

[jQuery] Making an Editable Treeview

2007-12-29 Thread sharp
Hi Im very new to jQuery, and am very impresed so far. Im struggling to create my vision of a Tree structured menu, with nodes that can be edited by the visitor, ie each node should be a jEditable text element. My troubles have been with combining the jEditable plugin with the treeview plugin. Can

[jQuery] Re: Help to improve code

2007-04-02 Thread Remy Sharp
Hi Joan, I saw you tested on PC browsers, I can tell you the plugin works in Safari. I wrote a crop plugin a little while ago, which doesn't add any new elements, but uses the background-image attribute to achieve a similar effect (though IE needed to replace the image with a transparent image),

[jQuery] Re: plugin issues

2007-04-09 Thread Jonathan Sharp
Ariel, What version of jQuery are you using? Cheers, -Jonathan On 4/8/07, Ariel Jakobovits <[EMAIL PROTECTED]> wrote: I am working with jdMenu. It works great on FF, throws an "invalid argument" in IE. The example on the site (http://jdsharp.us/code/jQuery/plugins/jdMenu/) does not throw

[jQuery] Re: How to load picture after picture

2007-04-10 Thread Jonathan Sharp
Another approach would be to print out the images like: echo ""; Then the following jQuery code: $(function(){ $('img.photo:first').show(); $('img.next').bind('click', function() { $('img.photo:visible').hide().next().is('img.photo').show(); }); $('img.prev).bind('click', funct

[jQuery] Re: How to load picture after picture

2007-04-11 Thread Jonathan Sharp
On 4/11/07, wyo <[EMAIL PROTECTED]> wrote: On Apr 10, 11:58 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote: > Another approach would be to print out the images like: > echo " class=\"photo\">"; > Doesn't this load all the pictures righ

[jQuery] jQuery's this - a (brief) explanation

2007-04-12 Thread Remy Sharp
Whilst learning jQuery, and whilst teaching other guys I work with, I found I/they kept getting confused as to what 'this' meant. So I wrote up a short tutorial entry trying to explain what jQuery's this meant in different situations. http://remysharp.com/2007/04/12/jquerys-this-demystified/ To

[jQuery] Re: jQuery Powered Sites - More Sites Added.

2007-04-12 Thread Remy Sharp
There's also: http://www.digitallook.com/ Who are a pretty big UK finance web site. On 10 Apr, 15:33, Rey Bango <[EMAIL PROTECTED]> wrote: > Added: > > - GameGum Free Flash Games > > - ToonGum ToonGum is a flash cartoon community. View, submit, and > interact with our many flash cartoons and la

[jQuery] Re: Safari and the wrap() method.

2007-04-12 Thread Remy Sharp
I've just giving it a test in Safari 2 - and it works. I'm sure it works in 1.3 also. On 12 Apr, 14:08, "Giant Jam Sandwich" <[EMAIL PROTECTED]> wrote: > Is the wrap() method supported by Safari 1.3 and above? I've been

[jQuery] Re: Safari and the wrap() method.

2007-04-12 Thread Remy Sharp
Sorry - I should add the test: The JS: $(function() { $('#test').wrap(''); }); Then standard HTML with a P tag with the ID of 'test' and some dummy content within it.

[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-12 Thread Remy Sharp
I did comment on Ralf's web site, but I thought it would be useful to know: The plugin doesn't work in Safari. The reason it doesn't work in Safari is because the script element doesn't fire any events when the external library is loaded, and hence listening for the onreadystatechange doesn't wo

[jQuery] Re: How to load picture after picture

2007-04-12 Thread Jonathan Sharp
On 4/12/07, wyo <[EMAIL PROTECTED]> wrote: Sorry, was to fast with posting, here are more questions. On Apr 12, 12:25 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote: > > You could do that too... here's another option: > > echo ""; > That

[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-13 Thread Remy Sharp
Hi there, I've looked through the jspax code, and it looks like he's creating an explicit test once the package is loaded as I suggested initially. This can can also be achieved without the second script element: function loadExtScript(src, test, callback) { var s = document.createElement('scr

[jQuery] Re: jQuery cross-site AJAX-style loading

2007-04-13 Thread Remy Sharp
The latest version of xsajax does work in Safari 2 (which should also work in Safari 1.3) On Apr 13, 9:39 am, "Ralf S. Engelschall" wrote: > On Thu, Apr 12, 2007, Ralf S. Engelschall wrote: > > On Thu, Apr 12, 2007, Jörn Zaefferer wrote: > > > > Ralf S. Engelschall schrieb: > > > > On Thu, Apr

[jQuery] Re: Displaying a rotated image

2007-04-13 Thread Jonathan Sharp
You have to do that in image manipulation software. When your digital camera takes the photo, most store an orientation flag that programs like iPhoto are smart enough to read and rotate the image for you automatically. In the raw file though the image is still incorrectly stored. There isn't a w

[jQuery] Re: plugin development

2007-04-17 Thread Remy Sharp
I've got a tutorial here that might help: http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/ It's simple in that it's a reusable plugin, but it doesn't have any logic outside of the 'each' loop - which is where you can really beef up the power of your plugin. I'm sure there will be

[jQuery] Re: Question about tablesorter plugin

2007-04-17 Thread Remy Sharp
Hi there, I had the exact same problem with the table sorter, and I didn't want to re-load the cache each time the row was removed (I was removing them from the DOM rather than hiding). Basically, I found I needed to patch the table sorter to allow a re- stripe. The changes I made were as follo

[jQuery] Re: Problem with the fieldselector [EMAIL PROTECTED]

2007-04-19 Thread Remy Sharp
Hi - what browser are you testing this in? I gave it a quick test in Firefox 2 and it worked fine. I applied jQuery to this very page and then ran: var f = 'to'; alert(jQuery("[EMAIL PROTECTED]'" + f + "']").attr('id')); On Apr 19, 11:14 am, Creazion <[EMAIL PROTECTED]> wrote: > Hi, I need hel

[jQuery] jQuery 1.1.3a / 1.2 ?

2007-04-19 Thread Jonathan Sharp
What's the release status for 1.1.3a (or 1.2)? We're in need of support for expanded namespaces (eg. being able to select foo:bar via $('foo\\\:bar') ) Cheers, -Jonathan

[jQuery] Re: Using EXT with Jquery

2007-04-20 Thread Remy Sharp
HI Eli, I spotted this too - and had a play with Ext and jQuery - though I couldn't really see how the two were supposed to be linked together. I did get the same error as you, but it was because I hadn't set up the underlying HTML properly, i.e. I was telling my page to target 'yui-north' inste

[jQuery] Re: Using EXT with Jquery

2007-04-20 Thread Remy Sharp
As promised: http://remysharp.com/wp-content/uploads/2007/04/ext_layout.html

[jQuery] Re: Using EXT with Jquery

2007-04-20 Thread Remy Sharp
I also wrote up a short article on my initial play with Ext and the mistakes I made (it also includes a link the jquery-plugins.js file that Juha points out is missing): http://remysharp.com/2007/04/20/jquery-ext/

[jQuery] Re: Is there an image cropping plugin?

2007-04-20 Thread Remy Sharp
I've written a crop plugin - I'm sure you can extend it to support resizing the crop on the fly: http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-and-pluck/#crop On Apr 20, 4:43 pm, Kim Johnson <[EMAIL PROTECTED]> wrote: > Hi folks, > > I'm wanting to do the following thi

[jQuery] Re: Using EXT with Jquery

2007-04-20 Thread Remy Sharp
April 20, 2007 8:37 AM > To: jQuery (English) > Subject: [jQuery] Re: Using EXT with Jquery > > Thanks all of you, especially Remy, > I managed to solve my problem, > > thishttp://remysharp.com/wp-content/uploads/2007/04/ext_layout.html > helped me a lot mate, thanks :) >

[jQuery] Performance profiling (in IE in particular)

2007-04-20 Thread Remy Sharp
I posted a message some time ago on performance profiling and testing in IE and the best thing available was Firebug Lite which required me to wrap everything in start/end calls. I've since written a time library to hook functions to reduce the amount of work required to performance test. It wor

[jQuery] Re: Image dynamic resizing

2007-04-20 Thread Remy Sharp
I've just (like in the last 5 minutes) written a zoom plugin that will resize the image on the fly when requested. You could link a slider (Ext?) or input box to change the size and call the plugin against the image: http://remysharp.com/wp-content/uploads/2007/04/zoom.js On Apr 21, 12:21 am, A

[jQuery] Re: Cropping images plugin

2007-04-23 Thread Remy Sharp
Here's my crop plugin if you wantt o have a crack at adopting it: http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-and-pluck/#crop I also wrote a zoom/resize plugin - which you may be able to add to the mix: http://remysharp.com/wp-content/uploads/2007/04/zoom.js Hope t

[jQuery] Re: Recommended way to overload jquery method?

2007-04-23 Thread Remy Sharp
Example of (how I would) overload a function: jQuery.extend({ _trim: jQuery.trim, trim: function(s) { // do something to s first, then you might want to call original function this._trim.call(this, s); } }); Though if you're thinking of overloading functions like trim, wouldn't it

[jQuery] Re: Postpone Link action

2007-04-23 Thread Remy Sharp
Hi Kevin, Assuming your transition is the $('div.box').hide() - then: $('a').click(function() { var url = this.href; $('div.box').hide('slow', function() { // called once transition is complete setTimeout(function() { window.location = url; }, 2000); // redirect 2 seconds after the t

[jQuery] Re: attr('defaultValue') does not exist.

2007-04-23 Thread Remy Sharp
Hi Michiel, It sounds like you're able to access the attribute using something like: var myVal = document.getElementById('#inputBox').defaultValue; // similar to the w3cschools example This is a DOM attribute rather than an XHTML attribute - which is why the attr method won't return the value.

[jQuery] Re: IE not executing JS loaded on the fly

2007-04-24 Thread Remy Sharp
You should separate out the HTML from the JavaScript - the $.get is only getting the URL in to the page, I'm fairly sure it doesn't execute any JS. You should load the HTML, then load in the JS using something like $.getScript. That might help. On Apr 23, 9:10 pm, "[EMAIL PROTECTED]" <[EMAIL PR

[jQuery] WYMEditor just released as jQuery plugin

2007-04-24 Thread Remy Sharp
For anyone out there developing CMS's you may have heard of the What You Mean editor. It's latest (alpha 0.3) release has seen it converted to a jQuery plugin making it very quick and easy to drop in to your own CMS. http://www.wymeditor.org/en/

[jQuery] Re: selecting multiple ids at once

2007-04-24 Thread Remy Sharp
If I've understood you correctly you want to target more than one selector, you can just comma separate them: $('#firstTarget A, .secondTagets A, A.third).doStuff() On Apr 24, 12:38 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]> wrote: > hello! > > Hopefully a simple question, for which i did no

[jQuery] Re: jQuery HTML Documentation Generator

2007-04-25 Thread Jonathan Sharp
I belive there's a java version of one in SVN that they use currently. Take a look at the ant docs target in the build.xml -js On 4/25/07, Matt Kruse <[EMAIL PROTECTED]> wrote: The "jQuery HTML Documentation Generator" at http://jquery.bassistance.de/docTool/docTool.html seems like a great t

[jQuery] Re: behaviors?

2007-04-26 Thread Jonathan Sharp
I think he may be talking about something different, think dynamic events in the sense that a new list item is added via an ajax call and the click event is bound to it. No need to re-call the bind to attach the event after the ajax content has loaded... $('li").behavior( "click", function() {

[jQuery] Re: behaviors?

2007-04-27 Thread Jonathan Sharp
Could you see this possibly being built directly into the browser or becoming part of the JavaScript/DOM standard? -js On 4/26/07, John Resig <[EMAIL PROTECTED]> wrote: .behavior() does not exist - but it could (without too much effort) the current solution with jQuery is shown in the previo

[jQuery] Re: Estimated 1.1.3 release date?

2007-04-27 Thread Jonathan Sharp
Typically X.Y.Z versioning follows the following: X = Major release (total rewrite, huge codebase changes, usually not backwards compatible) Y = Minor releases, some isolated backwards compatibility issues, new features release Z = Bug fix releases or "point releases". Typically no backwards comp

[jQuery] $(...).children() vs $().childNodes()

2007-04-27 Thread Jonathan Sharp
So we have a situation where we need to clone all of an elements childNodes (including whitespace & text nodes). The code below is an attempt to add a childNodes() function that behaves similar to children() except for it includes the childNodes. Comments/houghts/suggestions/feedback? $.fn.child

[jQuery] Re: Chaining methods

2007-05-02 Thread Jonathan Sharp
//plugin jQuery.fn.toggleText = function (evalText1, evalText2){ $(this).html(($(this).text() == evalText1)?evalText2:evalText1); } jQuery.fn.toggleText = function(txt1, txt2) { return this.each(function() { $(this).html( $(this).text() == txt1 ?

[jQuery] jQuery Site: EverBank.com

2007-05-03 Thread Jonathan Sharp
Spotted in the wild: http://everbank.com/ -js

[jQuery] Re: Pass objects to Ajax Success

2007-05-03 Thread Jonathan Sharp
Hi Jeff, You just need to use a closure. Outside your ajax call do $t = $(this); and then you can reference $t inside of your anonymous function. See below... Cheers, -js $(document).ready(function() { $("table > tbody > tr").hover(function(){$ (this).css("backgroundColor", "#de7121")}, f

[jQuery] Re: ANN: jQuery-Powered Sites: The List Continues to Grow

2007-05-04 Thread Jonathan Sharp
Here's another one I've neglected to mention (I even built it!) It uses thickbox http://www.sharpequestrian.com -js P.S. There's a photo of me on the photos page with my horse Micah. On 5/4/07, Rey Bango <[EMAIL PROTECTED]> wrote: > > > Hi Kevin, > > One of the things that we're trying to do o

[jQuery] Re: Firebug shows Too Much Recursion errors after clicking OK in alert box

2007-07-25 Thread Jonathan Sharp
This could also be written as: $('a').click(function() { if ($(this).parents('#nav').size() == 0) { alert('...'); return false; } }); -js On 7/25/07, Erik Beeson <[EMAIL PROTECTED]> wrote: You don't need to wrap the parameter to not in $(...). Maybe try: $("a").not("#nav a

[jQuery] Re: switch between two class - Basic Issue

2007-07-25 Thread Jonathan Sharp
The issue lies in that you're trying to bind your click event to .collapsibleopen at document ready time. The .collapsibleopen class won't be available until the user clicks to have it added. I think below is more of what you're after... $('.collapsible .collapsed .collapsibleopen').bind('click',

[jQuery] Does $('input#myId') search for inputs first or is it optimised?

2007-07-26 Thread Remy Sharp
I should really know this, but I've come to realise I'm not 100% sure. Does this: $('input#myId') ...search for all inputs first then narrow down to the ID, or does jQuery work out before hand that "there can be only one" Id - and therefore is the same, with respect to processing to: $('#myId'

[jQuery] Re: Does $('input#myId') search for inputs first or is it optimised?

2007-07-26 Thread Remy Sharp
overhead. > > --rob > > On 7/26/07, Remy Sharp <[EMAIL PROTECTED]> wrote: > > > > > > > I should really know this, but I've come to realise I'm not 100% sure. > > > Does this: > > > $('input#myId') > > > ...search

[jQuery] Re: switch between two class - Basic Issue

2007-07-25 Thread Jonathan Sharp
in $(this) to apply this JQuery only in the real clicked "element"? I am trying some XPath Selectors. Could you help me? Cheers ;) Mario 2007/7/25, Jonathan Sharp <[EMAIL PROTECTED]>: > > The issue lies in that you're trying to bind your click event to > .collap

[jQuery] Re: Are there any particular ways to debug jQuery code?

2007-07-27 Thread Jonathan Sharp
Why simply write bug free code! -js On 7/26/07, cfdvlpr <[EMAIL PROTECTED]> wrote: > > > Firebug is awesome for debugging your Jquery code using firefox. But, > how do you debug problems that occur in IE and IE only? > >

[jQuery] Re: Two words for Jquery

2007-08-01 Thread Jonathan Sharp
super fly. On 8/1/07, Richard D. Worth <[EMAIL PROTECTED]> wrote: > > On 8/1/07, Mario Moura <[EMAIL PROTECTED]> wrote: > > > > BJ AJ > > > > > > (Before JQuery) (After JQuery) > > > Meet BJ :-( > > Meet AJ :-) > > - Richard > > >

[jQuery] Re: Check this, if you've got the time

2007-08-02 Thread Jonathan Sharp
I'd recommend "booglyboogly" since that's what happens when you click on the "X" -js On 8/2/07, Paul Caton <[EMAIL PROTECTED]> wrote: > > > That's neat! > > Now you need a good name for it. Come to think of it, it looks a bit > like table tennis - maybe you could call it "Ping-Pong", something l

[jQuery] Re: new Plugin every: jQuery-oriented setTimeout and setInterval

2007-08-14 Thread Jonathan Sharp
I'm going to throw my suggestion in: $(...).oneTime(); $(...).everyTime(); $(...).stopTime(); Cheers, -js P.S. I approved your account so there shouldn't be a delay anymore. On 8/14/07, Blair Mitchelmore <[EMAIL PROTECTED]> wrote: > > > Maybe it's just my jealousy of pattern matching and mult

[jQuery] Re: Do my emails make it to the list?

2007-08-15 Thread Jonathan Sharp
The reason there's a delay is that new members posts are moderated to fight spam. After x number of "valid" posts the moderation restriction is removed. I've removed this restriction for your account. Cheers, -js On 8/15/07, barophobia <[EMAIL PROTECTED]> wrote: > > > I can see my emails in the

[jQuery] Re: Do my emails make it to the list?

2007-08-15 Thread Jonathan Sharp
No, probably not. Your messages are posted, just not immediately. We're pretty good at moderating posts quickly. Sometimes googlegroups seems a little lagged. Cheers, -js On 8/15/07, Göran Törnquist <[EMAIL PROTECTED]> wrote: > > Is that the reason why I haven't had any responses to my post (an

[jQuery] Re: jQuery negatives: dual/triple/quadruple special-case uses for both function calls and method names

2007-08-16 Thread Jonathan Sharp
On 8/16/07, Stephan Beal <[EMAIL PROTECTED]> wrote: > > On Aug 16, 7:39 pm, Mitch <[EMAIL PROTECTED]> wrote: > *snip* > Simon Willison apparently has a > similar hang-up about jQuery. And, like i am in my hate-hate > relationship with Python, he's in the minority. Minor detail, it wasn't Sim

[jQuery] Re: Do my emails make it to the list?

2007-08-17 Thread Jonathan Sharp
nd caught a number of messages that would not fall into the family friendly nature of this group. So please be patient as we approve you as you start contributing. Cheers, -Jonathan On 8/17/07, Giovanni Battista Lenoci <[EMAIL PROTECTED]> wrote: > > > Jonathan Sharp ha scritto:

[jQuery] Re: Avoiding anonymous functions - enhancement suggestion

2007-08-17 Thread Jonathan Sharp
On 8/17/07, John Resig <[EMAIL PROTECTED]> wrote: > > > I've thought of this, as well. I also wanted to add a hook to allow: > > $(...).click(".toggle()") > > However, I'm currently leaning away from it (embedding code in strings > is messy) in favor of another solution that I'm working on: > > $(.

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Jonathan Sharp
This can be reduced to this: $(document).ready(function() { function doPlusMinus(event) { qty_field = $(this).parent('td').find('[EMAIL PROTECTED]'); var num = $(qty_field).val(); $(qty_field).val( num + (event.data === true ? 1 : (num > 0 ? -1 : 0)) ); } // Fi

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Jonathan Sharp
.after( // You may be able to substitue add (to select this element for this object) for this after call // Create your element and bind the event to it $('').bind('click', true, doPlusMinus) ) ) Cheers, -js On 8/21/07, Jonathan Sharp <[EMAIL

[jQuery] jQuery Spotted In The Wild: REI.com

2007-08-22 Thread Jonathan Sharp
http://www.rei.com/product/735607 Click on the product image for a larger view. -js

[jQuery] Re: auto scrool

2007-08-23 Thread Jonathan Sharp
While this isn't exactly what you're looking for it would give you a base to build upon if you were to write your own. It would have the calculations for scrolling as well as some timing events. http://jdsharp.us/jQuery/plugins/AutoScroll/ Cheers, -Jonathan On 8/23/07, rayfidelity <[EMAIL PROTE

[jQuery] Clear element's style in IE?

2007-08-23 Thread Jonathan Sharp
I'm using this to clear an element's style (as set by developer's) and it works great in FF but not IE. Any thoughts? $('[EMAIL PROTECTED]').attr('style', ''); Cheers, -js

[jQuery] Re: [NEWS] jQuery's Fearless Leader on Ajaxian

2007-08-24 Thread Jonathan Sharp
I'm confused! ...he's not 10ft tall? Is he a mere mortal? -js On 8/24/07, Rey Bango <[EMAIL PROTECTED]> wrote: > > > jQuery's fearless leader John Resig is in the news today on Ajaxian.com. > The post is about John's recent chat over at Google on "Best Practices > in Javascript Library Design".

[jQuery] PERFORMANCE TIP: removeClass()

2007-09-19 Thread Jonathan Sharp
*Do not do:* $(...).removeClass('a').removeClass('b').removeClass('c'); *Instead do:* $(...).removeClass('a b c'); Same applys to addClass() I had 15 classes I had to remove and Firefox was a champ at chained removeClass calls, IE was taking 760ms! -js

[jQuery] Re: PERFORMANCE TIP: removeClass()

2007-09-19 Thread Jonathan Sharp
> > > just curious how would that compare to > $(...).attr('class',''); > > > Jonathan Sharp-2 wrote: > > > > *Do not do:* > > $(...).removeClass('a').removeClass('b').removeClass('c'); > > > > *Instead d

[jQuery] Re: PERFORMANCE TIP: removeClass()

2007-09-19 Thread Jonathan Sharp
could be better spent optimizing your display code. > > > andy > > -- > *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Jonathan Sharp > *Sent:* Wednesday, September 19, 2007 11:55 AM > *To:* jquery-en@googlegrou

[jQuery] Re: OT: Combining JS files for production releases

2007-09-20 Thread Jonathan Sharp
Hi Brook, Here's a layout of what we've developed at an enterprise level. Below is the relivant directory structure... ... /jquery jquery.properties dimensions.js jquery-1.1.4.js jquery-1.2.1.js hoverintent.js /src /component component.js component.css component.html /i

[jQuery] Re: jQuery camp: any closer to a location decision?

2007-09-24 Thread Jonathan Sharp
Are there any details in terms of times? I'm attempting to schedule a flight and need to know if I have time to catch on Saturday night. Cheers, -js On 9/15/07, John Resig <[EMAIL PROTECTED]> wrote: > > > It's very likely that this will be taking place at Harvard University, > thus, it'll be on

[jQuery] Ajax Experience Boston : jQuery Camp 2007 - Location & Times?

2007-09-24 Thread Jonathan Sharp
Have any details been nailed down in regards to the Sat. Oct 27th jQuery Camp following Ajax Experience? I need to finalize travel arrangements so a location and ending time would be most helpful. Looking forward to it! -js

[jQuery] Re: jdmenu and new dimensions issue?

2007-09-25 Thread Jonathan Sharp
Howdy, I'm jumping in late to the conversation here. As Brandon pointed out there were some updates to dimensions/jQuery core that need to be updated in the plugin. I have a rewrite nearing completion which I'm working hard at trying to have completed and published by Ajax Experience at the end of

[jQuery] Re: cannot retrieve elements with xpath

2007-09-26 Thread Remy Sharp
You need to wrap the jQuery in a 'ready' method - otherwise your JS is running before the DOM is ready: $(function () { $("//[EMAIL PROTECTED]'2']").hide(); $("//[EMAIL PROTECTED]'3']").hide(); }); Making this change works. On Sep 26, 10:45 am, julio <[EMAIL PROTECTED]> wrote: > Hi, > > I h

[jQuery] Re: Parent Child Selectors + bind

2007-09-26 Thread Remy Sharp
You're binding to 'onfocus' when it should be 'focus': $("#id1 > [EMAIL PROTECTED]").bind("focus", foo); On Sep 26, 8:35 am, Anjanesh <[EMAIL PROTECTED]> wrote: > Hi > > I cant get this seem to work > > $("#id1 > [EMAIL PROTECTED]").bind("onfocus", foo); > > Is there something wrong with the arg

[jQuery] Re: Quick question on image loading

2009-10-05 Thread Jonathan Sharp
Hi Eric, The browser will replace the image first before loading it. What you can do to preload the image is as follows: var newBackgroundImage = '/new/image/url.png'; $('') .attr('src', newBackgroundImage) .bind('load', function() { $('div').css('background-image', 'url(' + newBac

[jQuery] Re: format number

2009-10-05 Thread Jonathan Sharp
You can run a parseint on the number: var myInt = parseInt( '15,000', 10); Cheers, - Jonathan http://jqueryminute.com On Sun, Oct 4, 2009 at 7:49 AM, runrunforest wrote: > > cool, but that leads to another problem > > The computer now thinks 15,000 is just 15 instead of fifteen thousands

[jQuery] Re: Modify Dom Element using JQuery

2009-10-05 Thread Jonathan Sharp
Hi Nitin, Something similar to the following should work: $('div.modan > p > a').each(function() { $(this).parent().after( $('').find('li').append( this ).end() ).remove(); }); Cheers, - Jonathan On Mon, Oct 5, 2009 at 10:19 AM, Nitin Gautam wrote: > > I have following code > > > Center >

[jQuery] Re: selectors with xml cdata, parse html string

2009-10-05 Thread Jonathan Sharp
Hi Donnie & Pirco, You can use the .text() jQuery method to get at the CDATA. The error though is coming from how you're selecting the ID: Instead of: html = $.trim($(xml).find("html").text()); alert($("#mydiv", html).attr("id")); Try: // XML is already a XML Document object var cdata

[jQuery] Re: textContent attribute problem with ie

2009-10-05 Thread Jonathan Sharp
What are you trying to do? On Mon, Oct 5, 2009 at 11:37 AM, m.ugues wrote: > > HAllo all. > This piece of code works fine in FIrefox but does not work in IE. > > http://pastie.org/642444 > > The problem is on textContent attribute that in IE is undefined. > > Any workaround? > > Kind regards > >

[jQuery] Re: How to Add A Callback Function to a plugin

2009-10-05 Thread Jonathan Sharp
$.fn.myPlugin = function(options) {options $.extend({ callback: null }, options); // Your plugin if ( $.isFunction(options.callback) ) { options.callback.call(); } }; $('div').myPlugin({ callback: function() { // Your callback code } }); A better approach mig

[jQuery] Re: MooTools and jQuery

2009-10-06 Thread Jonathan Sharp
Hi Dennis, We had some issues with jqModal and unfortunately only the minified source is available so we ended up using the jQuery UI dialog component with great success. (Note the filesize listed on the jQuery UI page is for the entire zip file, the library itself is much smaller) http://jqueryu

[jQuery] Re: format number

2009-10-06 Thread Jonathan Sharp
Doh...thank you Karl for saving my behind. Parse Int won't work...coffee hadn't kicked in yet. Cheers, - Jonathan On Mon, Oct 5, 2009 at 6:58 PM, Karl Swedberg wrote: > > On Oct 5, 2009, at 11:43 AM, Jonathan Sharp wrote: > > You can run a parseint on the number: var myI

[jQuery] Re: Aaron Gustafson has a great ALA-Article on (Content-)Image Alignment and Consistency

2007-09-27 Thread Remy Sharp
If you're talking about the "If I Told You You Had a Beautiful Figure..." article, here you go: function FigureHandler(g, h) { if (typeof(h) !== 'object') { var h = { '75-100' : 'full-col', '67-75' : 'three-quarters-col', '50-67' : 'two-thirds-col', '34-50' : '

[jQuery] Re: Aaron Gustafson has a great ALA-Article on (Content-)Image Alignment and Consistency

2007-09-27 Thread Remy Sharp
> Is there a reason you didn't replace this.getElementsByTagName? On the first .getElementsByTagName - there's no particular reason to justify using jQuery. However, the second one should really read: $('p', this).each(... There really only there because I did a two minute conversion from Prot

[jQuery] Catch a click event before the DOM is loaded

2007-10-01 Thread Remy Sharp
I've recently been working on a project where the page is complex enough that the DOM would not have loaded before the user had spotted our 'big red button' - and clicked away. As much as I hate to admit, this project wasn't going to support a non- JS version (due to the demographic), so I though

[jQuery] Re: Catch a click event before the DOM is loaded

2007-10-01 Thread Remy Sharp
It really depends on the solution you're working on. In this particular case, it would odd if the button had just appeared, and on some pages there's a button for each row on a large table of data. Disabling it first then enabling is a better approach, but the solution I went for, still register

[jQuery] Re: Catch a click event before the DOM is loaded

2007-10-01 Thread Remy Sharp
On Oct 1, 9:06 pm, Guy Fraser <[EMAIL PROTECTED]> wrote: > Couldn't you just use this: > > http://jquery.com/plugins/project/elementReady Not when there are more than a few buttons on the page. This plugin works fine if your button has a particular Id attached to it, some of the pages we were wo

[jQuery] Re: [Site Submission]: nbc.com

2007-10-04 Thread Jonathan Sharp
Maybe we can get John on Jay Lenno... -js On 10/4/07, Jake McGraw <[EMAIL PROTECTED]> wrote: > > > On 10/4/07, Karl Swedberg <[EMAIL PROTECTED]> wrote: > > I wonder, Why do I feel like a proud papa every time I see jQuery in the > > wild? It's silly -- I haven't contributed a single line of code

[jQuery] Re: Using multiple versions of jQuery on the same page

2007-10-15 Thread Jonathan Sharp
A URL would be helpful for debugging. -js On 10/15/07, airslim <[EMAIL PROTECTED]> wrote: > > > Actually it does make sense... but its not working, for my case : > var jq = jQuery.noConflict(true); > > throws an arror with firebug -> "jQuery is not a constructor". > >

[jQuery] Re: creating drop down menus with JQuery?

2007-10-16 Thread Jonathan Sharp
$('ul.jd_menu').jdMenu({ activateDelay: 100 }); Should work, here are the other options: showDelay: 150 hideDelay: 550 Sorry there isn't any documentation yet. -js On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hey Chris, Thanks for this recommendation. One thing I'm noticing

[jQuery] Re: creating drop down menus with JQuery?

2007-10-16 Thread Jonathan Sharp
age of an arrow > > height="16" width="16" /> > > but when the user rolls over the image, I'd like the source of the > image to change to something else to indicate the menu is "active". > How do I do this with jdMenu? > > - Dave > &

[jQuery] Re: creating drop down menus with JQuery?

2007-10-17 Thread Jonathan Sharp
and bottom) of the > arrow. It does this for both PC IE and Firefox, although I can't tell > if the distances are the same. Any advice for relatively lining up > the menu directly beneath the image? > > Thanks, - Dave > > > On Oct 16, 3:56 pm,

[jQuery] Re: creating drop down menus with JQuery?

2007-10-17 Thread Jonathan Sharp
c). On your web site, you mention the > plug-in supports relative positioning. Is there an example somewhere > on the site? I can just model my code off the example. > > Thanks for your replies, - Dave > > On Oct 17, 9:29 am, "Jonathan Sharp" <[EMAIL PROTECTED]

[jQuery] Re: creating drop down menus with JQuery?

2007-10-17 Thread Jonathan Sharp
t; - Dave > > On Oct 17, 10:09 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote: > > Do you have a URL of a sample page? > > > > -js > > > > On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > > > > > &g

[jQuery] Stopping event propagation on non-standard event types

2007-10-17 Thread Jonathan Sharp
$(window) .bind('testEvent', function(e) { alert('1'); e.stopPropagation(); e.preventDefault(); return false; }) .bind('testEvent', function() { alert('2'); }) .trigger('testEvent'); The above code doesn't stop the testEvent from triggering th

[jQuery] Re: continuous action while mouseover

2007-10-17 Thread Jonathan Sharp
helps some. Cheers, -js On 10/17/07, Karl Swedberg <[EMAIL PROTECTED]> wrote: > > Yikes, you'd never be able to tell from my post below that I used to teach > English. Sorry if it confused anyone. Here is what I meant to write (with > corrections inside the asterisks): &g

[jQuery] Re: How do I completely overwrite an event?

2007-10-17 Thread Jonathan Sharp
If you're using jquery-1.2+ you can do the following to just wipe out your events: $('#BLAH').bind('click.myfn', function() { ... }); $('#BLAH').unbind('click.myfn').bind('click.myfn', function() { ... }); This will only replace your event (myfn can be whatever you want) otherwise if you do unbin

[jQuery] Re: Stopping event propagation on non-standard event types

2007-10-17 Thread Jonathan Sharp
I'll take a shot at that as I've been using some custom events in components being built and it'd be a nice behavior to have. And allow for a decoupling of callbacks that we have with developers currently. Cheers, -js On 10/17/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:

[jQuery] Re: creating drop down menus with JQuery?

2007-10-17 Thread Jonathan Sharp
lay: 20, >hideDelay: 20 >}); > > but it didn't seem to move the menu > > > http://groups.google.com/group/jquery-en/browse_thread/thread/4793fc4e34ebb5c1 > > - Dave > > On Oct 17, 1:22 pm, "Jonathan Sharp" <[EMA

[jQuery] Re: Stopping event propagation on non-standard event types

2007-10-17 Thread Jonathan Sharp
On 10/17/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > > > Jonathan Sharp schrieb: > > I'll take a shot at that as I've been using some custom events in > > components being built and it'd be a nice behavior to have. And allow > > for a deco

[jQuery] Re: changing the adressbar with javascript

2007-10-18 Thread Jonathan Sharp
You can use hashes (url.php#hash) which won't reload the page. -js On 10/18/07, Simpel <[EMAIL PROTECTED]> wrote: > > > Hi > > I'm almost certain that this one is impossible but maybe someone out > there has a solution > > We just released a site with a lot of ajax functions and now people >

[jQuery] Re: Getting a div with scroll bar to stay scrolled down

2007-10-19 Thread Jonathan Sharp
I think that would be how prototype would do it. Here's how jQuery would: $('#divname').scrollTop( $('#divname')[0].scrollHeight ); Cheers, -js On 10/16/07, Eric <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I have a div that will refresh itself and the scroll bar just won't > stay down. The sol

[jQuery] Re: Getting a div with scroll bar to stay scrolled down

2007-10-19 Thread Jonathan Sharp
On 10/19/07, Dave Methvin <[EMAIL PROTECTED]> wrote: > > > > $('#divname').scrollTop( $('#divname')[0].scrollHeight ); > > I think you meant: > > $('#divname')[0].scrollTop( $('#divname')[0].scrollHeight ); Nope, I was utilizing the scrollTop() method from dimensions. Here's another way that av

  1   2   3   >