I’ve written a jQuery plugin that accepts css colors for some of its parameters. I want to validate them. If it was just a hex or rgb value I could do that with a regular expression, but how do I validate all 147 valid color names without bloating the plugin? I was wondering if there is some way of attempting
Tag: javascript
Image Enlarger Script
I am looking for one of those scripts that when you click a Thumbnail, it makes the picture englarge. I tried searching Google using a lot of terms, but cant find any. Where do I get these? Answer I believe one of these are what you are looking for. http://leandrovieira.com/projects/jquery/lightbox/ http://jquery.com/demo/thickbox/
jQuery Datepicker “After Update” Event or equivalent
I am using a standard jQuery Datepicker and I need to modify the text in each TD based on some daily status information. I realize I can wire up the beforeShowDay event but that only allows me to modify CSS information for each date. Hoping for an event on the entire calendar such as afterRender etc. I can modify the
JavaScript auto-incrementing a variable in jQuery and AJAX
I have JavaScript using jQuery and AJAX which creates a dynamic array, which has some values used for AJAX request as below; The script is suppose to submit values in the array in array[i] for each AJAX request. I made a variable var i which auto increments.. But the script is not working.. The script works well if array[i] is
jQuery addClass when value of hidden input changes dyamically
I have a contact form that sends a value to a hidden input on successful completion of the sendmail function. I want to detect this value change and then use it to apply a class to a div/paragraph. I asked a similar question recently and I’m aware that this requires the script to continually check the doc after DOM is
How to validate the DateTime of MM/dd/yyyy hh:mm format?
I am using MaskedEditExtender for entering a datetime. I am unable to figure out how to validate it. Is there any Regular Expression for validating dates along with time MM/dd/yyyy hh:mm or any Javascript function ?? Answer THis will solve your issue:
Show child div on mouse hover of parent – needs javascript?
I need to show a div when you house over its parent (default is for the child div to be hidden). Is the only way to do this with javascript? Thanks Answer No JS required.
Tersest way to create an array of integers from 1..20 in JavaScript
What would be the tersest way to create this array: For example, a for loop: Or a while loop: Would there be other examples that would be terser — in other words — less code? I’m thinking of things like in Ruby where the equivalent code I believe would be as simple as 1..20. I’m not aware of syntax like
Check whether user has a Chrome extension installed
I am in the process of building a Chrome extension, and for the whole thing to work the way I would like it to, I need an external JavaScript script to be able to detect if a user has my extension installed. For example: A user installs my plugin, then goes to a website with my script on it. The
Fixed Positioned Div Inside another Div
I have one div position:fixed; and my problem is that position fixed is relatively to all the page, I need that the fixed div stays inside other div that is centered in the page with margins in auto.(So when I scroll down the page I want to see always the div in the same position). I use the jquery plugin