[jQuery] Re: My published plugins are not appearing in the jQuery Plugin list

2009-02-24 Thread Dave Stewart
Hooray! That's it sorted. Thanks again Karl :)

[jQuery] Re: My published plugins are not appearing in the jQuery Plugin list

2009-02-24 Thread Dave Stewart
Hey Karl, That's probably exactly why! I wasn't aware I needed to do this - so I will organise that now. Many thanks, Dave

[jQuery] Re: My published plugins are not appearing in the jQuery Plugin list

2009-02-23 Thread Dave Stewart
Just heard from someone who found me on Google, but the plugin list was not mentioned...

[jQuery] My published plugins are not appearing in the jQuery Plugin list

2009-02-19 Thread Dave Stewart
I've had two of my jQuery plugins published for a while now (more than a year) on teh jQuery site, with backup doumentation and demoes on my own site. http://plugins.jquery.com/project/form-highlight http://plugins.jquery.com/project/Populate However - they don't appear to show up in the plugins

[jQuery] "Highlight" plugin updated (highlight elements and related elements as you interact with them)

2008-05-29 Thread Dave Stewart
Hi Everyone, I've recently updated my "Highlight" plugin, which is designed to increases usability by highlighting elements as you interact with the page. Its primary use is for forms, but it can also be used for tables, lists, or any element you specify. Examples uses: * Form-filling can b

[jQuery] "Populate" plugin updated (plugin to fill forms using JSON)

2008-05-29 Thread Dave Stewart
Hi Everyone, I've finally updated my Populate plugin, which populates a form using JSON data. This plugin supports full PHP hierarchical naming and deep JSON data structures, as well as checkbox arrays and other non-standard UI controls. The plugin can be used as part of your AJAX toolkit, or fo

[jQuery] Re: jQuery.validate versus jQuery.yav

2008-02-25 Thread Dave Stewart
I love validate. It takes a bit of getting used to the options, but it's great. I attach a custom attribute to any items i want validated with simple rules, then validate does the rest. A rough example: Any error messages will go here... $('#form-1').validate()

[jQuery] Re: Which jquery plugin is best to use to create this effect

2008-02-25 Thread Dave Stewart
You don't need a plugin, just the animate effect: $('page').animate({left:600}, 1000)

[jQuery] Re: trying to find the first instance of a person's name on the page

2008-02-24 Thread Dave Stewart
> I was also thinking that the routine you built could be converted into a search-term highlighter. There's already a jQuery plugin that highlights, called, conveniently- enough, highlight!

[jQuery] Re: Can jQuery create Drop Caps?

2008-02-24 Thread Dave Stewart
:)

[jQuery] Re: Can jQuery create Drop Caps?

2008-02-24 Thread Dave Stewart
Yup - you need jQuery and Regular Expressions: var elements = $('a[class="tablink"]') elements.each( function(){ var html = $(this).html() html = html.replace(/([A-Z])/g, '$1') $(this).html(html) } )

[jQuery] Re: trying to find the first instance of a person's name on the page

2008-02-24 Thread Dave Stewart
; wrote: > Dave, That is great! Thanks. > I've tested it out with an array of 1000 names as a worst case > scenario and it is pretty slow. I'll have to see about refining the > list of names if possible to keep it as small as possible. > > Thanks again, > Stephen &g

[jQuery] Re: trying to find the first instance of a person's name on the page

2008-02-24 Thread Dave Stewart
Hey Stephen, RegExps are always going to be slower than a basic indexOf, so perhaps when you loop through the names you could try running an indexOf first, then if it comes out positive, only then do you the RegExp replacement. I imagine that there would be a cutoff point where the performance in

[jQuery] Re: trying to find the first instance of a person's name on the page

