Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:54:46+00:00 2026-06-04T04:54:46+00:00

Here is my HTML code: <div id=playlist_item> <ul class=link id=link> <div class=style><input type=checkbox class=styled>

  • 0

Here is my HTML code:

<div id="playlist_item">
    <ul class="link" id="link">
        <div class="style"><input type="checkbox" class="styled">
            <div id="style"></div>   
        </div>
        <li class="edit">http://carouselinfo.com/canal/</li>
        <span class="main edit">123</span>
    </ul>
</div>

When I prepend ie add the ul element then my other jquery event for this element not working

Jquery code:

$(function() {    
    $(".new").click(function(){
    $("#playlist_item").prepend("<ul class='link' id='link'><div class='style'><input type='checkbox' class='styled'><div id='style'></div></div><li class='edit'>Please edit this file</li><span class='main edit'>Write Duration</span></ul>")
});

This code is not working for prepend elements

$('.edit').editable();

$('input:checkbox').click(function () {
    var check_all = $("input[type='checkbox']");
    if ($(this).closest("ul").hasClass("change_link")) {
        $(this).closest("ul").removeClass("change_link");
    } else {
        $(this).closest("ul").addClass("change_link");
        $(".option").html("<div id='icons'><div class='add'></div></div><div id='icons'><div class='delete'></div></div>");
    }

    if (check_all.length == $("input[type='checkbox']").not(":checked").length) {
        $(".option").html("");
    }
});

Where I am wrong? Please help me out..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:54:47+00:00Added an answer on June 4, 2026 at 4:54 am

    Replace $('input:checkbox').click(function() { with the following code:

    $('#playlist_item').on('click', 'input:checkbox', function() {
    

    When binding the event to $('input:checkbox') it will only be bound to matching element that exist at the moment where you perform the binding. By using the delegate syntax you bind the event to a parent element and thus receive the events from all child elements, even if they did not exist when calling the .on() function.

    Since you also want to call .editable() on the new elements, do the following after adding a new one:

    $('.edit:not(.editable-done)').addClass('editable-done').editable();
    

    This will ensure .editable() is only called once per element. In case it is a jQuery UI widget you can simply keep $('.edit').editable() though – they detect automatically if the widget has already been created or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my html Code: <input type=checkbox name=test id=test /> Here i want to
Here is my HTML code <span class=xxt style=>Hide Me</span> <div><br/></div> <div></div> <span style=> <table>
Question 1 Here is the HTML code. <div class=preferredContact paragraph>ph:<span preferredcontact=40>(02) 9540 9959</span></div> I
Here is HTML code: <div class=row> <span class=item><a href=#>A</a></span> <span class=item><a href=#>B</a></span> <span class=item><a
Here is my HTML code <div class=column> <div class=open></div> <div class=close></div> <div class=content> This
first here is my html code: <div class=outter> <div class=item></div> <div class=item></div> <div class=item></div>
here is the html code : <div id=popup class=popup_block > <img src=images/PUB-histRIRE.jpg alt=popup />
Here is my html code looks alike. <div style=width:70%; margin:0px auto; border:1px solid #000;>
here is the html code that is giving me problem in IE7 <div style=position:absolute;top:276px;left:194px;
Here is my HTML code- <html> <head> <link type=text/css href=/static/theme.css rel=Stylesheet /> </head> <body>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.