[jQuery] plugin: blockui - How to Change cursor style in IE to 'not-allowed' on overlay???
I have a DIV blocked from data entry in IE, Firefox, Safari and Opera. Functionally all is okay -- super plugin!!! The only problem left is that the cursor does not change to 'not- allowed' on the overlay when I use IE 6,7 or 8. All other browsers render the cursor okay??? Here's the code: $().ready(function() { Protect('#divData'); $('#cbProtected').bind('click', function(e, ui) { if ($(this).is(':checked')) Protect('#divData'); else Unprotect('#divData'); }); }); function Protect(el) { $(el).block({ message: null, overlayCSS: { backgroundColor: null, opacity: 1.0, cursor: 'not-allowed' } }); }; function Unprotect(el) { $(el).unblock(); };
[jQuery] Re: plugin: blockui - How to Change cursor style in IE to 'not-allowed' on overlay???
Found my own answer for anyone who is interested... Changed overlayCSS to: overlayCSS: { backgroundColor: '#000', opacity: 0.0, cursor: 'not-allowed' } Now 'not-allowed' cursor style displays in all browsers as the ONLY visual clue to inputs being protected (not allowing data entry, events, etc.). On Aug 2, 9:39 am, Marv mcslay...@gmail.com wrote: I have a DIV blocked from data entry in IE, Firefox, Safari and Opera. Functionally all is okay -- super plugin!!! The only problem left is that the cursor does not change to 'not- allowed' on the overlay when I use IE 6,7 or 8. All other browsers render the cursor okay??? Here's the code: $().ready(function() { Protect('#divData'); $('#cbProtected').bind('click', function(e, ui) { if ($(this).is(':checked')) Protect('#divData'); else Unprotect('#divData'); }); }); function Protect(el) { $(el).block({ message: null, overlayCSS: { backgroundColor: null, opacity: 1.0, cursor: 'not-allowed' } }); }; function Unprotect(el) { $(el).unblock(); };
[jQuery] Re: val ( ) prefers labels over values?
You may be morally correct but the label attribute of the option tag is not widely supported: http://www.w3schools.com/TAGS/att_option_label.asp On May 7, 3:47 pm, Klaus Hartl klaus.ha...@googlemail.com wrote: Don't speculate, look up:http://www.w3.org/TR/html401/interact/forms.html#h-17.6 It's valid. This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label. --Klaus On 7 Mai, 20:16, James james.gp@gmail.com wrote: I don't think label inside an option is a valid attribute. I'd remove that. Is there a reason you're using that? Maybe you should consider using the title attribute instead. On May 6, 1:42 pm, Michael B. Williams mbw...@gmail.com wrote: Consider the following select box: select id=test option value=/option option label=XS value=1XS/option option label=S value=2S/option option label=M value=3M/option option label=L value=4L/option option label=XL value=5XL/option option label=0 value=60/option option label=1 value=71/option option label=2 value=82/option option label=3 value=93/option option label=4 value=104/option option label=5 value=115/option option label=6 value=126/option option label=7 value=137/option option label=8 value=148/option option label=9 value=159/option option label=10 value=1610/option option label=11 value=1711/option option label=12 value=1812/option /select If I do a $(#test).val(2) on this I would hope it would select S, but instead it selects 2. Why is this setting the value of the select box based on the label rather than based on the value attribute? I am using Safari 4, by the way. Thanks
[jQuery] [treeview] top node (root) is open but has plus sign????
I have a treeview where there is only one node at the top of the tree with several child nodes -- some having child nodes -- some not. All open / close indicators are as expected EXCEPT the very top one which even though the node is open it show a '+' sign rather than a '-' sign which is the normal display for an open node. Also clicking this top node's '+' closes the whole list AND changes the indicator to a '-' sign. Again, not what you would expect. Any ideas?
[jQuery] [treeview] what are the possible options for this plugin?
There doesn't seem to be any place that I can find which explains the options available for the treeview plugin. Does anyone have a link or reference as to what the options are and what their settings mean?
[jQuery] Treeview Plugin -- What are the options???
The documentation doesn't seem to detail the optoins and the demos use some but without any explanation of what options and settings are available. For example, what does 'Unique:' mean? Or 'Control:'?
[jQuery] Re: Cluetip override Error to stop showing cluetip
Karl, I evaluated ten (10) different tooltip plugins for jQuery and selected Cluetip based on features, functionality, and ease-of-use. So far, it has met my expectations wonderfully! Thank you for your efforts. For the past 2 days I have been struggling with the Cluetip API trying to programmatically close a displayed Cluetip and could not find a reliable way to do this. You solved ALL my problems with this one simple method. Thanks again. On Apr 23, 10:59 pm, Karl Swedberg k...@englishrules.com wrote: thanks a lot for your patience with me as I make improvements to the plugin. I really appreciate your questions and suggestions. The truth is, this plugin is the very first one that I wrote, and I started working on it just a couple months after I started learning JavaScript, so if I had to do it all over again, I'd write it a lot differently now. Nevertheless, I'm glad it's holding up as well as it is, even with all of the duct tape I've applied to it over the years. I used to give people a hack for hiding the tooltip if they wanted to do it manually, but tonight I realized it would be dead simple to add an artificial event binding that would hide the tooltip when triggered. Now, if you grab the very latest (updated a couple minutes ago) from Github, you should be able to write $ (document).trigger('hideCluetip'); and it will be hidden. https://github.com/kswedberg/jquery-cluetip/tree/master Cheers, --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 23, 2009, at 9:35 PM, DotnetShadow wrote: Hi there, I've been using the most recent version of cluetip 0.9.9.c and I have overridden error function in the cluetip, but I was wondering how I can hide the actual cluetip? I tried $(this).isActive = false but this didn't work. error: function(xhr, textStatus) { /// HIDE THE TOOLTIP? } Basically I got a check in the error function that checks whether to show the error or redirect to the login page in case I have forms authentication. So how can I hide the tooltip? Regards DotnetShadow
[jQuery] Re: finding mouse position within a div with a scrollbar
Here's an excerpt from my click event that determines the mouse coordinates for a click regardless of horizontal / vertical scrolling of the page or the clicked image: $('#img1').live('click', function(e) { var locX = Math.round(e.pageX - $(this).offset().left); var locY = Math.round(e.pageY - $(this).offset().top); ... On Apr 22, 9:59 am, Charlie Park char...@pearbudget.com wrote: I have a div with an overflow, so it has a scrollbar. The what are my mouse's coordinates tutorials (like this one:http://docs.jquery.com/Tutorials:Mouse_Position) only yield A) the coordinates of the mouse on the page (using e.pageX and e.pageY, or B) the absolute coordinates of the mouse, within the element, on the page (using e.pageX - this.offsetLeft;). What I want to do is to find out how far down, *within my scrolling element*, the mouse is. Best way to think of it: picture a calendar, like on Google Calendar. It has a scrollbar, so 10:00 am might be the earliest-visible timeslot (the mouse position would be at 0, 0 if it were in the top-left corner. But within div#calendar, you could have 599 pixels hiding above the visible section. That is, the mouse is actually at point 0, 600. How can I determine how much of the div is hiding? Alternately, how can I determine what the mouse's coordinates are, considering the entire height of the div, and not just the visible portion of it?
[jQuery] [validate] How can I reset the error messages without using the form plugin????
The validation plugin is great and I'm using it very successful with my ASP.net web services for AJAX data entry and validation. What I would like to do is use the JavaScript form reset method AND somehow reset the validator's error messages from the prior validate() invocation but I do not want to use the form.js plugin (nor do I need to since I never really submit any of the many forms on a page -- the forms are just used for the validation process). Thanks for any advice you can give...
[jQuery] Re: How can I reset the error messages without using the form plugin????
Okay, to answer my own question I have successful reset the form and cleared the Validation plugin error messages by: assume the following pseudo code: var frmAsset = $('#formAsset').validate({ rules: { shortDesc: { required: true, minlength: 3 } }, messages: { shortDesc: { required: '* required', minlength: $.format(Enter at least {0} characters) } } }); Now anywhere/anytime later on in processing you can clear this form and reset any error messages by doing these: $('#formAsset')[0].reset(); // this resets form variables to their initial values (must be set in form fields)... frmAsset.resetForm(); // these two lines together frmAsset.submit = {}; // reset the Validation plugin error messages... On Apr 21, 10:25 am, Marv mcslay...@gmail.com wrote: Thevalidationplugin is great and I'm using it very successful with my ASP.net web services for AJAX data entry andvalidation. What I would like to do is use the JavaScript formresetmethod AND somehowresetthe validator's error messages from the prior validate() invocation but I do not want to use the form.js plugin (nor do I need to since I never really submit any of the many forms on a page -- the forms are just used for thevalidationprocess). Thanks for any advice you can give...