I am trying to build a simple switch in a form. It works only one way. What am I missing here that is preventing this code from working?HTML \[code\]<div id="SlideJoinDiv" align="right" style="background-image: url(img/buttons/SchuifNederlandsBG.png"><img width="87px" height="53px" src="http://stackoverflow.com/questions/14511237/img/buttons/SchuifjeKnop.png" id="SlideJoin" /></div>\[/code\]jQuery\[code\]$(document).ready(function () { $('#SlideJoinDiv').click(function () { var waardeStart = 'gast'; var waardeType = $('#TypeAccount').attr('value'); if (waardeType = waardeStart) { $('#SlideJoinDiv').attr('align', 'left'); $('#TypeAccount').attr('value', 'artist'); } else { $('#SlideJoinDiv').attr('align', 'right'); $('#TypeAccount').attr('value', 'gast'); } });\[/code\]