If there is no need for the additional function you could always just
write it like so:
$(document).ready(function() {
$('a.taglink').click(function() {
var t = $(#tags);
if(!(t.val()) {
t.val(this.txt);
return;
}
var ss =
Please keep sending links as we want to have a nice list of
jQuery-powered sites for the jQuery web site.
http://www.100drine.be/blog/ uses jquery for the electronic postcards. If
you hover on any image in the content area, there is a big red button that
says send this picture as an ecard. The
On 1/13/07, Christof Donat [EMAIL PROTECTED] wrote:
Your code is really good for a jQuery beginner ;-) Just small improvements:
Thanks for the compliment and many more thanks for the *small*
improvements. Everything worked as you said and this was exactly what
I was looking for.
To clarify I
Hi,
This fails
Your parentheses are wrong. I just reformated your code and here is the
result:
$(document).ready(function() {
$('#getTags').click(function() {
$('#taglist').load('http://tarique.sanisoft.com/cheesecake/tags/taglist',
function() {
$('a.taglink').click(tagSelect);
Christof Donat wrote:
@Andrea: can you please check, if that was the problem for you?
Your test page works now :-)
But I still have the same problem...
Here is a zip file. After unzipping, there will be a new chili folder with
a test page and a subfolder. It works in FF1.5.0.9 but does
Gerry Tucker schrieb:
Hi all... again!!!
I know this is down to my only general knowledge of javascript but I'm
trying to use Jorn's validation plugin, and I assumed I would need to
use the form.js plugin as well.
My VERY simple problem is how to do this, because so far I have only
...why sticking to standards is good - microsoft is having the problems
they created:
http://blogs.msdn.com/iemobile/archive/2006/12/18/why-doesn-t-adobe-flash-always-render-for-ie-mobile.aspx
LOL, digg it!
http://digg.com/software/Microsoft_having_the_problems_they_created
Sorry for OT, I
Hi,
My problem now is how to get the value of text which is between a
/a of the clicked link, - now the scope of $(this) is different.
In the first case it work because $(this) was [a.taglink
cheeseCake...] but with the above $(this) becomes [Window
addphoto.html]
Hm, this sounds strange.
Ok. I give Up. I need to know the height of certain images in my page to be
able to format it and I've tried several workarounds like this function that
I call right before my verJustify() function (yeah, a function that lets me
justify vertically all divs in my page, just like the plug in):
/**
Hi,
Your test page works now :-)
Great :-)
But I still have the same problem...
Here is a zip file. After unzipping, there will be a new chili folder
with a test page and a subfolder. It works in FF1.5.0.9 but does not in
IE7. http://www.nabble.com/file/5620/chili.zip chili.zip
suppose we have some content to a page that gets loaded via AJAX in
response to some other event ... it looks like this :
input type=button id=some_new_button
how do I bind to this, in a simple way?
$(function() {
$(#some_new_button).click( function() { ... };
});
doesn't work because the
I'm looking at
http://jquery.bassistance.de/jquery-getting-started.html#rate
where it says:
SNIP
A very common problem encountered when loading content by AJAX is
this: When adding event handlers to your document that should also
apply to the loaded content, you have to apply these handlers
Jonathan Sharp schrieb:
I finally got around to finishing the pages and packaging the plugin
last night. Enjoy!
http://jdsharp.us/code/jQuery/plugins/jdMenu/
Great to see an update to this plugin!
Have you considered or tried an event delegation approach? That is,
assign the click
Steve Owsinski schrieb:
Hey everyone,
I recall a while back that jQuery was stated as compatible with IE
5.5. I see on the new docs.jquery.com wiki that it has known
problems. Is there a place that documents any of these issues?
Primarily, I'm wondering if most of the basic functionality
adding the compatibility plugin from here
http://jquery.com/dev/svn/trunk/plugins/compat-1.0/jquery.compat-1.0.js?format=txt
solved thew problem.
thanks
stefan
try to use jdMenu with jquery-1.1b.js i receive an error:
$(this[0]).ancestors is not a function
in jquery.jdMenu.js (Line
thanks ... this still isn't making any sense to me though.
the docs say that load
Bind a function to the load event of each matched element.
IOW ... it doesn't actually load anything - it causes some function to
get executed each time that element finishes loading.
I believe the online docs
the docs say that load
Bind a function to the load event of each matched element.
But if you notice, the docs indicate there is more than one load
function. The one you're quoting is a bind for the load event.
You're invoking a load action directly for which the docs say:
Load HTML from
Yup, that would be it!
Using 1.1a on my test site. Updated to 1.1b and it's working!
I was under the impression that these methods would be removed and replaced
wholly with their respective parent methods like css().
So, would the following be acceptable, do you think? ::
$('#myButton').click(function() {
$('#myTarget').load('myfile.html' function() {
alert('my callback');
});
});
The above says: when myButton is clicked, load myfile.html into
myTarget and alert me when it's done.
And then you can rebind any event handlers you want, but
.height() is also a setter and defaults the unit to pixels if not
provided. So you can do it like this:
$(div#content).height( $(#content).height() );
--
Brandon Aaron
On 1/13/07, Dan Atkinson [EMAIL PROTECTED] wrote:
Yup, that would be it!
Using 1.1a on my test site. Updated to 1.1b and
Lol! Yes, that would make sense!
Thanks for the responses on this.
Brandon Aaron wrote:
.height() is also a setter and defaults the unit to pixels if not
provided. So you can do it like this:
$(div#content).height( $(#content).height() );
--
Brandon Aaron
On 1/13/07, Dan Atkinson
On 1/13/07, Mike Alsup [EMAIL PROTECTED] wrote:
the docs say that load
Bind a function to the load event of each matched element.
But if you notice, the docs indicate there is more than one load
function. The one you're quoting is a bind for the load event.
You're invoking a load action
Olaf Bosch schrieb:
Good, new version for testing. I have found a way to check Favicon
exist. Than change the path. Look at:
http://olaf-bosch.de/bugs/jquery/links5.html
JQuery, the second Link have no Favicon, cuesrc is changed, see
alert. What is to do that this works as global in the
I am not total sure I understand what your asking, but it sounds like you
want the link to load a page into a certain part of your current page, in
other words, you have an html page that you want to load into another html
maybe using ajax? if this correct, check out the $.ajax function with a
Hey Dan,
Glad that worked. You're right: the plan was to remove all of these
shorthand methods and replace them with .attr() or .css().
But it was later determined that height() and width() are just too
convenient to get rid of, especially when we want to use its value in
some sort of a
Was curious if anyone had seen anything like the photo notes on
Flickr and Facebook, where you can associate some metadata with a
specific rect over an image. e.g. http://www.flickr.com/photos/
malingering/197630061/in/pool-ihatestupidpeople/ (mouseover the image)
Not sure what these are
One way to do it:
$(#table tr).each(function(){
$(this).find(td:eq(2)).dosomething;
});
Does anyone have a quicker way to do it?
Jacky-10 wrote:
Dear all,
If I want to select the 3rd column of the table, (e.g. 3 rows)
$(tr td:eq(2)) would returns only one td.
$(tr).find(td:eq(2))
Is .each redundant?
Does .find support functions like this?
$(#table tr).each.find(td:eq(2))(function(){
$(this).dosomething;
});
Jökull wrote:
One way to do it:
$(#table tr).each(function(){
$(this).find(td:eq(2)).dosomething;
});
Does anyone have a quicker way to do it?
You actually can do it this way:
$('trtd:nth-child(3)');
The reason why eq(N) returns just one, is that you're telling it grab the
nth one you find out of a set.
The code I pasted above grabs the nth CHILD of the tr, so it will return
what you want.
Hope that helps :)
Jacky-10 wrote:
Dear
Greetings.
I'm trying to get a list of forms from a DIV where the form's done input
is set to 1 or 0 .
Why does this code throw an error (this.done.value has no properties) ?
var myForms = $('.actionForm', myDiv).filter(function(){
return this.done.value==1 ;
});
I can get the
this is this here and that there!
inside the each, this is a element.
inside the filter it's the jq object that contains all your actionform
classed items inside myDiv.
On 1/13/07, bmckenzie [EMAIL PROTECTED] wrote:
Greetings.
I'm trying to get a list of forms from a DIV where the form's done
I hope I got the filter right... I looked back at some of my similar code,
jQuery.fn.randomOne=function(){
return this.eq( Math.floor(Math.random()*this.length));
}
is a simple plugin to get (in my case) one random element and this
is the jq element.
On 1/13/07, Ⓙⓐⓚⓔ [EMAIL
At ShockSMX's request and with John's help, I've created a plugin which
traverses the DOM in natural/onscreen order. It's my first plugin, so let me
know if you find any bugs or know what would make it more useful. (For
example, would you like me to accept a parameter which skips hidden nodes?)
Rigent wrote:
You're not setting the done input to 0 or 1 because you have the double
'=' in there, it should be:
return this.done.value = 1;
Actually, I want a collection containing the forms where the field done
has already been set to 1.
B.
--
View this message in context:
So, if div id=container is 500px tall:
-- $('#container).css('height') == 500px
-- $('#container).height() == 500
Oh, and thanks to Brandon for mentioning about .height() being a
setter, too.
In addition to that, css() converts any values given as Numbers to
Strings, so you can do
bmckenzie schrieb:
So I guess this depends on what the meaning of this is, eh?
The filter(function) needs jQuery 1.1a+ to work correctly. Older
versions accept the Function, but apply different scope and different
arguments.
I suspect that this is the reason why it isn't working, I can't
Hi, I'm just starting to use jQuery and, while I'm not much of a coder, I
love the way it works. I was developing a project using the Prototype
library, but after discovering jQuery I'm converting everything. I'm finding
it straightforward but I have a request for a clarification on something.
I
Kush schrieb:
Any ideas, why it happens when you place it inside another div for
example.
Your selector is not right, try
$('#container').Sortable(
--
Viele Grüße, Olaf
---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---
Silly me, thanks heaps Olaf
That fixed the problem :)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Olaf Bosch
Sent: Sunday, 14 January 2007 2:01 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Interface : 'sort floats' problem
Kush schrieb:
Any
function checkState(id) {
if ($(id).className == something) { etc
Use the is method:
$(id).is(something);
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
On Jan 13, 2007, at 9:52 PM, Miles Storey wrote:
Hi, I'm just starting to use jQuery and, while I'm not much of a
coder, I love the way it works. I was developing a project using
the Prototype library, but after discovering jQuery I'm converting
everything. I'm finding it
Thanks! I didn't know that existed, I assume it returns boolean. That's
great!
Cheers
On 1/14/07, Mike Alsup [EMAIL PROTECTED] wrote:
function checkState(id) {
if ($(id).className == something) { etc
Use the is method:
$(id).is(something);
On 1/14/07, Karl Swedberg [EMAIL PROTECTED] wrote:
Is id an ID? If so, you could use $('#id.something') and chain
whatever methods you want onto it.
The code that sets the event and function call is:
$(#options).find(a).click(function(){checkState(#+this.id)});
If there's a better way to
a bit clunky! just pass in this! and let checkState do the dirty
work... if it is actually needed!
On 1/13/07, Miles Storey [EMAIL PROTECTED] wrote:
On 1/14/07, Karl Swedberg [EMAIL PROTECTED] wrote:
Is id an ID? If so, you could use $('#id.something') and chain
whatever methods you
44 matches
Mail list logo