Given this HTML:
<p>
<span> Foo </span>
<span> Bar </span>
</p>
and this CSS:
span {
display:inline-block;
width:100px;
}
as a result, there will be a 4px wide space between the SPAN elements. Demo: http://jsfiddle.net/dGHFV/
I understand why this happens, and I also know that I could get rid of that space by removing the white-space between the SPAN elements in the HTML...
Recent Posts
Showing posts with label remove. Show all posts
Showing posts with label remove. Show all posts
Remove event handler in an element with jQuery
[2011 - jQuery 1.7 <]
With jQuery 1.7 onward the event API has been updated, .bind()/.unbind() are still available for backwards compatibility, but the preferred method is using the on()/off() functions. The below would now be,
$('#myimage').click(function() { return false; }); // Adds another click event
$('#myimage').off('click');
$('#myimage').on('click.mynamespace', function() { /* Do stuff */ });
$('#myimage').off('click.mynamespace');
In...
Subscribe to:
Posts (Atom)