jquery

[jquery] edit in place

Hello, I have a table like this <tr> <td>No.</td> <td>Username</td> <td>Password</td> <td>Valid Until</td> <td>Delete</td> <td>Edit</td> </tr> <tr> <td>1</td> <td id="1"> <div class="1u" style="display: none;">Username</div> <input type="text" class="inputTxt" value="Username" style="display: block;"...

Is there a JQuery plugin to represent a United Stated Dollar input field?

I need to represent a U.S. Dollar amount input field. I'd like to have some AJAX feedback to format it with a "$" sign and keep two decimal places (and also disallow letters and non digits.) Anyone know of an existing project or have a few quick tips to roll my own? ...

What is a good pattern for designing widgets in ASP.NET?

There is some desire to add widget-like components to the Default page of our corporate intranet, with things like job search, weather, etc. My original thought was to define the widgets as user controls, with a similar div structure, and use callbacks to communicate between the client and server, and jquery to perform some ui functiona...

Getting the portlet position

Following on from : http://stackoverflow.com/questions/1034360/how-to-save-portlet-positions I'd like to know how to get the new position of the portlet in the first place. ...

Using JQuery with RadioButtons to hide/show table rows

I have two radio buttons on my MVC form that I use to hide or show a row in a table. It works fine in firefox, but not IE. It seems that in IE the JQuery function is only being fired when i select the first radio button. i have added extra radio buttons to confirm that it only fires on the first. To render my buttons: ...

jQuery subtleties

Community wiki. At least I think it's worthy of that. I've always been interested in some of the inner workings of jQuery, and a great question prompted this. I'm not talking about cool stuff you can do with jQuery but more subtleties of how it works. Maybe links to helpful posts could come in here. One example is that $() is interc...

[jquery] How to fire the same function when user presses enter or makes a click

Hello, I have my own edit in place function for jquery which looks like this $('.editRow').live('click', function() { var row = $(this).parent('td').parent('tr'); row.find('.1u').slideUp('fast'); row.find('.1p').slideUp('fast'); row.find('.inputTxt').slideDown('fast'); $(this).parent('td').empty().append('<a href=# class=cance...

JQuery conflict with an other JQuery library

Hi, I use jquery for a module. My joomla template have an integrated jquery menu. So they conflict with each other. Is there a way to solve this problem. Following the script code of the module <script type="text/javascript" charset="utf-8"> window.onload = function () { var container = jQuery('div.sliderGallery'); ...

How to get all images with src not empty?

How to get all images in an html with src not empty. I want to use jquery to select images which just have scr attr not empty. how to write this jquery selector? ...

jQuery equivalent to Prototype array.last()

Prototype: var array = [1,2,3,4]; var lastEl = array.last(); Anything similar to this in jQuery? ...

Which keycode for escape key with jQuery

I have two functions. When enter is pressed the functions runs correctly but when escape is pressed it doesn't. What's the correct number for the escape key? $(document).keypress(function(e) { if (e.which == 13) { $('.save').click(); } // enter (works as expected) if (e.which == 27) { $('.cancel').click(); } // esc (do...

Sortable item moved from one list to another, loses handle and sort capability

I have DIVs with OL>LI lists in them, the lists are each sortable and I connect them together so the user can move and LI from one list to another.. seems like a common thing to do. When the sortable list receives an item, that item loses its "sortability"..or atleast the handle is not working on it. Here's some code to show you how I...

Using jQuery's datastore vs. expando properties

I'm developing code using jQuery and need to store data associated with certain DOM elements. There are a bunch of other questions about how to store arbitrary data with an html element, but I'm more interested in why I would pick one option over the other. Say, for the sake of extremely simplified argument, that I want to store a "lin...

Why does jQuery show/hide use display:none instead of visibility:hidden?

display:none means that the element isn't rendered as part of the DOM, so it's not loaded until the display property changes to something else. visibility:hidden loads the element, but does not show it. Why does jQuery use display:none for its show/hide functions instead of switching between visibility:hidden and visibility:visible? ...

jQuery Checkboxes

Hi All, I'm trying to write a piece of jQuery code where, if all checkboxes are "unchecked", then all li tags have the class "disabled." But, if one checkbox (any checkbox) is checked, then all [li] tags lose the class "disabled". Many thanks! ...

Virtual Earth, VEPolyline problem

In a project of mine which relies on VE API, i face a weird situation. I construct VEPolyline and apply array of VELatLong objects to it, array is generated in jQuery's $.each loop like push = new Array(); $.each(arr,function(index,ele) path.push(ele); }) everything is ok until zoomed, then i get following error: Unexpected value...

JSONP callback fails, need help with javascript/jquery

Hi, I'm a noob at json (know a bit of jquery)....and trying to get a tiny script to work I want to retrieve the time at a certain lat/lng and made up this script in bits from what I've read online: $.getJSON("http://ws.geonames.org/timezoneJSON?lat=47.01&amp;lng=10.2&amp;callback=?", { 'uID': 1 }, function(data) { $....

Jquery if then statement for css value

I want to check whether a div with a css class="x" has height="auto". If yes I want (with a jquery script) the css-class="a" removed from all elements with the css-class="y". If not the script does not have to do anything. thanks ...

Can jQuery do a POST of a ViewModel to a Controller in ASP.NET MVC?

I have my Html Textboxes created so that they will be bound to a custom view model when posting back to the server. <%= Html.TextBox("CustomerFormViewModel.Email")%> This works great if it's a traditional POST. I can then receive it on the Controller side with something like this: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Add...

Toggling menu with jQuery

I've got some HTML like the following: <ul> <li><a href="#">Page 1</a></li> <li><a href="#" class="toggle">[Open|Close]</a><a href="#">Page 2</a> <ul> <li><a href="#">Page 2-1</a></li> <li><a href="#">Page 2-2</a></li> <li><a href="#">Page 2-3</a></li> <li><a href="#">Page 2-4</a></li> </ul> ...