jquery

Custom WebControl using jQuery that needs to work inside an UpdatePanel

I have created a custom server side WebControl. This control calls an initialization script that uses jQuery to hookup the events with calls to bind when the page is loaded. This control is now being used inside an UpdatePanel and obviously the client side events no longer exist after the UpdatePanel does it's thing. So, I need to r...

append div after executing $post

Greeting, I would like to append some div after correct success is returned from my $.post My code looks as follows: $.post("/MyApp/Market/CheckIfIndustryIsValid", { id: $(NODE).attr("id") }, function(obj) { if (obj.Success) { if ($.inArray($(NODE).attr("id"), array) === -1) { ...

jQuery Validation Arguments

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. ...

JavaScript function pass-through?

I'm not sure if this is doable, but I would like to be able to set a jQuery UI event as a function (directly), as opposed to continuing to wrap in additional function(event, ui) { ... } wrappers. Hopefully you can see what I'm going for from the example below. Here is what I would like: $("#auto").autocomplete({ source: "somepage....

jquery drag and drop animation

I have some UI functionality for drag and drop, but when an element is dropped, the animation makes it flit about all over the place for a split second before it appears in the newly dropped location. Can anyone advise how to tackle this, so that the draggable element moves more cleanly into place on success? Here is a snippet from t...

Internet Explorer treating AJAX GET request as POST request?

For some reason, only in IE (tried 7 & 8), jQuery is performing a POST request when it should be a GET. See below: function(...) { /* ... */ $.ajax({ type: 'GET', dataType: 'script', url: '/something/' + id, processData: false, data: 'old_id=' + oldId, success:function(data) { alert(data); } }); ...

Does the jQuery UI Icon system have an "empty" icon - one with no image?

Sounds like a bit of a silly question but it'd be a nice feature. Does the jQuery UI Icon system have an "empty" icon - one with no image? Am I forced to do some custom styling on a ui-icon-empty and move the background to an area of the sprite that is off the chart? ...

ASP.NET: How to assign ID to a field in DetailsView?

I have a master-detail page, in which I use GridView to display multiple rows of data, and DetailsView + jQuery dialog to display the details of a single records. only one DetailsView is open at a time. I need to be able to pull out a single field of the open DetailsView, for manipulation using JavaScript. Is there a way to give a uniqu...

jquery date validation on multiple fields

I am attempting to use jquery to validate a date that is broken up into MM DD YYYY fields. <form name="dateform" id="dateform"> <input type="text" name="month"/> <input type="text" name="day"/> <input type="text" name="year"/> </form> I can only find examples that use a single field, which is not what I want. <form name="dateform" i...

jquery.autocomplete doesn't work in compability mode

I've read all the results I can find on SO about this without finding anything that applies to me, so don't judge me too quickly :) I am using jquery.autocomplete downloaded from here: http://www.dyve.net/jquery/?autocomplete together with http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.js This all works well in IE8 and FF, but as s...

How do I get the border-radius from an element using jQuery?

I've got a div, with the following HTML and CSS. In an attempt to make my Javascript code more robust, I'm attempting to retrieve certain CSS attributes from the selected element. I know how to use the .css() getter to get elements, but how to get the border-radius using that method? jQuery's documentation is sparse. HTML: <div id=...

CSS absolute DIV causing other absolute DIV problems

Hello, I have implemented a chat script which requires an absolutely positioned DIV to be wrapped around the pages content. This is to ensure the chat windows stay at the bottom. The problem is that because of the absolute positioning of this main wrapper, all other absolutely positioned elements (eg. Jquery Auto-completes, datepicker...

How to pass an array of objects trough a jquery $.post?

Hi, I want to pass the result of a query trough a $.post. function GetAllTasks() { $sql = "select t.id as task_id, description, createdat, createdby, max_requests, max_duration, j.name as job_name from darkfuture.tasks t...

Jquery Insert element before <tr>

Hi all I am trying to insert a block element Insert something before another . I am not sure if I am using the right method but here is my code. Hope you guys can help. Thanks! Jquery $("#addMatch").click(function(){ $("<td>New insert</td>").insertBefore("#addMatch").closest('tr'); return false; //this would insert the...

How do I clear this setInterval

Normally, id set the interval to a var and then clear the var like var the_int = setInterval();clearInterval(the_int); but for my code to work i put it in an anonymous function: function intervalTrigger() { setInterval( function() { if(timedCount >= markers.length){timedCount = 0;} google.maps.event.trigger(markers[t...

jQuery Validate Required Select

I am trying to validate html select element using jQuery Validate plugin. I set "required" rule to true but it always passes validation because zero index is chosed by default. Is there any way to define empty value that is used by required rule? UPD. Example. Imagine we have the following html control: <select> <option value="defaul...

script running very slow in IE with Jquery quickflip plug-in

I have a jQuery plugin running on my site that is executing very, very slowly in IE7/8 to the point that it throws a slow script warning to the user. It doesn't happen in any other browser, and I can't figure out what might be going on. If you go to this page: << REMOVED >> You'll see that there are 16 results on each page, and each o...

Any difference between lazy loading Javascript files vs. placing just before </body>

Looked around, couldn't find this specific question discussed. Pretty sure the difference is negligible, just curious as to your thoughts. Scenario: All Javascript that doesn't need to be loaded before page render has been placed just before the closing </body> tag. Are there any benefits or detriments to lazy loading these instead th...

using jquery growl with php/mysql

on my database i am planning to create a table storing messages to alert users of anything they need to do. i am looking at using a jQuery growl like notification method but im confused at how i would begin building it. the data would be added into the database using the standard MYSQL insert method from a form but how would i select...

jQuery: Div elements are not showing up

I am adapting the Coverflow technique to work with a div. Following is the html: <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <style type="text/css" media="screen"> body,html { margin: 0; padding: 0; background: #000; height: 100%; color: #eee; font-family: A...