thanks a lot Samy....that worked.
On Dec 25, 8:46 pm, "Mauricio \(Maujor\) Samy Silva" <css.mau...@gmail.com> wrote: > As you want insert a div element after a submit element you must use the > method after() like so: > > $(document).ready(function(){ > jQuery("input[type='submit']").after('<div class="my-class"></div>'); > }); > > Maurício > > Please have a look at:http://docs.jquery.com/Manipulation > > -----Mensagem Original----- > De: "converging rails" <bagam.ven...@gmail.com> > Para: "jQuery (English)" <jquery-en@googlegroups.com> > Enviada em: quinta-feira, 25 de dezembro de 2008 09:56 > Assunto: [jQuery] unable to access desired elements. > > > > > Hi all, > > I am very much a stranger to jQuery using it for the first > > time in my application. > > I have a DOM from which I need to access all the form submit buttons > > after the page loads and need to append a div element after each > > submit element. > > > <input type="submit" value="submit1"> > > <input type="submit" value="submit2"> > > <input type="submit" value="submit3"> > > > Now I would like to add a div tag after each submit button which > > looks like: > > > <input type="submit" value="submit1"> > > <div class="my-class"></div> > > ...... > > ..... > > In my js file, I have the following code: > > > jQuery(document).ready(function) { > > jQuery("input[type='submit']").next().append('my div tag goes > > here'); > > } ); > > > somehow, this doesnt seem to work. I couldnt get the divs to be > > appended to my submit buttons. > > Am i going wrong somewhere? Any help appreciated.. > > > regards, > > Venkat