jquery

How can I get the X axis labels in Flot to be transformed with my data?

I am using Flot to chart some data that I pull back from the server. The X-axis data that I receive is in units of milliseconds, and I want to display the chart with the X-axis in units of seconds. So, I thought this was a good use of the API's transform axis option. I applied my transform like so: var plot = $.plot($("#placeholder")...

How to test input value for null or zero with jQuery

I need to keep the focus on the text input when the user moves to the next input without putting something in the previous one. In short, if it is null (left blank) or not valid, how do I keep the focus on that input until the conditions are satisfied? ...

Can I use like this using jquery?

$('tr td:first-child').click(function() { var value = $(this).text(); // $("#showgrid").load('/Product/List/Item/' + value); $("#showgrid").load('<%= Url.Action("Item", "List") %>/' + n + "?q=" + value); }); Can I use like this to execute List Item Action result? what is the best way to send the value with...

Does jQuery have a JSON/javascript object to HTML pretty print function similar to PHP's var_dump?

Yes or no. If yes, what is it? Thanks. ...

How to get attributes of container in jquery ?

How can I get attributes values from an container using jquery ? For example: I have container div as: <div id = "zone-2fPromotion-2f" class = "promotion"> here how can I get attribute id value using jquery and than how can I trim the value to get component information ? update : how can i get attribute values ? UPDATE: If I have ...

JSON + PHP + JQuery + Autocomplete problem...

Hi Everyone, Only started today but I'm having massive problems trying to understand JSON/AJAX etc, I've gotten my code this far but am stumped on how to return the data being pulled by the AJAX request to the jQuery Auto complete function. var autocomplete = new function (){ this.init = function() { $('#insurance_destination').aut...

How can I check a radio button on load, based on it's value?

I've got the value of a radio button (r1) and I'm trying to use: $("input:radio[val=r1]").attr('checked', true); to check it. The thing is that I've got three radio buttons in a div, when I check one, the value of the checked button gets stored. When I reload the page I want the page to check the radio button that was chosen last...

jQuery UI, draggable / sortable append problem

I am trying to append html to an item which I have successfully dragged to a sortable list but it does not seem to work. I am cloning the original item and have tried to append to the ui.helper to no avail. Here's what I have so far: <head> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascr...

What's the Microsoft Ajax equivalent to jquery.ajaxSetup() or .ajaxError()?

I have an ASP.NET MVC site that uses both Microsoft Ajax [Ajax.BeginForm()] and jQuery to make asynchronous requests. I want to configure both frameworks such that a generic error handler is automatically attached if the developer does not explicitly specify a failure callback. In jQuery I can accomplish this with either .ajaxSetup() or...

How can I display the "first time here" bar like SO and slide the other DIVs down?

I implemented the code to dislay the bar at the top of the stackoverflow screen: http://stackoverflow.com/questions/659199/how-to-show-popup-message-like-in-stackoverflow What this does is display the div over top of the div at the top of the page. How can I display the new "bar" div and push the others down? Just like StackOverflow d...

Flash SWF not initializing until visible - can I force them to initialize?

I have an application that needs to render about 100 flash graphs (as well as other DOM stuff) in a series of rows that vertically extend many times beyond the current visible window - in other words, the users have to scroll down see see all the different graphs. This application is also dynamic and when a user changes a value in the D...

What is the differnce between these two types using jquery

hi, $('tr td:first-child').click(function() { var foobar = $(this).text(); $("#showgrid").load('/Product/List/Item?id=' + foobar); }); when I am seding foobar value like this in the Actionresult method I am getting string id value perfectly but I am not able to display the grid? but intresting thing is when I am ...

how to append dropdown list box

$("#Grid").click( $("#showgrid").load('SomeURL')); $.each($('#Grid td:nth-child(4n)'), function() { var forthColumn = $(this); forthColumn.append("<select><option value='1'>Division 1</option><option value='2'>Division 2</option><option value='3'>Division 3</option></select>"); }); }; I am try...

Bind "Ctrl+Alt+L" to insert some predefined string into focused textarea?

Hello, Is is possible to bind Ctrl+Alt+L to insert predefined string into focused textarea to cursor position? For example, I'm typing some text in textarea, then I'm pressing Ctrl+Alt+L and <a href="" title=""></a> is inserted into current cursor position. Thank you. ...

Cross-platform, cross-browser way to play sound using jQuery 1.4?

I'm trying to get jQuery to play a sound on element hover/click. (It's like a flash website without flash) I've tried the methods recommended in Cross-platform, cross-browser way to play sound from Javascript?, the jQuery Sound plugin and a couple of other tutorials without any success. I'm assuming this is because they haven't been upd...

How to get attributes values separately for each container present on the webpage in jquery ?

This question is in continuation to How to get attributes of container in jquer, I have different containers on my webpage and all of them have <div id = "some values"> now how can I get attributes values separately for each component ? Is there any way I can know which attribute id belong to which container div ? Currently I am using...

jquery draggable/droppable issue

Hey guys I have a drag and drop function that does not fully work. What I want to do is be able to drag and drop a picture into a div and have that picture pop up in the div. I have a list of 2 pictures right now, so I have the following function echoed for each picture. Both pictures are draggable and droppable, but the first one is the...

Generated HTML is not rendered after jquery AJAX call

Hi, I am using jquery tabs with a Java portlet application. When the tab content is being rendered by an AJAX call, the the JSP generates all input elements that is required into a Java String variable. This Java String variable is used a as Java scriptlet within the form tags. The final generated HTML comes up within jquery tabs. H...

Looking for a good jquery scrollbar

Im Looking for a good jquery scrollbar Thanks in advance ...

How to export to excel jquery grid data using jquery

Can any one help me out how to export the jquery grid data to excel? i have inserted one button call export? $("#Export").click(function(){ I am little confuse what should I write? }); thanks ...