JQuery :: Setting Css On A TD?
Oct 7, 2010
I have a simple table in which there are a collection of TRs inside a TBODY and a collection of TDs in each TR. I have a jQuery click event bound to a single TD in each TR. When I click onthis TD I use css to set its background color. When I click on the bound TD in another TR I want to be able to change the previously selected TD's background color and then change the newly clicked TD to a new background color. My click binding appears as follows:
.click(
function(){
var nRow = $(this).parent().parent().children90.index($(this).parent());
[code]....
View 2 Replies
ADVERTISEMENT
May 11, 2009
I am just moving over to jquery. Previously i had been using prototype and scriptaculous, im trying to figure out how to set a div relative to another div. in prototype i would of used 'setStyle' to do this. how to do the same in jquery?
View 2 Replies
View Related
Sep 10, 2010
In this code snip I want to be able to click an item i list-handbag and I then get the index li and with that index I want to animate the same index value in slideshow. How do I set that? Ex.:slideshow[index[list-handbag]].animate (.....what syntax can I use to do something on the slideshow img's?
------------
<div id="slideshow" style="width:100%;height:100%;">
<img src="/wp-content/themes/giovanni/images/handbag1.jpg" height="100%" alt="" />
[code]....
View 2 Replies
View Related
Mar 3, 2010
Would like to get the 'src' from a thumbnail and pass it into a var on hover. The reason is that i am loading a tooltip as an overlay ontop of the thumbnail(blocking a direct link), so i have to pass the url(src) to the tooltip and load the image from there.
here is the code:
var url;
$("#dyna img").hover(function(){
url = $(this).attr("title");
},function(){
[Code]....
View 1 Replies
View Related
Nov 25, 2010
I cannot work out why this doesn't work.
$(document).ready(
function(){
// Actual jQuery goodness that moves the captions
// Set the default value for the caption
$('.boxcaption').live('click',
function(){
console.log(this);
});
});
When I run the following and click on a .boxcaption element. It returns the this value 15 times, once for each .boxcaption that is on the page. I only want to return one value, which is the one I have clicked on.
View 1 Replies
View Related
Apr 1, 2010
I would like to dynamically set a tab title/name depending on the ajax content returned to the page when it loads, is there a way to do this? example
<LI><A href="lookup_return_data.php" title="result"><SPAN>set this content when page loads ie results:6</SPAN></A></LI>
It can be done perhaps with reg expression, but I assume there is a simple jquery solution.
View 1 Replies
View Related
Oct 22, 2010
i have 10 text boxes in a from and when i insert value in textbox1 and textbox2 sum twice and display them in textbox3 at same time when i am inserting it means keyup event how do i solve this task at client side using jquery
View 1 Replies
View Related
Sep 2, 2010
I'm developing one application that have two iframes. These iframes are ARS forms.So, I need to transfer information from one to the other one and after that, call one save method of the ARS form. (Ps: both have the same src attribute, in other words, the same form).
[Code]...
View 5 Replies
View Related
Jul 19, 2009
I have found a script that works fine for me but I'd like to make it reusable but I have an issue with that. On the script I have something like
function my_function() {
var $container = $('#panel .container');
}
and I'd like to pass the id (panel in this case) as a parameter like
in the example below:
[Code]...
View 3 Replies
View Related
May 28, 2009
I am currently loading the TreeView asynchronously and I'm trying toset it up so an animated gif displays while a node is being expandednd its child nodes are being created. Currently it just saysplaceholder until the child nodes are done loading
View 4 Replies
View Related
Apr 17, 2010
I'm trying to make a blog and I am facing a problem with the plugin using jQuery 'sidebarTabs'.
The blog is here Paris sportifs My question is: Is it possible to display no one sub-category(none) instead of all sub-categories related to the first title ('Paris Sportifs') The creator of the plugin was very friendly and made me good service, but he said that it is not possible because the jQuery library by default is set to display the first sub-section ('Les bases pour débuter etc
[Code]...
View 2 Replies
View Related
Sep 22, 2010
I'm currently building a web application based off posted Tweets. As of now, I'm able to pull the first 25 tweets that contain a searched keyword, however I would like the option to 'Show More Results' at the bottom of the page, so users can view more results if they would like. I've found a tutorial, but am still confused as to how to accomplish this.
View 5 Replies
View Related
Aug 6, 2010
I have a page with several different forms. One of these currently has an onsubmit event to run a custom validation program before the action is triggered. This event is currently shown asonsubmit="return validateForm(this)"and works as expected.
I want to be able to use this form in some instances without this validation so I want to take this event out and add it if a certain field has been set before the page was loaded. I'm new to jQuery and thought I'd understood how I could do this but I'm not getting this to work.
First of all I added a class of 'mainform' to this form and then used the following to set the event:
I've tried putting line 4 in quotes but it still doesn't work. What am I doing wrong?
View 5 Replies
View Related
Mar 16, 2011
jquery and am trying to set the class value on a td cell. It looks as though it is crashing on setting the attr value. This is effectively what I am trying to do.
// get my row
var row = $("#tableID").find("tr:eq(0)");
// get the cells in this row
[code]....
View 1 Replies
View Related
Sep 14, 2010
In my page i have a dropdown 'Type' with id 'idType', which needs to be set to focus when the page loads (depending on whether it has a value or not..)The css is not getting applied to the dropdown when it is in focus. Please can you help me to find a solution since i am new to jquery
View 3 Replies
View Related
Aug 23, 2010
I have a div that contains some data.Once every XX seconds I refresh it via this method
//Partial refresh of the patients tables
$(function () {
setInterval(function () {
[code]....
View 2 Replies
View Related
Oct 4, 2011
Here are two examples, you will need to goto the link andclick on "Add New Customer" on the right hand side.This one works:This is the code (it sets the property to checked and visually appears checked):
$(document).ready(function()
{
$("#activey").prop("checked", true);
[code]....
View 2 Replies
View Related
Apr 7, 2011
I use autocomplete on my application. The width of the dropdown is equal to the width of the Input element that is used. I would like to use a custom width for the Dropdown leaving the width of the input same. Can this be done?
View 1 Replies
View Related
May 3, 2011
The following snippets are not equivalent, what am I doing wrong? This one does not actually show the div
$('#edit_div').css.visibility= 'visible';
whereas this one does.
[Code]...
View 1 Replies
View Related
Mar 22, 2011
Ok so I have only been playing around for jquery for a couple of days (dear god, its amazing, why am I just now doing this?) Basically I have a div box that I want to change sized when clicked. When the page loads its 150x150 and when clicked it animates to 500x500. I want it to return to 150x150 when clicked again, therefore I am using the toggle function. The first click resizes the div perfectly, but disappears. (the display property is set to none) I'm assuming this has to do with the toggle() function itself, changing the display property using hide(). Here's what I have, seems pretty simple:
[Code]...
1.) why is the div being set to display:none when clicked? 2.) Can I achieve the functionality I've stated with the toggle() function or must I use another method like show() & hide() with an if statement or something?
View 2 Replies
View Related
Nov 18, 2011
The function will be
1.get the 70% width of the browser's screen.
2.convert that width into its corresponding px value
3.set the max width of the #mainContainer using the value got from the conversion/calculation.
Here is the css style for the container i want to set max-width with.
View 2 Replies
View Related
Jan 17, 2011
I have an array form input with an id: field[0], field[1] etc.How can I set the value of each array element directly?
$("#field[0]").val("value") doesn't appear to work.
View 3 Replies
View Related
Aug 30, 2010
I'm having trouble setting this keyup event w/ jquery. The first alert fires fine, but the second alert doesn't. This is driving me nuts. My textbox does have the name and id set to "typename".
Code:
function initFilter() {
alert("HERE");
[code]....
View 2 Replies
View Related
May 4, 2011
I'm trying to set a modal to the top right corner of the screen using block ui. In IE 6 the right margin is working, but it's ignoring the top margin and centering the modal in the window. In other browsers it behaves as expected
View 1 Replies
View Related
Nov 10, 2011
I have a problem on my website that I'm doing for a company, they have a Wordpress blog, and the blog page is set as a static home page, which is great. The problem is, the Atlantica theme puts a gallery on much of the blog, and worse, makes an even bigger gallery on the Home page (lucky me:-/). With some twiddling, I quickly figured out that I could just set the div "gallery" to "display: none" via CSS, and wah-LA! it disappeared..until 5 seconds later, when the error message "jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..." continues to re-assert itself, provides an OK to out of the error message, and keeps pestering me again.
I know next to nothing about the format of JScript. I've tried if/then statements, but once again, I'm so new at this, that I haven't gotten that far. I'm a whiz at CSS, but Javascript is kind of kicking my tail.
View 13 Replies
View Related
May 10, 2009
I'm opening a dialog box using the jQuery UI dialog methods, this box will display a form, and I would like to autofocus the first element. I'm also modifying tabindex of the different form fields of this new form in order to make them a lot higher than those of the original page, and thus navigate through the form using only the tab key. The issue is that I can correctly change tabindex values, and correctly focus the first element but pressing tab will not focus the next element in my newly added form but seems to act as I was focusing the first "tabindexable" element of my original page. I also note that manually focusing (ie. clicking) the element cause no problem, new tab index order is respected. Does anyone have a clue where it can came from ? Something seems to be messed up in the tabindex order. Tested on FF3, maybe the browser only update tabindex order on "manual" focus and not when modifying attributes ?
View 2 Replies
View Related