> Where can I find more about those plugins?
This search turned up jScrollPane, looks like that is what you want.
http://lmgtfy.com/?q=jquery+scroll+plugin
> One issue keeps nagging me
> though, and that is how to deal with private functions in a
> powerful yet elegant manner.
I'd recommend taking a look at the way the jQuery UI folks did it. You
can get the gist of it from ui.core.js. I didn't really appreciate
their design choices until I started
Google is hosting the file now, you could get it from there:
http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js
Ticket created: http://dev.jquery.com/ticket/5822
> In 1.4 the built in live() function has been heavily extended, so
> perhaps you can switch to using that instead?
Agreed, but I think livequery should still work. The error posted
there is in blockUI and not livequery anyway. Jon Bennett, can you put
up a simple page that is a complete test case
> I've been using LiveQuery a fair bit in my projects, I've just tried
> updating to 1.4, and it appears to have broken it.
Can you post a link to the simplest test case that shows the problem?
It is probably a simple fix.
The official forum will at http://forum.jquery.com/ so you might want
to head over there and look around. This Google group will be around
for a long time and you're free to post here, but at some point we'll
turn moderation off and within a few weeks it will most likely be
overrun by spammers.
ht
> It works. Is there any documentation on this protocol?
Hey, Google always has something. :)
http://en.wikipedia.org/wiki/JSON#JSONP
The reason jQuery uses a random number there is so that multiple
requests can be in progress at once and will get separate functions to
run on completion.
Do you have a link to your leaking test case?
If you're really stuck, you could try copying the clone function from
1.3 into 1.2.6.
Is #thing a THEAD or TBODY tag? That would be the only valid place to
append a TR.
When the button is clicked, set a variable to the current time and
return false from the handler to cancel the submit. When your ajax
completes, do a settimeout for the difference between the variable you
set and the min length of time you want to show the blockui. When the
settimeout fires it can
> Am I missing something?
Well, *we're* missing something, like the markup that goes with the
code. Can you point to a sample page maybe?
Is #CalendarBody the TABLE tag? If so, you should be appending a THEAD
or TBODY tag to it.
Instead of returning HTML fragments, you might want to return JSON
> $('t...@class^=child-]').hide().children('td');
Get rid of any @ for attribute selectors. In jQuery 1.3 we went to css
standard syntax, which does not use the @.
I think document.title works on all browsers.
Ajax nearly always uses UTF-8 encoding. Can you switch to UTF-8 for
the page and server?
> I would think the submit button data would also be included when doing
> $(form_obj).serialize()?
When you submit a form manually, the value of the submit button
clicked is sent as part of the form. If you serialize the form using
Javascript, no button was clicked so none of them are serialized.
There should be an announcement of another beta within a few days. The
stack overflow has been reported/fixed.
To be sure, you're talking about this plugin?
http://plugins.jquery.com/project/color
The plugins site is due to get a redesign for the jQuery 1.4 in
January and I think that will help some of the plugins that have been
neglected. Maybe we can get some people to adopt the plugins that seem
to be
> var o = $("#original-fields"), n = $("#new-fields");
> if (o != n) { // <-- BRICK WALL
> someAJAXFunctionThatSavesTheFieldsThatChanged();
> }
> How can I compare the #original-fields data with the #new-fields
> data? As it is, the two always differ; I assume this is because they
> are diff
> For some reason, it seems that the .focus() method (at least how I'm
> using it) isn't properly setting the focus to what I'm specifying.
Yeah, I think that may be broken, it's already been reported.
http://dev.jquery.com/ticket/5652
> ok, I've used some code I had lying around and put dummy content in
> there:http://www.tnt.be/bugs/jquery/moovsjquery/
>
> I actually don't really see a difference on my Ubuntu box (using FF
> 3.6b4), but there's a huge difference on a colleague's G4 (OS X 10.4,
> Firefox 3.5.5), so try to find
> I refrained from replying because the OP seemed trollish, but he has a
> point, IMHO.
It would be great if someone who knew both frameworks could set up a
page that demonstrated a side-by-side case where Mootools has smoother
animations than jQuery. Otherwise it's hard do know what might be
caus
> My Servlet return json string generated with json-lib... for example:
> {"descrizione":"Questa è la descrizione del
> computer","disponibile":false,"id":1,"nome":"Computer","prezzo":
> 123.456}
Is this just a formatting issue, or is there really a newline in the
string "Questa è la descrizione d
If the table is really big it might be better to use event delegation:
$('table').click(function(e){
var $td = $(e.target).closest('td'),
$tr = $td.parent(),
pos = $tr.children().index($td),
$up = $tr.prev().children().eq(pos),
$dn = $tr.next().children().eq(pos);
$up.c
> > Can make behave as ?
> Why would you not just use CSS to style an element
> to be bold and not underlined?
Definitely the way to go. That way the link works with the keyboard
and screen readers as well. Apps that require the mouse drive me crazy.
> but this line $('#state').add(option); is not adding value to the
> select box "state"
The .add() method only adds the option element to the jQuery object,
it doesn't modify the document. You probably wanted this:
$('#state').append(option);
> I'm having a bit of trouble understanding why a click event attached
> to the document is being triggered when submitting a form through the
> enter key.
When you press Enter, Firefox (looks like this wasn't tested in IE)
triggers the click event on the default submit button. That bubbles up
to
Try this
var test = 3.141592;
alert(test.toFixed(2));
> Any other ideas? :)
Well, from the code that you originally showed the possible causes
were pretty limited. If there is arbitrary code both before and after
that line you showed, it could be almost anything! Can you create a
simple test case?
> I already posted this on the jQuery BugTracker, but nobody seems to
> notice. Maybe I can get some help here and I hope you don't regard
> this a double post. (the link to the bug report
> ishttp://dev.jquery.com/ticket/5482)
I noticed the bug, thanks for reporting it. Bugs are usually fixed i
My guess: If your function doesn't return false to stop the submit,
the browser will start navigating to the submit action page
immediately. It's probably starting to fade but the page changes
before it's anywhere close to done.
> Just wondered if the Filter description could be made a little clearer
> on:http://docs.jquery.com/API/1.3/Traversing
Yes, I can't say that I don't agree with you. :-)
I updated the docs to use fewer negatives. Because the function only
removes an element when it returns an actual Boolean false
.ajaxForm uses $.ajax, which uses XMLHttpRequest. There are some
issues with the way xhr interacts with document.domain, independent of
jQuery.
http://fettig.net/weblog/2005/11/28/how-to-make-xmlhttprequest-connections-to-another-server-in-your-domain/
> Hello, Marty McGee here. I was hoping to open a discussion about the
> benefits of extending jQuery with your own custom functions versus
> simply writing your functions in JavaScript and calling them without
> extending jQuery first.
I am not a fan of extending the jQuery object with unrelated
> For some reason, Return key doesn't invoke OK button in JQuery dialog.
> Any idea what could be the issue?
Do you have some simple code demonstrating the problem? If the OK
button is a submit button in a form this generally should work, but an
example would be good.
> What I want is: When the user choose an item from the number1
> , the number2 will automatically change to the same
> value to the number2.
Maybe something like this?
$("select[name=number1]").change(function(){
$("select[name=number2]").val(
$(this).val()
);
});
If the change even
If this is UI Tabs you should ask in the jQuery UI group.
> Any idea what that "OPTIONS" and "500 unimplemented method" mean
It sounds like somehow type got set to "OPTIONS" and when sent to the
server it justifiably returned a "500 unimplemented" HTTP error code
because it didn't know what to do with that method type. Take a look
at the "more code here"
You'd be better off asking this in the jQuery UI group.
jQuery Pumpkin: Fright less. Do More.
> I'm wondering if there is a good way to resend an ajax request
> if it has produced an error.
Not that I know of, but it's an interesting question. The standard
XMLHttpRequest object doesn't have a way to resend the request. The
original $.ajax options are still around but they're not passed to
> I would like the first 4 clicks to run the increase font size
> function then the 5th click to reset the font.
jQuery 1.3 lets you specify multiple functions to .toggle(), you could
take advantage of that. I haven't tested this code but maybe something
like this? It looks like your original code
> I found this website which has done a great job writing some detection
> functions for some of the new html5 capabilities. Perhaps this is
> something that could be added to jQuery.support?
I added your find to an open ticket on HTML5 issues, thanks!
http://dev.jquery.com/ticket/4668
I think a lot of plugins have this problem but most people aren't
creating and deleting them a lot. My splitter has this issue but I
solved that problem because I was too lazy to support splitters being
destroyed. See, the real problem is that you have a "destroy"
option! :-)
Since $this and oth
> In other words, i have a main page with a menu that loads external
> files in the #content div with the load(file) function. The external
> file contains a DIV, and i want to bind a function to it $
> ("#mynewdivfromexternalfile").click(function() {alert ('it worx!'} );
You can use a callback i
> I built a site for a client and somewhere along the line, I added some
> code that slowed down the jQuery performance. I thought it was my
> crusty old laptop, but my brand new quad core PC also shows the
> animations quite slowly and choppily. Thus, the problem is with my
> code.
The Firebug
> It's our own existing auth service (and I'm not on the implementation team).
> Most other usages of this service are not directly from the browser, but
> from the back-end via java. I thought about proxying it via my service, but
> my service isn't SSL, so proxying still doesn't give me security
> That's correct, the problem is that it's an authentication service and while
> I *could* put the credentials on the URL, it would be sending them in the
> clear across the internet, which is not acceptable.
That's a tough one. A typical jsonp implementation uses either iframes
or (in jQuery's $
> How can I test that a control selection failed to find anything?
if ( $("#missing").length == 0 ) {
// it's not there
}
However, remember that if you apply jQuery methods to an empty
selection it does nothing:
$("#missing").hide(); // no-op
> A paragraph element placed after an image is not honoring the
> margin-top CSS parameter.
The IMG is an inline element unless you have changed it in CSS. Did
you try making it a block element, or wrapping it in a DIV?
> Is there anyway to write a custom filter which returns the parent
> nodes of the selector? ie) div.someClass:parentNode or ancestor:
> div.someClass would return the parent element of div.someClass.
Not that I know of, but you might be able to use the :has selector if
you know enough about the
Right, you can't "corner" an img element because the img element can't
have children. Put the img in a div and round that. Better yet, create
the img src with rounded transparent corners!
There are a lot of ways to accomplish this. Karl's post demonstrated
one way to create larger fragments directly with jQuery. In addition
to .append() you can look at using the .wrap() methods.
Mike Geary may come by and give you a pointer to his DOM creation
methods, which I used on several proj
So all those extra scripts are injected into the head with
document.write? If so they should have definitely been there before
any script below them executed. Have you found the place where Google
Maps is actually doing the document writes for the other scripts? I am
wondering whether it might be
In preparation for the push to a new release of jQuery, I've been
cleaning up bug reports in the jQuery core bug tracker. Many tickets
languiished because they weren't actually jQuery core bugs, but
instead should have been reported on the forums or sent to the author
of the plugin. jQuery UI also
> I wanna know why the implementation of jQuery.boxModel changed?
Most likely because it was using browser detection via the userAgent,
which is not reliable. If it's causing trouble, make a post in the
jQuery-dev group with an example.
> I only set settings.buttons["Ok']. Somehow extend() causes this
> behaviour can anyone explain why?
Sounds like you wanted the "deep" option. Otherwise your nested
objects won't be duplicated, just copied as object references.
http://docs.jquery.com/Utilities/jQuery.extend#deeptargetobject1obj
What does your xml look like? I am guessing it may not be well formed.
If $.get returns a string and you pass it to $() it will attempt to
parse it as html and an html link tag isn't supposed to have children.
If you force xml then it might return nothing if the xml is not well
formed.
> Is there some easy way of forcing IE to make ajax
> calls?
You can use the old trick of adding a random number to the end of the
url. It would probably also work to have the server return a Cache-
Control http header, if you can do that.
> I'm not sure why this 'fix' should be added to fadeOut? It seems most
> applicable to fadeIn and fadeTo.
Whoops, right. So the problem would be that in IE only, .fadeTo
("slow", 1) makes the element completely visible and then pops to 50%
opacity based on the stylesheet when the element's filte
> What is the best method to get the last ID so I have
>
> 1
> 3
> 4
Here's my untested solution:
function addNewRow()
{
var $tbody = $("#list tbody:first");
var newId = +($tbody.find("tr:last").attr("id") || "0") + 1;
var $row = $("").attr("id", newId).appendTo($tbody);
...
}
If there
> This is a nice simple solution to a common cross-browser issue, so
> wouldn't it be reasonable for this to be added to the standard jQuery
> animate method? The extra size is minimal.
That solution assumes no opacity was specified in a stylesheet.
#glory {
opacity: 0.5;
filter: alpha(o
Most likely, jQuery.noConflict was called somewhere in the page so
that the $ variable could be used by something else. If you are
including a lot of plugins, one of them may have done it.
So it looks like you're trying to fade in "#europe" as someone types
into the input. The opacity value should go from 0 to 1, though, so
I'm not sure why the values above 1 are there. Also, I would think
you'd want to set the initial state based on the input field. If all
of that is true, somethin
> I am trying to get/set only text of list only element text value.
> But for some reason I can not select it in clear way.
>
>
> Here text that I want to modify
>
> i don't want modify this
> i don't want modify this
>
>
>
You didn't show your code, but I assume you tried something like
> I'd ideally just like the function to return the shortUrl from the
> json results but can't seem to get it anywhere but the callback
> function.
...
> $.getJSON("http://api.bit.ly/shorten?version=2.0.1&longUrl=";
> + url + "&login=" + apiLogin + "&apiKey=" + apiKey, function(data){
>
> I get an error "Error: Form elements must not be named "submit"
This is a handy page to use for checking your code, or just for
reading the notes to be sure you aren't using any of the "special" DOM
names that trigger problems.
http://yura.thinkweb2.com/domlint/
> We've just released another jQuery plug-in which emulates the iPhone-style
> button used to toggle settings on/off.
Very nice, Dan. I like the way you haven't forgotten keyboard access.
> Any thoughts on my previous reply?
Leave the markup as-is and replace the Prototype script with this
jQuery. I tried to make the selectors do most of the work, but it
still has the downsides of the original code such as not validating
price inputs.
$(function(){
var calculate = function() {
I think you can let the selector do all the work:
var sum = 0;
$(".fieldpair > :checked + :text").each(function(){
sum += +this.value;
});
It's rare I ever find a use for the sibling selector!
> Has this issue been addressed? Im seeing the exact same thing.
Is this the same issue?
http://dev.jquery.com/ticket/4283
> The issue is on what I get from this function in
> Internet Explorer and in Firefox:
> IE : url("http://blabla/images/bg_round.png";)
> FF : url(http://blabla/images/bg_round.png)
Either is valid CSS; the URL only needs to be quoted if it contains
certain special characters.
http://www.w3.org/
The HTML spec allows characters in ids that the CSS selector spec
(used by jQuery) requires to be escaped. Is there some solution that
has been overlooked by jQuery and the W3C?
http://www.w3.org/TR/2009/CR-CSS2-20090423/syndata.html#characters
In CSS, identifiers (including element names, clas
> I have a client using 1.1.4.js and we are using 1.2.6.min.js. If the
> client upgrades, will it break their 1.1.4.js code? Is there any way
> to tell?
The best way to tell is to test it. It will depend on what features
they (and the plugins they use) are using. The release notes will tell
you w
> I don't want to execute it. I want to print it out to the html page so the
> user knows how to embed this stuff on their page.
It sounds like you want .text() then. That will not interpret html
code.
It is probably this bug:
http://dev.jquery.com/ticket/4017
Fixed here:
http://dev.jquery.com/changeset/6268
Possibly it is this one:
http://dev.jquery.com/ticket/4550
Happens here as well. Does it happen with bare DOM functions too?
> How can I make jQuery read say this code:
>
>
>
>
> and replace the 'rel' with 'id' ? Or is this asking too much?
How about this?
$("div[rel]").each(function(){
$(this).attr("id", $(this).attr("rel"));
});
Doesn't that mean #prg is missing from the document then? That sounds
like a logic error in your code.
> I am submitting a ajax request with special characters ("!...@#$%^&*()_+}
> {":<>?;'[]") for a form field and I am getting a error.
A little more information would help; code would be best. Are the
special characters in the URL, the form element names, the form data,
or somewhere else?
> I have a scenario where i need to detect when the content area of the
> browser changes size. Now, normally one would just attach to the
> window's resize event and be done with it. But, this does not work
> when something on the page causes a scrollbar to appear. The window
> never raises and e
> $('#orderlineform #product_id').live('change',isRentalActive);
The change event isn't one of the ones supported by .live(), in fact
it's specifically documented as not supported:
http://docs.jquery.com/Events/live#typefn
The .live() method requires events to bubble to the document level
where
Try this:
$("", opener.document)
That way it will create the li element in the right document.
http://docs.jquery.com/Core/jQuery#htmlownerDocument
jQuery.param encodes the string in UTF-8 because it uses
encodeURIComponent internally. If you know your parameters only
contain accented characters and not ones like "&", perhaps you could
build the URL yourself and let the browser do its default encoding?
http://dev.jquery.com/ticket/3611
htt
It has some old selectors. I just had to update it for a project
myself. There were just 4 lines that I changed, which got it to work
for my situation. There may be other issues for more complex trees; I
just had a two-level tree hierarchy.
- var branches = $("li[>ul]", this);
+ var b
> one area of functionality has me befuddled
> - using object methods to handle events.
To continue Karl's point, if you use jQuery the same way you would use
prototype then you'll be fighting it all the way. The prototype
solution squirrels away references to the DOM objects in the class and
the
> Another thought is that you could just do a replace on 0, 1 and 2 in the
> string: replace each number with the div you want, then wrap that in a div.
Yeah, I was wondering whether the regexp engine would be faster.
Something like this:
for(var item in items){
html.push(
'',
process(
> "Something like Firebug for IE? "
> http://www.fiddlertool.com
Also, IE8 has a very good built-in debugger and DOM inspector. I just
wish it was possible to have multiple IE versions on one computer
without a lot of hassle.
> So it appears that $.ajaxSetup's success method is a fallback
I think that's correct, although the docs need some clarification on
that.
> Is there a way to define my desired actions without having to place
> the function in every callback function?
Try ajaxSuccess, the global ajax event:
ht
Chris, I don't have Firefox 2 handy and it's working fine on Firefox
3.
In general it works best to initialize nested splitters from the
inside out; there are a few situations where initializing the outer
splitter will not work.
It looks like your sample is very close to being a table with
resiz
> I want to determine if a form has been submitted with jQuery or not.
Ajax requests have this header:
X-Requested-With: XMLHttpRequest
You could use that to determine how the form was submitted.
> Please consider the following snippet of code, which transparently
> intercepts all Ajax requests, detects whether the data being POSTed is
> a JSON object, and based on that, switches the content type to
> "application/json", and serializes the data to a string:
That's detecting whether s.data
> Is there any way to do this faster?
Create the full table in a string, including the tags, and
insert it into the document at one time. Each time you insert an
element into the document, the browser does some calculations and
checks. By doing it in one insert you save it work.
Whenever you're
If the object has a length property, it is assumed to be Array-like.
There are several Objects that have Array-like behavior, like jQuery
objects, DOM NodeList objects, and Function.arguments.
In this case, you've specified a deep copy so when $.extend sees the
nested object in prop it thinks the
> However, in the click handler when I get the event.target.checked is
> ALWAYS false for the above call. All is as expected when the handler
> is called based on a real UI click.
The click event is a little strange. When a "real" click happens you
see the effect of the click in the handler, suc
Did you define the .even class? I don't see it in Firebug.
It sounds like the problem may be related to this bug report:
http://dev.jquery.com/ticket/3611
> console.log('plugin is disabling option : ' +
> d[i]); // RETURNS A VALID ANSWER
> $(this).find('a[href="' + d[i] +
> '"]').parent().addClass('disabled');
> // THE SELECTOR RETURNS 0
> ELEMENTS, ALTHOUGH THE MARKUP IS CORRECT.
Break down the selector there a bit. It seems like th
> I tried various solutions to have a case insensitive :contains() on
> google but couldn't find one that works with jquery 1.3:
This seems to work fine:
$.extend($.expr[":"], {
"containsNC": function(elem, i, match, array){
return (elem.textContent || elem.innerText || "
1 - 100 of 344 matches
Mail list logo