jquery

Resizing image size using javascript

Hello, I am trying to resize the image using javascript, but I am getting errors var y; var y = new Image(); y.src = s; var wd = y.width/600; var ht = y.height/600; if(ht>wd){ var rw=round(wd * (1/ht)); var hw1 = ht * (1/ht); var hw=round(hw1); } else...

I can't see the listbox items in page source

Hi,Im adding items to listbox by using jquery but when i look to the page source(html source) ,the items that I've added dont seen.Im adding items by this way $("#<%=ListBox2.ClientID%>").append("<option value="+exampleValue+">"+exampleName+"</option>"); ...

jQuery(selector) or $(selector), which one?

Hello Which is better way to use jQuery? I've heard that jQuery(element) doesn't ruin code in e.g. Wordpress. But $ is easier and faster to write. Which one do you prefer and why? Martti Laine ...

jQuery: Handle blurring of each field in a form

I've got a form and I need to post data to the server every time a field in the form is changed. How do I apply a function to each child element of the form on blur? ...

function binding and the clone() function - Jquery

Hi I have problems with my keyup binding when cloning an element. Here's the scenario: I have an html markup like this: <tr class="rijbasis"> <td> <input type="text" class="count" /> </td> <td> <span class="cost">10</span> </td> <td> <span class="total">10</span> </td> </tr> I'm binding an keyup...

jQuery - datepicker - onblur

I'm using the jQuery datepicker where I have two textboxes (start date / end date). The user clicks in a respective textbox and the calendar shows up. That is OK. What I need to do is when the user say, clicks in the start date textbox and picks a date. I need an onblur event to be triggered then. Where do I set that onblur event for ...

JavaScript autocomplete upon typing

Right guys, all autocomplete plugins and functions that I've found, they only update upon keyup/down, etc. This is fine but the search only begins occurring once the user has stopped typing and if they are typing a phrase or word, the script is unable to instantly start suggesting, etc. I know this'll be a very simple fix or suggestion ...

Uploadify button: Style with CSS?

Is it possible to replace the Uploadify button (which is a graphic containing up/over/down states) with a simple CSS-styled button? ...

jQuery resizable() and multiple alsoResize's?

Hi, Is there a way to set multiple alsoResize's in jQuery UI? $('.selector').resizable({ alsoResize: '.other' }); I would like to set a couple of other elements to also resize, not just one. The official documentation tells nothing. ...

jquery live tabIndex

I have a jQuery statement that's working fine. How would I re-write it in .live? $(document).ready(function() { $(':input:enabled:visible, a:enabled:visible, span.ValidatorClass').each (function(i, e) { $(e).attr('tabindex', i) }); }); The reason I need this is I hide/show elements sometimes using .show and .hide and wh...

iterate trough each selecter jquery

Hi I'm having problems calculating stuff on my web app. Here is the scenario: I have a html markup like this: <table> <tr> <td><span class="sub_total">10</span></td> </tr> <tr> <td><span class="sub_total">10</span></td> </tr> <tr> <td><span class="sub_total">10</span></td> </tr> </table> <p><spa...

JQuery and Patial view in MVC

Belong to this article Jquery Partial View What should i do when i want to submit the value fill from user and sent it to the ActionResult controller that return the partial view -- View Code that call the controller (from article) <script language="JavaScript" type="text/javascript"> $('#centerbody').load('/Custom/CustomAction', f...

How can I convince IE to simply display application/json rather than offer to download it?

While debugging jQuery apps that use AJAX, I often have the need to see the json that is being returned by the service to the browser. So I'll drop the URL for the JSON data into the address bar. This is nice with ASPNET because in the event of a coding error, I Can see the ASPNET diagostic in the browser: But when the server-side ...

how to refresh mulitple divs when after posting using jquery

i have a screen with multiple little widgets (all with different divs around them). i have one form and when i post (using jquery) right now it updates the single form using ajax. i want two other divs to refresh as well (that are outside the form). What is the best way to trigger a refresh of multiple different divs on a single jquer...

Some trouble with jQuery

Is this html <div class='title centered'>SCE</div> <div class='description'> Magna tristique pulvinar porta montes, scelerisque odio montes porta habitasse, ut, arcu scelerisque vel, pellentesque </div> I need to fade childer div (description) after clicking on parent (title). $('.title').click(function() { $(thi...

Dynamically create numbered divs in Javascript + Jquery show/hide

I would like to create numbered divs (such as eventbox1, eventbox2, etc.) in a loop and then have an option to show and hide them. for (i=0; i<8; i++) { var html = '<div id="eventbox"+i></div>'; content.innerHTML += html; } I have also the following code in Jquery UI: function ShowHide(){ $("#eventbox"+1).animate({"height": "toggl...

Jquery: set stylesheet to iframe?

Hi guys, I'm loading a website into an iframe. This website has all styles defined within it's headtag. However the stylesheets are not linked like tags. I want to remove all this styles of the iframe content and link my own stylesheet to it. Any ideas how i can do this? ...

jQuery UI sortable() - listitem jumps to top in Safari and Chrome

Hi, I have a sortable unordered list on the bottom of my page, which works perfect in Firefox. However, in Safari/Chrome the grabbed listitem jumps instantly to the top of the page when I want to drag it, like the UL is on top of the window. Does anyone know what's going on here? Thanks. Lex. Here's the code: HTML (and PHP): <ul id="...

How do you make an AJAX callback trigger another AJAX call?

Is there a way to have the callback of one AJAX trigger another AJAX call? Or will that go out of scope? ...

WCF - "Encountered unexpected character 'c'."

Hello, I am trying to do something that I thought would be simple. I need to create a WCF service that I can post to via JQuery. I have an operation in my WCF service that is defined as follows: [OperationContract] [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat=WebMessageFormat.Json, ResponseF...