#side-nav ul li:before {
position: relative;
float:right;
top: 15px;
content: "<a href='http://url'>" + url('arrow.png') + "</a>";
}
Posted 13 January 2013 - 21:09
#side-nav ul li:before {
position: relative;
float:right;
top: 15px;
content: "<a href='http://url'>" + url('arrow.png') + "</a>";
}
Posted 13 January 2013 - 21:20
Posted 13 January 2013 - 21:35
<script>
var figures = document.getElementsByTagName("li");
for (var counter = 0; counter < figures.length; counter++) {
var newLink = document.createElement("a");
newLink.setAttribute("href", "bob");
var txtNode = document.createTextNode("Hello. This is a new node.");
newLink.appendChild(txtNode);
figures[counter].insertBefore(newLink,figures[counter].firstChild)
}
</script>
Posted 15 January 2013 - 18:59
kman1985, on 14 January 2013 - 23:20, said:
var $newLink = $("<a />"),
$existingListItems = $("#side-nav ul li");
$newLink.attr("href","http://url")
.text("Here's my new item")
.css({
position: "relative",
float:"right",
top: "15px"
});
$existingListItems.prepend($newLink)
Posted 15 January 2013 - 19:21
threetonesun, on 15 January 2013 - 19:10, said:
<ul> <li><a href="somewhere"><img /></a><p>List element text</p></li> ... </ul>
Posted 15 January 2013 - 19:36
lunamonkey, on 15 January 2013 - 19:21, said:
Posted 16 January 2013 - 19:37
$(document).ready(function() {
$('<img src="/images/big-arrow.png" alt="Arrow" width="22" height="22" border="0" />').appendTo('#side-nav ul li');
$('#side-nav ul li img').css ({
position: 'relative',
float: 'right',
top: '-30px',
left: '-5px'
});
});