I want to have site wide default settings for all jQuery validation uses on my site, I want every form to use the below settings, but then on a per form basis change the rules and messages. Is this possible?
$('#myForm').validate({
errorClass: 'field-validation-error',
errorElement: 'span',
errorPlacement: function(error, element) {
element.next('span').remove();
error.insertAfter( element )
.removeClass('field-validation-error')
.addClass('ui-state-error');
},
success: function(label) {
label.remove();
}
});
I have a simple application that users jquery-ui's draggable and droppable. In Firefox, it works perfectly. In Chrome, however, I'm having problems.
This is the code:
$(".cell").droppable({
drop: function(event, ui) {
var originalTarget = event.originalTarget;
...
}
});
In Chrome the 'event' object is of type 'Object' (using Chrome Dev Kit), and event.originalTarget is 'undefined'. What am I doing wrong?
Hi,
I'm using jQuery validation in ASP.net MVC. I would like to show validation summary and also individual error messages besides the control. I can do either one at a time. So it would be really helpful to know how can I display both.
Thank you.
Hi,
I am using JQuery UI tabs , to get the current selected tab i am using ui.index but i want an
index of last clicked tab.
for example,
initially tab 1 is loaded
after that if i click tab 3 then in show method i can fetch tab 1's index
and the same way if i click on tab 1 then i can fetch tab 3's index.
I have a submit button which has been working to submit my form in ASP.NET-MVC.
I would like to attach a jQuery dialog to the button click. If the user exits out of the dialog, then I would like to exit from the submit as well.
I have dialogs hooked to other buttons, but not submits. How can I do this?
Hi
I'm just wondering if anybody else can manage to get the tolerance:'fit' option to work when using the 'droppable' feature in jQuery's UI?
I want to call a function only when the draggable div is dropped perfectly onto a droppable div. Both divs are the same size and I'm using snapMode:outer to help the end user.
I simply cannot get it to work with 'fit'. Works perfectly with 'intersect'.
Would really appreciate some help.
Thanks
Chris
I am looking for suggestions on the easiest to set up and use AJAX Autocomplete plugin that will use JSON key/value pairs. I want a plugin that supports setting the form value to the key of the name selected.
I have been working with jQuery UI Autocomplete, but it is a total pain in the rear to get this working. Does anyone know of anything that actually supports this out of the box, or have a thread or page where this is already detailed?
anybody knows how to make the jquery dialog not resizable ?
I call it like this atm :
var elem = $("#mydiv");
elem.dialog({
modal: true,
title: 'title',
buttons: {
Ok: function() {
$(this).dialog('close');
} //end function for Ok button
}//end buttons
}); // end dialog
elem.dialog('open');
"MyParentPage.htm" uses the load function of jquery to load('myDiv.htm') //
myDiv.htm only contains:
<a href="#" class="bt-cbox">Click me</a>
I have the following in "MyParentPage.htm"
$(document).ready(function() {
$(".bt-cbox").click(function() {
alert("handler hit");
});
});
Why is the my alert not being hit
jQuery('#alternatives').accordion({
header: 'div.AirlineHeader',
active: false,
alwaysOpen: false,
animated: 'bounceslide',
autoheight: false
})
My accordian is having many panes. The problem is when I click it first, it works OK but second time it doesn't have constant height, Instead it is having a greater height value.
Should I add another option or anything for that ?
hi
when I append jquery datepicker to my asp textbox, by clicking on it, my browser auto shows the history of the dates i typed in a dropdownlist. Can I prevent this?
Set textbox to readonly isn't a good idea because asp.net doesn't read the values from read only fields in code behind.
any other ideas?
thank you and best regards.
marc
Hello, I am trying to show and hide a few form fields dependent on the value of one of my select fields, I am looking to use arrays to to hold what should be show and what should not be show for each select value, to save me from a massive switch statement, but cannot figure out to do it.
I am using PHP and Jquery. Any help would be great.
I'm trying to create a page that allows a user to change the "look and feel" of the site. I would like to use something similar to jQuery's ThemeRoller or FireFox's Developer Tool.
I can't force the user to use Firefox and I don't need all the options that the ThemeRoller has. I'm really only looking for header, background, font size and font type.
Any suggestions?
Thanks
Hey,
anyone knows a jQuery plug-in for text zoom a-la MAC OS X "Large Type" function in Address Book? I'd use it for the same situation - to show full-screen phone number after clicking on it.
Cheers
jQuery Validation plugin has "element" argument for required rule. I know how to use it for inline functions but what if I want to pass it to out-of-line JS function? I tried this:
rules: {
startHours: {
required: startTimeRequired(element)
},
but it didn't work.
I am using jQuery validate for client side validation and I want to ignore any element that has the style="display: none"
$("#myform").validate({
ignore: "?"
});
What would my selector be for that in the above case?
I'm using JQUERY animate to show a banner at the top of the page, which is a DIV that is set to top -60 to hide it. I'm using the following JS call to show the div:
// Animation
$('#message-dock').animate({
top: 0
}, 500, function() {
// Animation complete.
});
What I can't figure out is for some reason there is an unwanted delay before I start seeing the div and I can't figure out why? Any Ideas?
I am using jQuery validation plugin and Watermark plugin. The problem I am facing is when i applied a watermark to any input field for which validation is also applied then validations are failing
For Example:
<input type=text name=myinput class="required">
and I applied a watermark for this field in document ready function:
$("#myinput ").Watermark("myinput ");
This is the sample case where validation is failing as value=myinput is set for input field which is watermarked.
hi, I'm using jquery-plugin columnizer
http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=columnizer
for this website: http://donatellabernardi.ch/drupal
It is sometimes very slow to create the columns (you can try changing the browser window size, or selecting a filter.
Sometimes Firefox gives the error message: "Unresponsive Javascript script" and I have to press on continue to continue the navigation.
thanks
All,
Is there a jQuery timer which can start a timer for 20 minutes and display time elapsed? Please point me to a small code for it.
var austDay = new getTime();
austDay = new getSeconds(austDay);
var duration = 1200;
duration += austDay;
Thanks
Hi,
I was wondering whether there's a way of using multiple selectors in jQuery and setting different values for them IN ONE CALL.
E.g.:
$(selector1, selector2, selector3, ...).css({left:[532, 112, 453, ...]});
Thanks in advance
I'm trying to do a manual jQuery AJAX request the following way:
$("#user_plan_id").change(function() {
$("#plan_container").load('/plans/' + this.value);
});
I have the "rails.js" file included in my header, and a "<%= csrf_meta_tag %".
I see from my log that the request IS getting to the server (although without the authenticity token... does rails.js even do this?), but the response is a 302 (Found) rather than 200, and no data actually gets rendered.
Any ideas?
hi,
I'm using columnizer plugin (http://welcome.totheinter.net/columnizer-jquery-plugin/) to update my pages and display elements in vertical columns.
It usually takes 2 seconds to update the view. Is that normal ? It seems to be quite slow.
I sometimes receive Firefox message (Unresponsive javascript)
thanks
Hi fellow programmer
I want to select an anchor inside a div like this
<div class="response content">
Disapproved Bank Mandiri<br><br>
<p>
<a class="showlist" href="#">Back to list?</a>
</p>
</div>
What is the jquery to do this ?