Jquery: UI tabs not working
Well, hmm. Let’s see. A quick Google fixed this for me!
There is one CSS style that is required for .tabs() to work. It takes care of the hiding of non active tabs.
/*tabs
————————*/
.ui-tabs .ui-tabs-hide {
display: none;
}
Also, to get the tabs to line up horizontally, use a CSS style that says display: inline.
#rinatabs li {display:inline; padding:5px;}
Javascript: notes on using switch
function whatClicked(x) {
//z=(x) //this line works
//clickResult=alert(“you clicked ” + z) //this line works
x=parseInt(x); // see the value passed as a number
switch (x)
{
case 1:
alert(“you clicked 1″);
break;
case 2:
alert(“you clicked 2″);
break;
case 3:
alert(“you clicked 3″);
break;
case 4:
alert(“you clicked 4″)
break;
default:
alert(“oops”);
}
}
To use the switch with the x value that is being set in the a tag, the switch statement must be used [...]
Setting up if-then in javascript
Variable
if comparison
what to do if it IS true
what to do otherwise, if it IS NOT true.
if (comparison)
{what to do if comparison is ture }
else {what to do if comparison is false }
Passing values from html to javascript example
So, basically, the following examples sets values in javascript functions.
In the first function, we set up a function called “myMsg” and in parenthesis we put a placeholder for a value. We give that placeholder a value from one of the html elements. We do this by setting the html input element to reference “form.text1.value”. [...]
Graph: Passing values from html to javascript
Click to enlarge
Posted in Javascript