I have this markup:
<span class="top_ticker_middle"></span>
<div class="pc_elements">
<fieldset class="checkable">
<span class="as_cp_checkbox"></span>
<input type="hidden" name="pc_element_01" id="pc_element_01" value="yes">
<label for="pc_element_01">Some text</label>
</fieldset>
</div>
now: i need to append text from label to top_ticker_middle span after some click. I have many of this fieldsets in the list, and i should do this for specify, clicked element. Also i need to append this values one by one in the span top_ticker_middle. So i do this:
$('.pc_elements fieldset').live('click',function(){
var text_label = $(this).children('label').text();
$('.top_ticker_middle').empty().append(text_label);
});
something is wrong and not working, can you help me?
Replace:
With:
I faced the same issue! 🙂
Original Fiddle: http://jsfiddle.net/bAZnT/ (Actually this works!)