jquery

ASP.NET MVC and jQuery - routes and script locations

Hi there, I am playing with a proof-of-concept app in ASP.NET MVC and I have a query about routes when using jQuery. One of my functions requires me to call ~/jqdata/myFunction/ and this is all fine using $.get("/jqdata/myFunction/" + $(this).attr("name"), function(data) { alert (data); } However, I am not going to be able to cont...

jquery tablesorter filter plugin

I am using the tablesorter jquery plugin paired with this great tablesorter filter plugin. I have a select box on my page that contains a list of all the columns of my table. I want to be able to limit the filter to only the selected column when the user chooses to select it. So far I have attached an event to the select box like so: ...

jQuery quicksearch highlight results with onAfter function call?

I got an amazing answer quickly yesterday quickly about the best autocomplete option for what I needed. I think I can use the onAfter funtion call from QuickSearch to call the SearchHighlight plugin to highlight the text I am typing in. Is that feasible? I am having a hard time getting it to work. <meta http-equiv="Content-type" cont...

Disable a button on click

I have a button control. Once the user clicks on it, the click event should fire and then the button should get disabled. How can I do this? I have the option to use JQuery or JavaScript or both. Here is my button declaration: <asp:Button ID="Button1" runat="server" Text="Click Me" onclick="Button1_Click" /> On the butto...

Simple jQuery Hide/Show does not work in IE

$(document).ready(function(){ $('#createGallery').hide(); $("#newGallery").click(function () { $("#createGallery").show('slow'); }); $("#gallerySelect > option").not("#newGallery").click(function () { $("#createGallery").hide('slow'); }); }); I can't figure out why. Seems easy enough. my HTML is in HAML. But its easy to unde...

Is it possible to select all floats on a page with JQuery ?

I am trying to select all elements that have CSS computed style float:left or float:right. I see attribute selectors available in the JQuery documentation, however I am interested in CSS properties not attributes. Possible use cases for such a feature would be to select say all display:none elements on a page. ...

How do I copy PART of an input field to another field?

I know how to copy an input field to something else. No prob. How do I copy part (ie. the month of a date field) to another field. I want to take a field that is a date range (ie. 7-13-09 to 7-15-09) and copy it to two input fields (ie. the start date and end date) ...

Different AJAX XML results from same PHP file with same POST parameters using JQuery

I'm using the JQuery .ajax method to get the results of a simple PHP query in XML (which I've done various times within this project without a problem). However, the XML result that I receive from within my main project is different to what I expect (as tested by simply viewing the PHP file) when viewing the results in Firebug's console...

Virtual Earth maps don't show when starting as display:none

I have this code to show a map using the Virtual Earth API: <script type="text/javascript"> function GetMap() { var map = map = new VEMap('myMap'); map.LoadMap(new VELatLong(47.6, -122.33), 10, 'h', false); } $(document).ready(function() { GetMap(); }); </script> <a href="#" onclick="$('#myMap').togg...

jquery selection of elements with no visible children

Here's my goal: do something on an element, an <optgrooup>, if all of its children are invisible. My code below outlines the in red if it has any invisible children. But I want to do so only if all the children are invisible. If the element has any children that are visible, then don't highlight it. How can I tweak the jQuery select...

Jquery $(this) Child Selector

I'm using this on a page: jQuery('.class1 a').click( function() { if ($(".class2").is(":hidden")) { $(".class2").slideDown("slow"); } else { $(".class2").slideUp(); } }); With a structure in the page later that goes like this: <div class="class1"> <a href="...">text</a> <div class="class2">text</div> </div> This is wo...

Append text to input field

I need to append some text to an input field... ...

jquery basic slider won't display

I'm banging my head against the desk trying to get even a basic slider working. I think it must have something to do with the style, but I can't get the dang thing to even display. I have a very basic ASP.NET MVC application and in a view, i have: <% using (Html.BeginForm()) { %> <fieldset> ... <div id='mySlider'></div> ... </field...

Can't get JQuery to work in Master Page

I have a sample jquery in a form with no master page, and it works fine. I am trying to use the same function inside my master page but it does not work, I am using ASP.NET. Here is my code for both: WebForm (This works): <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="Surfitlocal.WebForm3" %> <!DO...

Cannot find the right <div> with selector after loading the HTML

I hope I can find a solution to this one. Here it goes: After I have submitted my form to add a message to the database, I create a <div> with the load method. After that I do some stuff in the callback function. When the function to create the new <div> has finished, it returns to the calling function that is supposed to prepend the m...

Preventing an duplicate ajax events in jquery

What is a good way to block until a previous ajax event is completed? I followed http://stackoverflow.com/questions/719194/how-can-you-make-a-vote-up-down-button-like-in-stackoverflow but if I click the button fast enough, it'll send multiple (and maybe inconsistent) events to the server. How do I make it so it'll forcethe user to wait...

Jquery post problem

//post data function SubmitForm(method) { var login = document.form.login.value; var password = document.form.password.value; $.post("../content/backend.php", { login: login,password: password,method: method}); } Im trying to post data using the above call. In firefox firebug flashes up an error but dose not give me time to evaluate th...

JavaScript, DHTML, jQuery: How to implement 'two way' master detail relationship within 3 html drop-downs (select boxes)

We have a requirement that has had me skimming the web for quite sometime now. Here is the problem scenario. We have a web-page and the page here contains three drop-downs as shown in the picture below (Dummy fields - but the actual business data is also on the same lines) Here, we have three drop downs with the data being populated dyn...

Jquery $.ajax() json call to *.js file causes browser to ask 'save/open'

I'm able to issue $.ajax() requests to urls that have a '.js' extension just fine when I use {...'dataType' : 'script'...}. However, when I use {...'dataType' : 'json'...} the browser (Opera and FF, so far, but I'll bet it's universal) asks to save/open the results of the request. Note that my 'success' callback runs fine and uses the r...

Cool UI templateing VS Jquery Templating

hi, i have read this article ScuttGu for making use of User control to make Client side templates. and this one too Ecnosia are they the same, regarding performance ? thanks in advanced. ...