Re: [jQuery] Re: Autocomplete plugin compatability with jQuery 1.4?

2010-01-31 Thread Richard D. Worth
Yes, and yes.

On Sun, Jan 31, 2010 at 3:41 PM, Jose  wrote:

> On Fri, Jan 29, 2010 at 1:38 AM, Richard D. Worth 
> wrote:
> > The latest version is jQuery UI Autocomplete, and it is compatible with
> > jQuery 1.4. You can find it in jQuery UI 1.8rc1:
> >
> > http://blog.jqueryui.com/2010/01/jquery-ui-1-8rc1/
>
> Is the UI autocomplete based on Jörn's autocomplete ? If seems a huge
> refactoring!
>
> regards
>


Re: [jQuery] Re: Autocomplete plugin compatability with jQuery 1.4?

2010-01-28 Thread Richard D. Worth
The latest version is jQuery UI Autocomplete, and it is compatible with
jQuery 1.4. You can find it in jQuery UI 1.8rc1:

http://blog.jqueryui.com/2010/01/jquery-ui-1-8rc1/

- Richard

On Thu, Jan 28, 2010 at 6:44 PM, dirk.diggler  wrote:

> Anthony,
>
> The short answer would appear to be no, it's not compatible.  To be
> fair, I'm running a slightly tweaked version of the plugin, so its
> entirely possible the incompatibility is something I introduced. This
> seems unlikely, though, since Firebug never even hits the breakpoint
> I've set in the "autocomplete" entry point function.
>
>
> On Jan 19, 8:24 am, Anthony Rayner  wrote:
> >  Hi all,
> >
> > We're using Jörn Zaefferer's awesome
> > 'Autocomplete<
> http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/>'
> > plugin and wondered if anyone knows if it is compatible with jQuery 1.4?
> Be
> > very intereseted to find out.
> >
> > Many thanks.
> > Anthony.
>


[jQuery] Re: FastFlip like plugin

2010-01-25 Thread Richard
carousel - so that's what that effect is called. Thanks!

I realized there was a new JQuery forum so asked this question again
there: http://forum.jquery.com/topic/fast-flip-like-image-gallery
It is interesting that I received an answer first in the older
supposedly abandoned forum.

Richard


On Jan 22, 2:33 am, Scott Sauyet  wrote:
> On Jan 20, 9:47 pm, Richard  wrote:
>
> > do you know of a JQuery plugin that supports rapidly skimming through
> > an image set like Google's FastFlip? For demo 
> > seehttp://fastflip.googlelabs.com/
>
> Do you mean something more than the various carousel plug-ins?
>
>    http://www.google.com/search?q=jquery+carousel
>
>   -- Scott


Re: [jQuery] jquery 1.4 and jqueryui tabs with ajax load

2010-01-22 Thread Richard D. Worth
See
http://forum.jquery.com/topic/jquery-1-4-upgrade-issues#1473700636757

- Richard

On Mon, Jan 18, 2010 at 5:59 AM, Joris D'Huys  wrote:

> I've upgraded to jquery 1.4 and my tabs with ajax load no longer
> work.
> uncaught exception: jQuery UI Tabs: Mismatching fragment identifier.
> When I use the previous jquery version, everything works fine.
>
> Any idea on how to solve this?
>
> Thanks
>


Re: [jQuery] New Forums

2010-01-22 Thread Richard D. Worth
eration edit controls*
Posts can be edited. This isn't possible with email, since the message was
already sent. And the web archive stores only the original message. This
needs to be used judiciously, but can be great for fixing typographical
errors, adding some important keywords to a thread topic, fixing some
formatting, etc.

*Permalinks*
Have you ever tried to email someone a google groups mailing list thread? Or
post it to a webpage, or another thread? Yuck. Here's how it goes, more or
less:
1. grab the title of the thread
2. open up the google groups web interface (don't forget to open the right
mailing list, there are 5-6 for jQuery)
3. search for the title of the thread
4. 
5. hope you got lucky in step 4 and it actually showed up. Many many don't.
Or sometimes you have to be creative with your search terms
6. click on the link
7. fuss with the url so it looks something like this
http://groups.google.com/group/jquery-en/browse_thread/thread/de2f89ee41d36535
instead of like this
http://groups.google.com/group/jquery-en/browse_thread/thread/de2f89ee41d36535/a735ff98c43bfc95?lnk=gst&q=plugin#a735ff98c43bfc95
8. Lament that your url contains only a GUID and no words from the post
title
(Note that it needn't be this complicated, as all mailing list threads and
posts have unique identifiers. So this complaint is more specific to the
google groups web interface than mailing lists in general. Many mailing
lists have a permalink in the post itself)

With the web-based forum, while on the thread you want to email or link to
1. Click 'Permalink'
http://forum.jquery.com/topic/boxy-hide-parent-22-1-2010

I'm right there with Karl. In fact we were together last week and both
commented that we weren't thrilled about giving up the mailing list and
switching to the forum. And he and I are among the top posters. I was always
really happy with the mailing list, and pleased with the flexibility it
offered in terms of mail clients. Every user was in complete control of
their experience, and could combine it with experiences they had with other
mailing lists. I wasn't anxious to give that up for a forum, especially if
it wasn't going to send emails, and let me respond via email. But I'm coming
around.

One of the compromises of a web-based forum is that the client (the web
browser) you choose is not as significant as the tools provided by the forum
itself. The website is basically the client for that back-end server data.
And as an end-user, you can only control that inasmuch as you get involved
and provide feedback on what features are important to you. Also, if it's a
good one, with web services such as RSS, APIs, advanced search, RESTful
urls, you could make your own clients, web browser/site or otherwise.

- Richard


[jQuery] FastFlip like plugin

2010-01-20 Thread Richard
Hello,

do you know of a JQuery plugin that supports rapidly skimming through
an image set like Google's FastFlip? For demo see 
http://fastflip.googlelabs.com/

Thanks,
Richard

(sorry, I accidentally posted this question to JQuery-UI)


[jQuery] Re: Select all items in list on form submit

2010-01-15 Thread Richard McKenna
Thank you both for all your input changing to a click event on the
button seems to have worked. I must have done something different this
time as I tried that before posting here.

Anyway thanks guys.




On Jan 15, 1:17 pm, Amos King  wrote:
> Try tying in to the click event of the submit instead of the submit event.
>  Just make sure to return false so the submit doesn't go off.
>
> On Fri, Jan 15, 2010 at 5:12 AM, Richard McKenna <
>
>
>
>
>
> richardofmcke...@googlemail.com> wrote:
> > So here's the full example. What it should do is select all the items
> > that have been moved to the right hand side, then submit the form.
>
> >http://67.199.29.196/selecttest.cfm
>
> > On Jan 14, 9:27 pm, pedalpete  wrote:
> > > Can you give a bit more detail?
>
> > > Is the submit not firing? or the .each?
>
> > > I always like to give my selectors an element+class/id, apparently it
> > > is more efficient, and I have noticed that some browses (it seems only
> > > sometimes) will miss some elements when only using the id/class.
>
> > > But throw some alerts in there so you can see what is not firing, and
> > > then we can go from there.
>
> --
> Amos Kinghttp://dirtyInformation.comhttp://github.com/Adkron
> --
> Looking for something to do? Visithttp://ImThere.com


[jQuery] Re: Select all items in list on form submit

2010-01-15 Thread Richard McKenna
So here's the full example. What it should do is select all the items
that have been moved to the right hand side, then submit the form.

http://67.199.29.196/selecttest.cfm


On Jan 14, 9:27 pm, pedalpete  wrote:
> Can you give a bit more detail?
>
> Is the submit not firing? or the .each?
>
> I always like to give my selectors an element+class/id, apparently it
> is more efficient, and I have noticed that some browses (it seems only
> sometimes) will miss some elements when only using the id/class.
>
> But throw some alerts in there so you can see what is not firing, and
> then we can go from there.


[jQuery] Re: Select all items in list on form submit

2010-01-15 Thread Richard McKenna
Thanks very much for your reply.

OK following your advice I tried the following

$('form#assignUsersForm').submit(function() {
alert("submit fired");
$('select#assignedUserList option').each(function(i) {
alert("each fired");
$(this).attr("selected", "selected");
});
});

Added the elements form & select selectors and the alerts. All works
as it should in FF and others but still not in IE7 & 6

the submit function isn't getting fired so the each never gets a
chance.

Ill put together a working example so you can see the full thing.

Thanks, Richard



On Jan 14, 9:27 pm, pedalpete  wrote:
> Can you give a bit more detail?
>
> Is the submit not firing? or the .each?
>
> I always like to give my selectors an element+class/id, apparently it
> is more efficient, and I have noticed that some browses (it seems only
> sometimes) will miss some elements when only using the id/class.
>
> But throw some alerts in there so you can see what is not firing, and
> then we can go from there.


[jQuery] Select all items in list on form submit

2010-01-14 Thread Richard McKenna
Hi all,

I wonder if anyone can help. I have this bit of code that selects all
the items in a multiselect list box when the form is submitted.

$('#assignUsersForm').submit(function() {
$('#assignedUserList option').each(function(i) {
$(this).attr("selected", "selected");
});
});

It works perfectly in IE8, FF, safari and chrome but not IE7 & 6

Does anyone have any idea why or can anyone suggest alternative code.

Thanks, Richard


Re: [jQuery] jquery.stylish-select.js - problem in Internet Explorer

2010-01-10 Thread Richard D. Worth
My guess is the field you are calling the plugin on also has an ASP.Net
validator on it. When the plugin triggers the change event to notify the
form element that the user changed the value, the ASP.Net validator receives
the event with the wrong target. See

http://dev.jqueryui.com/ticket/4071

The plugin could be updated to use fireEvent in IE to prevent this issue.
I'm still working on whether it makes sense (and how) to fix this in jQuery
core's .trigger. See

http://groups.google.com/group/jquery-dev/browse_thread/thread/b373713680e58be7

- Richard

On Sun, Jan 10, 2010 at 1:56 PM, Yvan  wrote:

> I'm using Jquery's "Stylish Select" plugin to replace a dropdown box
> in a form (ie: "Facility Type"):
>
> http://www.coverall.com/cnaws/quoterequest.aspx
>
> Although it's working fine in both Firefox and Safari, .. I'm having a
> problem with it in IE 7/8.
>
> The first problem that I'm having is that I'm getting a strange
> Javascript error message when I click on and try to select one of the
> options in the dropdown box:
>
> Message: 'length' is null or not an object
> Line: 172
> Char: 17
> Code: 0
> URI:
> http://www.coverall.com/cnaws/WebResource.axd?d=w7y_20eVwtqkECBvGtTXhctz7tfIr5GP58PmekFUdQI1&t=633700576732852734
>
> The second problem that I'm having (which I suspect is related to the
> javascript error message I'm getting in some way) ... is that I am not
> able to select any of the options in the dropdown box.
>
> The page that I'm trying to integrate this into is part of a .NET
> application.  Is it possible that there is something .NET specific
> that is creating a conflict in IE?  How can I fix this?
>
> Thanks in advance,
> - Yvan
>
>
>


[jQuery] Validation Plugin

2010-01-10 Thread Richard Beacroft
People enter an address to lookup on a google map, this makes an
asynchronous call and will either return a lat/longitude or not. if
not, i want to display an error to the user that an address could not
be found.

How do I go about this? I've not managed to get it working using the
remote attribute as I really need to call a client-side js function
which will in turn make the async call. Any suggestions?

Regards,
Rik


[jQuery] XPath for Attribute Selection Criteria

2010-01-06 Thread Richard Collette
The jQuery documentation states that it uses a combination of both CSS
and XPath selectors.

Does that mean that I should be able to select attributes using the
syntax:

[attName=Val1 or attName=val2]

since XPath criteria allow OR's like this?

If not, exactly what parts of XPath are supported?



[jQuery] (autocoplete) problem with fast typers:)

2010-01-05 Thread Richard KLINDA
Hello All!

I have a problem with the autocomplete plugin, if one types fast enough
to hit enter before the autocomplete suggestions show up (which is not
hard at all), then autocomplete doesn't run the result handler (and it
definitely should), so nothing happens.

So when user types "foo" into the search input field, he has to wait for
the suggestions to show up, only after this he can press enter to get
the results.  Is there a workaround for that?

Thanks,
Richard


Re: [jQuery] Dialog bug

2010-01-01 Thread Richard D. Worth
This is because the iframe is picking up the mouse events and not the page
that the dialog is in. To prevent this, place a div over the entire iframe
during the dialog drag. You can create and position this element in the
dialog's dragStart and remove it in the dragStop:

http://docs.jquery.com/UI/Dialog#event-dragStart

http://docs.jquery.com/UI/Dialog#event-dragStop

- Richard

On Fri, Jan 1, 2010 at 6:20 AM, Yuriy Pobezhymov <
yuradoc.commerc...@gmail.com> wrote:

> Hello.
> I have iframe (100% width and height) and jQueryUI dialog on the page.
> I don't know why, but when I move or resize dialog, it's work not
> correctly.
> You could see example here: http://lst.zt.ua/example
> If I make width:50%, than dialog works very good on blank part of
> page, but don't work correctly on iframe part.
>


Re: [jQuery] jquery customised easing

2009-12-30 Thread Richard D. Worth
The easing plug-in doesn't care what property is being animated:

$('#side').animate({backgroundPosition: "71px 9px"}, 500, 'easeOutBack');

- Richard

On Wed, Dec 30, 2009 at 9:50 AM, t1mmie  wrote:

>
> Hey Richard, thanks for your reply!!
>
> Yeah I was aware of the easing plug-in but I didn't think it could be used
> in the way I need it? As I am positioning background image..? Please
> correct
> me if I'm wrong - better yet - show me how? :D
>
> Thanks again
>
>
> Richard D. Worth-2 wrote:
> >
> > This can be achieved by using the easing plugin
> >
> > http://plugins.jquery.com/project/Easing
> >
> > which is included in the jQuery UI Effects Core. See here for a demo:
> >
> > http://jquery-ui.googlecode.com/svn/trunk/demos/effect/easing.html
> >
> > I think the one you're looking for is 'easeOutBack'
> >
> > - Richard
> >
> > On Wed, Dec 30, 2009 at 8:37 AM, t1mmie  wrote:
> >
> >>
> >> Hey all. I'll be quite amazed if anyone can help me with this one. I've
> >> been
> >> scouring the internet trying to find a tutorial on this, but no such
> >> luck!!
> >>
> >> I'm putting together my own little side navigation and I have an affect
> >> in
> >> my mind that I want to achieve and I'm sort of half-way there.
> >>
> >> I've thrown together [URL=http://www.webhero.co.uk/help/]a demo,
> >> here[/URL]
> >> ( http://www.webhero.co.uk/help ) of what I've made so far.
> >>
> >> I basically want the background to slide up and down depending on what
> >> menu
> >> the mouse hovers on to, with an easing (or bouncing) effect when you
> move
> >> over each one. I want the bouncing thing to go both ways, so that if the
> >> background is at the bottom and you hover over a link above, the
> >> background
> >> moves a little past the final result and then back -- so wherever it
> >> moves,
> >> it bounces or eases a little into place.
> >>
> >> Another thing to consider is that whatever page the user is on, the
> >> little
> >> bar will start off and go back to there - so in the demo we're presuming
> >> the
> >> user is on the 'web design' page.
> >>
> >> (You'll need to see the demo by now to see what I mean :P)
> >>
> >> As you can see, I've programmed this to work fine if you're moving your
> >> mouse top to bottom, but if you go from bottom to top - you'll see in
> the
> >> code that I'll need to put some conditional statements around the
> >> animations
> >> to test whereabouts the background currently is - and that's what I need
> >> help with really. Also if anyone has a few tips on how I can shorten
> down
> >> my
> >> javascript code here that would be awesome :)
> >>
> >> Or, if anyone has a better way of achieving what I'm trying to
> altogether
> >> then I gratefully welcome anyone's thoughts.
> >>
> >> It'll be easier to view the source but I'll include the html and JS
> here.
> >>
> >> [code]
> >>  >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> >> http://www.w3.org/1999/xhtml"; xml:lang="en" >
> >>
> >> 
> >>  >> src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"</a>;
> >> type="text/javascript">
> >> 
> >> 
> >> 
> >>
> >> 
> >>#side {
> >>min-height:600px;
> >>height:600px;
> >>width:243px;
> >>float:left;
> >>background:url(sidebg.jpg) no-repeat #33;
> >>background-position:71px 9px;
> >>}
> >>
> >>#side li, #side ul {
> >>  list-style:none;
> >>  padding:0;
> >>  margin:0;
> >>  float:left;
> >>}
> >>
> >>#side a * {
> >>  display: none;
> >>}
> >>

Re: [jQuery] jquery customised easing

2009-12-30 Thread Richard D. Worth
This can be achieved by using the easing plugin

http://plugins.jquery.com/project/Easing

which is included in the jQuery UI Effects Core. See here for a demo:

http://jquery-ui.googlecode.com/svn/trunk/demos/effect/easing.html

I think the one you're looking for is 'easeOutBack'

- Richard

On Wed, Dec 30, 2009 at 8:37 AM, t1mmie  wrote:

