jquery

What is the difference between Window.load and document.readyState

Hi All, I have one question , In my ASP.NET MVC web application i have to do certain validation once page and all controls got loaded. In javascript i was using belwow line of code for calling a method. window.load = JavascriptFunctionName ; Some one from my team asked me not used above line of code Instead use JQuery to do the ...

Return and Save XML Object From Sharepoint List Web Service

I am trying to populate a variable with an XML response from an ajax call on page load so that on keyup I can filter through that list without making repeated get requests (think very rudimentary autocomplete). The trouble that I am having seems to be potentially related to variable scoping but I am fairly new to js/jQuery so I am not qu...

Guide for custom drag and drop treeview control (with jQuery)

I need to do a custom tree with simple drag and drop functions (mainly for reordering tree nodes) Coding from scratch, are there any guides/examples out there for getting me jumpstarted? Oh and using jQuery of course! ...

jquery .load not applying ready function

On document ready I run this code: jQuery(document).ready(function(){ jQuery('#button').click(function() { jQuery('#contact_form').load("/Users/mge/Downloads/jquery-ajax-1/readme.txt"); return false; }); }); Then if I create a form like <div id="contact_form"> <form name="contact" met...

Licensing Scripts

Hi, I've had my first nightmare client recently who was messing me around with payment for a project. So... I've come to an agreement with another client to use some of the sites scripting to build a site for them. But, now the original client wants their site too. I have made a deal to licence the reused parts of the site (some jQuer...

Rails: AJAX Controller JS not firing...

I'm having an issue with one of my controller's AJAX functionality. Here's what I have: class PhotosController < ApplicationController # ... def create @photo = Photo.new(params[:photo]) @photo.image_content_type = MIME::Types.type_for(@photo.image_file_name).to_s @photo.image_width = Paperclip::Geometry.from_file(param...

How to check for empty values on two fields then prompt user of error using javascript

Hello guys, I hope I can explain this right I have two input fields that require a price to be entered into them in order for donation to go through and submit. The problem that I am having is that I would like the validation process check to see if one of the two fields has a value if so then proceed to submit. If both fields are empt...

Combining the jquery Calendar picker with the jquery validation and getting them to play nice?

I'm just starting to get into jquery/javascript programming so this may be a beginner question but I sure can't seem to find anything about it. I have a text field on a form. I've used the JQuery UI Calendar picker to make data entry better. I've also added jquery validation to ensure that if the user enters the date by hand that it's s...

After append() how to bind a click event to just added element

I have this code $(".delete2").click(function() { $('#load2').fadeIn(); } I have dynamically added item via this return addSubcategory = function(){ sucategorynameval = $("#sucategoryname").val(); categoryId = $("#addcategoryid").val(); $.get("process-add-subcat.php", { "action": "add_subcategory", ...

jquery prevent focus on click

I have this sample code: $myTrigger .click(function(e){ alert('click'); }) .focus(function(e){ alert('focus'); $(this).click() }) The intent is that I want something to happen when you click on $myTrigger. If, on the other hand, you tab onto it via the keyboard (ie, focus) I want the exact sa...

JQuery Cycle Function

http://malsup.com/jquery/cycle $('#slides').cycle({ fx: 'fade', sync: 0, delay: -5000 }); I want it so my slides fade in, wait 5 seconds then fade out to the next slide - I've been trying for a while but to no avail - any help? ...

Alternative to jQuery ui sortable needed

I'm trying to use jQuery ui sortable but it's not working out for me, it's having scroll offset issues when scrolled in Firefox. The goal is to have a list of <li> tags that a user can re-order with their mouse. My question is, what alternatives exist for that plugin? ...

jquery form validation

I am using a jquery pluggin for a quick and easy form validation My forms use the input's default value as a label and I have a little onfocus and onblur javascript function to show and hide this when the user starts to type: <input name='fnameREG' type='text' id='fnameREG' value='first name' size='70' onfocus='clearInput(this)' onblur=...

jQuery and Firebug

I am using jQuery's cycle plugin, and found that I can call up the default for "speed" by typing this into Firebug's console: $.fn.cycle.defaults.speed >>> 1000 I would like to know how to call up the override I have for speed (I would like to reuse it later): $('.xxx').cycle({ speed: 1700 }); If you have t...

Full page Slide with jQuery and ajax

Looking to implement a solution on a personal project but don't know if it is possible. Would love to have two buttons on left and right of page where if clicked would take you to new page or previous page. Screenshot: http://img188.imageshack.us/img188/9294/conceptu.jpg But here's the kicker, There will be fullscreen stretched bg's. ...

Passing Variable in load

I have a load action tied to the submit button of a form. jQuery('#content').load("/control/ajxdata/installs.php?country=" + country); jQuery('#content').load("/control/ajxdata/installs.php",{ 'country': country }); The name, and the id of the form element I am trying to utilize is "country" In the error console, I am getting "E...

jquery focusin() and preventing bubbling.

UPDATE 2: I slept on it and then whipped up some sample code to try and further figure out the issue. Here's a sample using the console.log of firebug to show you which object is triggering the focusin event: http://jsbin.com/axefo3/11 1) click the first link: yellow div shows 2) hit the tab key: It should tab into the link within t...

Using .click() with rel=noreferrer

Hi, i have a link with an ID with the rel=noreferrer property (in case you dont know, this means that the user will go to the href value, and the destinatary site won't know that they came from my site). <a href="http://google.com" id="mylink" rel="noreferrer">click here</a> If i use this jquery command, will the "rel" property still ...

jQuery Jcrop progress bar not working, is it a bug or am i doing something wrong?

I'm using this jQuery plugin http://deepliquid.com/content/Jcrop.html for images uploading. I'M on Windows Seven Right Now and and i've tested it on IE(flashplayer v10,0,2,54) and Firefox(flashplayer v10,0,45,2). i've tested it on a iMac and it's showing the upload progress bar perfectly. ...

Django, javascript and code reuse problem

Hi, I have some sort of a design problem with my Django AJAX application. I have a template where I initialize js variable from django context variable like so: var test = "{{ test }}"; This variable is than used in a number of js functions that are needed for interface to work properly. So now I'm trying to reuse some content from ...