Hi
I'm using the jQuery Validation plugin, and I'm trying figure out how i can make a name field required if a prefix (Mr, Ms, etc) or a suffix (Jr, Sr, PhD) is selected. This is what I have:
$('#geninfo').validate({
rules:{
firstname: {required: function(element){
return $("#prefix").val() != " ";
}
}
},
mess...
Hi everyone
I would be glad if some of you experts could help me with some jquery code.
Thanks in advanvce for your time.
I have created a page "photography.html" with a bunch of thumbnails.
You can see the slideshow here: http://test.tester24.com/photography
When a thumbnail is clicked, two things happen:
A window with a slideshow s...
Hi -
I'm making a slider and this is the meat of my code;
$('#slider a').click(function () {
elem.filter(this.hash).addClass("active").animate({"right":"0"}, 3000,
function() {
elem.filter(activeElem).removeClass("active");
activeElem = elem.filter(thi...
As I've gotten deeper into using jQuery with various sites I've worked on, I've found that I can get lost on whether a class attribute value is appended to an element in the DOM in order to attach an actual CSS style, or to bind an event to it. As such, I've started leaning towards using the rel attribute on anchor tags to denote if som...
Hi Guys,
I have a problem in that I am using a simple watermark plugin such that it works
jQuery('#selector').Watermark('Watermark text here ...');
The problem is - when I try and use something like
if (jQuery('#selector').val() != "") { //do stuff }
The statement is True because of the watermark. Is there anyway I can somehow "ig...
Hello, First off, I am very new to j-query. That being said, I have a very simple j-query photo gallery slider that holds images and fades into new ones every few seconds. I have a page where I duplicated it, and gave it different css and class/id names in the js to make a different one. I want both on the same page. Now that I have the ...
II am working website which is going to be accessed by a motorola device(scanner) but the functionality needs to be same a normal/usual website. On one of the page I have a textbox -> productID and listbox which can have multiple productID. Now when the focus is on textbox and it scans the productID ,the scanner returns a tab,now after ...
I have the following page that works as I want it to, all the JS is in the tags and no inline JS : http://www.ninjatrader-support.com/leins/SS/index.html
When I put this in production, and switched from the table to a div layout the "Next" and "Previous" buttons no longer work and I had to go back to inline JS in the PHP file that creat...
I have to sets of dates (via inputs/selects - mm/dd/yyy) on page.
I want certain readonly text field to show age in months (calculated based on those two dates) after a certain select field (different select, not a part of dates set) has been changed (any option in that select chosen must trigger calculation and show result in readonly f...
Sometimes this function can be called too quickly and multiple elements are created but since it uses an ID that's not unique to each instance it the part to fade out and remove the div only applies to the top level element, not all of them. So I end up with a static div tag that isn't fading/removing.
The best thing I can think to do ...
I have a grid displaying some information and when I select multiple rows and click on add order button it should display those rows in 2nd grid without making any call because its just show the selected row from 1st to 2nd grid....just like shopping cart application ? Is it possible with jqGrid?
Moreover, if I selected more rows it sho...
I have a c# web service that I call using jquery ajax. It works fine except when a custom exception is throw inside the web method. For some reason, the XmlHttpResponse objects responseText only has the base Exception class's properties. So I end up with a json object with the following properties: "ExceptionType", "Message", and "Sta...
Hello, I have got a div with contenteditable that should trigger a < br /> insert on "enter".
Everything works fine in IE but Firefox drives me crazy.
this.e.keydown(function(event) {
if(event.keyCode == 13) {
var execute = editor.insertHTML(\'<br />\')';
eval(execute);
return false;
}
});
Firefox ignores < br /> at t...
I'm sure this question has been answered before, but I don't think I'm using the right search phrase.
I think an example will explain better what I'm trying to ask:
var test = {};
test.example = function(parameter_2){
alert(parameter_1+parameter_2);
}
test("parameter_1").example("parameter_2");
Obviously that last line won't work...
I'm trying to get the jQuery Automcomplete thing to work, but it wont do as i want :P
This is my code:
JavaScript:
$("#CustomerID").autocomplete({
source: function(request, response) {
$.ajax({
type: "POST",
url: "/customer/search",
dataType...
I have an asp.net 2.0 web application that will run on the same web servers as SharePoint Server 2007. The application should run in its own App Pool (IIS 6.0). The Web Application needs to call the SharePoint Object model API.
Is there a resource that explains the required configuration / security settings and other considerations tha...
I'm looking for a JQuery (or other framework) plugin, kind of working like the Facebook status message text box.
What it should do:
Allow text to be typed freely without triggering the AutoSuggest (as opposed to normal AutoSuggest boxes)
Show the AutoSuggest, when triggered by a certain character, such as '@'.
Actually, it should wo...
I have a vehicle and a product object and I need vehicle to call a function within product.... I can't seem to figure it out, what should I do here?
var vehicle = function () {
return {
init: function () {
var that = this;
jQuery('.vehicle-year-profile .options .delete').bind('click', function (e) {
...
I am using the jquery-tmpl template library to build a dynamic <select> list. In my template I have a function call that returns all <option> elements from an existing <select> element on the page.
In my template the function call executes successfully and returns the .html() from the existing <select> list but renders it as text in th...
I render this JSON object:
[{"created_at":"2010-09-21T20:41:28Z","subject":"hello world"}]
Then I use this date parser to parse it (see below), but it only works in Chrome 6.0.4, Firefox 3.6.8, but NOT Safari 5.0.2 --- I get NaN errors. What gives?
Date.prototype.toRelativeTime = function(now_threshold) {
var delta = new Date() - t...