You can create such effects using CSS only. In that case you'll be more flexible with the content. See demo.
The idea is creating a triangle with the help of borders:
CSS:
.triangle {
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
width: 50%;
border-style: solid;
border-color: transparent transparent transparent rgba(242,91,32,0.45);
}
And a small piece of JS:
var triangle = document.getElementById('triangle'),
triangleWidth = triangle.offsetWidth;
triangle.style.borderWidth = triangleWidth + 'px 0 0 ' + triangleWidth + 'px';