jquery

jQuery: how to apply plugin in a "live" fashion

Is there a way to apply plugin to element in a "live" fashion, just like we can attach handler that survives ajax calls? Right now we have some code that uses "cluetip" in a rad grid, but after ajax, it gets dropped. $('a.clickableSticky').cluetip({ splitTitle: '|', showTitle: false, ...

AntiXss and my desired results

After scrubbing my field with AntiXss.HtmlEncode is there a way to remove all the html elements because they still show up as literals in the display? ...

Changing CSS of a tab in jQuery UI

Hi! I'm using jQuery UI to do some tabs but I wan't one of the tab to be to the right so I figured I'll use jQuery to change the CSS to float:right but that doesn't help. Do anyone know a better solution or how I can edit the CSS of one tab? ...

Add an onBlur to all form elements

So on a specific page I have some number of form elements, anywhere between 3 and 8, depending upon the user and their action on the page. How can I add a specific onblur event to all of the form elements dynamically on the page? If I have: function doThisOnBlur() { stuff } How can I add that same function to all of these once the p...

jQuery UI dialog box not aligning correctly

In jQuery I call a few dialog boxes in sequence to create a wizard. Despite setting the position to position: ["center", "center"], the dialogs align to left center. The wizard starts by calling getMoreParams(0). There are 7 divs in the HTML spanning moreParams[0-7]. Please let me know if more detail is required. See video here. Code...

jQuery UI Autocomplete stopped working.

For some reason jQuery UI's autocomplete has stopped working for me. I get the same error as is described on this webpage. I've copied the content of the query from that webpage below, hoping that somebody here will be able to answer it. Thanks! I am using Jquery UI Autocomplete to get a list of names. But for some reason I am get...

Best lightweight jQuery carousel plugin?

Around 10 months ago I looked at tons of carousel scripts, literally masses of them, trying to find the best one. My criteria were performance over features, that is, no built-in Ajax, no huge style sheets or images. Just a basic carousel (or 'slider') script. Best carousel I found in June 2009: jQuery Tools Scrollable What are s...

Toggling div visibility individually with jQuery

I have a simple jQuery function that toggles a div's visibility when clicked. The problem with the function is that it can't be applied to multiple items on the same page or they all toggle in tandem. Is there a way around this without having to assign a unique class to each instance? jQuery: $(function(){ $(".toggleThis").click...

Retrieive ids from the checked checbox itens in a GridView Row

Hello guys, I need present a grid-view in the web page, and based on the checkbox that each grid row has I want to retrieve and submit a value of the ID of each grid column. I'm using asp.net mvc and the mvc contrib grid, but accept suggestions on how to do via JQuery or Javascript too. Thanks. ...

How can I fire an event when I right click on a div inside a canvas with jQuery

UPDATE: I have updated the code snippet to include the whole page as found in Firebug. I have the following code: <html><head> <title>Welcome to CodeIgniter</title> <!--[if IE]> <script type="text/javascript" src="/assets/js/Jit/Extras/excanvas.js"></script> <![endif]--> <script src="/assets/js/jquery/jquery-1.4.2.min.js" type="tex...

Jquery - Remove() after hide()

I have a div that I want to remove using remove(). I want to show an animation before/while removal of div. I have only been able to show the animation when hiding the div. If i want to show the animation then do remove(). How is this done??? Code so far: //Delete Button - delete from cart $('.ui-icon-trash').live('click',function() {...

running a function when another is clicked using jquery

When i run this $btns.first().click(); in the first function it doesnt action it where as if i click it (as per second function it works perfectly. The result is the slides all show when i click on a tab instead of just one. And then when i click one of the inner buttons the slides all disapear leaving just one. Which is correct. h...

Best Performance for jQuery Selector

This gets and stores the background color of a specific link: var origColor = $("ul.relatedAlbums li a").css("background-color"); But there are a lot of those links, and I get the feeling that this is ineffecient. I imagine there's a way to tell the selector query to stop after the first match, and thus save on processing time. Here'...

Selecting item from ASP.NET listbox using jquery

Greetings, I'm trying to select item from asp.net list box then assign it to a text box so when a click on an item from the list box should appear in the text box. I tried the code listed down but it did not work. please advice how to do this!! ............................ updated code .......................... <%@ Page Language="...

Jquery - Perform callback after append

I am appending content to a list using: $('a.ui-icon-cart').click(function(){ $(this).closest('li').clone().appendTo('#cart ul'); }); I want to perform further functions to the appended content (change class, apply animations etc) How can I perform a callback on this function that will allow me to perform functions on th...

jQuery + JSONP + Yahoo Query Language

I want to get live currency rates from an external source, so I found this great webservice: Currency Convertor This service is working like a charm, the only downside is that it does not provide JSONP results, only XML. Therefore we have a cross browser problem while trying to consume this webservice using jQuery $.ajax(). So I found...

ASP.NET MVC JsonResult return 500

Hi I have this controller method: public JsonResult List(int number) { var list = new Dictionary<int, string>(); list.Add(1, "one"); list.Add(2, "two"); list.Add(3, "three"); var q = (from h in list where h.Key == number select new ...

Jquery corners on li removes corners

When i click on a li it changes the class to current, which it all works perfectly, but the corners get removed. Any ideas? $(document).ready(function() { //---- Promo Tabs ----- // var $tabs = $('.promo-tabs a'), $panes = $('.promo-panes > div'); $tabs.click(function(){ $(this).addClass('current') $...

JQuery Stops working on ASPX Wizard page

I have a ASPX wizard that I need to use JQuery to manipulate some of the CSS styles. For example if a certain criteria is met it will hide a button - $("input[value='Continue']").css("display", "none"). This works great on the first page, but subsequent pages (loaded as controls - ASCX) don't work. The wizard doesn't load a new page ...

Replacing radio buttons with different images

I need to create a group of 2 radio buttons (options: male / female) that display images instead of the actual buttons. The images should change upon selection. So there should be 4 images: male (on), male (off), female (on), female (off). I'm using jQuery throughout the site, and I would like to use jQuery for this, too, if possible. ...