>
> Hey all. I'll be quite amazed if anyone can help me with this one. I've
> been
> scouring the internet trying to find a tutorial on this, but no such luck!!
>
> I'm putting together my own little side navigation and I have an affect in
> my mind that I want to achieve and I'm sort of half-way there.
>
> I've thrown together [URL=http://www.webhero.co.uk/help/]a demo,
> here[/URL]
> ( http://www.webhero.co.uk/help ) of what I've made so far.
>
> I basically want the background to slide up and down depending on what menu
> the mouse hovers on to, with an easing (or bouncing) effect when you move
> over each one. I want the bouncing thing to go both ways, so that if the
> background is at the bottom and you hover over a link above, the background
> moves a little past the final result and then back -- so wherever it moves,
> it bounces or eases a little into place.
>
> Another thing to consider is that whatever page the user is on, the little
> bar will start off and go back to there - so in the demo we're presuming
> the
> user is on the 'web design' page.
>
> (You'll need to see the demo by now to see what I mean :P)
>
> As you can see, I've programmed this to work fine if you're moving your
> mouse top to bottom, but if you go from bottom to top - you'll see in the
> code that I'll need to put some conditional statements around the
> animations
> to test whereabouts the background currently is - and that's what I need
> help with really. Also if anyone has a few tips on how I can shorten down
> my
> javascript code here that would be awesome :)
>
> Or, if anyone has a better way of achieving what I'm trying to altogether
> then I gratefully welcome anyone's thoughts.
>
> It'll be easier to view the source but I'll include the html and JS here.
>
> [code]
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" >
>
> 
>  src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"</a>;
> type="text/javascript">
> 
> 
> 
>
> 
>#side {
>min-height:600px;
>height:600px;
>width:243px;
>float:left;
>background:url(sidebg.jpg) no-repeat #33;
>background-position:71px 9px;
>}
>
>#side li, #side ul {
>  list-style:none;
>  padding:0;
>  margin:0;
>  float:left;
>}
>
>#side a * {
>  display: none;
>}
>#side a, #side a .hover {
>height:36px;
>width:172px;
>position:relative;
>display:block;
>background:url(side.png);
>}
>
>#side a.webdesign {
>margin:10px 0 7px 71px;
>width:172px;
>background-position:0 0;
>}
>#side .highlight a.webdesign:hover, #side
> a.webdesign .hover {
>background-position:-172px 0;
>}
>#side a.seo {
>margin:5px 0 7px 71px;
>width:172px;
>background-position:0 -40px;
>}
>#side .highlight a.seo:hover, #side a.seo .hover {
>background-position:-172px -40px;
>}
>#side a.blog {
>margin:5px 0 7px 71px;
>width:172px;
>background-position:0 -80px;
>}
>#side .highlight a.blog:hover, #side a.blog .hover {
>background-position:-172px -80px;
> 

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Richard D. Worth
The index is passed as the first argument to the callback function you
provide to .each.

- Richard

On Wed, Dec 23, 2009 at 8:49 PM, Eric Zhong wrote:

>
>
> 2009/12/24 Richard D. Worth 
>
> What about using .each?
>>
>> http://docs.jquery.com/Core/each#callback
>>
>> - Richard
>>
>>
>> On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong 
>> wrote:
>>
>>>
>>>
>>> 2009/12/24 Eric Zhong 
>>>
>>> when i use for-loop to access elements with array index or get() method
>>>> it doesn't work.
>>>> but i have to  use the index to access, what happen please .
>>>>
>>>>
>>>> ok:  http://jsbin.com/olego
>>>> wrong: http://jsbin.com/ulixu
>>>>
>>>
>>> wrong:http://jsbin.com/axugi
>>
>>
>>
> thank you, i have tested .each(), it works well , but i need the index,
> may be the .each() can carry out too, but i think the index will more
> simple.
>
>


Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Richard D. Worth
What about using .each?

http://docs.jquery.com/Core/each#callback

- Richard

On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong wrote:

>
>
> 2009/12/24 Eric Zhong 
>
> when i use for-loop to access elements with array index or get() method it
>> doesn't work.
>> but i have to  use the index to access, what happen please .
>>
>>
>> ok:  http://jsbin.com/olego
>> wrong: http://jsbin.com/ulixu
>>
>
> wrong:http://jsbin.com/axugi


Re: [jQuery] UI dialog, How to center buttons

2009-12-22 Thread Richard D. Worth
.ui-dialog .ui-dialog-buttonpane { text-align: center; }
.ui-dialog .ui-dialog-buttonpane button { float: none; }

- Richard

On Tue, Dec 22, 2009 at 1:44 PM, RobGMiller  wrote:

> What is the easiest way to manage button location at runtime?
>


Re: [jQuery] Dialog only opening the once

2009-12-22 Thread Richard D. Worth
See

http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/

Also, if you should have any more questions, note there's a separate list
for jQuery UI:

http://groups.google.com/group/jquery-ui

- Richard

On Tue, Dec 22, 2009 at 5:22 AM, Sir Rawlins <
robert.rawl...@thinkbluemedia.co.uk> wrote:

> Hello Guys,
>
> I'm using the jQuery UI plugin to create a modal dialog box to ensure
> the user is ready to commit an action. The code sample can be found
> here:
>
> http://pastebin.com/m1834215a
>
> Now, when the page first loads and I click  the dialog
> box appears, however, if I close the dialog box and then click on the
> link a second time, nothing happens. I have to reload the page before
> being able to click on the link again.
>
> Can anyone suggest why this might be an issue? Surely it should open
> consistently every time?
>
> Thanks,
>
> Robert
>


Re: [jQuery] Re: dialog box

2009-12-22 Thread Richard D. Worth
On Mon, Dec 21, 2009 at 11:01 PM, Jojje  wrote:

> oh ok :) Thanks for taking  time to answer :)
>
> So now i got this, it works but it sends the ajax calls twice.  is it
> maybe because i set the callback wrong? the callback argument gets:
> function() {  fGbDelete(gbid,link);  }
> Shouldn´t it get just: fGbDelete(gbid,link)? Or why is it triggering
> twice?
>

Because you're animating two elements, so they each trigger the callback at
the end of the animation. See

http://jsbin.com/uzite3

source: http://jsbin.com/uzite3/edit

- Richard


Re: [jQuery] dialog box

2009-12-21 Thread Richard D. Worth
This can't be done with JavaScript. In order for JavaScript to be able to
display an Ok and Cancel button for the user to press, JavaScript cannot
also be waiting to return a value for your function as that would block the
browser UI, since JavaScript is single-threaded. You have to use callback
functions instead. Here's an example:

http://jqueryui.com/demos/dialog/#modal-confirmation

view source: http://jqueryui.com/demos/dialog/modal-confirmation.html

Notice that the function that creates the dialog returns right away. Then
JavaScript is able to handle the dialog being interacted with, and
eventually either button click. Rather than those callback functions
returning a value, they carry out what your function would do depending on
which button is clicked.

- Richard

On Mon, Dec 21, 2009 at 10:00 AM, Jojje  wrote:

> Hi!
>
> I´m trying to make a dialog box , where you can press ok or cancel.
> How do i set the function so that when a user press ok it returns
> true? I'm new to javascript an jQuery so bare with me but this is what
> i got so far...
>
> function dialogBox(type,blockUi,heading,message) {
>var result;
>var signImg;
>var buttons;
>var ok = '';
>var cancel = ' value="Cancel" />';
>
>//warning dialogbox
>if (type == 'warning' || type == '') {
>signImg='_img/signs/warning.png';
>buttons = ok + cancel;
>}
>//Info dialogbox
>else if (type == 'info') {
>signImg = '_img/signs/info.png';
>buttons = ok;
>}
>//Fatal dialogbox
>else {
>signImg = '_img/signs/error.png';
>buttons = ok;
>}
>//Create dialogbox
>function dialogBoxCreation() {
>$(' >' + heading + ''+message+''+buttons+'')
>.appendTo('body')
>.center()
>.hide()
>.fadeIn();
>}
>dialogBoxCreation();
>//BlockUi
>if (blockUi=='yes') {
>$(' id="dialogBg">').height($('body').height()).width
> ('100%').css({
>'position': 'absolute',
>'background': '#000',
>'opacity': '0.6',
>'z-index': '1'
>}).prependTo('body').fadeIn();
>}
>$('#okBtn').click(function() {
>   $('#dialogBox,#dialogBg').fadeOut(function() {
>   $('#dialogBox').remove();
>   $('#dialogBg').remove();
>});
>});
>$('#noBtn').click(function() {
>$('#dialogBox,#dialogBg').fadeOut(function() {
> $('#dialogBox').remove();
> $('#dialogBg').remove();
> });
>});
> }
>
> Thanks in advance
>
> George
>


Re: [jQuery] Re: jQuery in e107 plugin?

2009-12-21 Thread Richard D. Worth
Sure, just include jQuery UI before including the second jQuery, or after
the noConflict call.

- Richard

On Sun, Dec 20, 2009 at 7:11 AM, Harsányi János  wrote:

> This sounds great :)
> One more problem:
> Can I extend the first jQuery with jQuery UI?
>
> On Dec 19, 9:31 pm, "Richard D. Worth"  wrote:
> > After the second one is loaded you can get back to the first one using
> > noConflict:
> >
> > http://docs.jquery.com/Core/jQuery.noConflict
> >
> > - Richard
> >
> > On Fri, Dec 18, 2009 at 11:13 AM, Harsányi János  >wrote:
> >
> > > I have two e107 plug ins which are using jQuery.
> > > The first one uses jQuery UI too.
> > > The problem is that the second plug in re-defines the jQuery without
> > > the UI extension, and the first plug in is not able to work properly.
> > > Is there any way to load jQuery only if it has not been added yet?
> > > (I have tried typeof(jQuery) but it is throwing an error: "jQuery is
> > > not defined".)
>


Re: Re[4]: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page?

2009-12-19 Thread Richard D. Worth
Please share a live sample page showing the issue. If you don't have a place
to host one, use jsbin.com:

http://jsbin.com/

- Richard

On Sat, Dec 19, 2009 at 5:02 PM, Andre Polykanine  wrote:

> Hello Richard and all,
>
> For some reason it doesn't work (IE8). Might it be due to the
> validation plugin?
> Thanks!
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
> jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule
>
> - Original message -
> From: Richard D. Worth 
> To: jquery-en@googlegroups.com 
> Date: Saturday, December 19, 2009, 11:27:39 PM
> Subject: [jQuery] Re: What is the event when a user presses the  enter key
> anywhere on the page?
>
> Is it, thanks to normalization done by jQuery, as Mike mentioned.
>
> - Richard
>
> On Sat, Dec 19, 2009 at 4:18 PM, Andre Polykanine  wrote:
>
> > Hello Richard and all,
> >
> > Is that a multi-browser solution?
> > Thanks a lot!
> >
> > --
> > With best regards from Ukraine,
> > Andre
> > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
> > jabber.org
> > Yahoo! messenger: andre.polykanine; ICQ: 191749952
> > Twitter: m_elensule
> >
> > - Original message -
> > From: Richard D. Worth 
> > To: jquery-en@googlegroups.com 
> > Date: Friday, December 18, 2009, 3:19:55 AM
> > Subject: [jQuery] Re: What is the event when a user presses the enter key
> >  anywhere on the page?
> >
> > $(document).keypress(function(e) {
> >  if(e.ctrlKey && e.which == 13) {
> >$('#myForm').submit();
> >  }
> > });
> >
> > or
> >
> > $('#myForm').keypress(function(e) {
> >  if(e.ctrlKey && e.which == 13) {
> >$(this).submit();
> >  }
> > });
> >
> > - Richard
> >
> > On Thu, Dec 17, 2009 at 7:40 PM, Andre Polykanine 
> wrote:
> >
> > > Hello Mike and all,
> > >
> > >  Sorry, I also have a question about keypresses.
> > > I need a form to be submitted by pressing Ctrl+Enter. How do I manage
> > > to do that?
> > > Thanks!
> > >
> > > --
> > > With best regards from Ukraine,
> > > Andre
> > > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon
> @
> > > jabber.org
> > > Yahoo! messenger: andre.polykanine; ICQ: 191749952
> > > Twitter: m_elensule
> > >
> > > - Original message -
> > > From: Mean Mike 
> > > To: jQuery (English) 
> > > Date: Thursday, December 17, 2009, 9:06:36 PM
> > > Subject: [jQuery] Re: What is the event when a user presses the enter
> key
> > >  anywhere on the page?
> > >
> > > keypress
> > >
> > >$(document).keypress(function(e) {
> > >if ((e.which && e.which == 13)
> ||
> > > (e.keyCode &&e.keyCode == 13))
> > > {
> > >// do something
> > >}
> > >});
> > > mean mike
> > > On Dec 17, 2:03 pm, "laredotorn...@zipmail.com"
> > >  wrote:
> > > > Hi,
> > > >
> > > > I would like to capture the event of pressing enter anywhere on the
> > > > page, even if the focus of the mouse cursor is not on a text field.
> > > > What event/element am I looking at?
> > > >
> > > > Thanks, - Dave
> > >
> > >
> >
> >
>
>


Re: Re[2]: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page?

2009-12-19 Thread Richard D. Worth
Is it, thanks to normalization done by jQuery, as Mike mentioned.

- Richard

On Sat, Dec 19, 2009 at 4:18 PM, Andre Polykanine  wrote:

> Hello Richard and all,
>
> Is that a multi-browser solution?
> Thanks a lot!
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
> jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule
>
> - Original message -
> From: Richard D. Worth 
> To: jquery-en@googlegroups.com 
> Date: Friday, December 18, 2009, 3:19:55 AM
> Subject: [jQuery] Re: What is the event when a user presses the enter key
>  anywhere on the page?
>
> $(document).keypress(function(e) {
>  if(e.ctrlKey && e.which == 13) {
>$('#myForm').submit();
>  }
> });
>
> or
>
> $('#myForm').keypress(function(e) {
>  if(e.ctrlKey && e.which == 13) {
>$(this).submit();
>  }
> });
>
> - Richard
>
> On Thu, Dec 17, 2009 at 7:40 PM, Andre Polykanine  wrote:
>
> > Hello Mike and all,
> >
> >  Sorry, I also have a question about keypresses.
> > I need a form to be submitted by pressing Ctrl+Enter. How do I manage
> > to do that?
> > Thanks!
> >
> > --
> > With best regards from Ukraine,
> > Andre
> > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
> > jabber.org
> > Yahoo! messenger: andre.polykanine; ICQ: 191749952
> > Twitter: m_elensule
> >
> > - Original message -
> > From: Mean Mike 
> > To: jQuery (English) 
> > Date: Thursday, December 17, 2009, 9:06:36 PM
> > Subject: [jQuery] Re: What is the event when a user presses the enter key
> >  anywhere on the page?
> >
> > keypress
> >
> >$(document).keypress(function(e) {
> >if ((e.which && e.which == 13) ||
> > (e.keyCode &&e.keyCode == 13))
> > {
> >// do something
> >}
> >});
> > mean mike
> > On Dec 17, 2:03 pm, "laredotorn...@zipmail.com"
> >  wrote:
> > > Hi,
> > >
> > > I would like to capture the event of pressing enter anywhere on the
> > > page, even if the focus of the mouse cursor is not on a text field.
> > > What event/element am I looking at?
> > >
> > > Thanks, - Dave
> >
> >
>
>


Re: Re[2]: [jQuery] To make an Id using a variable

2009-12-19 Thread Richard D. Worth
var lang = 'fra';
$('#lang option[value=' + lang + ']').attr('selected', 'selected');

or

var lang = 'deu';
$('#lang').val(lang);

- Richard

On Sat, Dec 19, 2009 at 3:35 PM, Andre Polykanine  wrote:

> Hello Richard and all,
>
> Yepp, it works)
> and if I want to do the same with a select box?
> 
> English
> French
> German
> Say, I have it previously set to French.
>Do I need to make a loop or I can do
>it in the same simple way?
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
> jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule
>
> - Original message -
> From: Richard D. Worth 
> To: jquery-en@googlegroups.com 
> Date: Saturday, December 19, 2009, 10:24:40 PM
> Subject: [jQuery] To make an Id using a variable
>
> $("#utype" + t)
>
> - Richard
>
> On Sat, Dec 19, 2009 at 3:18 PM, Andre Polykanine  wrote:
>
> > Hello everyone,
> > What I'm trying to do is to make a radio button checked depending on a
> > variable gotten via PHP.
> > Here's the code:
> > // What radio button was checked previously?
> > var t=;
> > // Say it was 2. Then the id must be #utype2
> > $("#'utype'+t").attr("checked", "checked");
> >
> > What am I doing wrong?
> > Maybe there's a way to do the same using the Value attribute of the
> > input tag?
> >
> > --
> > With best regards from Ukraine,
> > Andre
> > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
> > jabber.org
> > Yahoo! messenger: andre.polykanine; ICQ: 191749952
> > Twitter: m_elensule
> >
> >
>
>


Re: [jQuery] jQuery in e107 plugin?

2009-12-19 Thread Richard D. Worth
After the second one is loaded you can get back to the first one using
noConflict:

http://docs.jquery.com/Core/jQuery.noConflict

- Richard

On Fri, Dec 18, 2009 at 11:13 AM, Harsányi János wrote:

