so what your saying is you may have more the one input in the same
div and you want the id of every input in said div ? what format do
you want them in if you have multiple inputs your gonna have multiple
results..
here is where I'm going with this what if you looped through the div
like this
$
Thanks, but the page is dynamic and I don't know the names.
Any other idea?
I thought I could solve it this way:
var top_div = $(this).parents("div").parents("div").attr("class");
var select_name = $('.'+top_div+'>select').attr("name");
But it returns me always the first select name, never the c
working with selects
$("a.stop").click(function() {
var obj = $("select");
for(var i = 0; i < obj.length; i++) {
if(obj.eq(i).attr("name") == "vfo") {
// you have found the element do what you need to do
obj.eq(i).addClass("found"); // add class amy be
obj.eq(i).attr( {
id:"found" // how bou
In my case I used now:
var parent_id = $(this).parents("div:first").attr("id");
$('#'+parent_id).hide();
var input_id = $('#'+parent_id+">input").attr("id");
$('#'+input_id).val("");
To find more than one, I saw some time ago to use find() and each()
functions. But I can't tell you how they wor
yeah it is a tough one. mike got it ! but what happens if you have more than
one input type ?
On Tue, May 12, 2009 at 3:02 PM, Mean Mike wrote:
>
> $('a.stop').click(function() {
>var input_id = $(this).prev().attr("id");
> var parent_id = $(this).parents("div:first").attr("id")
$('a.stop').click(function() {
var input_id = $(this).prev().attr("id");
var parent_id = $(this).parents("div:first").attr("id");
$('#'+parent_id).hide();
}
On May 12, 8:48 am, heohni
wrote:
> hi!
>
> I have this construct:
> class="textInput">
>
> On click I want to hi
6 matches
Mail list logo