- I am trying to learn typescript.
- I have an ui working in jquery.
- I am trying to move it in typescript.
- but I am not successful. I am trying to move everything inside this method WholeUI()
- I am getting error.
- cann you tell me how to fix it.
working fiddle. http://jsfiddle.net/46aqscwv/
breaking fiddle http://jsfiddle.net/Ls1aqLv1/
error
Uncaught SyntaxError: Unexpected token (
at new Function (<anonymous>)
at exec (typescript.js:41)
at HTMLDocument.runScripts (typescript.js:41)
code
function WholeUI() {
$(document).ready(function() {
$('ul.tabs li').click(function() {
var tab_id = $(this).attr('data-tab');
$('ul.tabs li').removeClass('current');
$('.tab-content').removeClass('current');
$(this).addClass('current');
$("#" + tab_id).addClass('current');
})