I've got a problem with my JS code, I would like to change the CSS property "left" of an element. I'm not sure what's to exact problem. I'm pretty new to JS. The following code shows my CSS as well as my JS code.
CSS:
#Slider_Cont_Section
{
left: 0;
}
JavaScript:
<script type="text/javascript">
function FunzioneSliderLeft()
{
var left = document.getElementById("Slider_Cont_Section").style.left;
if ( left = "0px")
{
left = "0px";
}
else if ( left = "-1280px")
{
left = "0px";
}
else if ( left = "-2560px")
{
left = "-1280px";
}
else
{
left="-2560px";
}
</script>
<script type="text/javascript">
function FunzioneSliderRight()
{
var left = document.getElementById("Slider_Cont_Section").style.left;
if ( left = "0px")
{
left = "-1280px";
}
else if ( left = "-1280px")
{
left = "-2560px";
}
else if ( left = "-2560px")
{
left = "-3840px";
}
else
{
left="0px";
}
</script>