I have multiple tables that are randomly generated. I only want the first row of each table displayed with the rest of the rows hidden. When I click on the visible row for a table I want the rest of its rows/contents to show/hide. How would I accomplish this using Jquery?
...
I want to validate an asp.net texbox with min char=3, max=10 and no special characters. I do not want to use a plugin of jQuery but plain jQuery
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
How do I about it.
P.S - I asked the question earlier then edited it, but can't find the question now. Seems like it did not get pos...
This is my XML:
var x="<page><item>1</item></page>";
My XML is stored in a JavaScript string.
I am trying to make some changes to this XML using XSL. I want to apply this XSL to this XML via JavaScript. So I have used JQuery:
$('#output').xslt({xmlURL: '??',xslUrl: 'Test.xsl'});
Here the xmlURL is an XML file, but the input is a s...
Is there any way how to truncate jquery?
I need to use only AJAX related methods in jquery code.
As you might know the minified version is only 55KB and the uncomplressed version is about 110KB.
David
...
I've got a table with a large number of rows that is not suitable for paging. The rows in this table can be sorted by clicking a column header which triggers a client side sorting algoritm based on http://www.exforsys.com/tutorials/jquery/jquery-basic-alphabetical-sorting.html The function dynamically adds an "expando" property to each r...
I've got an ASP.NET MVC application that uses jQuery. To load the js libraries, I reference them like this:
<script type="text/javascript" src="../../Scripts/jquery-1.3.2.min.js"></script>
This works fine locally, but when I publish it to the server, it can't find the library. To get it to work, I have to change it to this:
<script t...
I want to validate a texbox with min char=5, max=20, allow alphabet and numbers and only 3 special characters !@# using plain jQuery (no plugin)
function chkText() {
$(".cssText").each(function() {
// add regex condition here in an IF statement
});
}
...
my textbox has a class='cssText'. I want to change this class to 'blck' at runtime.
How can I access the class attribute of textbox and change its value using jQuery?
Thanks
...
In Jquery UI I can configure an element as draggable by invoking
$("#drag").draggable();
But is there a way to start and stop the drag functions manually from another function? Ie
someOtherFunction = function() {
$("#drag").startdrag();
}
yetAnotherFunction = function() {
$("#drag").stopdrag();
}
...
Hi,
I currently have the following in JQuery 1.3.2
for (i = 0; i < totalPages; i++) {
var newDiv = $("<a href=\"#\">").append(i+1).click(function()
{
alert(i+1);
});
$('#pageLinks').append(newDiv).append(" ");
}
This outputs a list of numbers as required, but the alert when clicking the generated element is return...
I have 3 tables - Table1 Table2 and Table3
I want to change this $("tr").filter to only effect Table2
Is this correct?
$("#Table2 tr").filter or is there any other way to do so?
...
Is it possible using jQuery (or any other JavaScript function) to detect when an onmouseover event is fired?
I have a page where existing javaScript calls a onmouseover/out events to re-write the contents of the div. I'm actually only interested in getting at what the div contains while the mouse is hovered over it. The onmouseover ev...
What's the difference between jQuery's replaceWith() and html() functions when HTML is being passed in as the parameter?
...
I'm using the jQuery datepicker to select dates. It works fine, except there is 1 default behavior that I would like to change. When you select a day, the selected day is highlighted (which I like). The current day is also highlighted, but using a different css style (which I also like). However, if you select the current day, the hi...
so I have a modal dialog i use with jQuery in my asp .net page. I am trying to set a textbox value using jquery. here is some sample code:
<div class="popup-template popup1">
<div class="content">
<input type="text" id="tbX" value="asdf" />
<input type="button" onclick="$('#tbX').val('TEST VALUE');" value="Input Te...
I'm trying to use JQuery to get the values of the ListItems in an unordered list (see below). The code below is close to working, but it always returns the value of the first ListItem, even if the second one is checked.
Thanks,
Russ.
$(document).ready(function() {
$("li").click(function() {
$("input:checked")....
I have no issues when doing using JQuery in a aspx page without a masterpage, but when I try to use it in pages that have a masterpage, it doesn't work, so I end up putting the jquery files and other script files in the page instead of the master. Now if I have 10 pages, I am doing this for all 10, which I know is incorrect. In the sam...
I am using the FancyBox plugin and when the user clicks on a small image, a larger image pops up. I saw the code for doing it with 1 image, but not for 2, so I assumed the correct way was to just do the following, which I am curious if it is correct or not? Do you just put the statements element you want the fancybox to operate on righ...
I have rather a complex UI. However, for the purpose of this question, let's say that there is a HTML table that renders UILayout1 by default (say default mode). There is a button that a user can use to toggle between the default mode and a preview mode (UILayout2)
When in preview mode, there are some columns in the table that are invis...
Hi all,
I have some javascript making an ajax call in my Rails site:
$.ajax({type: "PUT", url: url, data: { dummy: data }, complete: function(data) {}});
When Rails gets it, it throws back an ActionController::InvalidAuthenticityToken Error. I'd like to keep the protect_from_forgery stuff in there, if possible... But I'm at a loss ...