Jquery tab resize
in Using jQuery UI
•
5 months ago
Hello,
I am using the following for for jquery tab. When I open the following code in IE8, and resize my browser window to a smaller size, the tab page also changes its position. How do I make it not move when the IE is resized?
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<link type="text/css" href="y/lnplerg.css" rel="stylesheet" title="LNP/LERG" media="all">
<script>
$(document).ready(function() {
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<link type="text/css" href="y/lnplerg.css" rel="stylesheet" title="LNP/LERG" media="all">
<script>
$(document).ready(function() {
function validatePhonenumber(field){
var regex = /^[2-9][0-9][0-9][2-9][0-9][0-9][0-9][0-9][0-9][0-9]$/;
if(field.val() == ''){
alert("Phone number cannot be blank");
return false;
}
if(regex.test(field.val())) {
alert("valid phone number");
}
else {
alert("Enter valid phone number");
return false;
}
}
$("#tabs").tabs();
$("#registerButton").click(function() {
var selected = $('#tabs').tabs('option', 'selected');
if(selected == 0) {
//alert($('#orignum').val());
//alert(selected);
validatePhonenumber($('#orignum'));
}
});
$("#registerButton1").click(function() {
var selected = $('#tabs').tabs('option','selected');
alert($('#cic_cd').val());
alert(selected);
});
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="tabs">
<ul>
<li><a href="#fragment-1"><span>One</span></a></li>
<li><a href="#fragment-2"><span>Two</span></a></li>
<li><a href="#fragment-3"><span>Three</span></a></li>
</ul>
<div id="fragment-1">
<label for="Orig Number">Orig Number</label>
<input id="orignum" name="orignum" />
<!-- <input type="file" name="filesToUpload" id="filesToUpload" onchange="makeFileList();"> -->
<input type="file" name="filesToUpload" id="filesToUpload">
<label class="formItemLabel" for="cic">NPA-NXX-L
:</label >
<textarea cols="20" rows="1" placeholder="NANP NPA-NXX-L"></textarea><input type="file" name="fileNpanxxl" id="fileNpanxxl"><a class="lookup">Lookup</a><span class="lookupWait invisible">Wait...</span>
<p class="submit">
<button id="registerButton" type="submit">Register</button>
</p>
</div>
<div id="fragment-2">
<label for="Cic_cd">Cic Code</label>
<input id="cic_cd" name="cic_cd " />
<p class="submit">
<button id="registerButton1" type="submit">Register </button>
</div>
<div id="fragment-3">
<p>Tab3</p>
</div>
</div>
</body>
</html>
<div id="fragment-3">
<p>Tab3</p>
</div>
</div>
</body>
</html>
Thanks.
1