> I have two e107 plug ins which are using jQuery.
> The first one uses jQuery UI too.
> The problem is that the second plug in re-defines the jQuery without
> the UI extension, and the first plug in is not able to work properly.
> Is there any way to load jQuery only if it has not been added yet?
> (I have tried typeof(jQuery) but it is throwing an error: "jQuery is
> not defined".)
>


Re: [jQuery] To make an Id using a variable

2009-12-19 Thread Richard D. Worth
$("#utype" + t)

- Richard

On Sat, Dec 19, 2009 at 3:18 PM, Andre Polykanine  wrote:

> Hello everyone,
> What I'm trying to do is to make a radio button checked depending on a
> variable gotten via PHP.
> Here's the code:
> // What radio button was checked previously?
> var t=;
> // Say it was 2. Then the id must be #utype2
> $("#'utype'+t").attr("checked", "checked");
>
> What am I doing wrong?
> Maybe there's a way to do the same using the Value attribute of the
> input tag?
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
> jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule
>
>


Re: [jQuery] Jquery using Modal Window with user input

2009-12-18 Thread Richard D. Worth
You can use the jQuery UI Dialog with the modal option set to true. Here's
an example:

http://jqueryui.com/demos/dialog/#modal-form

- Richard

On Fri, Dec 18, 2009 at 10:12 PM, tinypond  wrote:

>
> What I am trying to do is the following: I have a webpage with some input
> fields, before the user can save the information to a database. I have the
> requirement to make the existing page dim and call up a modal window asking
> the user whey they made changes. This modal window would have a textbox to
> enter why the changes were made along with accept or cancel buttons. If the
> accept button  is pressed the information in the textbox needs to get past
> back to the webpage so it can then write all changed information along with
> the reason why it was changed to the database. If cancel was pressed
> nothing
> would be done.
>
> Could someone please point me to an example that does something similar to
> this or please tell me if this requirement is feasible.
>
> Thanks in advance for your help.
> --
> View this message in context:
> http://old.nabble.com/Jquery-using--Modal-Window-with-user-input-tp26852412s27240p26852412.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


Re: [jQuery] Help with droppable

2009-12-18 Thread Richard D. Worth
Answered here
http://groups.google.com/group/jquery-en/browse_thread/thread/6baa555a340b3ec4

- Richard

On Fri, Dec 18, 2009 at 5:28 AM, Alex Beston  wrote:

> Hi there,
>
> I'm trying to create some words which can be dragged and dropped into a
> container (called droppable).
>
> I've tried to dynamically create some divs each containing a word, and they
> can be dragged okay, but when I try to drop, it isnt recognised.
>
> I notice  that if I have a static div in the script it will be recognised
> by the droppable area (as per the example on the jquery site)
>
> thanks in advance,
>
> Alex
>
> -
>
> Heres the code I have so far:
>
> var these = [ 'red', 'blue', 'green', 'orange',  'white' ];
>
> function makeButtons() {
>  for (i in these)
> makeWord(these[i]);
> }
>
> function makeWord(s) {
> var e = $(document.createElement('div'));
> e.attr('id', s); // make a div with id orange / white / etc
>  e.append(s);
> e.draggable( );   // make this div draggable
> $('body').append(e);
> }
>
> function initialise(){
> makeButtons();
> $(function(){
>  $("#droppable").droppable({
> drop: function( ) { alert('dropped'); }
>   });
> });
> }
>
> // html
>
> 
> 
>  $(document).ready( initialise );
> 
> 
> 
> 
> 
>
>
> -
>
>
>
> --
> rgds, Alex
> -
>


Re: [jQuery] Help with draggable / droppable

2009-12-18 Thread Richard D. Worth
Worked ok for me:

http://jsbin.com/anure

source: http://jsbin.com/anure/edit

If you need any more help, note that there's a separate list for jQuery UI:

http://groups.google.com/group/jquery-ui

- Richard

On Thu, Dec 17, 2009 at 1:14 PM, Alex Beston  wrote:

> Hi there,
>
> I'm trying to create some words which can be dragged and dropped into a
> container.
>
> I've tried to dynamically create some divs each containing a word, and they
> can be dragged okay, but when I try to drop, it isnt recognised.
>
> thanks in advance,
>
> Alex
>
> -
>
> Heres the code I have so far:
>
> var these = [ 'red', 'blue', 'green', 'orange',  'white' ];
>
> function makeButtons() {
>  for (i in these)
> makeWord(these[i]);
> }
>
> function makeWord(s) {
> var e = $(document.createElement('div'));
> e.attr('id', s); // make a div with id orange / white / etc
>  e.append(s);
> e.draggable( );   // make this div draggable
> $('body').append(e);
> }
>
> function initialise(){
> makeButtons();
> $(function(){
>  $("#droppable").droppable({
> drop: function( ) { alert('dropped'); }
>   });
> });
> }
>
> // html
>
> 
> 
>  $(document).ready( initialise );
> 
> 
> 
> 
> 
>
>
> -
>


Re: [jQuery] Re: Styling dynamic content

2009-12-17 Thread Richard D. Worth
See
http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_event_work_on_a_new_element_I.27ve_created.3F

- Richard

On Fri, Dec 18, 2009 at 12:23 AM, Jason Kaczmarsky wrote:

> Ahah, this was the problem I thought i was having. I can't make jQuery
> work on dynamic content.
>
> If an element with a class of "file" is added to the document, like
> the previous case, no jQuery event related to that element works.
> Ex:
> $(".file").click(function(){
>alert(this)
>});
> Nothing is ever alerted if that element is clicked.
>
> Example page:
> http://pendarenstudios.com/NEW/file_sel.php
> On Dec 17, 10:39 am, Jason Kaczmarsky  wrote:
> > I must have missed something cause I made a new page and rewrote the
> > code and it worked fine. Thanks for the help guys.
> >
> > On Dec 17, 5:26 am, "Richard D. Worth"  wrote:
> >
> > > Works for me:
> >
> > >http://jsbin.com/egoto/
> >
> > > - Richard
> >
> > > On Wed, Dec 16, 2009 at 8:44 PM, Jason Kaczmarsky <
> jkaczmar...@yahoo.com>wrote:
> >
> > > > Yes, I am sure they are the correct class and are showing up
> properly.
> >
> > > > Button press:
> > > > //loop
> > > > $("#files").append(''+Files[i]+'');
> > > > //end loop
> >
> > > > Firebug:
> > > > 
> > > > work.txt
> > > > SAS Guide.txt
> > > > 
> >
> > > > On Dec 16, 7:43 pm, "Smith, Allex" 
> wrote:
> > > > > The browser should render all the styles no matter when they enter.
> >
> > > > > Are you sure that the class is assigned to those elements? I would
> make
> > > > sure by peeking at the rendered html via Firebug.
> >
> > > > > -Original Message-
> > > > > From: jquery-en@googlegroups.com [mailto:
> jquery...@googlegroups.com] On
> > > > Behalf Of Jason Kaczmarsky
> > > > > Sent: Wednesday, December 16, 2009 2:14 PM
> > > > > To: jQuery (English)
> > > > > Subject: [jQuery] Styling dynamic content
> >
> > > > > So I've created a little app which loads some filenames into a div
> via
> > > > > an AJAX query. This happens when a user clicks a button, not when
> the
> > > > > page loads. Because of this, I cannot style the filenames how I
> want.
> > > > > I've tried using CSS to do the trick:
> >
> > > > > .file{
> > > > > color: #F00;
> > > > > }
> >
> > > > > .file:hover{
> > > > > cursor:pointer;
> > > > > color:#000;
> > > > > }
> >
> > > > > This CSS colors the filenames red when it loads, but nothing in the
> > > > > hover event works.
> >
> > > > > Instead of this, I tried using jQuery to style it.
> >
> > > > > $(".file").hover(function(){
> > > > > $(this).css("background-color","#F00");
> > > > > },function(){
> > > > > $(this).css("background-color","#000");
> > > > > });
> >
> > > > > This also does not change anything. I assume it is because the
> element
> > > > > does not exist when the page is rendered, but later on. Although
> this
> > > > > doesn't explain why the text is red when I use the CSS, so I'm a
> bit
> > > > > confused. How would I accomplish this?
>


Re: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page?

2009-12-17 Thread Richard D. Worth
$(document).keypress(function(e) {
  if(e.ctrlKey && e.which == 13) {
$('#myForm').submit();
  }
});

or

$('#myForm').keypress(function(e) {
  if(e.ctrlKey && e.which == 13) {
$(this).submit();
  }
});

- Richard

On Thu, Dec 17, 2009 at 7:40 PM, Andre Polykanine  wrote:

> Hello Mike and all,
>
>  Sorry, I also have a question about keypresses.
> I need a form to be submitted by pressing Ctrl+Enter. How do I manage
> to do that?
> Thanks!
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
> jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule
>
> - Original message -
> From: Mean Mike 
> To: jQuery (English) 
> Date: Thursday, December 17, 2009, 9:06:36 PM
> Subject: [jQuery] Re: What is the event when a user presses the enter key
>  anywhere on the page?
>
> keypress
>
>$(document).keypress(function(e) {
>if ((e.which && e.which == 13) ||
> (e.keyCode &&e.keyCode == 13))
> {
>// do something
>}
>});
> mean mike
> On Dec 17, 2:03 pm, "laredotorn...@zipmail.com"
>  wrote:
> > Hi,
> >
> > I would like to capture the event of pressing enter anywhere on the
> > page, even if the focus of the mouse cursor is not on a text field.
> > What event/element am I looking at?
> >
> > Thanks, - Dave
>
>


Re: [jQuery] Re: prompt before closing dialog

2009-12-17 Thread Richard D. Worth
The built in browser confirm is the only way you can block (with for the
user to respond) without blocking the UI. Any javascript confirm will have
to use a callback instead of a return false. In that case you can return
false to prevent the close, then use the result of the jConfirm callback to
decide whether or not to call .dialog('close') manually. But you'll use a
flag to prevent an infinite loop.

- Richard

On Thu, Dec 17, 2009 at 6:44 AM, Obi1  wrote:

> it doesn't work for me as i'm using jConfirm not javascript confirm
> but it will have to do while i don't find a solution.
>
> Thanks
>


Re: [jQuery] Re: prompt before closing dialog

2009-12-17 Thread Richard D. Worth
Here's an example of using a confirm inside beforeclose

Demo: http://jsbin.com/urosa

Source: http://jsbin.com/urosa/edit

- Richard

On Thu, Dec 17, 2009 at 5:30 AM, Obi1  wrote:

> this doesn't seem to work, i mean the prompt appears but only after
> dialog is closed;
> also tryed using the beforeclose event but the prompt doesn't even
> show.
>


Re: [jQuery] traversal question for IE6 and IE7

2009-12-17 Thread Richard D. Worth
Your html isn't valid.
* A dl cannot contain a div directly as you've shown, only dts and dds.
* The dt and dd elements inside the div#bar need to be directly inside the
dl. They can't have a div as a parent.
* The dt and dd elements don't close immediately when you put a closing
slash in the opening tag. If you want to have them be empty and close them
immediately, change



to



otherwise the browser ignores the slash in the opening tag and waits for
some parsing rule to close the element. For more on that, see
http://groups.google.com/group/jquery-en/browse_thread/thread/bef63592011861ba

By the time the browser's html parser is done with it, your html might look
something like this:


  

  





  


which based on the html you've shared is a lot different than what you
started with.

- Richard

On Wed, Dec 16, 2009 at 6:39 PM, cewing  wrote:

> Hi all,  I've got a bit of HTML with the following structure:
>
> 
>  
>
>
>  
>  
>  
>  
>
>  
> 
>
> in IE6 and IE7 $("dd#baz").parents() returns an object with 2 nodes in
> it, the dl and div#foo.  it does not contain div#bar.  I assume this
> is due to a stricter interpretation of proper DOM structure in IE6 and
> IE7 than in FF, Safari, Chrome, Opera, or even IE8 (where div#bar _is_
> present).
>
> I need to find div#bar.  Can someone suggest a traversal-based
> workaround to getting there from dd#baz that will work in IE6 and
> IE7?  The problem with non-traversal based solutions is that the
> entire structure you see here may be nested inside each of the dd
> elements, and if so, I'd need to find the div#bar _closest_ in the
> parents hierarchy to the dd from which I begin.
>
> If absolutely necessary, I can scrap dl structure and go with a more
> pure div-based structure, but I'm trying to hook into some automatic
> styling in my chosen framework and that is hung on dl elements.
>
> Any suggestions?
>


Re: [jQuery] Re: Styling dynamic content

2009-12-17 Thread Richard D. Worth
Works for me:

http://jsbin.com/egoto/

- Richard

On Wed, Dec 16, 2009 at 8:44 PM, Jason Kaczmarsky wrote:

> Yes, I am sure they are the correct class and are showing up properly.
>
> Button press:
> //loop
> $("#files").append(''+Files[i]+'');
> //end loop
>
> Firebug:
> 
> work.txt
> SAS Guide.txt
> 
>
> On Dec 16, 7:43 pm, "Smith, Allex"  wrote:
> > The browser should render all the styles no matter when they enter.
> >
> > Are you sure that the class is assigned to those elements? I would make
> sure by peeking at the rendered html via Firebug.
> >
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of Jason Kaczmarsky
> > Sent: Wednesday, December 16, 2009 2:14 PM
> > To: jQuery (English)
> > Subject: [jQuery] Styling dynamic content
> >
> > So I've created a little app which loads some filenames into a div via
> > an AJAX query. This happens when a user clicks a button, not when the
> > page loads. Because of this, I cannot style the filenames how I want.
> > I've tried using CSS to do the trick:
> >
> > .file{
> > color: #F00;
> > }
> >
> > .file:hover{
> > cursor:pointer;
> > color:#000;
> > }
> >
> > This CSS colors the filenames red when it loads, but nothing in the
> > hover event works.
> >
> > Instead of this, I tried using jQuery to style it.
> >
> > $(".file").hover(function(){
> > $(this).css("background-color","#F00");
> > },function(){
> > $(this).css("background-color","#000");
> > });
> >
> > This also does not change anything. I assume it is because the element
> > does not exist when the page is rendered, but later on. Although this
> > doesn't explain why the text is red when I use the CSS, so I'm a bit
> > confused. How would I accomplish this?
>


Re: [jQuery] prompt before closing dialog

2009-12-17 Thread Richard D. Worth
Handle the beforeclose event and return false if you don't want to allow the
dialog to close yet:

http://docs.jquery.com/UI/Dialog#event-beforeclose

If you have any further questions, there's a separate list for questions
about jQuery UI plugins:

http://groups.google.com/group/jquery-ui

- Richard

On Thu, Dec 17, 2009 at 5:10 AM, Obi1  wrote:

> Hi, i'm having some trouble because i'm using a dialog witch has a
> form in it where someone can change info about their hotel. this
> dialog also has 2 buttons one to close and the other to save changes.
> what i'm trying to accomplish is - when someone made sany change and
> tries to close de dialog without saving he will be prompt if he really
> wants to leave without saving the changes an the dialog only closes if
> person choses 'yes'.
>
> when closing the window clicking the 'close' button i can accomplish
> this, but i wanted it also to work when closing dialog using the "x"
> button on the top of the dialog.
>
> is this possible?
>


Re: [jQuery] Viewport Scroll

2009-12-16 Thread Richard D. Worth
See http://flesler.blogspot.com/2007/10/jqueryscrollto.html

- Richard

On Tue, Dec 15, 2009 at 2:42 PM, Wroathe  wrote:

> Hi there!
>
> I'm using jQuery to load in some content from a separate page and I
> was wondering if there was a way to make the browser viewport scroll
> down to the element I'm adding in by using jQuery or Javascript?
>


Re: [jQuery] Call from Javascript to jQuery javascript function

2009-12-16 Thread Richard D. Worth
On Tue, Dec 15, 2009 at 8:46 PM, brian  wrote:

> And, if you'd like callit() to be run only when the document is fully
> loaded, just wrap the call in another $(document).ready() block:
>
>
>  
> $(document).ready(function() {
>   // whatever stuff needs to occur when the doc is loaded
> });
>
> // will be defined immediately
>  function callit() {
>alert("Hello world!");
> }
>  
>  
>  $(document).ready(function() {
>   // will be run when doc is loaded
>  callit();
> });
>  
>

No need to add another block. As you pointed out earlier, the document ready
won't run until later. By the time it does, the callit function will have
been defined:

 
$(document).ready(function() {
  // will be run when doc is loaded
  callit();
});

// will be defined immediately
function callit() {
   alert("Hello world!");
}
 

- Richard


[jQuery] Re: running an onload code snippet only once

2009-12-16 Thread Richard KLINDA
No, I mean I now use window.onload as a workaround (instead of
$(function(){})), it fires only once of course, but I did not like it
because I can only use it once in the code.  I did not know about
$(window).load(func), thats very nice, thanks.

>>>>> Regarding 'Re: running an onload code snippet only once'; MorningZ adds:

  > Those events window.onload, in jQuery, that would be $(window).load
  > (...), should *not* be firing at any time other than when the
  > document loads the first time... something else has to be going on
  > with your code to fire off that code again

  > On Dec 15, 3:27 pm, Richard KLINDA  wrote:
  >> Hello, what is a good way to run a code snippet after the page is
  >> loaded, but only just one time?

  >> I use the ready event $(function(){...}); most of the time, but
  >> sometimes it fires multiple times (when the DOM changes I think),
  >> and rarely there are stuff that I only want to run JUST ONCE per
  >> pageload.

  >> What is a good way to achieve that?

  >> Now I do window.onload = function() {...}, but I hope there is
  >> something better.

  >> Thanks in advance...

  >> -- Richard

-- 
Udv, Richard


[jQuery] running an onload code snippet only once

2009-12-15 Thread Richard KLINDA
Hello, what is a good way to run a code snippet after the page is
loaded, but only just one time?

I use the ready event $(function(){...}); most of the time, but
sometimes it fires multiple times (when the DOM changes I think), and
rarely there are stuff that I only want to run JUST ONCE per pageload.

What is a good way to achieve that?

Now I do window.onload = function() {...}, but I hope there is something
better.

Thanks in advance...

-- 
Richard


Re: [jQuery] beginner help with using custom jquery ui objects.

2009-12-14 Thread Richard D. Worth
We'd love to help answer these questions over here:

http://groups.google.com/group/jquery-ui

Thanks.

- Richard

On Mon, Dec 14, 2009 at 7:02 PM, David_ca wrote:

> Hi,
>
> With help from this tutorial
> http://bililite.com/blog/understanding-jquery-ui-widgets-a-tutorial/
> I started to create my own custom ui objects based on the ui widget
> factory
>
> I am hoping somebody could help me with the object syntax.
>
> //
> Question 1) Alternate way to call a method of the widget.
> I am able to call method darker() of my widget using this syntax:
>
> $().ready(function() {
>var aGreen = $('#test4 .target').green4();
>$('#test4 .target').green4('darker');
> });
>
> For me it is more natural to do the same thing using the below syntax
> but
> it does not work. Can someone tell me why it doesn't work and/or show
> my the best practice approach
> to create a variable of a widget object instantiation and reference it
> later.
>
> $().ready(function() {
>var aGreen = $('#test4 .target').green4();
>aGreen.darker();
> });
>
> ///
> Question 2) How make a function return something.
> Supposing my widget has a getHello() method that returns a "hello"
> string
> How do I call that method of my widget. I tried the below code but it
> does not work.
> $().ready(function() {
>var aGreen = $('#test4 .target').green4();
>console.log("response: "+ $('#test4 .target').green4('getHello'));
>
> });
>
>
>
> ///
> Question 3) How to pass a parameter to a function.
> Supposing I have setDarker(value) function that takes a parameter
> How do I invoke that function. Below is the syntax I hope would
> work but it doesn't.
>
> $().ready(function() {
>var aGreen = $('#test4 .target').green4();
>aGreen.setDarker("big");
>
> });
>
> BAnd finally below is the html code I used for testing,
> Also a  link to the same code is here
>
> http://docs.google.com/Doc?docid=0AbxHJxs0V9KvZGRucDVyNnJfMTdmZ3ZmOG4zNA&hl=en
>
> Thank you for any help
> David
>
>
> //
>  www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> http://www.w3.org/1999/xhtml"; lang="en-
> US">http://gmpg.org/xfn/11";>
>Hacking at 0300 : Understanding jQuery UI widgets: A
> tutorial title>
>
>http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/</a>
> jquery.min.js" type="text/javascript">
>http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/</a>
> jquery-ui.min.js<<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/%0Ajquery-ui.min.js">http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/%0Ajquery-ui.min.js</a>>"
> type="text/javascript">
>
> 
> $.widget('ui.green4', {
>getLevel: function () { return this._getData('level'); },
>setLevel: function (x) {
>var greenlevels = this._getData('greenlevels');
>var level = Math.floor(Math.min(greenlevels.length-1, Math.max
> (0,x)));
>this._setData('level', level);
>this.element.css({background: greenlevels[level]});
>},
>_init: function() { this.setLevel(this.getLevel()); },
>darker: function() { this.setLevel(this.getLevel()-1); },
>setDarker: function(value){console.log("value: "+value)},
>getHello: function(){"hello"},
>lighter: function() { this.setLevel(this.getLevel()+1); },
>off: function() {
>this.element.css({background: 'none'});
>this.destroy();
>}
> });
>
> $.ui.green4.defaults = {
>level: 15,
>greenlevels:
>
> ['#000','#010','#020','#030','#040','#050','#060','#070','#080','#090','#0a0','#0b0','#0c0','#0d0','#0e0','#0f0',
> '#fff']
> };
> 
>
> 
> $().ready(function() {
>var aGreen = $('#test4 .target').green4();
>$('#test4 .target').green4('darker');
> });
> 
>
> 
> 
>
> 
> This is a test paragraph
> 
>
>
> 
> 
>


