[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 111
  • Last Modified:

moving to the right in a table with query

$(document).ready(function() {
	
	//funciones de edicion
	
	$(".cambiarClientes").click(function(){
		
		$(this).html('<form action="cambioWebPortal.php" method="GET"><input type="text" id="infoClientes" name="infoClientes" value="'+$(this).html()+'"><input type="hidden" name="eventoPertenece" value="'+ $(this).attr("eventoPertenece") +'"><input  type="submit" value="Cambiar"></form>');

			$(this).unbind("click");		

		$(this).eq(2).html() = "test";
			
	});

Open in new window


This correspond to a table that have a td that have a class named "cambiarClientes", i need the line that have eq(2) to work, that is two columns to the left, any idea?
0
joyacv2
Asked:
joyacv2
  • 4
  • 2
1 Solution
 
GaryCommented:
.index() is zero based so the second element would be .index(1)
0
 
GaryCommented:
Do you mean the second column from the right?
0
 
joyacv2Author Commented:
the second to the right, imagine three columns the first is the one that contains the class
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
GaryCommented:
Post your table HTML and indicate what you want to get
0
 
joyacv2Author Commented:
<table><tr><td class="cambiarClientes>1232</td><td>worked</td><td>pending</td></tr></table>

I want that when 1232 is click then pending change to test, move two to the right, but eq is not working
0
 
GaryCommented:
$(".cambiarClientes").click(function () {
    $(this).next().next().text("test")
})

Open in new window

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now