Sign in to follow this  
i_tejas19

Jquery - Classes not getting applied through appendTo method

Recommended Posts

I am appending a div and a ul inside a div with class middlepane but while doing so the classes target and connected are not applied to ul, my code is


$( "<div class='inmiddle'>"+ type + "<ul class='target connected'></ul></div>").appendTo(".middlepane") ;

i also tried this

 $( "<div class='inmiddle'>"+ type + "<ul class='target connected'></ul></div>").appendTo(".middlepane") ;

$(".middlepane").find("ul").addclass("target connected");

but this also didn't work
i also tried

 $( "<div class='inmiddle'>"+ type + "<ul class='target connected'></ul></div>").appendTo(".middlepane") ;

$(".middlepane").children("ul").addclass("target connected");

this also didn't work

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.