<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<link rel="stylesheet" type="text/css" href="http://test.nattywp.com/newsone/wp-content/themes/Newsone/style.css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://test.nattywp.com/newsone/wp-content/themes/Newsone/js/jquery.jcarousel.pack.js"></script>
<script type="text/javascript">
// I rolled your click() handler into this one.
// No sense in binding two click handlers on the same elements.
function mycarousel_initCallback(carousel,item) {
jQuery('#features-nav .features-nav-item').bind('click', function() {
carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
$("#features-nav .features-nav-item").removeClass("current");
$(this).addClass("current");
return false;
});
};
// Added function for jCarousel's "itemVisibleCallback.onBeforeAnimation"
function mycarousel_itemVisibleBefore() {
$("#features-nav .current").removeClass("current");
};
// Added function for jCarousel's "itemVisibleCallback.onAfterAnimation"
function mycarousel_itemVisibleAfter(carousel, item, idx) {
$("#features-nav").children().eq(idx - 1).addClass("current");
};
// Wrapped all your ready() functions into one.
// No need to have several.
jQuery(document).ready(function() {
jQuery("#features").jcarousel({
scroll: 1,
auto:2,
wrap: 'both',
initCallback: mycarousel_initCallback,
buttonNextHTML: null,
buttonPrevHTML: null,
// Callbacks that run just before and after new item is displayed
itemVisibleInCallback: {
onBeforeAnimation: mycarousel_itemVisibleBefore,
onAfterAnimation: mycarousel_itemVisibleAfter
}
});
jQuery("#screenshots").jcarousel({
scroll: 1,
});
var el = $('#portfolio-services');
if(el.html()) { el.html(el.html().replace(/, /ig, "</li><li>")); }
});
</script>
</head>
<body>
<div class="mytop">
<div style="display: block;" id="features" class="jcarousel-features jcarousel-container jcarousel-container-horizontal">
<div class="jcarousel-clip jcarousel-clip-horizontal">
<ul style="width: 1890px; left: 0px;" class="jcarousel-list jcarousel-list-horizontal">
<li jcarouselindex="1" class="jcarousel-item jcarousel-item-horizontal jcarousel-item-1 jcarousel-item-3-horizontal"><a
href="http://test.nattywp.com/newsone/?p=232"><img src="http://test.nattywp.com/newsone/wp-content/main5.jpg" alt="Short announce" class="" title="" width="630"
height="250"><span class="features-effects png_scale"> </span></a></li>
<li jcarouselindex="2" class="jcarousel-item jcarousel-item-horizontal jcarousel-item-2 jcarousel-item-4-horizontal"><a
href="http://test.nattywp.com/newsone/?p=230"><img src="http://test.nattywp.com/newsone/wp-content/main3.jpg" alt="Second review here" class="" title=""
width="630" height="250"><span class="features-effects png_scale"> </span></a></li>
<li jcarouselindex="3" class="jcarousel-item jcarousel-item-horizontal jcarousel-item-3 jcarousel-item-5-horizontal"><a
href="http://test.nattywp.com/newsone/?p=228"><img src="http://test.nattywp.com/newsone/wp-content/main4.jpg" alt="Website review" class="" title="" width="630"
height="250"><span class="features-effects png_scale"> </span></a></li>
</ul>
</div>
<div id="features-nav">
<div id="features-nav1" class="features-nav-item png_crop current">
<div class="num">1</div>
<h3>Short announce</h3>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quis risus at nisl blandit feugiat. Ut vel orci quis sem
[...]</p>
</div>
<div id="features-nav2" class="features-nav-item png_crop">
<div class="num">2</div>
<h3>Second review here</h3>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quis risus at nisl blandit feugiat. Ut vel orci quis sem
[...]</p>
</div>
<div id="features-nav3" class="features-nav-item png_crop">
<div class="num">3</div>
<h3>Website review</h3>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quis risus at nisl blandit feugiat. Ut vel orci quis sem
[...]</p>
</div>
</div>
</div>
</div>
<!-- end verticle carousel -->
</body>
</html>
if (document.getElementById('hello')) {
document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript';
}
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |