Here is the code I have, hopefully the selection I've given is enough.
var $nextHt开发者_JAVA技巧ml = $('<a href="" class="bx-next">next</a>');
var $prevHtml = $('<a href="" class="bx-prev">prev</a>');
The code above creates two links:
<a href="">next</a><a href="">prev</a>
Right now, the two anchor tags this has created are floating freely within it's parent div, which also holds many other objects. This makes it hard to stylize the two anchors together.
How can I wrap the two anchors in a div together so the output HTML is this:
<div class="control-wrap">
<a href="">next</a><a href="">prev</a>
</div>
Thanks for the help! My lack of Jquery knowledge is killing me...
$("<div>").addClass("control-wrap").append($nextHtml).append($prevHtml);
精彩评论