The Responsive jQuery Content Slider

The Responsive jQuery Content Slider

Came to know about a slider.The Responsive jQuery Content Slider. It is responsive. The content can be images, videos or HTML content.

License : The MIT License (MIT)

more info : http://bxslider.com/

Height and Span

Can we set height to span?

Can we set height to span? The answer is no. Span is an inline element. If you provide height to span, there will not be any effect. If you really want to set height then you will have to add  display : inline-block or display : block.

Finding Dimension of Text in Pixels - HTML5 Javascript JQuery

Finding Width & Height of Text in Pixels
HTML5 - Javascript - JQuery

For Div, Span
I came across a problem that i want to find width of the text in my page in order to properly align it. I found the solution using JQuery.
Steps
1. Wrap the text in a span and append to some element say to a div.

$(div).append("<span id='find-length'>"+text+"</span>").

2. Find width and height using JQuery.
var textWidth = $("#find-length").width();
var textHeight = $("#find-length").height();

For SVG
For finding dimension of svg text element we will make use of  getBBox() method.

Eg: var dimension = element.getBBox();
var textWidth = dimension .width;

var textHeight = dimension .height;