I'm using jQuery 1.3.1 and when I try to loop through a form and remove any div w/out an id i get an exception.
uncaught exception: Syntax error, unrecognized expression: [@id]
$('form:eq(1)').children().each(
function()
{
this2 = this;
if ($(this2).find('div').not('[@id]')) { $(this).remove(); }...
Background
I would like to simulate the "active" behavior that most browsers support for links when they are clicked. For any element and event I would like to be able to add a css class to the element for the duration of the event. So in psuedo jQuery code I'd like to do this:
$(".button").click(function() { alert('clicked'); });
......
Within the gridview I have, I'm trying to make it so when the user checks a check box for the row the row is highlighted. Now, this GridView is striped (meaning even rows have one background color and odd rows have another). This code to do it is floating around the net in various forms...
var color = '';
function changeColor(obj) {
...
Hey,
I am using jQuery on my site and i have a update section on my project and I have three dropdowns:
Completed?
Hours Worked
Who worked on this project?
I am trying to create an ajax call using jQuery to when I select it, call a $.ajax() and send the data to my php page to update my mysql database.
I am guessing I could do this:...
I've come across a couple questions, such as this one, and I really have to wonder why "Use jQuery" seems to be the answer when somebody asks how to do something in JavaScript. I understand that jQuery can save you a lot of time, and can help you out a lot, especially when you are doing a lot of fancy JavaScript in your site. However, ...
My code looks like this:
<ul id="ulList">
<li class="listClass" id="id1"><a href="http://link1">Link 1</a></li>
<li class="listClass" id="id2"><a href="http://link2">Link 2</a></li>
<li class="listClass" id="id3"><a href="http://link3">Link 3</a></li>
</ul>
Now I like to get the following:
All links as an array
All id...
I've been at this for a couple of days now, so any help would be much appreciated. I've got a link which contains two divs sitting on top of each other. The top div is hidden, but slides in to partially cover the bottom div on mouseenter, and then out again on mouseleave. It is working to a degree, but is a bit buggy. This is what I have...
I need to set a single property in a jQuery command using a value that is calculated in the code-behind. My initial thought was to just use <%= %> to access it like this:
.aspx
<script type="text/javascript" language="javascript">
$('.sparklines').sparkline('html', {
fillColor: 'transparent',
normalRangeMin: '0',
normalRang...
I want every cell in each row except the last in each row. I tried:
$("table tr td:not(:last)")
but that seems to have given me every cell except the very last in the table. Not quite what I want.
I'm sure this is simple but I'm still wrapping my head around the selectors.
...
I'm trying to do something when a user selects an option from a select box - As simple as can be right? I'm using JQuery 1.3.1 to register a click handler with the id of the select box. Everything was fine until I tested using Chrome and Safari and found it didn't work.
Firefox 3.05 - YES
I.E 7.0.5730.13 - YES
IE6Eolas - YES
Sarafi 3...
I am trying to get an element using JQuery's selector, but it does not find it even though the element actually exists. Moreover, I can actually find the element using getElementById.
For example:
$('#outputDiv') gives me a null value. But document.getElementById("outputDiv") returns me the Div I was trying to access.
Any idea?
...
I have a page with .Net grid view with about 12 text fields per row and about 250 rows. Right now there is a save all button at the bottom of the page that sends all the fields 12x250 to the server where they are entered into db 1 by one. Which ends up being very slow and some times does not go through at all. I didnt come up with this ...
Hello,
I'm looking for a JQuery code sample or library for displaying tooltips when the cursor hovers over an element. Specifically, what I want to do is display my own <div> element on hover, not an automatically-constructed or loaded-from-the-host-element tooltip. I've looked at a couple JQuery tooltip plugins and they all seem to be ...
How do you compare a value from jQuery with a fixed number?
I thought this might work but it doesn't:
if (parseInt($("#days").value) > 7) {
alert("more than one week");
}
...
The slideDown applied to a div does the slideDown but doesn't scroll the page down and the div slided down div remains hidden from view. Is there a way to scroll the page down as well so the user can view the div?
...
Hello Everyone,
After having a search around I could not find exactly what I want, I am looking to validate a form client side using the Jquery library and some form of validation plugin. I was hoping that some one could advise me on whether there are any validation plugins out there that do not use generic error messages, as my form ...
I'm making a simple navigation menu for a site. You create an ul with id menu, and should be pretty simple from there. I have some simple css to give all the lis the correct background image, then some jQuery to change the look of an li when the user mouses over. It works pretty well, but there's one problem. When the user clicks on ...
This is really strange but this code is working fine unless the value entered by the user includes an asterik (*) or other characters like $ or #. The #ticketNumber.Val() is the suspected problem. Some of our id's have an * in them. Any help would be appreciated.
function buttonClicks() {
var action = '/ServiceCall/IsAServiceCall...
Ok this is a general question about how to solve this issue, not to find some work around for the example given.
Lets say I have a $(this) object and it is a select, if I want to select the selected option and I had an id I could just bust a
$('#id option:selected')
game over.
but with a this I can't go $(this+' option:selected') or ...
I'd like to increase the height of a textarea when the text wraps to a new line, so it dynamically expands to whatever it needs to be. I don't want to use the onscroll event because I want the expansion to always be one step ahead of the scrolling, so the textarea never scrolls until it reaches a max height of x.
Anyway I could do this?...