I know that jQuery made the decision not to allow selection of
elements with colons in them, however it is valid XML. Here is an
example piece of code I am getting back from an ajax call:
item
news:specialFree chicken!/news:special
/item
Any ideas how I can select the news:special item?
~Sean
Google Calendar has several widgets/gadgets.
~Sean
Nash, do you have an example we can look at?
~Sean
Jake,
Here's a problem that jQuery can't do.
It doesn't support Curried Functions.
Now that's not really fair because javascript does not support curried
functions either.
http://en.wikipedia.org/wiki/Curried_function
But I can think of a way that one could hack the same effect, can you?
Actually, I think this is quite easy in Javascript. If you look at the
code listings in the Wikipedia article [1], Javascript has more succinct
code than anything but scheme, and scheme's advantage mostly has to do
with it's simpler syntax for functions.
-- Scott
[1]
Also, what's Sean talking about when he says:
lets say the focus function gets called twice (through
malicious javascript or a quirky browser) then the toggle state of the
class will be off. But in general I prefer your implementation.
Is this something i need to worry about? Is this
Can you link an example or paste some code?
~Sean
Yansky,
I was going to wait for the next version of jQuery, but I'll try to
get a working version of jQuery for userscripts again.
~Sean
On 4/18/07, Christof Donat [EMAIL PROTECTED] wrote:
Currying doesn't give you
float function(float a) { return mycallback(a,42); }
Of course it does, you just have to clever.
let us say you have this function:
divide = function(a){ return function(b){ return a/b; }}
If you want to create
Spam is not the only problem I'm receiving. Sometimes I don't get the
original message sent to me via email and then I only get someone's
reply to it.
Google needs to step up their game, or we should find another host.
~Sean
jQuery(item_content).filter(#contentpane .contentpane p, :first);
Filter removes those items from your search. Perhaps you want to use
find instead. Try the following code:
jQuery.get(item_link,function(item_content){
var new_content =jQuery(#contentpane .contentpane
I don't think there is a crop plugin, but there is an ImagePan
(http://motherrussia.polyester.se/jquery/panview/) plugin that you
might find usefull.
~Sean
Hi Simon,
I'd recommend using http://jquery.com/api/ and firebug to help you
debug. You're function looks ok, but I think error is an object that
contains lots of data. Check out $.ajaxError at the api I linked. Let
me know if you have more questions.
~Sean
Can you post some sample html that you're working with? It's a little
hard to work blind.
Filter would remove your search from the results, find would leave on
your search in the results.
apples
oranges
bananas
filter oranges would leave: apples and bananas
find oranges would leave: oranges
You're absolutely right. I think at some point in jQuery's past this
was flipped, but I'm glad to know that the filter functions works as
intended now. Sorry for the confusion. =(
~Sean
I assume $('img').css({width:'100px'}); is not what you want.
Are you asking for something with an image slider.
~Sean
Hello Simon,
Yes, your onResize function can change the values of maxWidth. Here is
an example:
$('#resizeMe').Resizable(
{
minWidth: 50,
minHeight: 50,
maxWidth: 400,
maxHeight: 400,
// etc. etc.
Javascript has a built in scrollTo(x,y) function. One would only need
to get the .offsetTop of the element and viola. Ok well perhaps that
was over simplified, but at least there's some stuff to point you in
the right direction.
~Sean
Kim, I think you are right.
$(this).parents(div.foo) should work.
The following might also work:
$(../div.foo,this)
But I haven't had time to punch that in myself yet.
~Sean
I ran you code in FireFox and in IE6 and recieved no such error.
~Sean
Try: $.fn.cropImage = function() { ... }
Although this may be old syntax.
~Sean
The new plugin page looks good. This would be an ideal time to put in
a rating or digg system. Having the top 5/10 plugins is always
helpful.
~Sean
I'm sorry, what was the question?
~Sean
Hi Dave,
On 4/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Sean, I am fishing...If you are supporting a jQuery app, how much
effort goes into supporting browser changes and incompatibilities?. - Dave
Most of the browser incompatibilities I've had to deal with have been
with CSS not with
On 4/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
No need to store anything in a variable. That gets murky. Just hide
them all via a selection on class and then show the one you want after
that. Then you need not remember anything about state.
That takes more processing time, and for
Nathan,
A long time ago I made a simple proof of concept script on this:
http://www.sunsean.com/Jistory/
~Sean
Glad to see this is still alive Sam, excellent plugin.
~Sean
Looking at the code for newticker, you might/should be able to just
recall $(ul).newsticker() and it should reset the ul. If for some
reason it doesn't work, then this might be the change that the plugin
needs:
stopTicker = function(el) { if(el.tickfn) clearInterval(el.tickfn); }
~Sean
Try this:
$('#pictures').html(...).bind(load,function(){...});
~Sean
Try drag.src
~Sean
I may have misinterpreted what you are trying to do, but perhaps this will work:
$(navigation);
function navigation() {
$('.nav_paginacion ul li a').click(function() {
$.get( this.href, function(data) {
$(#comment_block).html(data);
navigation();
});
return false;
});
}
Simple problem:
I add an image from an external site to the page and sometimes the
site is protected by Apache authentication so it pops up a login box.
This is really annoying, any ideas on how this can be suppressed. All
creative suggestions accepted.
~Sean
Ok, so now I have this same scenario where I am trying to load ajax
from a apache authenticated area and it popping up with the login box.
Is there any way to hide that?
I'm looking all over the web, but I haven't found anything yet.
~Sean
On 5/8/07, John Resig [EMAIL PROTECTED] wrote:
I agree - they did a very nice job with the demos site. I'm sure we
could arrange for something similar on the main site.
We should really push an effort to create as many cutpaste example
as possible. People see, they grab, they edit. That's
Thanks Karl!
~Sean
Ralf, I know that jQuery can do everything that mootools can, and
often better. But just because I know doesn't mean other people do.
MooTools looks sexy, and jQuery, for the moment being, lacks that.
Jeffrey, that's exactly my point. We should have more examples of
jQuery's abilities.
As I
Try adding the following at the end of the code:
script type=text/javascript $.tabs(container); /script
~Sean
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
jQuery (English) group.
To post to this group, send
This is what I would do:
//inside head
leavingSite = false;
window.onunload = function(){
leavingSite = true;
setTimeout(if(leavingSite){ [insert ajax] },2000);
}
If the new page does not load in 2 seconds or the user left the site,
then the script will execute. (although I'm not sure what
Mozilla (Firefox) can extend Node, but IE cannot.
Here's a snippet of what I am trying to do:
Node.prototype.ac = function(e) { this.appendChild(e); }
The problem is that Node is not defined in IE.
Does anyone have any bright ideas on how we can trick IE into working also?
~Sean
I was storing the onclick text, and eval() evaluates a string of
javascript. This means that the functions that would be executed on
click would instead be executed right then (at the eval).
I hope that helps.
~Sean
Hi Brad,
I got the HTML from the link you posted. So try this (somewhere in head):
script type=text/javascript
var linklist = new Array();
var currlink = 0;
$(function(){
$(#vidLinks, #vidLinks2, #vidLinks3, #vidLinks4).find(li
a).each(function(){
linklist[linklist.length] =
Yup, you go it!
~Sean
I am able to pull a copy using: svn checkout
*http*://jqueryjs.googlecode.com/svn/trunk/
jqueryjs
I'm not sure why you are getting that error though. Perhaps it is a DNS
issue? You could try switching you DNS to openDNS.com
~Sean
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
JSON:
To follow up on the result of this.
I can not use ajax for requesting information from another site (bummer).
However I only originally wanted an image that wouldn't popup a
security login window.
Using this works beautifully:
var img = new Image(); //Don't use document.createElement(img);
Jake,
A great idea, however the problem is how can JSON represent the order
correctly? Currently, it would output both b tags before the i,
whereas the desired effect is to output the first b, then the i,
then the second b tag, in that order.
~Sean
P.S. The xml is just an example scenario.
Just as a note, the following code produces this output: Author-Subtitle-
var json = {p:{b:Title,i:Subtitle,b:Author}};
for(x in json.p) document.write(json.p[x]+-);
And the following code produces this output: Title,Author-Subtitle-
var json = {p:{b:[Title,Author],i:Subtitle}};
for(x in
I believe that might be the shortest way to get the element, however if
speed is your concern, then I suggest storing the divs before hand. Give
this code a try:
var div = $(tr td div);
$(tr td a).each(function(i){
$(this).click(function(){
alert(div[i].innerHTML);
return false;
});
});
That's great news. Thanks for the feedback Rey.
~Sean
Why not send the data back as JSON, and then parse through it server
side. There are probably some small scripts that already do this for
ASP.
~Sean
As others have mentioned, plugins are the main form of reusable code.
This is not very different from creating a carefully constructed
Object in a OO language. In fact I find most OO languages to not have
very reusable code, the only languages that support re-usability in my
opinion, are
Liam,
I highly recommend checking out the panView Plugin:
http://motherrussia.polyester.se/jquery/panview/
or jQPanView:
http://projects.sevir.org/storage/jpanview/index.html
~Sean
try adding the javascript right after the body tag.
bodyscript type=text/javascript [jQuery stuff] /script
~Sean
$(document).ready(function(){
/*$(h1).after(hr class=\thinDivider\ /);*/
$(h1).after(span class=\thinDivider\/span);
});
You forgot to end you span tag:
$(function(){
$(h1).after(span class=\thinDivider\/span);
});
~Sean
I assume you are talking about this plugin:
http://empireenterprises.com/_comet.htm
Then you can download it here:
http://empireenterprises.com/_share/jquery.comet.js
~Sean
i´m creating the #loading by PHP
only hides the body
if #loading is inside the body tag it will be hidden too when you
say $(body).hide();
this works when nothing is submit, but when submit the form dont show
I'm really not sure what you're talking about unless I see an example.
~Sean
Klaus,
Since the div's that are being toggle all have IDs that means they are
unique, so why not search the document namespace instead of just the
containing div?
~Sean
I'm not sure how you're doing your sorting, but you may find the
following useful:
// Array.Sort
//Original: http://weetbixthecat.com/blog/2006/faster-javascript-sorting/
if(!Array.prototype.Sort) Array.prototype.Sort = function(p,f) {
if (typeof p != string) throw new TypeError();
var o =
On 5/25/07, Daemach [EMAIL PROTECTED] wrote:
tableFilter can do a multi-column sort on an 800-row table in under
60ms - it takes a bit longer to move the table rows around :)
Ah, well that's great news. I agree that manipulating the DOM is what
takes a while. It sounds like you are
I think the problem is not the javascript, but instead the browser.
Trying to change the display of a thousand items can cause it to be a
little slow. I present to you a small example, that shows javascript
can handle many items at once, and since the browser only has to
display a few items at
I'm trying to get this working:
jQuery('#accordion [EMAIL PROTECTED]').click(function(){
var rank = jQuery('#accordion
p').index(function(){jQuery(this).parent('p').eq(0)});
});
I'm not sure why you would want to do this, but the following should
get the effect your desire.
It would appear that you idea does not work.
Just as a note about testing. Open any jQuery page and Firebug, and
viola, you have little playground to try quick jQuery lines.
~Sean
P.S. I wrote a plugin to find jQuery pages: http://www.sunsean.com/jquerydetect/
I'm writing this off the top of my head, but it should be at least
close to functional.
jQ: $(#id1).children().filter(function(){return
$(this).text()!=;}).filter(:eq(0)).text()
Or if you intend to use this a lot, you could write a small plugin:
(function($){
$.fn.textNode(index){
index =
Mathias,
The solution is simplier than it seems.
function foo(){...}
$(document).ready(foo);
//someplace where you want to call the document.ready again
foo();
By wrapping the code that you want to call from document.ready inside
a function it is easy to call again at any time.
Of course
I think that some other code might be creating this problem. Do you
have an example page of this happening?
~Sean
Will jquery 1.1.3 support the colon operator?
ex: $(xsl\:template)
I know that : is used in jQuery, but \: seems very possible.
It would be nice to parse through xml files with colons in them.
~Sean
You bet, try binding an onClick function in the tabs plugin that will
detect when the last tab is clicked. Look at the documentation and
source code of the tabs plugin for more information.
~Sean
I don't think that will work.
If d is your span, then it doesn't have an attribute of productSizeName.
Perhaps you should consider changing the html around a little, it
seems a little unorganized.
~Sean
When I visit the page in both IE and Firefox it seems to load on top
of the page just fine.
~Sean
Two ideas.
One idea would be to have a small (20ms) timeout before populating the
second select box.
The other (faster) option is to create several select boxes (of each
possible second box), then simply show/hide which box they should be
editing.
The second approach should also be faster for
As stated, the document.getElementById will only work on document, and
will only return the unique id.
It is in fact very bad practice to have multiple id's and it is not
unreasonable for javascript to fail if there are more than one. Just
use a class instead of an id if there needs to be
Slightly off topic, but why would you not want them to enter the
http://; does that really complicate things?
Great plugin btw, although I really like using the title attribute as
much as possible, so I like Alex's suggested script too.
Keep up the good work everyone.
~Sean
Viewing the source is never a bad way to learn in my opinion.
~Sean
Josh,
It's your baby now, have fun with it.
If you implement the title idea, I recommend automatically running
Watermark on all inputs with a title attribute (if your script is
included).
ie: $([EMAIL PROTECTED]).Watermark();
Making scripts plug-and-play is one of the best ways to reach a
More importantly, why are you using two ID's?
Remember, ID's are supposed to be unique, so just $('#bar') should work.
If your ID's aren't unique, I highly suggest you change them to classes.
~Sean
I suppose I can see a few applications of using multiple id's, but I'm
still curious why using classes instead is not a better option.
On 6/5/07, patcoll [EMAIL PROTECTED] wrote:
#home #logo
#interior #logo
You could for example have div id=home class=logo
My point is that, id's and
On 6/5/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote:
So, for us gmail users, we have to remember to compose a new message ,
rather then hitting reply and changing the subject.
Just to make sure I understand you.
Gmail users can still hit reply as long as they don't change the
subject right?
~Sean
I have a feeling the problem is with this code:
/* highlight TR */
25 $(#prj tr).mouseover(function(){
26 $(this).addClass(over);
27 })
28 .mouseout(function(){
29 $(this).removeClass(over);
30 }
31 );
Try taking that out or changing it this:
$(prj tr).hover(
function(){ $(this).addClass(over);
Is it possible to call $.ajax and have it load an html page, but
without running the scripts?
It would do dataType:xml, but then it doesn't return the proper response text.
~Sean
Not sure why your script isn't working. You can review the code of
another jQuery greasemonkey script here:
http://userscripts.org/scripts/source/6061
~Sean
Is the documentation's raw content available somewhere online?
Yes it is, on the API page: http://jquery.com/api/
You find a link to many versions of the api, like XML and JSON.
~Sean
I hear a lot of discussion about how jQuery isn't that slow, the test
wasn't perfectly fair (what test is?), that keeping code small is
important, and that development time is the most important thing.
1) Lots of people take speed tests seriously, even if they're not a
good way to judge a
You have to rebind the clicks after the ajax loads:
$.ajax({
type: GET,
url: news.php,
success: function(msg){
$(#response).fadeIn(slow).html(msg);
$(#response a).click(function(){
alert(Hello);
return false;
)};
}
});
~Sean
Thanks for the feedback Rey, that's great to hear.
~Sean
Please check it out at: http://digitalbush.com/projects/masked-input-plugin/
I totally dig it Josh, keep up the great work.
~Sean
I completely forgot about this. I'm am using version folders for
development and it's very useful.
This methodology doesn't require a change in the developers but rather
the users of the scripts. The other advantage is that it versions at
the folder level instead of the file level. (very
Hi,
Your code looks just fine, I'll just hit on a few stylization points.
In general I'm a minimalist and I believe that having whitespace at the
appropriate point in code will allow for easier understanding/reading of the
code. Often people hit enter and tab at every possible occaision, but
Can anyone else get the outerHTML of a html object? I can't seem to
get it anymore.
document.getElementById('log').outerHTML returns undefined.
I'm using FF2.
~Sean
On 6/14/07, Jeffrey Kretz [EMAIL PROTECTED] wrote:
According to Koch, outerHTML was never supported by FF.
Very interesting, thank you.
On 6/13/07, Brandon Aaron [EMAIL PROTECTED] wrote:
Here is a link to a post not too long ago with an outerHTML plugin for jQuery.
Try this:
$('li.hide-comm-single').click(function(){
$(this).parents('.comment')
.children().not('ul').hide();
return false;
});
~Sean
Only the CSS needs changing.
Where it says li { float:left; } take the float:left; part out.
~Sean
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.
~Sean
When you say pop up, do you mean, window.open style.
If that's the case try using something like this:
var popup = window.open(...)
$(#cloneme).clone().appendTo(body,popup);
~Sean
Thanks Karl, I had no idea there was a complete property. Is this only for
images, or all DOM elements?
~Sean
Congrats Glen! I hear your voice a lot in this group and no doubt you
will be a great addition to the team.
~Sean
On 6/17/07, Robert Wagner [EMAIL PROTECTED] wrote:
it (the link you mentioned) behaves _strange_ in safari. (2.0.4) it
hangs a few seconds an then it shows the tabs (sometimes).
-robert
I'll try to look into this Robert, but I don't have access to a mac
atm, do you think the windows version
Will do. =)
~Sean
On 6/18/07, Shaun Kester [EMAIL PROTECTED] wrote:
I made a quick post with screenshot for you using Safari on windows. I
see the loading image briefly, then the page just stops. No tabs show
up.
http://www.skfox.com/jquery/idtabs-new-jquery-plugin/
Thanks for the screenshot. Apparently there
Looks great John, glad to see an improvement on the plugin page. It
was getting a little crowded, and as you've already stated, a
languages (or libraries) greatest strength is it's ability to grow.
Cheers
~Sean
How long does it take to get a registration email (I assume more than
5 minutes isn't good)?
~Sean
1 - 100 of 225 matches
Mail list logo