I think the input.date-picker css style should be changed to div.date-picker-holder input, as your usage instructions don't say anything about having to give the input element a date-picker class name. Either that or get the plugin to set the input classname to date-picker automatically. As it
Sounds like a float rounding error...
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Hi thereI'm just getting my head around the whole JSON thing, so please excuse my ignorance. For a while now I've been successfully fetching JSON data from the server via ajax and using it in jquery. My question regards sending data from the client to the server. The $.post and $.get methods are
Thanks Will, I followed your lead and eventually discovered John's JSON script with stuff like: Object.toJSON(obj), which was just what I was looking for :)Cheers,Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Yes I was wondering this too. The serialize() in form.js is different from that in jquery.js. It appears the former takes in a form id and spits out a _javascript_ array, whilst the latter takes in input elements and spits out a url parameter list.
I need to use the behaviour in form.js. How do I
On 26/09/06, Glen Lipka [EMAIL PROTECTED] wrote:
Is it permissable to have more than one
$(document).ready(function() {})
per page?Absolutely. The function is just appended to the handler I believe.Chris
___
jQuery mailing list
discuss@jquery.com
Just putting in my vote for John's method. To me it makes sense, and would mean I wouldn't have to keep track of numerous .end()sChris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
I'm having the same problem. Also serialization doesn't appear to be working, even in the demo.Cheers,Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Correction - serializing doesn't work when there is no id specified for the UL and LI elements.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
HiThe Interface Sortables plugin was not firing on onchange. This is because the iDroppables plugin expects a property called onchange but is being given one called onChange.
To change this you need to go into iSortables.js on line 242 and change the first onChange to onchange.Hope this helps
Replace (state:stateVal) with {state:stateVal}
:)
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Felix, I'm using the Drag and Drop plugin for an almost identical project.
I've found that when I display several months at a time, ie alot of ul's,
performance gets very very sluggish like you mention.
I think it's because when you pick up a draggable, the script has to go
through each ul and
Hi Christoph,
Could you post a bit of your code for us to look at? Also I assume you're
using the latest jQuery version?
Cheers,
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Brilliant, thank you Jorn. I use this plugin extensively.
Regards,
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Like Blair says, you need to use a callback.
I'd do something like this:
var seed_id;
var seed;
function createSeed(callback) {
$.post('login/login.php',{action:'createseed'}, function(data) {
results = data.split('|');
seed_id = results[0];
seed = results[1];
if (callback)
Synchronous loading is proposed for jQuery 1.1. But I'm sure callbacks would
be able to do what you need...
Couldn't you just do:
createSeed(restOfScript);
function restOfScript() {
...
}
Then the rest of the script would run after the ajax request has returned.
Chris
On 06/12/06, kazaar
Just playing Captain Obvious here, but jquery.com seems to be experiencing
some difficulties...
SQL logic error or missing database.
Let's hope it's the former...
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Here's a great blog post from Doug Crockford, one of the gods of Javascript
on the subject:
Many people prefer to use it synchronously. When used this way, the
JavaScript engine is blocked until the interaction with the server is
complete. Because it blocks, the flow of control looks a lot like
$(#delete+stateIdVal).html(Really delete?);
Is that what you're after?
Also, as a tip, instead of using javascript: calls inside your link,
consider a more unobtrusive method. Give each link a delete classname.
Then you can do:
$(a.delete).click(function() {
if (confirm(Really delete?)) {
There is the old empty anchor (#). Is that what you mean?
Sure, if you are using a's. Then just put a return false; in your
handler to stop it jumping to the top of the screen. You could always use
a span, then you don't have to worry about href etc. Although in an a
you get free hover
Link?
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
1. There really should be a main menu on the frontpage (Download,
Documentation, Community, Plugins, Tutorials ...)
I believe there is.
2. A page where jQuery code is compared to code of other libs (real world
examples)
The blog has 2 or 3 comparisons like this, but they probably need to
and if I go $(#content).load()
does the stuff inside #content get deleted automatically?
Yes - load() overwrites the contents of the element.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
I assume you're only adding sortability once, not each time toggle() is
called?
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
$() gets you a jQuery object, so you can use it with jQuery methods etc. To
access selectedIndex you need the actual element, so try:
$(#b6)[0].selectedIndex = $(#s6)[0].selectedIndex;
Chris
___
jQuery mailing list
discuss@jquery.com
...you would have to do $(this)[0], so it's extra typing either way. ...
Er in that example it should be this[0].
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
$(this)[0] is never needed as 'this = $(this)[0]' when in an 'each'
loop (or binding on an event, callbacks in plugins etc).
I was simply speculating what would have happened if this had been
designated a jQuery object. Hence this[0] would give you the DOM node. Read
the whole thread :)
Hi all,
I'm having a problem with John's metadata plugin.
The value of the parameter arr in the jQuery.fn.get function in
metadata.jsis always undefined, so at this point:
return arr arr.constructor == Array ?
it never branches towards the metadata logic, hence I can never access
metadata
I've tried lots of ways:
given: td class=blah data={foo:'bar'}/td
$(td.blah).get(0).foo;
$(td.blah).each(function() {
this.foo;
});
$(td.blah).each(function() {
$(this)[0].foo;
});
The point is though, that EVERY jquery query on my page, regardless of
whether or not I'm accessing a
Sounds like you have a custom script being loaded in by ajax, eg .load() and
eval'd which is throwing the error. Any syntax errors in your custom script?
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
I think you can do:
if (!$(#testDiv input:checkbox).is(:checked)) $(#testDiv).hide();
(Notice the !). Not tested though.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Mungbeans - remember this in the context you are using it is a normal DOM
node, so you can't use jQuery methods like .val on it. You can do
$(this).val() instead.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
On 15/12/06, Erik Beeson [EMAIL PROTECTED] wrote:
Rounded corners are easy:
border-radius: 10px;
-moz-border-radius: 10px;
And a link to http://www.getfirefox.com/
--Erik
And in the latest Firefox 3 Alpha and nightlies, they're now anti-aliased!
Very purdy.
You could use .change() instead of .click().
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
So if I have a binding like this:
$(div.clickme).bind(click, function() {
// Do stuff
});
Is there NO WAY to use .trigger(click) to only call the handler (ie the
old pre 1.1 functionality)? This is really annoying and seriously breaks my
app :(
Eg sometimes I have forms that load with certain
Hi there,
How would I select the first ancestor of a certain type? Eg if I want to
select the first div that is found while searching up the DOM from an
element.
Cheers,
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Karl - excellent, works a charm!
Thanks,
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Matt - I want the first ancestor of a certain type, not the first parent.
Yehuda - won't this just select all tr's that are the first tr's in their
table?
To clarify, say I have this structure:
table
tr
td
table
tr
td
a id=fooDemo/a
/td
/tr
All $() does is call the jQuery query engine to find dom elements based on a
css-like query. So $(#myId) finds any element with an id of myId.
You can do $(#myId, window.parent.document) to set the context of
operation.
All this is documented on the website, I recommend you start at the top!
On 23/01/07, Dan Eastwell [EMAIL PROTECTED] wrote:
Wrap jQuery functionality around a single or multiple DOM Element(s).
That sentence is not very explicatory: you could not have got Chris's
example from having read that. I'm still a newbie myself, and don't have the
knowledge yet to extend
Hi Sholby,
Try this: $(ul.deroulant a).not(.pliant).bind(click, function() {
/*etc*/ });
1. You speed up the selector slightly by having the element name before the
class name ie ul.deroulant.
2. You don't need to use $() again when using jquery methods like .not()
etc.
Cheers,
Chris
Hi there
I'm aware .trigger() was patched in the recent 1.1.1 update, but I'm having
issues with it.
If I have a checkbox, then firing trigger(click) seems to fire the bound
click handler first, *before* unchecking the checkbox.
This is a pain cos say I have some code like this:
Hi there
I posted about this a while ago but never got a response I could understand
(probably my fault!).
My question relates to why using .trigger(), which as of 1.1 is supposed to
trigger the browser's default behaviour, gives a different result to
performing the triggered event manually.
Ah yes, I meant XHTML served as XML not text/html. Are you saying
that innerHTML works even when served as an application of XML? If
so, I stand gratefully corrected.
Joel.
I use .html() fine and I'm serving proper xml :)
Chris
___
jQuery
I think the tablesorter plugin is fairly easy to extend with custom regexes,
if you're up for it! Or you could just use the existing regex and get it to
strip all commas before the comparison.
Chris
___
jQuery mailing list
discuss@jquery.com
What if I specify a div as display:inline in my css? Hiding then showing
this div using the above script would change it's display to block.
Would be good if it remembered the original setting.
Chris
___
jQuery mailing list
discuss@jquery.com
Here's what I do to easily bulk load all my scripts whilst still keeping
everything in separate files:
script type=text/javascript src=scripts.php/script
And in scripts.php -
?php
$scripts = array('lib/jquery.111.js',
'lib/jqModal.js',
'lib/datePicker.js',
Another thing...
If I add a button via javascript after the initial page load and .jqm()
call, how can I bind this button so that it triggers the modal?
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
.next() only gets siblings, so you won't be able to select the new td as
it's nested one deeper than the tr you're searching from.
I have similar functionality in a program of mine, here is how I did it:
$(#table_Orders tbody tr).bind(click, function() {
$(#expanded).remove();
if
Actually the .selected stuff is relevant to your problem I think...
I have generic logic elsewhere that gives a selected row a .selected class,
and highlights the row. You can see from my example that it removes any
expanded previews first, then only if the row is actually selected (as
opposed
Ah whoops! You use it like this:
$(#cancelButton).trigger(click);
I must be half asleep... :)
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Brice - that would be brilliant, that sort of functionality is sorely
needed.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
This should do it:
$(#dToDo1 input.checked)[0].checked;
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Oops, replace input.checked with input:checked.
:)
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
$(#dToDo1 a.deleteAnchor);
And, if you want to delete them:
$(dToDo1 a.deleteAnchor).remove();
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Jörn,
This plugin keeps getting better! You rock.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
This is awesome! Didn't know you could use flash to do that :)
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
One option:
http://www.stilbuero.de/2006/03/15/png-alpha-transparency-fast-and-easy/
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Have a look in the sample php file provided with the plugin - that helped
me.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
The beautiful terseness makes me cry.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Hawt!!
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Hi Mark,
You can use $.browser. See here for more info:
http://docs.jquery.com/JavaScript#.24.browser
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
You should check out jsonT (http://goessner.net/articles/jsont/)
It lets you transform ordinary javascript objects in HTML painlessly. So you
could do:
#myAnchor.append(
jsonT(
{ id:1, class:3 },
{ self: div id='{id}' class='{class}'/div }
)
);
It supports really complex
Mario,
jQuery is client-side - your server-side program should connect to your
database. Then, if you like, jQuery can talk to you server via ajax and
perform database actions.
Cheers,
Chris
___
jQuery mailing list
discuss@jquery.com
Mario,
Sorry, I'm still not too sure what you're asking. JQuery is able to
interface with any server-side language (eg PHP) via AJAX to give you
functionality such as autocomplete etc. The PHP and Ajax book sounds like a
good place to start :). Also look at www.jquery.com in the documentation
Hi Jonathan,
I'd be interested in being able to position the menu absolutely too. Look
forward to your patch :)
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
You can use Event.ctrlKey which will return true if the ctrl key was pressed
during the event.
So you could do something like:
$(#myTextarea).bind(keypress, function(e) {
if (e.keyCode == 13 e.ctrlKey) {
// do stuff
}
});
13 is the code for Enter.
Cheers,
Chris
p.s. Yay, a fellow New Zealander :). Hi from Christchurch!
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
John, is it possible for the packed version to have a trailing semi-colon at
the end? I get errors for the script I include after jquery if this isn't in
place.
Cheers and thanks for another great release,
Chris
___
jQuery mailing list
Josh,
Using .load() within the scope of $(document).ready() is redundant, since
everything in that block is performed on page load anyway.
Also (1) you can use the :checked selector, and (2) this.value will work
just fine and saves the jquery call.
Try this:
$(document).ready(function() {
$() effectively returns an pseudo-array of the elements that match the
specified query. The .each() method applies a function to each element in
that array. In your case the query matches only one element in the DOM, so
there is only one element in the array, and .each() will be performed once.
The effect methods in jQuery take an optional callback parameter. The
callback function is called when the animation is complete.
So you can do:
$divTarget = $(divTarget);
$divTarget.slideUp(slow, function() {
$divTarget.children(div.middle).html(stuff);
$divTarget.slideDown(slow);
});
Dan,
You can separate your selectors with a comma. Also you don't need to specify
a context (eg element type) when selecting an id. Eg #time is faster that
select#time.
So try: $(#time, #anotherId).change(function() {});
Cheers,
Chris
___
jQuery
Hmm.. maybe capture a focus event?
Like $(document).not(#menu).bind(focus, function() { .../* menu hide
code */...});
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Brice,
Is there any way I can change the callback functions after the initial
.jqm() call? I'm wanting to have a standard widget that performs similar
to the prompt() function in javascript. But I want to dynamically add a
callback depending on when/where in the site it's being used.
Cheers,
Thanks for that Brice.
Another thought - is it possible to get the element that triggered the
jqmShow)? So if I have n anchor elements with class of jqmShow, the modal
object (once triggered) will have a reference to its calling element?
Cheers,
Chris
Excellent - just what I needed! Sterling effort.
Cheers
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
I keep all my behaviours in separate functions. For instance if I had a
fancy table widget I'd have a function called initTable() that contained the
behaviour code. I'd call it initially upon page load, then call it again
when necessary if content has been updated via ajax.
Eg.
Alexandre,
Is there any way to debug this plugin? For instance jqUploader has just
stopped posting to my server side script for some reason, and it would be
handy to see what sort of error it is throwing.
Cheers,
Chris
___
jQuery mailing list
Brice,
re $.jqm.hash. I'm getting an error that there is no such property. Doing an
inspection of the object $.jqm in firebug shows only two properties - .open
and .close.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
There is no difference. click(), keyup(), etc are just short cuts.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Brice,
The version linked to on your page is r9.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Sigh...
And I just noticed the link to r10.
One of those days
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
This might work:
$(.meh).parents([EMAIL PROTECTED]:first);
Although I think you're better to give the td a class rather than rely on it
having an id attribute.
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Try:
$(#blogreviews img).css(width,250px);
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Jamal, you need to rebind events to elements after updating them via ajax.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Another solution that I've found really handy is to have your event code
included with the html.
So, as in my first example, I might have a php class that generates a
datagrid - both the html AND the javascript with event handlers etc. So the
handlers are bound on initial page load, and then
Whoops, make sure you add a closing } to the anonymous function :)
On 08/03/07, Chris Domigan [EMAIL PROTECTED] wrote:
Ben,
You need to enclose your loadJson function in an anonymous function,
otherwise it is evaluated at runtime:
buildDialogBox({
u : 'oba_1_2',
f : function
Ben,
You need to enclose your loadJson function in an anonymous function,
otherwise it is evaluated at runtime:
buildDialogBox({
u : 'oba_1_2',
f : function() {
loadJson('userlist.txt', buildUserManageTable),
d: 'formDialog600'
});
Chris
context-sensitive actions to each menu option.
Big thanks to Joern Zaefferer whose excellent Tooltip plugin provided much
inspiration.
This is my first plugin for jQuery and any feedback/comments/improvements
would be most appreciated!
Cheers,
Chris Domigan
You can use .each().
$(#myId).each(function() {
// do lots of stuff
});
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
You could create a function that does the following:
var $el = $(#parentId);
$el.before($el.html()).remove();
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Re #1: Oops. Obviously passing the clicked option won't help here - the
whole point is you don't want it clickable in the first place...
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Hi Glen, thanks for the ideas.
Just as a styling suggestion. Would it be hard to enable Office 2007 style
on it?
No, shouldn't be too difficult. Would have to put some logic in to support
icon column. You could set a background image in menuStyle to emulate this.
1. Ability to disable/gray
!
--
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Chris Domigan
*Sent:* Thursday, March 08, 2007 5:14 PM
*To:* jQuery Discussion.
*Subject:* [jQuery] New plugin: ContextMenu
Hi everyone
The first version of my new ContextMenu plugin has been released
Hi Jorn,
Seems like you didn't like the Tooltip approach of prividing only the
very basics of inline-styles and the rest via stylesheets.
Yeah the whole styling thing was something I wasn't too sure about. On the
one hand I thought it might be handy not to have to worry about a separate
css
Hi Danial,
On 10/03/07, Danial Tzadeh [EMAIL PROTECTED] wrote:
Hi All,
Is it possible to make it with left click too? could be a nice
addition as many users don't know they have to right click.
Cheers,
Danial
Yep I'll try and put this in the next version. Something in the settings
like
Howard, thanks for the comments. Something like you suggest is already in
the works :)
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Maybe he's saying that n00bs don't know there IS a difference between this
and self...?
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
And if you wait another couple of day's I'll have a new version out that
adds/fixes a lot of stuff :)
Chris
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
1 - 100 of 111 matches
Mail list logo