I am using the following code to countdown before enabling a button.
<script type="text/javascript">
$.fn.timedDisable = function(time) {
if (time == null) { time = 5000; }
return $(this).each(function() {
$(this).attr('disabled', 'disabled');
var disabledElem = $(this);
setTimeout(function() {
...
My dom looks like:
<td>
<select id=s1 class=c1>...</select>
<select id=s2 class=c1>...</select>
<select id=s3 class=c1>...</select>
<input type=button id=btn value=click/>
</td>
Now when the page loads, I do a $(".c1").hide(); and then based on other logic, make one of them visible.
Now when the button is clicked, I want the ID of t...
I'm working on a Pylons-based web app. Because I am sane, I am using jQuery (and plugins) instead of writing raw JavaScript. I am also using FormEncode to validate forms for my app (especially new user registration). FormEncode is great for validating forms after they're submitted. jQuery, when JavaScript is available, validates form...
Is there a way, using jQuery, to force a form to wait until a function is done executing before submitting?
I have a submit button on a multi-field form. I would like the submit button to hit a server to determine whether the current user has any items in the database, and if they have none, I would like it to pop up a confirmation wind...
I have this HTML
<li>
<a rel="1" href="/jobwall/job/1">
<img src="http://lcl.moovjob.com/media/images/employers/simonainleydotinfo.jpg">
</a>
</li>
and I have this javascript
$('ul#jobs li a').mouseenter(function(){
$(this).parent().addClass('active');
$.ajax({
type: 'POST',
url: '/jobwall/j...
Hello. I know its a not a new concept that my site is perfect on FF,Safari and Chrome but jacked up on IE8. That being said and cutting to the chase. This is the home page that I am working on for a social network for people with CysticFibrosis.
http://www.cysticlife.org/Home.php
If you can, look at it in FF,Safari and Chrome, and the...
I've seen this same issue posted in this forum as well as others ... unfortunately none of the responses in those places has helped me. So I broach the subject yet again ...
On my test site hompepage (http://www.crucean.com/testSite/index.html), I have a DIV with the ID #bodyText ... when jscrollpane is called on this DIV, it has an eff...
Hi,
I'm new to jquery and am learning it. I was following these 2 tutorials and I couldn't find the solutions for what I am looking for:
1). spyrestudios.com/demos/jquerydemo2/ajax.html
2). web.enavu.com/demos/paginate2/
What I've done :
1). The sub-dynamic content which is data from the whole pagination html ( level 3 )
1). The dyna...
Scenario:
I want to create a jQuery controllable jackpot "spinner" that will rapidly sequence a number of random images through a div before settling on one, with the delay interval between each equal but changeable. For mockup purposes, I'm simply changing CSS color classes to a box, although in the final I'll use background images.
...
I am trying to check checkboxes based on a select option. So, if the user chooses one option 3 from the dropdown, I want it to automatically check checkboxes with the ids set as 4, 24, and 17.
I have predefined the variables using PHP, so that my array is as follows:
var per =[];
per['3'] = [];
per['3']['4'] = '4';
per['3']['24']...
Hey all,
I'm about to port a series of my jQuery projects over to Vanilla Javascript (pure javascript, no framework) and would like to know if there are any existing [framework adapters / framework agnostic adapters] out there?
For instance I'm envisioning something like this:
// My Project
(function(){
// Fetch all the elements u...
Are there any open source pivot tables with drag&drop support or what is the fastest method to implement it?
Which JS library to use? I wanted JQuery, will this be the right solution?
...
I have added stopPropagation, however, I still get two popups in a row. This is better than before, where there were 20 popups for one element that is clicked....is there a better approach or am I missing something ?
$(top.document).ready(function () {
$("*").click(processAction);
});
function processAction(e) {
var clicked =...
A sample bit of code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<div id="myinfo">info</div>
<input id="clickme" type="button" value="click here to display info"/>
<script type="text/javascript">
function Fighter() {
this.name = "Kenny"; // fight...
I googled and googled and I concluded that it's very hard to get answer on my own.
I am trying to use jquery or JavaScript to get a property of clicked element. I can use "this.hash" for example - it returns hash value I presume.
Now I would like to get name of the class of clicked element.
Is it even possible? How? And where would I...
I have a design where I have a list of "available boxes", users take boxes by dragging them from the "available boxes" list to their "My Boxes" list.
Users more often than not take multiple boxes at a time (max 20), once they have finished with the boxes they drag them back to the "available boxes" list to return them.
jQuery sortable ...
There's quite a few questions on Stack Overflow about id vs class but these questions are nearly always in relation to CSS - and the generally accepted answer is to use classes to style a particular set of elements, and ids for specific instances. Makes sense, fair enough.
I'm finding however that as I do more and more Javascript/jQuer...
$(top.document).ready(function () {
$("*").click(processAction);
function processAction(e){
var clicked = e.target;
e.stopPropagation();
alert(clicked.tagName);
e.stopPropagation();
switch(clicked.tagName)
{
case "A":
newDialog("You've clicked on a link !", "Please Choose An Action <...
Hi,
I have an .aspx page with a couple of textfields. I validate these with jQuery validation plugin when the user clicks the submit button. When the submit button is clicked I also open up a new window, but I only want to open the window if the fields are correctly filled out.
How do I stop the window from opening if the fields are no...
I would like to create an element on a website that scrolls as you scroll down the window. In most cases, I know this could easily be solved with some basic css using fixed positioning. The issue is, I would not like it to be in the same space on the screen at all times. I would like it to be a sidebar element that starts with the rest o...