Michael E. Carluen wrote:
I am curious as to what might be the advantage of using your overlabel
plugin versus a much shorter script like the one below?
I posted your suggested code at
http://scott.sauyet.com/Javascript/Demo/Overlabel/test.html
and a simple version of mine at
Giant Jam Sandwich wrote:
Well, I have vastly improved this script. It was my first plugin for
jQuery, and after creating a few others, I decided to go back and make
some edits on this one. You can find the demo here:
http://reindel.com/blog/src/jquery_truncate/
Nice!
An interesting variant
Diego A. wrote:
Fixed the bug and re-packed the script.
Looks great to me. If you're looking for things to do on it, it would
be nice if the text File selected for upload: and the text Remove
this file from selection were configurable.
The only other thing I might consider with this,
Fabien Meghazi wrote:
Maybe I should fill a bug so jquery devs can take a look at this.
It is a bizarre one. My little brain can't see anything to cause this;
maybe some of the experts can. Perhaps more demos are in order, but I'm
not sure what more to even try.
Good luck,
-- Scott
Yansky wrote:
I'm having some trouble figuring out why this isn't working:
$(links).each(function(i){
$.get(i, function(data){
var trimmedToList = $(data.slice(data.indexOf('\div
id=media'),data.indexOf('\div class=description'))).html();
(This is addressed to Jörn, but everyone should please feel free to
comment.)
Jörn,
I know you're probably quite busy with the autocomplete plugin, but if
you have a minute, I'd like to suggest a tweak to your tooltip plugin.
There is a not-yet documented option called bodyHandler(), which
Sean Catchpole wrote:
[ ...]
add = function (a) { return function (b) { return a+b } }
Now I can call add(3) and it will return function (b) { return 3+b }
[W]e can now call add(3)(7) and it will return 10.
And more to the point, you can store and use the function returned by
the call to
Sean Catchpole wrote:
However, this can only be done through a tedious declaration of the
function (all those return functions)
and then the (arg1)(arg2)(...) format isn't the best. So I've been
working on a curry function that will change any function in a curried
one. I'll post it on the
Geoffrey Knutzen wrote:
How can I test if an element has a specific class?
If I have
div class=foo bar
How can I check if the element has class=bar
$(#myDiv).is(.bar);
For all the great documentation JQuery has, some things are hard to
find. This is at
I wrote:
I don't know if I'm alone, but I think a plain alphabetic list of
functions would be a good addition to the docs.
Never mind. Just looking a little further,
http://docs.jquery.com/Alternative_Resources
-- Scott
Mei Gwilym wrote:
Why bother with javascript? Html will do it for everyone:
I believe the OP wanted the checkbox changed with a click anywhere on
the TR that contained it. The label is a good idea in general, but this
is something beyond that.
-- Scott
Howard Jones wrote:
Having just made my first real piece of jQuery code, I'm already
wondering if it can be made more concise :-)
[ ... ]
$('input:[EMAIL PROTECTED]').each(
function() {
var myid = $(this).attr('name');
$(this).parent().parent().click( function(event)
duggoff wrote:
I've gone through the tutorial for Quick and Dirty Ajax (http://
15daysofjquery.com/quick-and-dirty-ajax/14/) and I'm having a problem.
I have a php file that queries a database and returns a populated
table. If I call it from my browser like this: camp_table.php?
Title=Campname
Christopher Jordan wrote:
I should have mentioned that $group.options[index] was the first syntax
I tried. FF handles both. IE produces the same error for both syntaxes.
I've never seen that. It looks like a useful short-cut if it's
supported everywhere.
Any other thoughts?
I'd like
Nathan Young -X (natyoung - Artizen at Cisco) wrote:
If I understand your problem statement this is something I'd currently
solve using closures, is there a way that using currying is
fundamentally different or is it a different way of thinking about the
same problem?
At the risk of
Rick Faircloth wrote:
Is there a fool-proof way to determine if a user has Javascript
enabled in their browser?
From the server side? No. From the client? Just try it.
Often, the trick is to make the site function reasonably even if JS is
off. One ugly technique that I've used on
,
-- Scott Sauyet
Rick Faircloth wrote:
The simplest
thing is just to add a post parameter that says ajaxOn=true or some
such, then check for that server-side. It wasn't included in the HTML,
or it was set to false, so if it's true, the server knows to respond
with an AJAX request. It's pretty
Brian Cherne wrote:
jVariations is a developer tool that generates a control panel (with
checkboxes and radio buttons) to show and hide variations (aka corner
cases) in a single HTML template.
This is a very nice little tool!
One thing that would make it more useful for me would be to hide
lacroix1547 wrote:
[ ... ]
I tried to made a trivial ( or gory I am not sure anymore ) dom query
system with such dom static analysis to be used allong jquery. Nothing
very serious but results were there. Everything looked instantaneous.
This is very interesting. Is it something you can
Kelvin Luck wrote:
I'd like to announce the beta release of v2 of my datePicker plugin for jQuery.
This release is a complete rewrite which makes the date picker considerably
more powerful and flexible than it previously was. Check out the temporary
project page:
I don't know why this didn't show up on the list. I sent it hours ago...
Mike Alsup wrote:
I decided to make this a more polished plugin. You can find the new
version here:
http://malsup.com/jquery/gfeed/
Very nice!
One minor bug: you're max value is going to get ignored if it's
sam wrote:
How do I then run the $(document).ready() function on *only* this new
div that has been inserted into the DOM? If I rerun the entire $
(document).ready() function, the original alerters will have the
click function bound twice.
There is a optional context to the $() method;
Rick Faircloth wrote:
I think I may try the AJAX solution, partly because I just want to get
more experience with AJAX and mostly because it seems to be the
best solution.
It's not that much harder client-side than the others. But there really
is more work to do on the server...
Wait, I
Mario Moura wrote:
select id=edit-taxonomy-1 class=form-select name=taxonomy[1]
option value=0none/option
option selected=selected value=1820services/option
option value=1839Products/option
I am trying find the option that have selected=selected of course is
very random in many inputs.
This
Ariel Jakobovits wrote:
instead of embedding the $(document).ready code in your pages, create
Javascript classes for each page that receive as an argument a container DIV
that after they make the AJAX call for the page they are responsible for, they
put their content into.
Then, when that's
Aaron Heimlich wrote:
Well, DOM2 does define Mutation Events[1], which seem to be what
you're looking for, but I dunno how many browsers actually support them.
You could trigger custom events inside append(), prepend(), etc., but I
dunno how well that will run.
They don't seem well
bingo wrote:
I am jquery for now almost 3 months. But, one thing I am not able
still figure out. This is more for a user convience. I want to let
user know which divs will be updated after certain action. For this, I
want to show a spinning wheel on the div that will be updated. But I
am not
I wish there was a way in CSS to say div.foo *AND* div.bar {color:red}
The comma acts like an OR statement. Why isn't there an AND statement?
div.foo.bar {color: red}
Rey Bango wrote:
I wanted to thank jQuery team member, Karl Swedberg for his invaluable
assistance in getting the jQuery.com site up and running during our
previous host's less than business-like termination of the hosting service.
Thanks Karl! And thanks John!
I'll bet it wasn't just
cesare wrote:
I am trying to parse the content of a flickr feed like this:
http://www.flickr.com/services/feeds/photos_public.gne?tags=colorfulformat=rss_200
$(item).each (
function() {
var titleTag = $(this).find(title)[0];
var
bingo wrote:
I think this will work...but the problem is some of the libraries that
I am using do not provide callback functionality..but definitely for
most ajax stuff this will work..
If they do not provide callback functionality but do some asynchronous
processing, there seems little you
Rodney Finn wrote:
Can I permanently post a JavaScript text node to a wabpage?
I'm sorry. I don't understand the question. Can you elaborate (and not
just with some JS source code)?
-- Scott
wyo wrote:
I've a form with serveral submit buttons which should call quite some
different functions. Is there a way to overwrite the URL depending on
the submit button, calling separate server functions or do I have to
separate them on the server?
You could easily do this in JQuery, but then
Andy Matthews wrote:
http://www.commadelimited.com/clients/haven/atkins/floor-plans.html
On this page, if you click any of the olive colored buttons on the left,
you'll see the text slide to the right as an indicator for which floor
plan is active. It also slides any other active item back
I think this would do it. The original code is starting with 0
intentionally. It's not hard to switch to starting with a random one:
} else if ( settings.type == 'random' ) {
// add this:
var first = Math.floor ( Math.random ( ) * (
elements.length )
Gordon wrote:
Now elements such as divs can contain more child nodes, or plain text,
or a combination of both. What I need to know is how to get at the
text of a div with a mixture of text nodes and other HTML elements.
Doing $(element).text returns all the text in the child elements as
well,
Karl Swedberg wrote:
I've been toying around with a new version of the jTip plugin, which was
originally created by Cody Lindley. [ ... ]
http://test.learningjquery.com/jtip/
Excellent!
Two suggestions: First, on the documentation page, it would be nice if
all the examples showed the HTML
/2uhkxt
http://www.appelsiini.net/~tuupola/javascript/jEditable/
http://davehauenstein.com/blog/archives/28
I've never seen anything specific to tab titles, but I don't think that
will likely be any issue, unless there is some unlikely conflict with
your tab plugin.
Cheers,
-- Scott
Sean Catchpole wrote:
I really like json, and the ability to recognize arrays is great.
However, there is strength of xml in that order can be preserved. I
can not think of a way to implement this in json. Is it possible and I
am simply blind to the truth?
XML:
pbTitle/biSubtitle/ibAuthor/b/p
tlob wrote:
Hy there.
I'm pretty new to jQuery and JS in general. I managed to build
something. I learned a lot! THX jQuery guys. When you look into my
code, could it be shorter, smarter, sharper? especially this part:
[code]
$(document).ready(function(){
Gordon wrote:
In reflection, I think what I need is a queue into which classes of
animations can be inserted. All the animation events in a class get
executed together, but each class in the queue is executed one after
the other. Maybe something like this:
animQueue.addClass ('hideClass');
Rodrigo Moraes wrote:
I have a problem with Thickbox contents not being loaded when the
trigger is set dynamically. Here's an example: [ ... ]
Any clues why this is happening?
Sorry, I've looked at it a bit, and have absolutely no idea. It is very
strange. Sorry to have nothing to offer;
mrcarxpert wrote:
It's been a long time since I've posted anything. I've been busy, but
I did manage to squeeze out another plugin before my vacation.
I'm proud to announce the first Beta of my a href=http://
digitalbush.com/projects/watermark-input-pluginWatermark Input
Plugin for jQuery/a.
[EMAIL PROTECTED] wrote:
Sorry, I've got it now:
No need to be sorry. Glad you got it. The original culprit was probably
if (pos = left) {
which should read
if (pos == left) {
(an extra equals sign.)
Cheers,
-- Scott
Angelo Zanetti wrote:
Its very difficult for me to give you a link because you have to
unfortunately login to the system. Maybe I can expain clearly what the
script does. [ ... ]
This is unlikely to be enough information to allow the community to
help. It's difficult to help without a live
Angelo Zanetti wrote:
I agree and understand that you need something to look at, I have save
the page source and uploaded it here:
http://www.zlogic.co.za/jQuery/jQueryProblemIE.htm
I get the same behavior in IE and FF. One issue is that you're pointing
to JQuery on a local domain:
Chris W. Parker wrote:
As a humble user of jQuery and several great plugins I would like to
request that anyone who releases anything to the public always insert
the version of the release in the filename.
I don't have a major problem with this, as I would simply strip the
version number out
Andy Matthews wrote:
Is there documentation about jQuery ( API jQuery) available in other
formats besides HTML?
Yes.
www.jquery.com/api
And many other options are available at:
http://docs.jquery.com/Alternative_Resources
Cheers,
-- Scott
John Farrar wrote:
The XML page [www.jquery.com/api - SDS] cannot be displayed
Cannot view XML input using style sheet. Please correct the error and
then click the Refresh javascript:location.reload() button, or try
again later.
Gareth Hughes wrote:
Is there a way of writing the functions so they work on items that are
appended to the page by jQuery? Another approach perhaps?
There's a good tutorial here:
http://docs.jquery.com/Tutorials:AJAX_and_Events
Cheers,
-- Scott
Gareth Hughes wrote:
http://docs.jquery.com/Tutorials:AJAX_and_Events
Many thanks Scott, that's done the trick. I've had to double up on my
functions (once inside the document.ready and once outside) but that must be
the way my code is structured.
Did you read the tutorial all the way
[EMAIL PROTECTED] wrote:
Go to : http://mootools.net/slickspeed/
Why is jquery so slow ?
This has been discussed a great deal this week, especially in these threads:
http://tinyurl.com/yoekz5
http://tinyurl.com/2x9dbf
http://tinyurl.com/2axcxq
Fundamentally, the answer is that
Gordon wrote:
Is there a way I can get the #selector style syntax to work on XML
files?
I don't think so. From the CSS specs [1]:
Note. In XML 1.0 [XML10], the information about which attribute
contains an element's IDs is contained in a DTD. When parsing XML,
UAs do not always
Brandon Aaron wrote:
Sorry I don't have the answer but the bgiframe is primarily to fix
z-index issues in IE with select elements.
That's what I thought, and because the select items were the dominant
objects showing through, I started by trying to use bgiframe. I'm
starting to think that
Okay, I've been staring at this too long now... help!
I have a div that is in-line when JS is off. With JS on, JQuery
unobtrusively hides the div, inserts an external link and a close button
to toggle it on and off. It works fine everywhere except in IE. I've
tested FF2, OP9, and SF3, all
[re: http://scott.sauyet.com/issues/2007-06-15a/]
Karl Swedberg wrote:
hey Scott,
that looks like a nasty ie6 bug.
I keep thinking that it's just me. But I've been racking my brains
trying to figure out what I've done wrong. In some sense, knowing that
FF, OP, and SF are much closer to
Sean Catchpole wrote:
Scott, the problem is the form (quick-buy).
If I put other elements there (instead of the form), they render just fine.
I'll play a little more with it, but consider wrapping the quick-buy
form in creative ways.
Damn, I just caught that too. I this minute saw that the
Dan G. Switzer, II wrote:
I think this problem is due to some of your CSS background-color
declarations. I've seen problems using background-color: inherit; before
similar to this--where it essentially makes the background color
transparent.
Thanks. I have seen those issues before. There
Klaus Hartl wrote:
As a member of the welcoming committee, I'm pleased to announce that
we have sent you [ ... ] a 5-page, 4-color
instructional brochure detailing the secret jQuery Team handshake.
Hey, i didn't get that ;-)
I had to learn the handshake all alone...
As all true members
John Resig wrote:
Special thanks to Mike Hostetler for the hours of work he put in to
get the repository off to a great start.
Check it out at: http://jquery.com/plugins/
It looks great. It was very easy to use, and it looks like it will be
very useful.
One quick question: I don't have
Matt Conrad wrote:
I'm trying to find the cleanest way to get the position (x, y) of a
table cell that is clicked. I'll eventually post the coordinates back
to the server.
By (x, y) you mean (row, column) right, not pixel measurements? That's
what the code seemed to attempt.
Without a
Rui Costa wrote:
thanks, but i put your sentece into an alert command, and de alert
window don't opened. if remove [0] the alert window shows undefined.
Any other option?
Do you have a test page available? It works for me:
http://scott.sauyet.com/test/JQuery/Tests/ParamFromObject.html
G[N]Urpreet Singh wrote:
I cannot remove the parent of an element in IE6. The behavior in IE6
is that only the first of the parents is getting removed and then it
stops working.
[ ... ]
divThis is div 1 span id=trashDel/span/div
divThis is div 2 span id=trashDel/span/div
You
Rui Costa wrote:
http://www.mobiliarioemnoticia.pt/wmv/testemunhos.asp
i add 2 buttons. click them.
Can you try this inside an HTML page? I have no idea how JQuery is
supposed to act when there is no HTML, tag, no BODY tag, etc. I don't
see anything wrong other than that, but that may be
i need to access to DATA parameter at the OBJECT tag.
$(#mediaPlayer)[0].data
Rui Costa wrote:
well, at the right side of the wmv video, there are a list of videos,
and i need to click, and change de source of the video and start to
play,
I have no experience with embedded media. You might want to check out:
http://jquery.com/plugins/project/media
Another
Rey Bango wrote:
Dan Atkinson wrote:
I for one believe that the debacle of the new comments system is the
worst possible advertisement for jQuery. [ ... ]
Dan, the comment system issue has nothing to do with jQuery. I've
verified this with one of their developers.
It's still not good
Rey Bango wrote:
Scott Sauyet wrote:
Rey Bango wrote:
Dan Atkinson wrote:
I for one believe that the debacle of the new comments system is the
worst possible advertisement for jQuery. [ ... ]
Dan, the comment system issue has nothing to do with jQuery. I've
verified this with one
JoshN wrote:
I'm using TortoiseSVN, and I'm an SVN noob so bear with me...
I tried to import from here:
http://jqueryjs.googlecode.com/svn/trunk [ ... ]
This is probably just a terminology issue.
Import to Subversions mind, means loading initial data into the
repository. If you want to
zarino wrote:
Is it possible to use jQuery to choose an extract of HTML (for example
one div out of a possible ten to choose from) and insert it in a page?
It's doable. Check out http://tinyurl.com/fspg5 for information on
using Javascript's implementation of a random() function.
But this
Glen Lipka wrote:
Scott, I can think of a couple reasons for this.
Let's say you want to scroll some facts or quotes or customer testamonials across the screen, but you also want to start at a random one.
That sort of thing. Or scrolling images.
Oh, I can see plenty of reasons for
zarino wrote:
How come the javascript governing which file-name to choose isn't
working? Also, does the path in the jQuery .load event have to be
relative to that javascript file, or the 'parent' html file?
The path should be relative to the HTML page, not the Javascript.
If that doesn't
zarino wrote:
Hm... I've made the path relative to the HTML file, but it still
doesn't work.
My fault. Try:
var fact = facts[Math.floor(facts.length * Math.random())];
not var fact = facts[Math.floor(facts.size * Math.random())];
-- Scott
zarino wrote:
Excellent! That was it. It all works brilliantly now. :-D
As a side-note: Am I being really picky here, or could the contents of
facts.js and custom.js be combined into one file? Seems a shame to
have a whole separate javascript file containing just one line of
code.
That would
Allan Mullan wrote:
Hmm yeah, I got fooled too! :-S
Rob Desbois wrote:
I feel very stupid for clicking on that :-( I was expecting some
super-excellent jQuery usage.
Oh well, back to work...
On 6/28/07, *Brandon* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
So did I. Maybe because
aDeviKreates wrote:
I can get this to work halfway, showing the group of Products and when
I click on the Product it does display the list of Categories for that
Product. However, I am stuck here. I cannot get it to when I click
on the Category this list of items is displayed.
Do you have a
aDeviKreates wrote:
Unfortunately, I don't have a live site to look at. This is an
intranet site right now. Is there any other information I can provide
that might help?
I can't tell enough from the code supplied. Probably the best bet would
be to create as simplified a test version of
Jacques Jocelyn wrote:
Thanks Scott for your insight, It worked fine.
Great.
I have to agree with your opinion on JS not working, but here I don't
think I will have a choice, the entire apps is built on Ajax...
Up to you, of course, but I always try to provide the necessary
DXCJames wrote:
I am building a app that has a lot of $.posts so it requires me to
rebind alot.. for some reason i have an infinite loop in IE but not FF
and i cant figure out how it happened.. anyway.. do you think instead
of binding functions to the locations, just using onclick= and just
To expand on this just a bit, Shelane used what is perhaps a cryptic
syntax here.
$(function() {
// ...
});
could also be written
$(document).ready(function() {
// ...
});
So the code inside this function will now be run when the document is
ready, i.e.
[EMAIL PROTECTED] wrote:
Is it a fact that dynamically created content cannot trigger JS events?
No. The problem is that the binding is done on specific items and not
on some abstract class of items. When you later add items, they don't
have your particular bindings associated with them.
backflip wrote:
I'm using the following code to style a table:
$(table.xy tr:nth-child(odd)).addClass(odd);
But before doing that I'm hiding some rows:
$(tr#xy).hide();
Now the zebra pattern isn't working any more (it's an abnormal zebra), of
course. How to apply the zebra-stuff just to
Sean Catchpole wrote:
[ ... ] http://www.sunsean.com/cssAnimate.html [ ... ]
I think this is an interesting idea. Perhaps jQuery should apply a
unique class to the elements it's going to animate, then manipulate
the css instead of the dom.
This is an interesting idea. But I see one major
Sean Catchpole wrote:
You bring up an excellent point. However if we can temporarily create
a unique className (say jQueryAnimation+timestamp) for the duration
of the animation, then specificty won't be a problem.
I don't want to discourage you from trying, but I think it's more
complicated
Remy Sharp wrote:
Since it's Friday - here's something I made for fun with jQuery:
Okay, we're now expecting something this cool every Friday!
This is wonderful! Thank you very much for sharing.
-- Scott
Jeroen Coumans wrote:
On Jul 5, 9:56 pm, Scott Sauyet [EMAIL PROTECTED] wrote:
I don't want to discourage you from trying, but I think it's more
complicated than this. Specificity has to do with the number of id's,
the number of classes (and pseudo-classes), and the number of elements
[EMAIL PROTECTED] wrote:
I need to be able to grab attribute content staight from XPath in the
form of //[EMAIL PROTECTED]'imageClass']/@id would return the ids of anything
with the class name imageClass. I have not got the reg exp knowledge
to do this myself.
I doubt this is likely to be
Sass wrote:
Tell me please, is it possible to build site likehttp://www.left-or-right.com/
with using jquery and ajax.
yes its possible! [... ] But not in 5min [ ... ] You need a DB
(to store Date), PHP (to read the DB), HTML, CSS, JS [ ... ] You
can start here:
Brian Cherne wrote:
I've recently updated my jVariations plug-in (not sure if anyone was
using the old version). It is a developer tool that allows you to toggle
variations (aka corner cases) on a single HTML page. Useful for rapid
visualization of code changes... before weaving in the real
Who's doing the Manning jQuery in Action book? I've just been asked
to do a technical review.
-- Scott
John Resig wrote:
On 7/12/07, Scott Sauyet [EMAIL PROTECTED] wrote:
Who's doing the Manning jQuery in Action book? I've just been asked
to do a technical review.
Umm - I have no idea! Yehuda has been working on jQuery Quickly - is
this book different from that one?
On 7/12/07, Scott Sauyet
Two questions I had when starting with jQuery, and glancing through the
API docs, I still don't see them documented (maybe in a tutorial?):
(1) How do you select an element by its ID?
(2) How do you select all elements given a CSS class?
This leads to an interesting documentation question:
Richard D. Worth wrote:
New wiki page:
http://docs.jquery.com/Frequently_Asked_Questions
This is great! I think there should be a link to this from the Getting
Started list on the documentation page. I don't have authorization to
edit the Main Page or whatever template is used, or I
Richard D. Worth wrote:
http://docs.jquery.com/Frequently_Asked_Questions
This is great! I think there should be a link to this from the
Getting Started list on the documentation page.
I don't know if you saw, but there is a link on that page (as well as
the left sidebar - all pages).
azzozhsn.net wrote:
I think we can customize JQuery. I mean drop any function, class or
method we don't use.
Other responses have (correctly) questioned the need for this. But if
you want to know how, John Resig posted a message on a similar thread
not long ago:
Mitchell Waite wrote:
This looks better on a big screen but do I have this right?
http://www.whatbird.com/wwwroot/images/addClass.gif
The description of the Javascript is pretty good. Dan had some good
suggestions of how it might be done better, but your exposition of
what's happening
Glen Lipka wrote:
Some styles dont work on the TR.
Like font.
That's why I always use the TD, just to avoid that misstep.
I wasn't critiquing the CSS, just the exposition of it.
You are right, though, about some horrible CSS table implementations.
-- Scott
skatta wrote:
i simply want to do this ...
$(#mydiv).prepend(Hello There).show(slow);
it shows up, but without the 'show' effect
Your show is applied to #mydiv, which is presumably already visible,
and so it has no effect. You might try something like (untested):
$(spanHello
skatta wrote:
scott, i think that was it ... i also had some issues with my order of
effect events. only problem is now ... liek prepend is great, if i
want to remove the content i can't ... remove() seems to give it a
display:none attribute ... i want to dump it from the DOM 100%
remove
1 - 100 of 315 matches
Mail list logo