jquery

How to disable show() in jquery on page load?

I want to show() "<div id="test">write text here</div" on click and not on page load. <script type="text/javascript"> $(document).ready(function(){ $("#click_test").stop(function(event){ event.preventDefault(); $("#test").slideup(); }); $("#click_test").click(function(event){ event.preventDefault();...

Style input file and auto submit

Hello, I am trying to have a single text link on which the user clicks and it asks the user which file he/she wants to upload then, auto matically POSTs it to the form. How can I achieve the same? I know I have to style my file input but how to get it to post automatically on file selection? Thank you very much ...

Jquery tab postback

Hi, I am using jquery remote tab with asp.net to load my .aspx pages.The problem is if suppose i have a main page called "Parent.aspx" which contains the jquery tab and child page "Page1.aspx" which is loaded via remote tab into the "Parent.aspx".When i click on a server side button on my Page1.aspx, the whole window redirects to the Pag...

Jquery trigger file input

Hello, Am trying to trigger an upload box (browse button) using jquery. But it doesnt seem to work. $('#fileinput').trigger('click'); Please help. Thank you. ...

service call via jquery

I'm trying to write username validation using jquery, I'm using jmsajax plugin.I have tested webservice, it work fine. I'm getting error. Webservice code [System.Web.Script.Services.ScriptMethod(ResponseFormat = ResponseFormat.Json)] [WebMethod] public bool check_username(string uname) { DBMOdelDataContext db = new ...

Wait until function is loaded

How can I in jQuery test when a javascript function is fully loaded? I would like to use a gif, which displays loading, while the javascript function loads, and hide it when the function is fully loaded? ...

How to select and replace the whole page with jQuery

My design of a page forces me to refresh the whole page with html that I have loaded via ajax. $('html').replaceWith(data); Gives me errors. Any ideas? ...

grouping draggable objects with jquery-ui draggable

Hello, I want to use jquery draggable/droppable to let the user select a group of objects (each one has a checkbox in the corner) and then drag all the selected objects as a group... I can't figure out for the life of me how to do it haha. Here is what I'm thinking will lead to a usable solution, on each draggable object, use the star...

Can't select SPAN sibling

Can't understand why this code changes color of DIV element to blue, but doesn't change color of a SPAN element. Any ideas? <html> <head> <script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; <script> $(document).ready(function(){ $("#prev ~ div").css("color", "blue"); $("#prev ~ span").css("color"...

Auto Slider / Scroller to display dynamic content

Can any one tell me how can i implement a auto slider/scroller in my web page. The slider should show dynamic data from a database. (Ex : Hot jobs tab in the plipl.com site's home page (www.plipl.com) . Is there any easy way to do this with jQuery ? ...

Cannot post successfully if not using cassini for JQuery posts in ASP.NET MVC

Hi When i set my project to start app using Visual Studio Development server (Cassini:Port) my JQuery posts properly to the following URL "SomeController/SomeMethod". When i use localhost to run with the following URLS, it does not work "http://localhost/Store/SomeController/SomeMethod" or "SomeController/SomeMethod". Any one facing...

jquery jqModal Ajax and nested modal problems

I just started using jqModal as I need support for nested modals. I'm noticing some erratic behavior with nested modals and ajax, but I don't know exactly how to fix it. What happens is when I load the main modal, that has a nested modal in it, I get two jqmOverlay divs, it's like it's applying the overlay for both modals, even though ...

Safari and Chrome: problem editing input 'size' attribute on the fly

Hi, I have the following bit of code to create an automatically resized text input: // setup quick jump input $("#goto").keydown(function(e){ var size = $(this).val().length; // sanity if ( size < 1 ) { size = 1; } $(this).attr("size",size); // if enter then GOTO-> if ( e.keyCode == 13 ) { window.location.href =...

Deselect contents of a textbox with javascript

I understand that with javascript you can select the contents of a textbox with the following code (in jQuery): $("#txt1").select(); Is there a way to do the opposite? To deselect the content of a textbox? I have the focus event of a series of textboxes set to select the contents within them. There are times now that I want to focu...

Unable to get a jQuery script work in Firefox

I have the following script in my homepage $(function () { // same as $(document).ready(function () { }) // assuming we have the open class set on the H2 when the HTML is delivered $('li.drawer h2:not(.open)').next().hide(); $('h2.drawer-handle').click(function () { // find the open drawer, remove the class, move to the UL fo...

Toggle animation?

Hey, I have this code: $('.couch-hide').click(function() { $(this).animate({right:0},1000, 'easeOutBounce'); }); I am trying to get it to toggle, so on first click, pop it out, then click again, and place it back inside. Would i need to set a variable as a tracker? To tell what stage it is at? Thanks, Ryan ...

Generate HTML Table Client Side

(ASP.NET Web Application) I'd like to create a page which allows the user to build an HTML table. The user will be provided with the following controls: a textbox used to define the amount of rows in the table, a textbox used to define the amount of columns in the table, and a bulleted list of shapes (ex. Square, Octagon, etc) which wil...

Internet Explorer and the case of the Very Strange iFrame behaviour

I'm having a truly... bizzare error in none other than Internet Explorer with a windowing system I'm developing. Basically, the windows are absolutely positioned divs containing ah iFrame that shows their page and resizes along with them. In all other browsers this works fine as intended, but in IE the iFrame doesn't show up... properly....

What is the simplest way to wrap a div with siblings in jQuery?

I want to use jQuery to dynamically expand my markup so that my divs show up as nice rounded boxes. For example if my DOM has a series of div objects with unique ids like: <div id="queuediv0" class="isequeue" > </div> Which can be selected using: $(“.isequeue”) I want to replace/wrap those divs so that the end result looks like: ...

A problem setting timeout feature in with Jquery AJAX.

Hello, I have a jquery HTML page which loads a form. The form has a bunch of settings, but eventually the form gets submitted using a post command (see below) which returns an HTML page built by a script running on the server. This works fine, except when the script runs longer than 5 minutes. The post command just returns nothing. I...