문제

$('.main-bottom-menu li').after('<div style="float: left;">//</div>');
$('.main-bottom-menu li:last').after('');

but it doesn't clear // after last li element. How can i remove // after li:last element?

올바른 솔루션이 없습니다

다른 팁

This should do it:

$('.main-bottom-menu li:last').html('');

According to this question, he doesn't want to remove the div, he just wants to empty it. The above code should do it.

You need to call remove() on selected element to remove it from DOM

Live demo

Change

$('.main-bottom-menu li:last').after('');

To

$('.main-bottom-menu li:last').next('div').remove(); to remove div after last li
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top