emanuelx Posted March 16, 2014 Report Share Posted March 16, 2014 <!--item 1--> <div style="clear:both;" class="small-3 columns"> <a href="#" class="button tiny">Button Tiny</a> </div> <div class="addbutton small-9 columns"> <input class="input_b" type="text" placeholder="Text of button" /> <a class="button small" data-b="button tiny">Adicionar</a> <!--carregar neste botao--> </div> <!--item 1--> <div style="clear:both;" class="small-3 columns"> <a href="#" class="button small">Button Small</a> </div> <div class=" addbutton small-9 columns"> <input class="input_b" type="text" placeholder="Text of button" /> <a class="button small" data-b="button small">Adicionar</a> <!--carregar neste botao--> </div> Boas, fica aqui umas questão, não sei se dá para fazer ou não, era ao carregar no botao adicionar ele obtem o valor do input, isto através do jquery, visto que eu tenho vários elementos com a mesma classe como é que eu posso fazer isso? cumps com calma e sem stresses Link to comment Share on other sites More sharing options...
emanuelx Posted March 16, 2014 Author Report Share Posted March 16, 2014 fica aqui o codigo se alguem vier a precisar $('.b').click(function(){ console.log($(this).parent('.addbutton').find('input[type=text]').val()); console.log("zzz"); console.log($(this).attr('data-b')); // console.log($('.input_b').val()); }); com calma e sem stresses Link to comment Share on other sites More sharing options...
Rechousa Posted March 16, 2014 Report Share Posted March 16, 2014 Olá, Entretanto coloquei aqui a funcionar: http://codepen.io/Rechousa/pen/wpfiy Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa Link to comment Share on other sites More sharing options...
emanuelx Posted March 16, 2014 Author Report Share Posted March 16, 2014 Olá, Entretanto coloquei aqui a funcionar: http://codepen.io/Rechousa/pen/wpfiy mais simples que o meu ai na parte do parent com calma e sem stresses Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now