Re: [jQuery] Re: AND OR Expression

2009-12-10 Thread Richard D. Worth
var tdval = parseInt(td4th.text(), 10); //base 10
if ( (tdval > 4) || (tdval > 2 && activeCEO == 'Yes') )

- Richard

On Thu, Dec 10, 2009 at 3:26 PM, evanbu...@gmail.com wrote:

> If I knew what I was doing, why would I be asking for help? I already
> know what doesn't work. That's why I posted the question.
>
> Is this right?
>
> if parseInt((td4th.text() > 4)) || (parseInt((td4th.text())) > 2 &&
> (activeCEO == 'Yes'))
>
> On Dec 10, 2:46 pm, MorningZ  wrote:
> > > This isn't working out for me "
> >
> > Expecting it to?
> >
> > First post you were comparing:  string > string...  which isn't going
> > to work
> >
> > Follow up post after blowing right over Richard's suggestion, you are
> > comparing string > number, which *still* isn't going to work...
> >
> > and this line doesn't make any sense
> >
> > var td4th = parseInt($('td:nth-child(4)', jQuery
> > (this)));
> >
> > as you are parseInt-ing a jQuery object
> >
> > On Dec 10, 2:36 pm, "evanbu...@gmail.com"  wrote:
> >
> >
> >
> > > This isn't working out for me
> >
> > > var td4th = parseInt($('td:nth-child(4)', jQuery
> > > (this)));
> > >if (td4th.text() > 4) || ((td4th.text() > 2 && (activeCEO ==
> > > 'Yes'))
> > >   td4th.addClass(bgColor);
> >
> > > If I do this, it works
> >
> > > if (td4th.text() > 4)
> > >td4th.addClass(bgColor);
> >
> > > but once I add the rest beyond the || operator it doesn't.
> >
> > > On Dec 10, 1:29 pm, "Richard D. Worth"  wrote:
> >
> > > > Convert with parseInt and then compare int to int instead of strings
> >
> > > >
> https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global...
> >
> > > > - Richard
> >
> > > > On Thu, Dec 10, 2009 at 12:26 PM, evanbu...@gmail.com
> > > > wrote:
> >
> > > > > I having trouble with this line
> >
> > > > > if (td4th.text() > '4') || (td4th.text() > '2' && (activeCEO ==
> > > > > 'Yes'))
> >
> > > > > In plain English, I want it to be true if
> >
> > > > > td4th > 4
> >
> > > > > OR
> >
> > > > > td4th > 2 AND activeCEo = 'Yes'
> >
> > > > > Thanks
> >
> > > > > $('#tblBoardDirectors tr').each(function() {
> > > > >var relStatus = ($('td:nth-child(5)',
> $(this)).text())
> > > > >var activeCEO = ($('td:nth-child(12)', $(this)).text
> > > > > ());
> > > > >{
> > > > >if (relStatus != 'Retired') {
> > > > >var td4th = $('td:nth-child(4)', $
> > > > > (this));
> > > > >if (td4th.text() > '4') ||
> (td4th.text() >
> > > > > '2' && (activeCEO == 'Yes'))
> > > > >td3rd.addClass(bgColor);
> > > > >}
> > > > >}
> > > > >});- Hide quoted text -
> >
> > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
>


Re: [jQuery] AND OR Expression

2009-12-10 Thread Richard D. Worth
Convert with parseInt and then compare int to int instead of strings

https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Functions/ParseInt

- Richard

On Thu, Dec 10, 2009 at 12:26 PM, evanbu...@gmail.com
wrote:

> I having trouble with this line
>
> if (td4th.text() > '4') || (td4th.text() > '2' && (activeCEO ==
> 'Yes'))
>
> In plain English, I want it to be true if
>
> td4th > 4
>
> OR
>
> td4th > 2 AND activeCEo = 'Yes'
>
> Thanks
>
>
> $('#tblBoardDirectors tr').each(function() {
>var relStatus = ($('td:nth-child(5)', $(this)).text())
>var activeCEO = ($('td:nth-child(12)', $(this)).text
> ());
>{
>if (relStatus != 'Retired') {
>var td4th = $('td:nth-child(4)', $
> (this));
>if (td4th.text() > '4') || (td4th.text() >
> '2' && (activeCEO == 'Yes'))
>td3rd.addClass(bgColor);
>}
>}
>});
>
>
>


Re: [jQuery] Re: jquery numeric spinner and jqueryui tabs

2009-12-10 Thread Richard D. Worth
You may want to bring this up on the jQuery UI list

http://groups.google.com/group/jquery-ui

A live sample page would help. If you don't have a place to host one, use
jsbin.com::

http://jsbin.com/

- Richard

On Thu, Dec 10, 2009 at 10:15 AM, Jason Meckley wrote:

> Richard, thank you, but that didn't work. for the same reasons as
> before. if I try to reload the tab I am viewing then it doesn't work.
>
> I dug around some and found 1. why this is happening 2. a hack to make
> it work.
> 1. if I attempt to selected the selected tab and collapsible is false
> the operation is doesn't fire (aborted?).
> 2. if I select the selected tab and collapsible is true the tab is
> minimized.
> 3. the spinner is calculating hieght/width/margin when spinner() is
> called to aline the icons to the textbox. it's using
> element.outerHeight() and element.outerWidth() as part of the
> calculation.
> 4. it seems that the panel's content is appended to the browser DOM
> after load but before show. this is why the spinner formats work in
> the call to show, not load.
>
> does that make sense?
>
> hacks:
> 1. Hidden hack tab
> 
>  
>   tab 1
>   tab 1
>   &nbps;
>  
>  
> 
> var HIDDEN_TAB_INDEX = $(".tabs").("option", "length")-1;
> var tabs = $(".tabs");
> var index = tabs.tabs("option", "selected");
> tabs
> .tabs("url", index, url)
>.tabs("select", HIDDEN_TAB_INDEX)
>.tabs("select", index);
> this works, but causes a "flash" as you will see the panel shrink and
> expand.
>
> 2. Collapsible hack
> 
>  
>   tab 1
>   tab 1
>  
> 
> $(".tabs").tabs({collapsible:true});
> var tabs = $(".tabs");
> var index = tabs.tabs("option", "selected");
> tabs
> .tabs("url", index, url)
>.tabs("select", index) //collapse
>.tabs("select", index); //expand
> which again produces a flash with the shrinking/expanding. it also
> means the user can collapse any tab, which I don't want.
>
> 3. Hard code the style values.
> $(".tabs").tabs({
>load: function(event, ui){
>  $(".spinner", ui.panel).spinner().find(".ui-spinner-
> buttons").css({hard coded values});
>}
> });
> I like that I don't get a "flash" but it's also dependent on the
> styling of the input box not changing. if it does then I have to
> change my script.
> right now I'm leaning towards option 3 since it's not used in that
> many places.
>
> I'm wondering... is there an event I can bind to that say after the
> textbox (or entire ajax content) is attached to the browser DOM (or
> after the content is attached to a parent), process the spinner?
>
> $(function(){$(".spinner").spinner();}); doesn't work when placed
> within the ajax content itself. it produces the same results as
> calling spinner in the load event. the outerHeight/Width are 0.
>
> On Dec 10, 6:29 am, "Richard D. Worth"  wrote:
> > On Wed, Dec 9, 2009 at 4:52 PM, Jason Meckley  >wrote:
> >
> >
> >
> > > it appears that calling load programatically (rather than clicking on
> > > the tab manually) does not call the show function.
> >
> > In that case, you might try .triggerHandler('click')
> >
> > - Richard
>


Re: [jQuery] Conflict at function data() of jquery 1.3.2 library and ui.core.js

2009-12-10 Thread Richard D. Worth
What exactly is the problem?

- Richard

On Thu, Dec 10, 2009 at 2:58 AM, cogitovn  wrote:

> Dear all,
> I use both libraries: jQuery 1.3.2 and ui.core, ui.slider. Besides,
> plugin (jquery) tool.tooltip (http://flowplayer.org/tools/
> tooltip.html <http://flowplayer.org/tools/%0Atooltip.html>) is also in
> use.
> At 2 different locations of the site, I call tooltip() function.
> The first, tooltip() call to $.data() of jQuery, line 1368 in
> jquery.js
> But at other, tooltip() call to $.fn[name], line 225 in ui.core.js
> Althougt, both include these libraries concurrently, in the same
> order.
> I don’t know why.
> Please help me for useful information.
> Thank you very much!
>
>


Re: [jQuery] selectedClass option in jQuery UI 1.7.2

2009-12-10 Thread Richard D. Worth
And if you have any future questions about jQuery UI, note there's a mailing
list for it:

http://groups.google.com/group/jquery-ui

Thanks.

- Richard

On Thu, Dec 10, 2009 at 7:07 AM, Richard D. Worth  wrote:

> This decision was made as part of our creation and adoption of the jQuery
> UI CSS Framework. This offers a set of generic widget classes that we use
> across all jQuery UI widgets, and we encourage others to make use of the
> same. Then all widgets can be themed with simplicity, using a pre-built
> theme, or rolling their own theme with themeroller.com.
>
> http://jqueryui.com/docs/Theming
>
> http://jqueryui.com/docs/Theming/ThemeRollerReady
>
> http://themeroller.com/
>
> jQuery UI Tabs, like other jQuery UI widgets, continues to have
> widget-specific classes, as well as more generic css framework classes. They
> are summarized here:
>
> http://jqueryui.com/docs/tabs/#theming
>
> Notice for example that the selected tab gets both the ui-tabs-selected
> class (tabs specific) and the ui-state-active class (css framework). Both
> have the ui- prefix, meaning they're in the jQuery UI css class namespace.
> And they're managed by the plugin. For consistency and simplicity, we've
> made neither configurable. This is our standard way of communicating on the
> identity and state of the selected tab. It's up to the user to either write
> a css rule that contains one of these two classes, or manually add some
> other class at an appropriate time.
>
> - Richard
>
>
> On Mon, Dec 7, 2009 at 1:26 AM, Donny Kurnia wrote:
>
>> It's have been a long time since I use jQuery UI tabs in my project. My
>> client want dragable function, so I use this opportunity to upgrade all
>> jquery ui.
>>
>> However, I notice one page got broken, because now the class used for
>> selected tab is hardcoded in the ui.tabs.js
>>
>> I search the ticket and found this: http://dev.jqueryui.com/ticket/3691
>>
>> I just wonder, what the decision to remove the option and use hardcoded
>> class instead? As I know, using hardcoded constant will lead to hard to
>> maintenance code and might result in an inconsistence.
>>
>> Whatever the decision, I want to thanks to all jQuery developer and jQuery
>> UI contributor.
>>
>> --
>> Donny Kurnia
>> http://blog.abifathir.com
>> http://hantulab.blogspot.com
>> http://www.plurk.com/user/donnykurnia
>>
>
>


Re: [jQuery] selectedClass option in jQuery UI 1.7.2

2009-12-10 Thread Richard D. Worth
This decision was made as part of our creation and adoption of the jQuery UI
CSS Framework. This offers a set of generic widget classes that we use
across all jQuery UI widgets, and we encourage others to make use of the
same. Then all widgets can be themed with simplicity, using a pre-built
theme, or rolling their own theme with themeroller.com.

http://jqueryui.com/docs/Theming

http://jqueryui.com/docs/Theming/ThemeRollerReady

http://themeroller.com/

jQuery UI Tabs, like other jQuery UI widgets, continues to have
widget-specific classes, as well as more generic css framework classes. They
are summarized here:

http://jqueryui.com/docs/tabs/#theming

Notice for example that the selected tab gets both the ui-tabs-selected
class (tabs specific) and the ui-state-active class (css framework). Both
have the ui- prefix, meaning they're in the jQuery UI css class namespace.
And they're managed by the plugin. For consistency and simplicity, we've
made neither configurable. This is our standard way of communicating on the
identity and state of the selected tab. It's up to the user to either write
a css rule that contains one of these two classes, or manually add some
other class at an appropriate time.

- Richard

On Mon, Dec 7, 2009 at 1:26 AM, Donny Kurnia  wrote:

> It's have been a long time since I use jQuery UI tabs in my project. My
> client want dragable function, so I use this opportunity to upgrade all
> jquery ui.
>
> However, I notice one page got broken, because now the class used for
> selected tab is hardcoded in the ui.tabs.js
>
> I search the ticket and found this: http://dev.jqueryui.com/ticket/3691
>
> I just wonder, what the decision to remove the option and use hardcoded
> class instead? As I know, using hardcoded constant will lead to hard to
> maintenance code and might result in an inconsistence.
>
> Whatever the decision, I want to thanks to all jQuery developer and jQuery
> UI contributor.
>
> --
> Donny Kurnia
> http://blog.abifathir.com
> http://hantulab.blogspot.com
> http://www.plurk.com/user/donnykurnia
>


Re: [jQuery] Problem with images loaded dynamically

2009-12-10 Thread Richard D. Worth
My guess would be to check and make sure the server is configured to send
the appropriate mime-type for the file, based on the extension.

- Richard

On Mon, Dec 7, 2009 at 2:35 PM, jlee  wrote:

> Hi,
> I'm stuck here - I'm trying to load images dynamically on my website,
> but for some reason the method I use works on a server on my local
> computer, but behaves very strangely on a remote server...
>
> I use this code to load the images:
> function replaceImage(imgName, container) {
> $j(container).hide(); //so it fades out once the image has loaded
> $j(container).image(imgName, function() { //this is a simple plugin,
> i'll paste it's code below
> if(container != "#galImage") { //if it's a thumbnail, i want to be
> able to click on it
> $j(container).empty().append(this).wrap("");
> } else { //it's not a thumbnail, so no "a" wrapper
> $j(container).empty().append(this);
> }
> $j(container).fadeIn(); //finally, show the image
> });
> }
>
> The simple plugin for loading images into a container:
> $.fn.image = function(src, f){
> return this.each(function(){
> var i = new Image();
> i.src = src;
> i.onload = f;
> this.appendChild(i);
> });
> }
>
> This code is used like this: replaceImage('images/' + imgName,
> 'imgCont1');
>
> As I said, everything works just fine on my machine with apache server
> installed. But, when I open the website located on a server, it turns
> out that most images don't appear at all, and the ones that do show up
> are severely distorted... Does anybody know what could cause that?
> Here's an example of such distorted image:
> http://www.eurydicesite.info/error.jpg
>
> The non-working site is available here: http://www.eurydicesite.info -
> > when you click on "portfolio", 9 thumbnail images should appear to
> the left, but they don't.
>


Re: [jQuery] jquery numeric spinner and jqueryui tabs

2009-12-10 Thread Richard D. Worth
On Wed, Dec 9, 2009 at 4:52 PM, Jason Meckley wrote:

>
> it appears that calling load programatically (rather than clicking on
> the tab manually) does not call the show function.
>

In that case, you might try .triggerHandler('click')

- Richard


[jQuery] Not working in Firefox (mac) or IE

2009-12-09 Thread Richard McKenna
Hi everyone,

I have the below piece of code it works perfectly in Chrome, Firefox
(pc) and Safari (mac & pc).

But I can't get it to work in IE 8 or Firefox 3.5.5 on OS X

$('#licenseTerms').scroll(function (){
var a = $(this).scrollTop() / 15;
var b = $('#licenseTerms').height();
//console.log(a);
//console.log(b);
if ( a >= b ) {
$('#acceptLicenseTerms').removeAttr("disabled");
}
});

#licenseTerms is a div with auto overflow.
#acceptLicenseTerms is a disabled checkbox.

Does anyone have any ideas why it isn't working?

Kind regards,

Richard


Re: [jQuery] How do I write an express to access all radio button elements?

2009-12-09 Thread Richard D. Worth
$(':radio')

http://docs.jquery.com/Selectors/radio

- Richard

On Wed, Dec 9, 2009 at 10:41 AM, Dhruva Sagar wrote:

> $('input[type=radio]')
>
> Thanks & Regards,
> Dhruva Sagar.
>
>
>
>
>
> On Wed, Dec 9, 2009 at 9:03 PM, laredotorn...@zipmail.com <
> laredotorn...@zipmail.com> wrote:
>
>> Hi,
>>
>> I'm trying to access all radio button elements with this expression ..
>>
>> var expr = $("element[type='radio']");
>>
>> but the experts among you know this isn't correct.  What is the
>> correct expression?
>>
>> Thanks,  - Dave
>>
>
>


Re: [jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread Richard D. Worth
I'm glad it helped!

- Richard

On Wed, Dec 9, 2009 at 10:05 AM, T.J.  wrote:

> You know what, I just think I fixed my own problem. The function call
> is executed before I bind the click event to the button, which means
> that it has no event to trigger yet. Two days I've spent wondering
> about this, and only saw it because of far, far fewer lines of code on
> that example page.
>
> Thanks!
> T.J.
>
> On Dec 9, 8:56 am, "T.J."  wrote:
> > Thanks for the link; I haven't heard of that site before.
> >
> > http://jsbin.com/axuwi3is my (very basic) example of what I'm trying
> > to attempt. What the button on my page actually does is quite
> > different, and if you need that then let me know.
> >
> > On Dec 9, 8:29 am, "Richard D. Worth"  wrote:
> >
> >
> >
> > > Could you share a live sample page? If you don't have a place to host
> one,
> > > jsbin.com:
> >
> > >http://jsbin.com/
> >
> > > That will allows us to see what you're seeing quite easily.
> >
> > > - Richard
> >
> > > On Wed, Dec 9, 2009 at 9:23 AM, T.J.  wrote:
> > > > For further clarification, the way I'm calling that is as follows:
> >
> > > > for (var x = 1; x <= count; x++) {
> > > > $("#button").triggerHandler("click");
> > > > }
> >
> > > > which is inside of a function that I call on page load, and it isn't
> > > > working at all.
> >
> > > > Thanks,
> > > > T.J.
> >
> > > > On Dec 8, 1:32 pm, "T.J."  wrote:
> > > > > Hi all,
> >
> > > > > I have a click event bound to a button that I'm needing to call
> > > > > without any user interaction on the button. I'm using the fragment
> > > > > portion of the URL to determine how many times the button's "click"
> > > > > function needs to fire and using a for loop to (attempt to, at
> least)
> > > > > trigger the click. I've tried this with .click(),
> .trigger("click"),
> > > > > and .triggerHandler("click") but with no success. I could write a
> > > > > JavaScript function and call that within the loop, but that's
> > > > > unnecessary code..
> >
> > > > > Is what I'm doing valid, or can the .trigger/.triggerHandler
> methods
> > > > > not be called from within a loop? The syntax I'm using is as
> follows:
> >
> > > > > $("#button").triggerHandler("click");
> >
> > > > > Thanks,
> > > > > T.J.
>


Re: [jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread Richard D. Worth
You're calling the function before binding the click handler. Change

  checkState("#nbl=3");

  $("#test").click(function(){
alert("You clicked #test!");
  });

to

  $("#test").click(function(){
alert("You clicked #test!");
  });

  checkState("#nbl=3");

- Richard

On Wed, Dec 9, 2009 at 9:56 AM, T.J.  wrote:

> Thanks for the link; I haven't heard of that site before.
>
> http://jsbin.com/axuwi3 is my (very basic) example of what I'm trying
> to attempt. What the button on my page actually does is quite
> different, and if you need that then let me know.
>
> On Dec 9, 8:29 am, "Richard D. Worth"  wrote:
> > Could you share a live sample page? If you don't have a place to host
> one,
> > jsbin.com:
> >
> > http://jsbin.com/
> >
> > That will allows us to see what you're seeing quite easily.
> >
> > - Richard
> >
> >
> >
> > On Wed, Dec 9, 2009 at 9:23 AM, T.J.  wrote:
> > > For further clarification, the way I'm calling that is as follows:
> >
> > > for (var x = 1; x <= count; x++) {
> > > $("#button").triggerHandler("click");
> > > }
> >
> > > which is inside of a function that I call on page load, and it isn't
> > > working at all.
> >
> > > Thanks,
> > > T.J.
> >
> > > On Dec 8, 1:32 pm, "T.J."  wrote:
> > > > Hi all,
> >
> > > > I have a click event bound to a button that I'm needing to call
> > > > without any user interaction on the button. I'm using the fragment
> > > > portion of the URL to determine how many times the button's "click"
> > > > function needs to fire and using a for loop to (attempt to, at least)
> > > > trigger the click. I've tried this with .click(), .trigger("click"),
> > > > and .triggerHandler("click") but with no success. I could write a
> > > > JavaScript function and call that within the loop, but that's
> > > > unnecessary code..
> >
> > > > Is what I'm doing valid, or can the .trigger/.triggerHandler methods
> > > > not be called from within a loop? The syntax I'm using is as follows:
> >
> > > > $("#button").triggerHandler("click");
> >
> > > > Thanks,
> > > > T.J.
>


Re: [jQuery] Re: .trigger and .triggerHandler methods

2009-12-09 Thread Richard D. Worth
Could you share a live sample page? If you don't have a place to host one,
jsbin.com:

http://jsbin.com/

That will allows us to see what you're seeing quite easily.

- Richard

On Wed, Dec 9, 2009 at 9:23 AM, T.J.  wrote:

> For further clarification, the way I'm calling that is as follows:
>
> for (var x = 1; x <= count; x++) {
> $("#button").triggerHandler("click");
> }
>
> which is inside of a function that I call on page load, and it isn't
> working at all.
>
> Thanks,
> T.J.
>
> On Dec 8, 1:32 pm, "T.J."  wrote:
> > Hi all,
> >
> > I have a click event bound to a button that I'm needing to call
> > without any user interaction on the button. I'm using the fragment
> > portion of the URL to determine how many times the button's "click"
> > function needs to fire and using a for loop to (attempt to, at least)
> > trigger the click. I've tried this with .click(), .trigger("click"),
> > and .triggerHandler("click") but with no success. I could write a
> > JavaScript function and call that within the loop, but that's
> > unnecessary code..
> >
> > Is what I'm doing valid, or can the .trigger/.triggerHandler methods
> > not be called from within a loop? The syntax I'm using is as follows:
> >
> > $("#button").triggerHandler("click");
> >
> > Thanks,
> > T.J.
>


Re: [jQuery] ui-accordion page is not working in Firefox

2009-12-08 Thread Richard D. Worth
Any chance you've fixed it since you sent your email? Caus it looks fine to
me in Firefox 3.5.5. If it's still giving you problems, perhaps clear your
cache, disable all add-ons (including Firebug), inspect with Firebug (after
you've ruled out all add-ons and re-enabled it).

- Richard

On Tue, Dec 8, 2009 at 8:48 AM, al...@ourlaughingplace.com <
al...@ourlaughingplace.com> wrote:

> I have a page using UI-Accordion which has been up for a few months.
> I just discovered that it is not working right on firefox 3.5.5, the
> entire accordion is compressed into one fat line.  This page works
> fine in all other browsers, Chrome, IE8, IE6, Safari 4, Opera.  I have
> other pages on same website which use ui-accordion and they work fine
> in Firefox, using the same jQuery file set.
>
> Here is a link to the page:
> http://www.ourlaughingplace.com/aspx/dining.aspx
>
> This is an asp.net, C# code.  Accordion code looks like this, content
> is filled in by back end script:
>
> 
>Magic Kingdom
>
>
>Epcot
>
>
>Disney's Hollywood Studios
>
>
>Animal Kingdom
>
>
>Downtown Disney (Florida)
>
>
>Walt Disney World® Resorts
>
>
>
>Disney's Animal Kingdom Lodge & Villas a>
>
>
>Disney's Yacht Club Resort, Beach Club
> Resort & Villas
>
>
>Disney's Boardwalk Inn & Villas
>
>
>Contemporary Resort & Bay Lake Towers h1>
>
>
>Dolphin & Swan Resorts
>
>
>Disney's Grand Floridian Resort & Spa h1>
>
>
>Polynesian Resort
>
>
>Wilderness Lodge & Villas
>
>
>Caribbean, Coronado, Port Orleans Resorts a>
>
>
>Fort Wilderness Resort & Campground h1>
>
>
>Old Key West, Saratoga Springs
>
>
>Pop Century, All-Star Music, Movies,
> Sports
>
>
>
>
>
>
>Walt Disney World® Other
>
>
>Disneyland Park
>
>
>Disney's California Adventure
>
>
>Downtown Disney District (California)
>
>
>Disneyland Resorts
>
>
>Disney Magic®
>
>
>Disney Wonder®
>
>
>Vero Beach
>
>
> 
>
> Help!
>


Re: [jQuery] Re: Remove css attribute from the DOM element

2009-12-07 Thread Richard D. Worth
On Sun, Dec 6, 2009 at 9:19 PM, Joshua Partogi wrote:

> On Dec 7, 12:36 pm, "evanbu...@gmail.com"  wrote:
> > I like to use the addClass method rather than embed CSS in my js
> > code.  I find it easier to maintain.
> >
> > $('td').addClass('myCSSClass');
> >
> > $('td').removeClass('myCSSClass');
>
> Hi Evan,
>
> I'd prefer that approach too. But the problem is this css attribute
> value is stored in the database. I can not find the doc on how to add
> an extra css attribute to a css class.
>

See http://flesler.blogspot.com/2007/11/jqueryrule.html

- Richard


Re: [jQuery] javascript variable scope

2009-12-04 Thread Richard D. Worth
Cool, huh? This is one of the beauties and real powers of the JavaScript
language. It's called a closure:

https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Closures

- Richard

On Fri, Dec 4, 2009 at 6:46 PM, cmonahan  wrote:

>
> This surprised me.
>
> I made the scenario as simple as possible.
>
> http://jsbin.com/eyopo3/edit
>
> You can see in function g() I change the value of the variable i after
> having used it.
>
> That may seem like a useless thing to do, but in the production code I was
> working on, i was a loop iterator.
>
> --
> View this message in context:
> http://old.nabble.com/javascript-variable-scope-tp26648745s27240p26648745.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


Re: [jQuery] Is possible to update two div with the same load?

2009-12-04 Thread Richard D. Worth
I think you're better of with $.get and then doing the finding and loading
into both divs yourself.

- Richard

On Fri, Dec 4, 2009 at 5:21 AM, NMarcu  wrote:

> Hi,
>
>   I need to update a div that contain a table, and another one that
> contain a drop down list, that is build depending on what is in one
> table from db(the first div depend on this also). It's possible to
> update the 2 divs with the same load, or need to use two load. I try
> this but not worked correct.
>
> Thanks.
>


[jQuery] Spellchecker plugin

2009-12-04 Thread Richard W
Hi jQuery users

I have pretty much finished my simple spellchecker plugin (barring
additional functionality) and am wanting some testing/feedback/
criticism/bug reports etc from the jQuery community.

My initial inspiration for the plugin came from a work responsibility:
to build a spellchecker plugin for a cms we were working on. It was a
"edit-in-place" CMS so the plugin had to work on any block element. We
didn't end up using the spellchecker, so i decided to finish it and
release as open source.

You can view the project page on google code here:
http://jquery-spellchecker.googlecode.com/

A full featued demo can be found here: 
http://spellchecker.jquery.badsyntax.co.uk/

I've also integrated the plugin into the markitup editor here:
http://spellchecker.jquery.badsyntax.co.uk/markitup.html

So yea that's about it. It's still very beta at this time, but should
work on most browsers.

Thank your for your time.
Rich


[jQuery] blockUI history removal

2009-12-02 Thread Stephen Richard
In jquery.blockUI.js (most up to date version says it's 2.27 24-
SEP-2009) the line

$(data.el).removeData('blockUI.history');

(line 391, in the reset function)

looks a bit suspect to me: in the install function the data object is
added to the _blocked_ element, but data.el is the  _message_  (which
as far as I can tell never gets a data object added to it). I think
this means that the history is not removed, and if for some reason you
call unblockUI again on the same element then the message node will
get put back in the DOM again, which is inconvenient when you're
trying to pop up error messages...

Shouldn't the code be
$(el).removeData('blockUI.history');
?

Thanks
Stephen


Re: [jQuery] Re: looping through elements with jQuery based on class

2009-12-01 Thread Richard D. Worth
See http://docs.jquery.com/Traversing/slice#startend

- Richard

On Tue, Dec 1, 2009 at 11:07 PM, led  wrote:

> Thank you Richard.
>
> But what about to to use the example with only the first 3 '$
> ('div.star-rating.rater-0.auto-submit-star.star-rating-applied.star-
> rating-live')' in page.
> Is that i need to show the results of the rating.
>
> if the result is 3 then add the class to only the first 3 stars.
>
>
> On 2 dez, 03:21, "Richard D. Worth"  wrote:
> > On Tue, Dec 1, 2009 at 9:53 PM, led  wrote:
> > > I'm try to use star rating plugin frm
> > >http://fyneworks.com/jquery/star-rating/.
> >
> > > I need to add class 'star-rating-on' on the divs  with class 'star-
> > > rating rater-0 auto-submit-star star-rating-applied star-rating-
> > > live' .
> >
> > That's not a class, it's five classes. Spaces in a class attribute value
> > separate multiple class names.
> >
> >
> >
> > > I can use:
> >
> > > $("div.star-rating rater-0 auto-submit-star star-rating-applied star-
> > > rating-live")
> >
> > that selector is looking for all elements of type star-rating-live within
> an
> > element of type star-rating-applied within an element of type
> > auto-submit-star within an element of type rater-0 within an element of
> type
> > div with a class of star-rating. In this case the space acts as a
> descendant
> > selector. That would only do if your markup looked something like this
> >
> > 
> >   
> > 
> >   
> > 
> > 
> >   
> > 
> >   
> > 
> >
> > and it would match the star-rating-live element, not the div.
> >
> > > .each(function(){
> > >$(this).addClass('star-rating-
> > > on')
> > >});
> > > but it isn't working.
> >
> > If you really only want the divs with all those classes:
> >
> >
> $('div.star-rating').filter('.rater-0').filter('.auto-submit-star').filter('.star-rating-applied').filter('.star-rating-live').addClass('star-rating-on');
> >
> > or more succinctly:
> >
> >
> $('div.star-rating.rater-0.auto-submit-star.star-rating-applied.star-rating-live').addClass('star-rating-on');
> >
> > - Richard
>


Re: [jQuery] looping through elements with jQuery based on class

2009-12-01 Thread Richard D. Worth
On Tue, Dec 1, 2009 at 9:53 PM, led  wrote:

> I'm try to use star rating plugin frm
> http://fyneworks.com/jquery/star-rating/.
>
> I need to add class 'star-rating-on' on the divs  with class 'star-
> rating rater-0 auto-submit-star star-rating-applied star-rating-
> live' .
>

That's not a class, it's five classes. Spaces in a class attribute value
separate multiple class names.


>
> I can use:
>
> $("div.star-rating rater-0 auto-submit-star star-rating-applied star-
> rating-live")


that selector is looking for all elements of type star-rating-live within an
element of type star-rating-applied within an element of type
auto-submit-star within an element of type rater-0 within an element of type
div with a class of star-rating. In this case the space acts as a descendant
selector. That would only do if your markup looked something like this


  

  


  

  


and it would match the star-rating-live element, not the div.


> .each(function(){
>$(this).addClass('star-rating-
> on')
>});
> but it isn't working.
>

If you really only want the divs with all those classes:

$('div.star-rating').filter('.rater-0').filter('.auto-submit-star').filter('.star-rating-applied').filter('.star-rating-live').addClass('star-rating-on');

or more succinctly:

$('div.star-rating.rater-0.auto-submit-star.star-rating-applied.star-rating-live').addClass('star-rating-on');

- Richard


Re: [jQuery] Cookie in JQuery. Create, Update and Get

2009-12-01 Thread Richard D. Worth
See

http://plugins.jquery.com/project/cookie

- Richard

On Tue, Dec 1, 2009 at 9:55 PM, shapper  wrote:

> Hello,
>
> I need to add a cookie with value "true" or "false".
> If the cookie does not exist then created. Otherwise change its value
> to the new value.
> Later I need to get the cookie value.
>
> Can I do this with JQuery? Do I need a plugin? Which one?
>
> Thank You,
> Miguel
>


Re: [jQuery] About selectable

2009-12-01 Thread Richard D. Worth
This isn't a built-in feature. I have an idea or two about how you might do
this. What's the use case?

Oh, and please start a new thread on the jQuery UI list:

http://groups.google.com/group/jquery-ui

Thanks.

- Richard

On Tue, Dec 1, 2009 at 4:57 AM, Catta  wrote:

>
> Hi
>
> Im have create an selectable divs and now i have an question if its
> possible
> to have a max select limit on this.
>
> And i have been reading and done as they have done at:
> http://jqueryui.com/demos/selectable/
> http://jqueryui.com/demos/selectable/
>
> So if there is any one, who can give me a tip or a link where i can read
> about this, I would be very glad.
>
> Thanks!
> --
> View this message in context:
> http://old.nabble.com/About-selectable-tp26588114s27240p26588114.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


Re: [jQuery] slideToggle Functions

2009-11-30 Thread Richard D. Worth
Each of the methods you mention accept (optionally) a single callback
function as a final argument. Neither accept more than one. See:

http://docs.jquery.com/Effects/toggle#speedcallback

http://docs.jquery.com/Effects/slideToggle#speedcallback

If you want to do something different in one case as opposed to another,
check whether the element is visible and then call the appropriate animation
method to show or hide, along with anything else you want to do at the same
time. Or call the toggle or slideToggle, and put your if inside the single
callback, like so:

$('#my-element').click(function() {
  var wasHidden = $('#list-element').is(':hidden');
  $('#list-element').slideToggle(200, function(){
if (wasHidden) {
  $('#status-element').html('show artist index');
  console.log('show');
} else {
  $('#status-element').html('hide artist index');
  console.log('hide');
}
  });
});

- Richard

On Mon, Nov 30, 2009 at 1:39 PM, Gavin  wrote:

> I have a simple bit of jQuery that I just can't get working.
>
> $('#my-element').click(function(){
>$('#list-element').slideToggle(function(){
>$('#status-element').html('show artist
> index');
>console.log('show');
>},function(){
>$('#status-element').html('hide artist
> index');
>console.log('hide');
>}
>);
>});
>
> Right? Simple? I've had it working before, but whenever the element is
> clicked, the element toggles but the console prints 'hide' every time
> and the #status-element never gets changed. I have also tried just
> using toggle() instead of slideToggle and also
>
> slideToggle(200,function(){...
>
> (including the speed before the callback functions).
>
> Any ideas would be appreciated!
>
> Thanks,
> Gavin
>


Re: [jQuery] jQuery Slider - disable keyboard control

2009-11-26 Thread Richard D. Worth
I don't recommend it, as it's there for accessibility. However, if you must,
add your own handle manually with no href:


  


If you have any more questions about it, please ask on the jQuery UI list:

http://groups.google.com/group/jquery-ui

- Richard

On Thu, Nov 26, 2009 at 10:51 AM, akitainu27 wrote:

>
> Can slider keyboard control be disabled for good without disabling the
> slider?
> Thanks.
> --
> View this message in context:
> http://old.nabble.com/jQuery-Slider---disable-keyboard-control-tp26531343s27240p26531343.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


Re: [jQuery] Re: Cancel Selected An Item of Selectable

2009-11-26 Thread Richard D. Worth
This is not currently supported. You can track progress here:

http://dev.jqueryui.com/ticket/4205

- Richard

On Wed, Nov 25, 2009 at 9:59 PM, He Jun-Jie  wrote:

> Thank you for replying my question. My situation is very easy I just
> want to ask whether the jQuery ui selectable provides a way to
> unselected one item by doing ctrl+click.
> Here is the sample: http://jsbin.com/ujile
>
> On 11月25日, 上午11时59分, "Richard D. Worth"  wrote:
> > We'd be happy to help you over here:
> >
> > http://groups.google.com/group/jquery-ui
> >
> > <http://groups.google.com/group/jquery-ui>Please post a live sample page
> > showing the problem. If you don't have a way to host one, please create
> one
> > on jsbin.com:
> >
> > http://jsbin.com/
> >
> > - Richard
> >
> >
> >
> > On Tue, Nov 24, 2009 at 12:56 AM, I'm Jack  wrote:
> > > I used jQuery ui selectable function on my web page. So long it works
> > > fine, but I find a problem that if we’ve already selected some items,
> > > and I want to cancel selected one item of them, how could we do? I try
> > > to bind a click function to the elements to remove the style of ui-
> > > selected, but it doesn’t work at all. It’s so strange. Guys, could you
> > > help me in some way?- 隐藏被引用文字 -
> >
> > - 显示引用的文字 -
>


Re: [jQuery] Problem with slider & if else. Please help.

2009-11-25 Thread Richard D. Worth
On Wed, Nov 25, 2009 at 1:18 AM, Morgan  wrote:

> Hi,
>
> I'm a jquery novice and am trying to get a simple cost slider to work
> the way I want with no luck.  I've used this as my foundation and
> modified it so that the cost is set behind the scenes and not entered
> by the user - http://design-notes.info/demo/cost/costestimator.html .
>
> How I would like it to work: I want the default starting point to be
> $200 / 1 page.  As the person slides to the right the page step should
> increase by one and the cost should increase by $150 up to a max of
> $3050 / 20 pages like this:
>
> $200 / 1 page
> $350 / 2 pages
> $500 / 3 pages
>

Sounds like you want $50 + (number of pages * $150). No?

- Richard


Re: [jQuery] Extract tag element and closing tag

2009-11-25 Thread Richard D. Worth
See

http://github.com/brandonaaron/jquery-outerhtml

Here's the spoiler:

alert( $('').append( $(this).clone() ).html() );

- Richard

On Wed, Nov 25, 2009 at 8:14 AM, coldwired  wrote:

>
> Hi,
>
> I've got the following piece of code that extracts the html code contained
> within a clicked element:
>
> $("p,h1,h2,h3,span,li, dd, dt,b,em,strong").click(function() {
>alert($(this).html());
> });
>
> I want to get the containing element from this too, it's open and close
> tag.
>
> For example:
>
> 
>  text in here
> 
>
> The above code would return "text in here" - how
> can I return the div tag and it's attributes too?
>
> Thanks,
> Colin.
> --
> View this message in context:
> http://old.nabble.com/Extract-tag-element-and-closing-tag-tp26512422s27240p26512422.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


Re: [jQuery] Cancel Selected An Item of Selectable

2009-11-24 Thread Richard D. Worth
We'd be happy to help you over here:

http://groups.google.com/group/jquery-ui

<http://groups.google.com/group/jquery-ui>Please post a live sample page
showing the problem. If you don't have a way to host one, please create one
on jsbin.com:

http://jsbin.com/

- Richard

On Tue, Nov 24, 2009 at 12:56 AM, I'm Jack  wrote:

> I used jQuery ui selectable function on my web page. So long it works
> fine, but I find a problem that if we’ve already selected some items,
> and I want to cancel selected one item of them, how could we do? I try
> to bind a click function to the elements to remove the style of ui-
> selected, but it doesn’t work at all. It’s so strange. Guys, could you
> help me in some way?
>


Re: [jQuery] is there a good way to open show an iframe in a jQuery dialog window?

2009-11-24 Thread Richard D. Worth
If by jquery dialog window you mean jQuery UI Dialog, please ask here:

http://groups.google.com/group/jquery-ui

If you mean another plugin, please specify which one. Thanks.

- Richard

On Tue, Nov 24, 2009 at 7:32 PM, thisisvlad  wrote:

>
> i want to use a jquery dialog window to show an iframe.  i am running into
> all sorts of issues.
>
> first off, i want the dialog to only show when the iframe is loaded.  i
> tried to create the iframe w/ visibility set to hidden, and then do a
> .dialog() on it, but apparent jquery appends the iframe to the dom at this
> point, and thus the iframe is reloaded, and we have to wait.
>
> also, when i close the dialog, jquery appends the iframe again, which means
> the iframe is getting reloaded all over again, which wastes resources on my
> sever etc.  is there a clean way to do this?
> --
> View this message in context:
> http://old.nabble.com/is-there-a-good-way-to-open-show-an-iframe-in-a-jQuery-dialog-window--tp26505706s27240p26505706.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


Re: [jQuery] dialog partial content not visible in IE7

2009-11-23 Thread Richard D. Worth
Please post this question to the jQuery UI list:

http://groups.google.com/group/jquery-ui

<http://groups.google.com/group/jquery-ui>Also, it would help if you could
reduce this to a minimal test page that reproduces the issue. Thanks.

- Richard

On Sat, Nov 21, 2009 at 9:23 PM, Bill  wrote:

> I have a jQuery dialog where some of the content does not display
> initially in IE7. When I mouse over the dialog, the content appears.
> This problem does not seem to occur in IE8 or other browsers (FF,
> Safari, Chrome).
>
> He is a link to the (test) site. If you click on the login link in
> IE7, three links at the bottom of the dialog will not appear.
> https://exdev.ucx.ucr.edu/enroll/catalog/olr_catalog_main.php
>
> I cannot find any reason this is occurring. Have tried several things
> to make them appear (set focus, do a "show" on the containing div,
> etc.), but nothing seems to work. Any help or ideas would be greatly
> appreciated.
>
> Bill
>


Re: [jQuery] Re: is this legal acording to the jQuery licence

2009-11-23 Thread Richard D. Worth
See

http://groups.google.com/group/jquery-en/browse_thread/thread/2ab7ba203fc3267f

- Richard

On Mon, Nov 23, 2009 at 5:52 AM, Dimitar  wrote:

> Can anyone answer on this?
>
> On Nov 19, 4:11 pm, Dimitar Velkov  wrote:
> > Hello, I need to use jQuery lib in a script that will be included in my
> > clients sites.
> > My script will be included last  in the body of a html page, and jQuery
> lib
> > will be included dynamically from my script.
> > Can anyone tell me is this going to have conflict with older jQuery
> > libraries and with other libraries. If it's going to have conflict can
> > someone tell me hot to solve it.
> > I have made some modification on jquery, can someone tell me if this is
> > legal according to the jQuery license.
> >
> > Here is the changes they are on the beginning of the script:
> >
> > (function(){
> >
> > var
> > // Will speed up references to window, and allows munging its name.
> > window = this,
> > // Will speed up references to undefined, and allows munging its
> name.
> > undefined,
> > // Map over jQuery in case of overwrite
> > _jQuery = window.AR_jQuery,
> > // Map over the $ in case of overwrite
> > _$ = window.AR_jQuery,
> >
> > jQuery = window.AR_jQuery = function( selector, context ) {
> > // The jQuery object is actually just the init constructor
> > 'enhanced'
> > return new jQuery.fn.init( selector, context );
> > },
> >
> > I'll wait for response.
> >
> > Thanks
> >
> > --
> > Dimitar Velkov
>


Re: [jQuery] JQuery Dialog, bug when page loading?

2009-11-19 Thread Richard D. Worth
Try this

http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content

- Richard

On Thu, Nov 19, 2009 at 2:48 AM, Nicu Marcu  wrote:

> Very good solution, working OK. I try to do something like this on tabs,
> but tabs are hidden permanently. On page loading, tabs are display for a few
> sec, without being organize in tabs. How can I resolve this bug with tabs?
>
> 2009/11/18 Richard D. Worth 
>
> Hide the dialog in the html by putting it in a hidden container, or putting
>> style="display:none;" on the element itself. When you call .dialog('open')
>> that attribute will be removed.
>>
>> - Richard
>>
>>
>> On Wed, Nov 18, 2009 at 4:20 AM, NMarcu  wrote:
>>
>>> Hello all,
>>>
>>>I have a question, I'm not sure if is a Dialog bug or I do
>>> something wrong. When page is loading(at the beginning). I can see for
>>> a short time(approx 1 sec) the component of the Dialog. If I use a
>>> confirmation Dialog, with the question: "Are you sure?", I get this
>>> messages on the page body on page loading. This goes out  after 1 sec,
>>> but this is not acceptable.
>>>
>>>
>>
>
>
> --
> All the best,
>
> Nicolae MARCU
>


Re: [jQuery] JQuery Dialog, bug when page loading?

2009-11-18 Thread Richard D. Worth
Hide the dialog in the html by putting it in a hidden container, or putting
style="display:none;" on the element itself. When you call .dialog('open')
that attribute will be removed.

- Richard

On Wed, Nov 18, 2009 at 4:20 AM, NMarcu  wrote:

> Hello all,
>
>I have a question, I'm not sure if is a Dialog bug or I do
> something wrong. When page is loading(at the beginning). I can see for
> a short time(approx 1 sec) the component of the Dialog. If I use a
> confirmation Dialog, with the question: "Are you sure?", I get this
> messages on the page body on page loading. This goes out  after 1 sec,
> but this is not acceptable.
>
>


[jQuery] Trying to update div tag in jQuery DOM window

2009-11-17 Thread Richard
I have a PHP form in a jQuery DOM window (just like jQuery Dialog),
and when the form is sent I want to change the HTML in the div in the
DOM window.

The problem is  that the div is not changing in the DOM window. When I
relaunch the DOM window, then I can see the change.

// When the form is sent, the following change is not being updated
live in the inlineContenContactForm div in the DOM window
// Only when I relaunch the DOM window I can see the change
 $('#inlineContenContactForm').html("'Form
Submitted"");




// To launch the DOM Window:
 $('.readMoreDOMWindow').click(function(){
$.openDOMWindow({
windowSourceID:'#inlineContenContactForm',
height:220,
width:320,
overlay:0,
positionType:'anchoredSingleWindow',
windowPadding:20,
windowBGColor:'#ccc',
borderSize:'0',
anchoredSelector:'.readMoreDOMWindow',
positionLeft:120,
positionTop:-150
});
return false;
});


Re: [jQuery] JQuery - how to fade and loop background style

2009-11-17 Thread Richard D. Worth
jQuery UI effects core adds color animation and class transitions:

http://jqueryui.com/demos/animate/

http://docs.jquery.com/UI/Effects/animate

You can download it here:

http://jqueryui.com/download

just check 'Effects Core'

- Richard

On Tue, Nov 17, 2009 at 11:43 AM, Dan  wrote:

> Hi All,
>
> Is there a way to fade and loop a background-color of a div element? I
> would like it to change every 10 seconds or so, from green to orange
> to purple and then loop back to green and start again. With a fade
> effect.
>
> I have searched high and low for a plugin, or tutorial, to no avail.
>
> Thanks.
>
> Dan
>


Re: [jQuery] Jquery Boston Conference

2009-11-17 Thread Richard D. Worth
>From http://ralphwhitbeck.com/2009/09/16/jQueryConference2009Summary.aspx

"The jQuery Conference will now be held four times next year in Boston,
London, San Francisco and Online."

Any further information will be posted to the jQuery Blog,
http://blog.jquery.com/ as it becomes available.

- Richard

On Mon, Nov 16, 2009 at 7:41 AM, ray  wrote:

> I've searched online for any posting related to a Jquery Conference in
> 2010. Does anyone have an idea if there will be another hosted and if
> so will it be in Boston; 2010?
>


Re: [jQuery] How to implement an Excel-like UI?

2009-11-17 Thread Richard D. Worth
Start here:

http://jqueryplugins.weebly.com/jquerysheet.html

- Richard

On Mon, Nov 16, 2009 at 8:27 PM, sayeo87  wrote:

>
> Hi,
>
> I'm new to jQuery, and plan on doing some tutorials to get more familiar
> with it. But my ultimate goal is to make a UI that has somewhat similar
> behavior as MS Excel in the sense that you can select multiple blocks and
> edit single cells (I don't need any calculations though). A click-drag
> would
> highlight multiple blocks, a double-click would let you edit a single cell.
> Each cell will only hold a single character. The image at the end gives a
> better idea of what I'm trying to achieve. The questions I have are:
>
> - where would be a good place to start? (any plugins/tutorials I should
> look
> at in particular)
> - How well would something like this scale in jQuery if there were to be
> 1000s of cells, which could be dynamically added/removed?
>
> Thanks for your help!
> http://old.nabble.com/file/p26382940/guitartabcreator_mockup_small.jpg
> --
> View this message in context:
> http://old.nabble.com/How-to-implement-an-Excel-like-UI--tp26382940s27240p26382940.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


Re: [jQuery] Selectors, Escaping special Character in JQuery 1.3.2 not working as expected.

2009-11-17 Thread Richard D. Worth
Works for me:

http://jsbin.com/izoco

source: http://jsbin.com/izoco/edit

- Richard

On Tue, Nov 17, 2009 at 4:01 AM, phil  wrote:

> I just recently attempted to upgrade from jQuery 1.2.6 to jQuery 1.3.2
> and it broke several web pages where my selectors are escaping special
> characters - the period.
>
> Here is a quick example:
>
> 
>
> The selector $("#first\\.name") works in jQuery 1.2.6, but is broken
> in jQuery 1.3.2.
>
> Is this intentional or a is it a bug?
> I would be grateful if there is a workaround!
>
>


Re: [jQuery] jquery tabs not on the same row! help please!

2009-11-12 Thread Richard D. Worth
You're missing ui.tabs.css

- Richard

2009/11/12 AdyLim 

> Hi there,
>
> I'm just starting to learn jquery and trying to implement tabs onto my
> aspx page...The problem is that the tabs are showing up one on top of
> anotherhow do i get the tabs to line up in a row?  I'm using
> jquery 1.2.6...all the js's (ui.core.js, ui.tabs.js) are included in
> my masterpage.
>
> any help is appreciated!
> thanks!
>
> my code follows:
>
> ASPX:
>
> <%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master"
> AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs"
> Inherits="ctc3.test.WebForm1" %>
> 
> 
>  runat="server">
> 
>  runat="server">
>
>
>  
>   $(function() {
>   $("#tabs").tabs();
>   });
>
>
>
> 
>
>
>
>Nunc tincidunt
>Proin dolor
>Aenean lacinia
>
>
>
>Proin elit arcu, rutrum commodo, vehicula tempus, commodo
> a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris.
> Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem.
> Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo.
> Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam
> sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat.
> Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci
> tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.
>
>
>Morbi tincidunt, dui sit amet facilisis feugiat, odio
> metus
> gravida ante, ut pharetra massa metus id nunc. Duis scelerisque
> molestie turpis. Sed fringilla, massa eget luctus malesuada, metus
> eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet
> fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam.
> Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis.
> Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra
> nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas
> feugiat, tellus pellentesque pretium posuere, felis lorem euismod
> felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et
> purus.
>
>
>Mauris eleifend est et turpis. Duis id erat. Suspendisse
> potenti.
> Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat,
> eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent
> taciti sociosqu ad litora torquent per conubia nostra, per inceptos
> himenaeos. Fusce sodales. Quisque eu urna vel enim commodo
> pellentesque. Praesent eu risus hendrerit ligula tempus pretium.
> Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.
>Duis cursus. Maecenas ligula eros, blandit nec, pharetra
> at,
> semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra
> justo vitae neque. Praesent blandit adipiscing velit. Suspendisse
> potenti. Donec mattis, pede vel pharetra blandit, magna ligula
> faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque.
> Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi
> lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean
> vehicula velit eu tellus interdum rutrum. Maecenas commodo.
> Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus
> hendrerit hendrerit.
>
> 
>
> 
>
> 
>
>


Re: [jQuery] Are there any specific reason why the Jquery library returns a lot of errors in the Firefoxx error console?

2009-11-11 Thread Richard D. Worth
There shouldn't be any errors if your application is behaving as
expected. Sounds like you've got some sort of configuration problem. Perhaps
you don't have the latest version of jQuery? Or you're using a plugin that
hasn't been updated to work with the version of jQuery you're using? Or
maybe you're performing a call that leads to an error in an event that
continuously gets triggered, such as a timer or a mousemove. All guesses.
Hard to do more than that without seeing some code. Please post a live page,
or if you can't, reproduce on jsbin.com:

http://jsbin.com/

- Richard

On Wed, Nov 11, 2009 at 3:35 PM, Sune42  wrote:

> Hi
>
> Just curious.
>
> I am using the Firefox error console for my debugging and I am a bit
> annoyed to always see the Jquery library errors popping up all the
> time in the list.
>
> Are there any technical reason for why the Jquery library has so many
> errors? or is it not possible to get rid of them because otherwise it
> wouldn't work on all browsers?
>
> //Andy
>
>


Re: [jQuery] Jquery suitable for advanced webapplication

2009-11-11 Thread Richard D. Worth
In addition to jQuery, you may also want to look at jQuery UI, which is
jQuery's official suite of interactions, widgets, effects, and theming for
creating rich internet applications:

http://jqueryui.com/

<http://jqueryui.com/>- Richard

On Wed, Nov 11, 2009 at 8:39 AM, Wiemer  wrote:

> Hi Everybody,
>
> Forgive me my possible bad english, if I'm rude please ignore it I
> didn't mean to be :)
>
> Currently we're planning the build for a highend webapplication (Saas)
> where everything will be javascript controlled and php + mysql on the
> backend. Right no I'm looking for a good javascript framework on which
> we can build the webapplication.
>
> I'd like to know what your experiences are when using Jquery with
> - multiple interface states,
> - lot's of php & mysql exchange/activity
> - mvc patern
>
> I allready found out that Jquery is lovely for lot's of javascript
> magic in your website with a very good community. But is Jquery also
> suitable for building a custom framework / platform behind an advanced
> webapplication? Please let me know what you're experiences are and any
> directions for good articles or resources are allways welcome.
> Looking forward to your reaction!
> Greetings
>
> Dennis Wiemer
> Dvotion
>


Re: [jQuery] help with milkbox conflict

2009-11-09 Thread Richard D. Worth
See

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

<http://docs.jquery.com/Using_jQuery_with_Other_Libraries>and

http://docs.jquery.com/Core/jQuery.noConflict

<http://docs.jquery.com/Core/jQuery.noConflict>- Richard

On Mon, Nov 9, 2009 at 8:02 AM, jessicaw1974  wrote:

> Hi, I am new to this and attempting to use milkbox. It looks like
> jquery-1.3.2.min.js is preventing milkbox from working. I wonder if
> there is an obvious conflict (already documented), or if this requires
> more exploration.
>
> I am pasting code below. Thank you. Jessica
>
>
>
>  @import url(css/milkbox/milkbox.css);
> </
> script>
> <script type="text/javascript" src="js/mootools-1.2.3.1-more.js"></
> script>
> <script type="text/javascript" src="js/milkbox.js">
> </
> script>
>
> <link type="text/css" href="2010css/jquery-ui.css" rel="stylesheet" /
> >
> <link type="text/css" href="2010css/general.css" rel="stylesheet" />
>
> <script type="text/javascript" src="2010js/jquery-1.3.2.min.js"></
> script>
> <script type="text/javascript" src="2010js/jquery-
> ui-1.7.2.custom.min.js">
>
>$(function(){
>
>// Accordion
>$("#accordion").accordion({ header: "h3" });
>
>// Accordion
>$("#accordion2").accordion({ header: "h3"
> });
>
>// Tabs
>$('#tabs').tabs();
>// Tabs
>$('#tabs2').tabs();
>
>// Dialog
>$('#dialog').dialog({
>autoOpen: false,
>width: 600,
>buttons: {
>"Ok": function() {
>
>  $(this).dialog("close");
>},
>"Cancel": function() {
>
>  $(this).dialog("close");
>}
>}
>});
>
>// Dialog Link
>$('#dialog_link').click(function(){
>$('#dialog').dialog('open');
>return false;
>});
>
>// Datepicker
>$('#datepicker').datepicker({
>inline: true
>});
>
>// Slider
>$('#slider').slider({
>range: true,
>values: [17, 67]
>});
>
>// Progressbar
>$("#progressbar").progressbar({
>value: 20
>});
>
>//hover states on the static widgets
>$('#dialog_link, ul#icons li').hover(
>function() {
> $(this).addClass('ui-state-hover'); },
>function() {
> $(this).removeClass('ui-state-hover'); }
>);
>
>});
>
>


Re: [jQuery] How to determine number of elements after dom manipulation ?

2009-11-08 Thread Richard Bakker

Does anyone perhaps know ?


On 7 nov 2009, at 09:18, Richard Bakker wrote:


I am generating elements (img's) based on data from an xml file.
Once that is done, I want to determine the number of icons that were
generated.

i do a: alert($('img').size())
result: 0, which isn't the case

how can i determine them after they have generated ?
**
function dataloader(location,service,div){
  $.ajax({
  type: "GET",
  url: "includes/data.xml",
  dataType: "xml",
  success: function(xml) {

  $(xml).find('group').each(function(){
  if($(this).attr("name") == service){
  $(this).find("Service").each(function(){
  var type = $(this).find("Type").text()
  var host = $(this).find("Host").text()
  var name = $(this).find("Name").text()
  var site = $(this).find("Site").text()

  if(type == "Host" && site == location){
  $('').appendTo

('#'+div);
  }
  })
  }
  });
  }
  });

}




[jQuery] How to determine number of elements after dom manipulation ?

2009-11-07 Thread Richard Bakker

I am generating elements (img's) based on data from an xml file.
Once that is done, I want to determine the number of icons that were
generated.

 i do a: alert($('img').size())
result: 0, which isn't the case

how can i determine them after they have generated ?
**
function dataloader(location,service,div){
   $.ajax({
   type: "GET",
   url: "includes/data.xml",
   dataType: "xml",
   success: function(xml) {

   $(xml).find('group').each(function(){
   if($(this).attr("name") == service){
   $(this).find("Service").each(function(){
   var type = $(this).find("Type").text()
   var host = $(this).find("Host").text()
   var name = $(this).find("Name").text()
   var site = $(this).find("Site").text()

   if(type == "Host" && site == location){
   $('').appendTo

('#'+div);
   }
   })
   }
   });
   }
   });

}


Re: [jQuery] Re: Jquery UI Accordion Navigation

2009-11-07 Thread Richard D. Worth
And sorry I didn't realize we're on the wrong list. If you need any more
help, please start a new thread on the jQuery UI list:

http://groups.google.com/group/jquery-ui

Thanks.

- Richard

On Sat, Nov 7, 2009 at 7:21 AM, Richard D. Worth  wrote:

> It looks like you'll have to supply your own navigationFilter function:
>
> http://docs.jquery.com/UI/Accordion#option-navigationFilter
>
> The default is
>
> navigationFilter: function() {
>   return this.href.toLowerCase() == location.href.toLowerCase();
> }
>
> which is trying to match the whole url, not the end, and not just the hash
>
> - Richard
>
> On Sat, Nov 7, 2009 at 3:49 AM, mehstg1319  wrote:
>
>> Right, All out of ideas now. :-(
>>
>> Have changed the 1,2,3 etc to valid tokens and changed the NAME to ID.
>> But still no luck.
>>
>> I sense I must be very close, but cannot work out why it does not
>> work.
>>
>> Paul
>>
>> On Nov 6, 5:15 pm, "Richard D. Worth"  wrote:
>> > Home
>> > ...
>> > About
>> > ...
>> > > tabindex="-1">Portfolio
>> >
>> > - Richard
>> >
>> > On Fri, Nov 6, 2009 at 11:55 AM, mehstg1319  wrote:
>> > > I don't see any ID's or Names that don't start with a letter in my
>> > > code. :-s
>> >
>> > > P
>> >
>> > > On Nov 6, 4:50 pm, "Richard D. Worth"  wrote:
>> > > > ID and NAME tokens must begin with a letter ([A-Za-z])
>> >
>> > > > On Fri, Nov 6, 2009 at 11:39 AM, mehstg1319 
>> wrote:
>> > > > > Richard,
>> >
>> > > > > I have tried using ID's. Seems to make no difference, the
>> navigation
>> > > > > will still not work :-( I believe I may have the anchors slightly
>> > > > > wrong, but cannot work out what is wrong with them.
>> >
>> > > > > With regards to your second point about using a valid ID? I do not
>> > > > > understand, I don't see anything wrong with the names i have used?
>> >
>> > > > > P
>> >
>> > > > > On Nov 6, 1:43 pm, "Richard D. Worth"  wrote:
>> > > > > > Two suggestions:
>> >
>> > > > > > 1. use id instead of name
>> >
>> > > > > > 2. use a valid id. See
>> >
>> > > > > >http://www.w3.org/TR/html4/types.html#h-6.2
>> > > > > > "
>> > > > > > ID and NAME tokens must begin with a letter ([A-Za-z]) and may
>> be
>> > > > > followed
>> > > > > > by any number of letters, digits ([0-9]), hyphens ("-"),
>> underscores
>> > > > > ("_"),
>> > > > > > colons (":"), and periods (".").
>> > > > > > "
>> >
>> > > > > > - Richard
>> >
>> > > > > > On Fri, Nov 6, 2009 at 3:00 AM, mehstg1319 
>> wrote:
>> > > > > > > Thanks very much
>> >
>> > > > > > > That has fixed that bug, silly mistake to make!!
>> >
>> > > > > > > The navigation still does not work however :-(  i.e. if I go
>> to
>> > > > > > >http://www.paulbraham.com/test_site/index.html#2itshouldopenon
>> > > the
>> > > > > > > second panel and if I go to
>> > > > > > >http://www.paulbraham.com/test_site/index.html#3
>> > > > > > > it should open on the third.
>> >
>> > > > > > > Any ideas what I have done wrong here?
>> >
>> > > > > > > Paul
>> >
>> > > > > > > On Nov 6, 1:42 am, "jquery.redsqu...@googlemail.com"
>> > > > > > >  wrote:
>> > > > > > > > Your click function fail is due to the fact you hook the
>> event up
>> > > > > > > > outside of a doc ready block. You can either change it to
>> use
>> > > .live
>> > > > > or
>> > > > > > > > move it after the accordion initialise call.
>> >
>> > > > > > > > On Nov 5, 2:48 pm, mehstg1319  wrote:
>> >
>> > > > > > > > > Hi guys
>> >
>> > > > > > > > > I am working on the following sitehttp://
>> > > > >www.paulbraham.com/test_site/
>> > > > > > > > > and am having a few troubles with my JQuery Accordion.
>> >
>> > > > > > > > > Basically, I have turned on Navigation, and inserted three
>> > > anchors,
>> > > > > > > > > #1, #2 and #3 for the three sections that exist. Now in
>> theory,
>> > > i
>> > > > > > > > > could go to index.html#2 and it would load with section 2
>> open.
>> > > > > This
>> > > > > > > > > is not happening, and I cannot work out what is wrong with
>> my
>> > > code.
>> >
>> > > > > > > > > Also, I have used the following code to update the hash on
>> the
>> > > > > address
>> > > > > > > > > bar when a section is selected. This is so it is possible
>> to
>> > > > > bookmark
>> > > > > > > > > the website with a certain section open. This is also not
>> > > working.
>> >
>> > > > > > > > > $(".menuLink").click(function(event){
>> > > > > > > > >   window.location.hash=this.hash;
>> > > > > > > > >  });
>> >
>> > > > > > > > > If it helps, I found this tutorial, that shows it working
>> > > > > perfectly, I
>> > > > > > > > > just can't work out what is so different about mine!!
>> >
>> > > > >
>> http://www.michaeljacobdavis.com/tutorials/statesavingaccordion/state.
>> > > > > > > ..
>> >
>> > > > > > > > > Thanks in advance
>> >
>> > > > > > > > > Paul
>>
>
>


Re: [jQuery] Re: Jquery UI Accordion Navigation

2009-11-07 Thread Richard D. Worth
It looks like you'll have to supply your own navigationFilter function:

http://docs.jquery.com/UI/Accordion#option-navigationFilter

The default is

navigationFilter: function() {
  return this.href.toLowerCase() == location.href.toLowerCase();
}

which is trying to match the whole url, not the end, and not just the hash

- Richard

On Sat, Nov 7, 2009 at 3:49 AM, mehstg1319  wrote:

> Right, All out of ideas now. :-(
>
> Have changed the 1,2,3 etc to valid tokens and changed the NAME to ID.
> But still no luck.
>
> I sense I must be very close, but cannot work out why it does not
> work.
>
> Paul
>
> On Nov 6, 5:15 pm, "Richard D. Worth"  wrote:
> > Home
> > ...
> > About
> > ...
> >  tabindex="-1">Portfolio
> >
> > - Richard
> >
> > On Fri, Nov 6, 2009 at 11:55 AM, mehstg1319  wrote:
> > > I don't see any ID's or Names that don't start with a letter in my
> > > code. :-s
> >
> > > P
> >
> > > On Nov 6, 4:50 pm, "Richard D. Worth"  wrote:
> > > > ID and NAME tokens must begin with a letter ([A-Za-z])
> >
> > > > On Fri, Nov 6, 2009 at 11:39 AM, mehstg1319 
> wrote:
> > > > > Richard,
> >
> > > > > I have tried using ID's. Seems to make no difference, the
> navigation
> > > > > will still not work :-( I believe I may have the anchors slightly
> > > > > wrong, but cannot work out what is wrong with them.
> >
> > > > > With regards to your second point about using a valid ID? I do not
> > > > > understand, I don't see anything wrong with the names i have used?
> >
> > > > > P
> >
> > > > > On Nov 6, 1:43 pm, "Richard D. Worth"  wrote:
> > > > > > Two suggestions:
> >
> > > > > > 1. use id instead of name
> >
> > > > > > 2. use a valid id. See
> >
> > > > > >http://www.w3.org/TR/html4/types.html#h-6.2
> > > > > > "
> > > > > > ID and NAME tokens must begin with a letter ([A-Za-z]) and may be
> > > > > followed
> > > > > > by any number of letters, digits ([0-9]), hyphens ("-"),
> underscores
> > > > > ("_"),
> > > > > > colons (":"), and periods (".").
> > > > > > "
> >
> > > > > > - Richard
> >
> > > > > > On Fri, Nov 6, 2009 at 3:00 AM, mehstg1319 
> wrote:
> > > > > > > Thanks very much
> >
> > > > > > > That has fixed that bug, silly mistake to make!!
> >
> > > > > > > The navigation still does not work however :-(  i.e. if I go to
> > > > > > >http://www.paulbraham.com/test_site/index.html#2itshouldopen on
> > > the
> > > > > > > second panel and if I go to
> > > > > > >http://www.paulbraham.com/test_site/index.html#3
> > > > > > > it should open on the third.
> >
> > > > > > > Any ideas what I have done wrong here?
> >
> > > > > > > Paul
> >
> > > > > > > On Nov 6, 1:42 am, "jquery.redsqu...@googlemail.com"
> > > > > > >  wrote:
> > > > > > > > Your click function fail is due to the fact you hook the
> event up
> > > > > > > > outside of a doc ready block. You can either change it to use
> > > .live
> > > > > or
> > > > > > > > move it after the accordion initialise call.
> >
> > > > > > > > On Nov 5, 2:48 pm, mehstg1319  wrote:
> >
> > > > > > > > > Hi guys
> >
> > > > > > > > > I am working on the following sitehttp://
> > > > >www.paulbraham.com/test_site/
> > > > > > > > > and am having a few troubles with my JQuery Accordion.
> >
> > > > > > > > > Basically, I have turned on Navigation, and inserted three
> > > anchors,
> > > > > > > > > #1, #2 and #3 for the three sections that exist. Now in
> theory,
> > > i
> > > > > > > > > could go to index.html#2 and it would load with section 2
> open.
> > > > > This
> > > > > > > > > is not happening, and I cannot work out what is wrong with
> my
> > > code.
> >
> > > > > > > > > Also, I have used the following code to update the hash on
> the
> > > > > address
> > > > > > > > > bar when a section is selected. This is so it is possible
> to
> > > > > bookmark
> > > > > > > > > the website with a certain section open. This is also not
> > > working.
> >
> > > > > > > > > $(".menuLink").click(function(event){
> > > > > > > > >   window.location.hash=this.hash;
> > > > > > > > >  });
> >
> > > > > > > > > If it helps, I found this tutorial, that shows it working
> > > > > perfectly, I
> > > > > > > > > just can't work out what is so different about mine!!
> >
> > > > >
> http://www.michaeljacobdavis.com/tutorials/statesavingaccordion/state.
> > > > > > > ..
> >
> > > > > > > > > Thanks in advance
> >
> > > > > > > > > Paul
>


Re: [jQuery] How to get references to added elements

2009-11-05 Thread Richard D. Worth
Use insertAfter() instead. See

http://docs.jquery.com/Manipulation/insertAfter

<http://docs.jquery.com/Manipulation/insertAfter>- Richard

On Thu, Nov 5, 2009 at 5:50 PM, kheraud  wrote:

> Hello,
>
> Thank you to help me to discover jQuery. I have a very easy question
> but i walk around the solutions for days.
>
> //I search for sub-elements with class "test" of paragraphs :
> var elementSearched = $("p .test");
>
> //Then I add a new nodes to these elements :
> var returnedVar = elementSearched.after("Hello div>");
>
> My aim is to add handlers already present on other nodes to these new
> nodes. But "returnedVar" is not the new nodes added but the old one
> targetted. Then I have to search for the new nodes added to apply the
> handler. It is hard and if I apply the handler to a node already
> handled, my handler is done twice for this node.
>
> How can I have references to the nodes added with .after method ?
>
> Thank you for your help.
>


Re: [jQuery] Attempting to "hide" a div using jquery but div displays for a split second and then disappears

2009-11-04 Thread Richard D. Worth
See

http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content

<http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content>-
Richard

On Wed, Nov 4, 2009 at 10:21 AM, Newbie  wrote:

> I am working on an accordian side navigation jquery piece and I am
> unable to get it to operate exactly how I want.
>
> The menu was originally designed by Roshan Bhattarai and can be viewed
> at http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html
>
> The original design does not degrade well since the div containing the
> drop down menu information is set to display:none using CSS- but
> another forum poster suggested that the css selector be removed and
> the hiding function be set in the jquery.
>
> This is the code that was added to perform this function:
>
> $("div.menu_body").hide();
>
> The code works to some extent, however the div does appear on the page
> for a split second on refresh or on page load and then diseappears.
>
> I am thinking I either did something wrong, am missing something, or
> could put that bit of code somewhere else in the script for the div to
> truly be hidden until the visible header is clicked.
>
> The whole point of adding this code is so the accordian menu degrades
> gracefully- if there is another way for the entire menu to be viewable
> with javascript turned off, please detail the steps.
>
> I have downloaded the newest version of jquery.
>
> Here is the entire script for the menu.
>
> 
> 
> <!--//-+
> //  Developed by Roshan Bhattarai
> //  Visit <a  rel="nofollow" href="http://roshanbh.com.np">http://roshanbh.com.np</a> for this script and more.
> //  This notice MUST stay intact for legal use
> // ->
> $(document).ready(function()
> {$("div.menu_body").hide();
>//slides the element with class "menu_body" when paragraph with
> class
> "menu_head" is clicked
>$("#firstpane p.menu_head").click(function()
>{
>$(this).css({backgroundImage:"url(down.png)"}).next
> ("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp
> ("slow");
>$(this).siblings().css({backgroundImage:"url(left.png)"});
>});
>//slides the element with class "menu_body" when mouse is over the
> paragraph
>$("#secondpane p.menu_head").mouseover(function()
>{
> $(this).css({backgroundImage:"url(down.png)"}).next
> ("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp
> ("slow");
> $(this).siblings().css({backgroundImage:"url(left.png)"});
>});
> });
> 
>
> The site is on a private server behind a firewall so I cannot share
> the site but I can provide as much information as possible to solve
> this issue.
>
> An example of that preload or "flashing" upon refresh of the page with
> this type of code is viewable on this website:
> http://docs.jquery.com/Effects/hide - If you view the demo where it
> stated "Click  to hide me too" and continue to watch that line will
> refreshing the page, you will see the hidden information for a split
> second and then it will hide.  I am wondering and trying to find a way
> to prevent that flash of hidden information to be viewable at all.
>


Re: [jQuery] Re: Slider

2009-11-04 Thread Richard D. Worth
On Tue, Nov 3, 2009 at 12:50 PM, Luh Hooo Zer wrote:

> Well i guess the word value was not the right word.
>
> i have a graphic under the slider1 slider2 and slider3 that says:
> Low-Medium-High
>
> with 30 steps in the slider.
>
> if a visitor drags slider1 handle to Medium, and slider2 handle to Low
>
> then slider 3 moves to High for instance.
>

Why? You've yet to state your algorithm or mathematical formula for
determining the position of slider3 based on the positions of slider1 and
slider2.


>
> but the way i have it programmed, slider 3 just jumps to value 30 or
> "high" when those slider1 and slider2 fit those values.
>
> here is the code:
>
> if (parseInt(slider1Value) >= 11 && parseInt(slider1Value) <=20 &&
> parseInt(slider2Value) >= 1 && parseInt(slider2Value) <=10) {
>$("#slider3").slider('option', 'value', 30);
>$('#infoMedPrem').hide();
>$('#infoLowPrem').hide();
>$('#infoHighPrem').show();
> }
>
> so as you can see once the sliders fit into those two ranges, the
> slider3 jumps to that position... and i just cant logically think of
> how to make it slide, as the other two sliders are moving i think
> that made sense?!?
>

I'm afraid I still don't understand the relationship you're trying to set up
between these three sliders, but I'll give you an example that may help.
I've created two sliders, A and B, whose values are added to determine the
value of C:

http://jsbin.com/avagu3

source: http://jsbin.com/avagu3/edit

- Richard


>
>
>
> On Nov 2, 1:28 pm, "Richard D. Worth"  wrote:
> > Are you adding slider1 and slider2 to get the value of slider3? In that
> > case, why does it step at 10, 20, 30? Or perhaps you're multiplying them.
> > Not sure since you say "the value combination."
> >
> > Are you wanting to animate smoothly between each step even though it
> can't
> > sit at any value between them?
> >
> > - Richard
> >
> > On Mon, Nov 2, 2009 at 1:24 PM, Luh Hooo Zer  >wrote:
> >
> >
> >
> > > I have 3 sliders on one page.
> >
> > > the value combination of slider1 and slider2 dictates the position of
> > > slider3 handle.
> >
> > > but its not smooth... for instance, slider 1 and slider2 have 30
> > > steps, so is pretty smooth to slide, but slider 3 i can only site to
> > > position at values 10, 20, 30 it doesnt slide like slider1 and
> > > slider2 do
> >
> > > is there a way to say, as the sliders are sliding, to move slider3
> > > just as smooth ast the other two?- Hide quoted text -
> >
> > - Show quoted text -
>


Re: [jQuery] Create interactive song list selector

2009-11-03 Thread Richard D. Worth
You might take a look at the ListNav plugin:

http://www.ihwy.com/Labs/jquery-listnav-plugin.aspx

- Richard

On Tue, Nov 3, 2009 at 7:37 AM, wshawn  wrote:

> We have a master list of hundred songs we can draw from in our
> database.  I have already created a php / mysql / ajax (maybe not
> needed here) combination which populates the page with a table of a
> master list of items.
>
> Currently when the worship leader clicks on the name of the song it is
> moved to a new table, and then that list gets placed in a database and
> emails get sent to the appropriate people.
>
> I need the list to do a little more.
>
> Two things I can't quite wrap my head around:
>
> In the master list I would like to be able to get jquery to filter the
> master table by letter.
> i.e. songs starting with Q only with the added ability to show all
> again... Of course if the last song with Q was just selected the list
> should automatically go back to showing all.  I was doing this with
> Ajax, but feel this is a waste as jQuery can handle this directly.
>
> After the list is in the new table I would like to be able to do
> something like:
>
>
> http://www.lukedingle.com/javascript/sortable-table-rows-with-jquery-draggable-rows/
>
>
>


Re: [jQuery] class toggle navigation

2009-11-02 Thread Richard D. Worth
Try this


$(document).ready(function(){
  $('a').click(function() {
$(this).toggleClass('active');
showPic(this);
return false;
  });
});


...

Image  
   
   01
   02
   03
   04
   


- Richard

On Mon, Nov 2, 2009 at 2:48 PM, Bernard Elsmere
wrote:

> Hello
>
> I'm trying to implement a minimal navigation bar using jQuery's
> toggleClass() function but can't seem to get it working, no matter how
> many tips from all you gurus out there that I follow meticulously.
>
> It's the .img_selector div at the bottom of the page:
> http://www.thomasrugani.com/static/designobjects/02.html
>
> I want to toggle the 'active' class for each  when it's selected,
> to indicate which image is showing, so after calling jQuery, in the
>  I've got
>
>
>  $(document).ready(function(){
>$('a').click(function () {
>  $(this).toggleClass('active');
>});
>  });
>
>
> then the links, which also include the showPic function:
> ---
> 
> Image  
>
>  href="images/
> stoppino_tictacs_lit.jpg" title="">01
>02
>03
>04
>
> 
> 
> Can anyone see what I'm missing? Thanks in advance..
>
> Bernard
>


Re: [jQuery] Slider

2009-11-02 Thread Richard D. Worth
Are you adding slider1 and slider2 to get the value of slider3? In that
case, why does it step at 10, 20, 30? Or perhaps you're multiplying them.
Not sure since you say "the value combination."

Are you wanting to animate smoothly between each step even though it can't
sit at any value between them?

- Richard

On Mon, Nov 2, 2009 at 1:24 PM, Luh Hooo Zer wrote:

> I have 3 sliders on one page.
>
> the value combination of slider1 and slider2 dictates the position of
> slider3 handle.
>
> but its not smooth... for instance, slider 1 and slider2 have 30
> steps, so is pretty smooth to slide, but slider 3 i can only site to
> position at values 10, 20, 30 it doesnt slide like slider1 and
> slider2 do
>
> is there a way to say, as the sliders are sliding, to move slider3
> just as smooth ast the other two?
>
>


Re: [jQuery] Create PDF from js

2009-11-02 Thread Richard D. Worth
See

http://code.google.com/p/jspdf/

- Richard

On Mon, Nov 2, 2009 at 5:26 AM, m.ugues  wrote:

> Hallo all.
> Is there any plugin for creating custom PDF from javascript?
>
> I found this library http://www.collinssoftware.com/Pdf_Samples_1.htm
> but is not free.
>
> Kind regards.
>
> Massimo
>


[jQuery] Re: Can you remove styles from a certain UI

2009-10-26 Thread Richard D. Worth
Yes. See

http://www.filamentgroup.com/lab/using_multiple_jquery_ui_themes_on_a_single_page/

- Richard

On Mon, Oct 26, 2009 at 6:25 PM, Luh Hooo Zer wrote:

>
> i have a jquery slider, and jquery tabs on one page
>
> i dont want the tabs to have the theme the slider does...
>
> is there a way to set the tabs to not use the theme style, on the
> same  page as the slider?


[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345

2009-10-23 Thread Richard D. Worth
How bout an old version of jQuery UI then? If you're using jQuery v1.3.2
make sure you're not using a jQuery UI version older than 1.7

- Richard

On Thu, Oct 22, 2009 at 11:20 AM, Maxime FAYE  wrote:

> Nope :
>
> jQuery JavaScript Library v1.3.2 that's what the jQuery.js file says :)
>
>
> 2009/10/22 Ariel Flesler 
>
>> Could be that you're using an old version of jQuery (prior to 1.3.x?)
>>
>>
>> On Thu, Oct 22, 2009 at 1:03 PM, Maxime FAYE wrote:
>>
>>> Sorry no...
>>>
>>> But i can give you the code that is generting the error :
>>> var sDialogId = "divPleaseActionDialog";
>>> var sDialog = "";
>>> var oButtons = {};
>>> oButtons[aTranslations["ok"]] = function(){
>>> $j('#' + sDialogId).dialog('destroy');
>>> };
>>> sDialog += '' + "\n";
>>> sDialog += 'Please select at least one action';
>>> sDialog += '' + "\n";
>>> $j('body').append(sDialog);
>>> alert($j('#' + sDialogId).length);
>>> $j('#' + sDialogId).dialog({
>>> modal:true,
>>> buttons:oButtons,
>>> height:300,
>>> width:500,
>>> stack:true,
>>> title:aTranslations['error'],
>>> close:function() {
>>> $j('#' + sDialogId).dialog('destroy');
>>> }
>>> });
>>>
>>> It seems that the error occure when jQuery launch the dialog
>>>
>>> 2009/10/22 Ariel Flesler 
>>>
>>>>
>>>> Can you provide a link to the page where you see this error?
>>>>
>>>> --
>>>> Ariel Flesler
>>>> http://flesler.blogspot.com
>>>>
>>>> On Oct 22, 1:32 pm, Maskime  wrote:
>>>> > Hi all,
>>>> >
>>>> > I'm having the following error when  opening a dialog
>>>> >
>>>> > $.Event is not a function js/jquery/ui.core.js Line 345
>>>> >
>>>> > I don't really understand what's happening since i'm using this code
>>>> > to load dialog in many places in my application an it's the first time
>>>> > that i'm having this problem...
>>>> > If any one has an idea, it's more than welcome :)
>>>> >
>>>> > Thank you in advance.
>>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Ariel Flesler
>> http://flesler.blogspot.com
>>
>
>


  1   2   3   4   5   6   7   8   9   10   >