javascript - How to remove a span element from Backbone.js $el? -
this.$el
has following structure:
<div> <span class="orword">or</span> <span>...</span> </div>
i trying retrieve span class orword
, remove dom. in order achieve tried didn't work:
this.$el('span.andword').remove();
please let me how above span can removed $el
element.
thanks
you need use find()
search child element:
this.$el.find('span.orword').remove();
Comments
Post a Comment