2008-02-23 Thread Dave Stewart
Heh heh, this is cool! var names = ['Stephen Boyd','Fred Von Brown'] $("body").each( function(){ var html = $(this).html() $(names).each( function(i, e){ var rx= new RegExp(e, 'gi') html = html.replace(rx, '' +e+ '') }

[jQuery] Re: trying to find the first instance of a person's name on the page

2008-02-23 Thread Dave Stewart
For only the first name on each page, just remove the 'g' modifier from the RegExp constructor (I'm sure you know this)

[jQuery] Re: Injecting jQuery with A Bookmarklet

2008-02-23 Thread Dave Stewart
How funny - I wrote the exact same thing tonight! http://www.keyframesandcode.com/code/development/javascript/jquery-favelet/

[jQuery] Re: trying to find the first instance of a person's name on the page

2008-02-23 Thread Dave Stewart
Well you could do something like this (it would be prohibitively slow on 250 names on one page though!!) : var names = ['Stephen','Fred'] $("body").each( function(){ var html = $(this).html() $(names).each( function(i, e){ var rx= new RegExp(e, 'gi')

[jQuery] Re: ".find" does not work in ".each"

2008-02-23 Thread Dave Stewart
> it looks like he is trying to find td elements with an id that *starts* with > "order," True! But the jquery was good. So not sure what was going on there. Sometimes you just need to delete blocks of code and write from scratch, as you just can't what's not quite right (the brain sees what it

[jQuery] Re: ".find" does not work in ".each"

2008-02-23 Thread Dave Stewart
Not sure, but from an id/class point of view, any page id should be unique, so your "order" identifier if it is to be used on many TDs, should really be a class="order". So if you're just picking up a single id, there's no need to iterate over, is there? Anyway - I replicated your test and find w

[jQuery] Re: trying to find the first instance of a person's name on the page

2008-02-23 Thread Dave Stewart
Well regexp would be useful if there was a pattern to people's names, but there isn't. Do you want to find any names, or a list, or a specific name?

[jQuery] Re: Call a function just before the window close

2008-02-23 Thread Dave Stewart
Sorry - text got cut off: Doing it the old way: window.onbeforeunload = function(){ return "Are you sure?" } Worked great.

[jQuery] Re: Call a function just before the window close

2008-02-23 Thread Dave Stewart
Well you know - try as I like, I could NOT get the DOM method addEventListener to work for beforeunload. Doing it the old way: window.onbeforeunload = function(){ return "Are you sure?" }

[jQuery] Re: Call a function just before the window close

2008-02-23 Thread Dave Stewart
I couldn't bind 'beforeunload' to the window. document, or body tag successfully. I had to revert to a manual 'window.beforeunload'. I know I should be doing something like evt = window.attachEvent ? window.attachEvent('onbeforeunload', fn) : window.addEventListener('beforeunload', fn, false) b

[jQuery] Re: Mac OS X default system drag and drop is overriding Interface's drag and drop

2008-02-23 Thread Dave Stewart
Yes! The CSS background image is the way forward. Thank [EMAIL PROTECTED] for that. A layered-over-the-top-div solution would have been a complete and horrible hack as far as I'm concerned, so this is just great. li.thumbnail{ position:relative; width:75px; height:75px;

[jQuery] Re: Mac OS X default system drag and drop is overriding Interface's drag and drop

2008-02-23 Thread Dave Stewart
Brainwave: CSS background-image! I'm going to try this now...

[jQuery] Re: Mac OS X default system drag and drop is overriding Interface's drag and drop

2008-02-23 Thread Dave Stewart
"[EMAIL PROTECTED] Macs as usual!" was my first thought. But I'm borrowing a Mac laptop to try and check stuff out over the next few days, so I'll try and keep this thread current and will let you know Dave

[jQuery] Mac OS X default system drag and drop is overriding Interface's drag and drop

2008-02-23 Thread Dave Stewart
Hi all, I'm developing a back end for a photographer's agent, and she wants the site to be mainly drag 'n' drop thumbnail images, so she can create "collections" of various images, by dragging from various bins. So I've started with a styled list of images, and each contains an . Each aligns t

[jQuery] Re: jQuery won't recognise attribute names containing [square brackets]

2008-02-12 Thread Dave Stewart
I knew about :input, but my brain just pre-supposed it meant only input elements so I had kind of disregarded them somewhat. So thanks for pointing that out!

[jQuery] Re: jQuery won't recognise attribute names containing [square brackets]

2008-02-11 Thread Dave Stewart
Hey Marty, I couldn't live without PHP's square brackets. I just about always want to split up a form into component parts. I could easily write something using RegExp to do this for me, but having it all built in is just lovely. Great that Rails has it too. Cheers, Dave

[jQuery] Re: jQuery won't recognise attribute names containing [square brackets]

2008-02-11 Thread Dave Stewart
Hi Aaron, Good styles there with the name attribute stuff. Not so good if you want to grab other entities such as selects, but good to see that it accepts non-standard characters.

[jQuery] Re: jQuery won't recognise attribute names containing [square brackets]

2008-02-08 Thread Dave Stewart
OK - this is the best I could come up: function $$(selector, context){ return jQuery(selector.replace(/(\[|\])/g, '\\$1'), context) } $$('#contact[email]') It adds to the global namespace (so won't work with prototype for example, which also uses

[jQuery] Re: jQuery won't recognise attribute names containing [square brackets]

2008-02-07 Thread Dave Stewart
Wow, that's really useful to know, thanks Karl. I think I'll just use a regular expression: selector = selector.replace(/(\[|\])/g, '\$1') It would be really useful if this were an option, somehow. My jQuery- foo is not all that. Any ideas, anyone? Cheers, Dave

[jQuery] jQuery won't recognise attribute names containing [square brackets]

2008-02-07 Thread Dave Stewart
tors e.g. #contact #email offer different advantages. Has anyone any preferences, and why?? Many thanks, Dave Stewart

[jQuery] Re: [validate] Validation Plugin - how to remove a control form validation

2008-02-06 Thread Dave Stewart
Hi Jorn, Sorry for teh delay - was ill yesterday so took a day off. Well it looks like you've made some amendments to the code, so I don't think I can reproduce the steps now, but, this is what *did* happen: 1 - new page, no email or password 2 - click "Email my password" - Email validati

[jQuery] Re: [validate] Validation Plugin - how to remove a control form validation

2008-02-04 Thread Dave Stewart
Hey Jorn, Actually the main form image are part of the Art and Science of CSS book (hell, they published it, so I guess you can) but you could just specify no bg image and have coloured blocks instead. The highlight code is mine, but I've updated the first line to cleaner jQuery to read

[jQuery] Re: Validation Plugin - Associate array naming with a single error label

2008-02-02 Thread Dave Stewart
Jorn, I've done some work on selectors for groups, and it's actually quite easy to select a group or sub group for validation, although I don't know the details of your implementation, so I wont suppose to imply anything. As usual I've uploaded some demo code for you to take a look. www.

[jQuery] Re: [validate] Validation Plugin - how to remove a control form validation

2008-02-02 Thread Dave Stewart
f the submission fails on any other element all ignored elements are restored and the form is one again bullet-proof, ready for another submission. What do you think? Cheers, Dave On Feb 1, 10:53 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > Dave Stewart schrieb

[jQuery] Re: Validation Plugin - Associate array naming with a single error label

2008-02-01 Thread Dave Stewart
Jorn, Here is a live example. http://www.janepatrick.co.uk/admin/test/associative.php Hopefully it's in your interest to examine this issue further! Many thanks, dave

[jQuery] Re: [validate] Validation Plugin - how to remove a control form validation

2008-02-01 Thread Dave Stewart
Hey Jorn, That's great! As you know I'm a big fan of the plugin :) You know I've written a whole load of cool helper stuff that works with validate. Perhaps I should email you, rather than using this agonisingly slow groups thing...? Let me know if that's cool. Did you see my other post about va

[jQuery] Re: [validate] Validation Plugin - how to remove a control form validation

2008-01-30 Thread Dave Stewart
Hi Jorn, Yup - here's a test page: http://www.janepatrick.co.uk/admin/test/login.php Submitting the form manually (as you said) just bypasses any validation, which is NOT what I want, as I still need the email address validated before it's sent to the back end to email the password... U

[jQuery] Re: changing content for span tag on the fly

2008-01-30 Thread Dave Stewart
$("#scrollStats").html('bold'); $("#scrollStats").text('text');

[jQuery] [validate] Validation Plugin - how to remove a control form validation

2008-01-30 Thread Dave Stewart
Hi there I'm building a login form, with a "Forgot password" link. When clicked, I need to unset some validation options to successfully submit the form. The code I'm running does this: 1 - remove the validation constraints from the password field 2 - hide any error messages that

[jQuery] Re: Parsing XML using jQuery

2008-01-29 Thread Dave Stewart
Thanks David and Tim, I didn't know that. Very useful.

[jQuery] Re: Google map plugin?

2008-01-29 Thread Dave Stewart
Hi Chris, The trick to Google Maps (for me at least) was getting to know the basics of the OOPness of it all. EVERYTHING (just about) is an object. You rarely pass values, you normally instantiate objects, then pass them. For example, in the example Bohdan gave, you would have to 1) create the

[jQuery] Re: Validation Plugin - Associate array naming with a single error label

2008-01-29 Thread Dave Stewart
I made a small discovery (in my sleep no less!) that works in HTML, but screws up the PHP: HTML: If I put the array properties in single quotes (the spaces are to make it clearer), the controls are validated as a group! This is good. PHP: However, the PHP also receives those single quotes, so

[jQuery] [validate] Validation Plugin - Associate array naming with a single error label

2008-01-28 Thread Dave Stewart
Hey folks, I often pass variables to the backend using associative arrays. However, I can't seem to associate the error label with the group as a whole, as in HTML Form terms, it's actually 2 separate elements, rather than array (which PHP sees it as). Associative Array Test At least one

[jQuery] Re: Parsing XML using jQuery

2008-01-28 Thread Dave Stewart
Not sure if this is the best reply, but in order to access the structure, it has to be part of the DOM, so best to inject in into a placeholder first: $('#placeholder).html(xml) // probably need to kill the xml declaration first Then you can use jQuery to traverse the tree. :D

[jQuery] Re: How do I stop the form control (but not the label) itself receiving the "error" class

2008-01-25 Thread Dave Stewart
Great stuff! In the meantime I'm looking forward to learning even more about your fabulous, time-saving plugin. Cheers! Dave

[jQuery] Re: [validate] using a different tag than for error messages

2008-01-25 Thread Dave Stewart
n override the error element like this. I've checked and it works great. But unless I'm mistaken, it's missing from the validation options documentation! Cheers, Dave On Jan 24, 8:35 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > Dave Stewart schrieb:> Hello, > >

[jQuery] Re: How do I stop the form control (but not the label) itself receiving the "error" class

2008-01-25 Thread Dave Stewart
Jörn, "highlight" does exactly what I want if I pass it an empty function, so that's great. How about adding the option to pass "null" or "false" for those times when you want to do nothing and just let the the error message take the strain? Cheers, Dave

[jQuery] Re: Scrollable image in a div

2008-01-25 Thread Dave Stewart
Pete, Great little plugin there! I've done teh same using vanilla JavaScript; have yet to convert it to jQuery but this is a nice insight. One problem (bug) is that you seem to have to click (then it freezes) then release to move around, then re-click to cancel. Do you know why the mouse handler

[jQuery] Re: using a different tag than for error messages

2008-01-25 Thread Dave Stewart
Hi MorningZ, I just did some quick Googling on the matter, and turned up this useful link: http://www.456bereastreet.com/archive/200711/use_the_label_element_to_make_your_html_forms_accessible/ "Each label element can only be associated with a single form control, while a form control may have s

[jQuery] Re: How do I stop the form control (but not the label) itself receiving the "error" class

2008-01-25 Thread Dave Stewart
Jörn, Thanks! That was what I wanted! A lot of jQuery plugins have so many options that sometimes it's difficult to see the wood for the trees. Thanks again for pointing this out Diego, thank you also for your input into this matter. Cheers, Dave

[jQuery] Re: How do I stop the form control (but not the label) itself receiving the "error" class

2008-01-24 Thread Dave Stewart
SORRY - the word [jQuery Validation Plugin] was supposed to appear in the title, but didn't. To restate the problem: When I validate a form using the jQuery Validation Plugin, when it comes across a form element that doesn't validat, it does 2 things: 1. Adds, or shows the corresponding error

[jQuery] Re: using a different tag than for error messages

2008-01-24 Thread Dave Stewart
SORRY - the word [jQuery Validation Plugin] was supposed to appear in the title, but didn't. Hello Diego, Sorry, it's a separate question, actually. I've re-stated the first post question to clarify things, so sorry for the ambiguity. To restate the problem: Using the jQuery Validation Plugin,

[jQuery] [validate] How do I stop the form control (but not the label) itself receiving the "error" class

2008-01-24 Thread Dave Stewart
Pretty much sums it up really. I only want the error label (of class "error") to be displayed, but not the class of the text box or such like to have it's class updated. Thanks, Dave

[jQuery] [validate] using a different tag than for error messages

2008-01-24 Thread Dave Stewart
Hello, I'd rather not use tags for my error messages, as I think s are less semantically ambiguous. Is there any way I can change the default functionality? At the moment I'm placing my own error s manually, but I can't get them to show unless I change them to s Help! And thanks very much. Chee

[jQuery] Re: pretty urls break my jquery app: how to adapt it ?

2008-01-24 Thread Dave Stewart
Hi Alex, Amazing project. I'd be interested to know more about the generative stuff. How are the particles generated? In Flash? Cheers, Dave

[jQuery] Re: getScript Safari fix

2007-07-11 Thread Dave Stewart
Whoops, forgot to mention, I had set up this page to test it: http://www.conciencia.net/Temp/IncludeTest.htm

[jQuery] getScript Safari fix

2007-07-11 Thread Dave Stewart
to dynamically load each listed file one after the other. It might be beneficial because it doesn't load the script for making jqModal work until it's needed. This might not be the best example, but it shows what it can do. /* * jQuery.include - A dynamic javascript/css loader plugin for jQu

[jQuery] Re: Safari Problems

2007-04-02 Thread Dave Stewart
Go to www.conciencia.net and click either of the two buttons underneath the calendar (Escuche/Vea el programa), the "Preguntas Frecuentes" link, or any of the links in the grey box further down on the page. I actually don't have Safari available to test this myself, but I asked someone to test it