In my opinion, it seems like this should be it's own class. You should have another object to control the FamousPerson
objects and add them when they are instantiated. I would also decouple the checkbox from the FamousPerson
class itself and tie the behavior in elsewhere.
As for the solution part, if you still want to add it in here, check out this this. There's an example of creating a checkbox with a label and adding it to the DOM. Shouldn't be too hard to patch some of it in to your existing class.
In my opinion, it seems like this should be it's own class. You should have another object to control the FamousPerson
objects and add them when they are instantiated. I would also decouple the checkbox from the FamousPerson
class itself and tie the behavior in elsewhere.
As for the solution part, if you still want to add it in here, check out this. There's an example of creating a checkbox with a label and adding it to the DOM. Shouldn't be too hard to patch some of it in to your existing class.
In my opinion, it seems like this should be it's own class. You should have another object to control the FamousPerson
objects and add them when they are instantiated. I would also decouple the checkbox from the FamousPerson
class itself and tie the behavior in elsewhere.
As for the solution part, if you still want to add it in here, check out this. There's an example of creating a checkbox with a label and adding it to the DOM. Shouldn't be too hard to patch some of it in to your existing class.
In my opinion, it seems like this should be it's own class. You should have another object to control the FamousPersonFamousPerson
objects and add them when they are instantiated. I would also decouple the checkbox from the FamousPersonFamousPerson
class itself and tie the behavior in elsewhere.
As for the solution part, if you still want to add it in here, check out this. There's an example of creating a checkbox with a label and adding it to the DOM. Shouldn't be too hard to patch some of it in to your existing class.
In my opinion, it seems like this should be it's own class. You should have another object to control the FamousPerson objects and add them when they are instantiated. I would also decouple the checkbox from the FamousPerson class itself and tie the behavior in elsewhere.
As for the solution part, if you still want to add it in here, check out this. There's an example of creating a checkbox with a label and adding it to the DOM. Shouldn't be too hard to patch some of it in to your existing class.
In my opinion, it seems like this should be it's own class. You should have another object to control the FamousPerson
objects and add them when they are instantiated. I would also decouple the checkbox from the FamousPerson
class itself and tie the behavior in elsewhere.
As for the solution part, if you still want to add it in here, check out this. There's an example of creating a checkbox with a label and adding it to the DOM. Shouldn't be too hard to patch some of it in to your existing class.
In my opinion, it seems like this should be it's own class. You should have another object to control the FamousPerson objects and add them when they are instantiated. I would also decouple the checkbox from the FamousPerson class itself and tie the behavior in elsewhere.
As for the solution part, if you still want to add it in here, check out this. There's an example of creating a checkbox with a label and adding it to the DOM. Shouldn't be too hard to patch some of it in to your existing class.