Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can anyone convert the javascript code to typescript.I am new in typescript.
Here is the code :-

What I have tried:

var main = function() {

var paused = false

$('.arrowR').click(function() {
paused = true;
$('#slideshow > div:first')
.fadeOut(1000)
.next()
.fadeIn(1000)
.end()
.appendTo('#slideshow');
});

$('.arrowL').click(function() {
paused = true;
$('#slideshow > div:last')
.fadeIn(1000)
.prependTo('#slideshow')
.next()
.fadeOut(1000)
.end();
});



setInterval(function() {
if (paused === false) {
$('#slideshow > div:first')
.fadeOut(1000)
.next()
.fadeIn(1000)
.end()
.appendTo('#slideshow');
};
}, 5000);


};

$(document).ready(main);
Posted
Comments
MadMyche 2-May-18 9:34am    
https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900