Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set focus current page

  • Loading branch information...
commit bcf4a96e5e3f7576c2269a73aba31dc42aa1ff9f 1 parent f750c8f
unknown authored
View
38 ImagesLibrary.aspx
@@ -74,31 +74,31 @@
<table align="center" cellpadding="0" cellspacing="0" border="0" style="padding-top: 20px">
<tr>
<td>
- <a href="Default.aspx" target="_blank">Trang Chủ</a>
+ <a id="default" href="Default.aspx" target="_blank" class='menu_i'>Trang Chủ</a>
</td>
<td width="60px" align="center">
&nbsp;
</td>
<td>
- <a href="Services.aspx" target="_blank">Dịch Vụ</a>
+ <a id="service" href="Services.aspx" target="_blank" class='menu_i'>Dịch Vụ</a>
</td>
<td width="60px" align="center">
&nbsp;
</td>
<td>
- <a href="News.aspx" target="_blank">Tin Tức</a>
+ <a id="list" href="List.aspx" target="_blank" class='menu_i'>Tin Tức</a>
</td>
<td width="60px" align="center">
&nbsp;
</td>
<td>
- <a href="ImagesLibrary.aspx" target="_blank">Thư Viện</a>
+ <a id="image_library" href="ImagesLibrary.aspx" target="_blank" class='menu_i'>Thư Viện</a>
</td>
<td width="60px" align="center">
&nbsp;
</td>
<td>
- <a href="Contact.aspx" target="_blank">Liên Hệ</a>
+ <a id="contact" href="Contact.aspx" target="_blank" class='menu_i'>Liên Hệ</a>
</td>
</tr>
</table>
@@ -304,7 +304,7 @@
<script type="text/javascript">
$(document).ready(function () {
-
+ setFocusCurrentPage();
MainContentW = 1000;
LeftBannerW = 125;
RightBannerW = 125;
@@ -467,4 +467,30 @@
savedirection: true,
random: true
});
+ function setFocusCurrentPage(){
+ var url = document.location.href;
+ if(url.indexOf("Default.aspx") != -1){
+ $('#default')[0].style.color = '#FF7F50';
+ }
+ if (url.indexOf("Services.aspx") != -1) {
+ $('#service')[0].style.color = '#FF7F50';
+ }
+ if (url.indexOf("List.aspx") != -1) {
+ $('#list')[0].style.color = '#FF7F50';
+ }
+ if (url.indexOf("ImagesLibrary.aspx") != -1) {
+ $('#image_library')[0].style.color = '#FF7F50';
+ }
+ if (url.indexOf("Contact.aspx") != -1) {
+ $('#contact')[0].style.color = '#FF7F50';
+ }
+ $('.menu_i').each(function () {
+ $(this).mouseover(function () {
+ if (this.style.color) this.style.color = 'orange';
+ });
+ $(this).mouseout(function () {
+ if (this.style.color) this.style.color = '#FF7F50';
+ });
+ });
+ }
</script>
View
2  Service.aspx.cs
@@ -18,7 +18,7 @@ protected void Page_Load(object sender, EventArgs e)
{
using (SqlCommand scom = new SqlCommand("Select description from News where id = -2", scon))
{
- //SqlDataReader sreader = scom.ExecuteReader();
+ SqlDataReader sreader = scom.ExecuteReader();
sreader.Read();
content.Text = sreader.GetValue(0).ToString();
}
View
44 Site.master
@@ -54,31 +54,31 @@
<table align="center" cellpadding="0" cellspacing="0" border="0" style="padding-top: 20px">
<tr>
<td>
- <a href="Default.aspx" target="_blank">Trang Chủ</a>
+ <a id="default" href="Default.aspx" target="_blank" class='menu_i'>Trang Chủ</a>
</td>
<td width="60px" align="center">
&nbsp;
</td>
<td>
- <a href="Services.aspx" target="_blank">Dịch Vụ</a>
+ <a id="service" href="Services.aspx" target="_blank" class='menu_i'>Dịch Vụ</a>
</td>
<td width="60px" align="center">
&nbsp;
</td>
<td>
- <a href="List.aspx" target="_blank">Tin Tức</a>
+ <a id="list" href="List.aspx" target="_blank" class='menu_i'>Tin Tức</a>
</td>
<td width="60px" align="center">
&nbsp;
</td>
<td>
- <a href="ImagesLibrary.aspx" target="_blank">Thư Viện</a>
+ <a id="image_library" href="ImagesLibrary.aspx" target="_blank" class='menu_i'>Thư Viện</a>
</td>
<td width="60px" align="center">
&nbsp;
</td>
<td>
- <a href="Contact.aspx" target="_blank">Liên Hệ</a>
+ <a id="contact" href="Contact.aspx" target="_blank" class='menu_i'>Liên Hệ</a>
</td>
</tr>
</table>
@@ -254,14 +254,14 @@
<script type="text/javascript">
$(document).ready(function () {
-
+ setFocusCurrentPage();
MainContentW = 1000;
LeftBannerW = 15;
RightBannerW = 15;
LeftAdjust = 5;
RightAdjust = 5;
TopAdjust = $(window).height() / 2 - 90;
-
+
function FloatTopDiv() {
startLX = 0, startLY = TopAdjust;
var d = document;
@@ -280,8 +280,8 @@
var pY = document.body.scrollTop;
startLY = TopAdjust; startRY = TopAdjust;
ftlObj2.y += (pY + startLY - ftlObj2.y) / 16;
- ftlObj2.sP(ftlObj2.x, ftlObj2.y-30);
-
+ ftlObj2.sP(ftlObj2.x, ftlObj2.y - 30);
+
setTimeout("stayTopLeft()", 1);
}
@@ -352,6 +352,32 @@
savedirection: true,
random: true
});
+ function setFocusCurrentPage(){
+ var url = document.location.href;
+ if(url.indexOf("Default.aspx") != -1){
+ $('#default')[0].style.color = '#FF7F50';
+ }
+ if (url.indexOf("Services.aspx") != -1) {
+ $('#service')[0].style.color = '#FF7F50';
+ }
+ if (url.indexOf("List.aspx") != -1) {
+ $('#list')[0].style.color = '#FF7F50';
+ }
+ if (url.indexOf("ImagesLibrary.aspx") != -1) {
+ $('#image_library')[0].style.color = '#FF7F50';
+ }
+ if (url.indexOf("Contact.aspx") != -1) {
+ $('#contact')[0].style.color = '#FF7F50';
+ }
+ $('.menu_i').each(function () {
+ $(this).mouseover(function () {
+ if (this.style.color) this.style.color = 'orange';
+ });
+ $(this).mouseout(function () {
+ if (this.style.color) this.style.color = '#FF7F50';
+ });
+ });
+ }
</script>
</body>
View
2  Styles/images-library.css
@@ -8,7 +8,7 @@ body{
width:100%;
}
.menu a:hover{
- color:#b2bb55;
+ color:#FFA500;
}
.menu a{
color:White;
View
2  Styles/main.css
@@ -15,7 +15,7 @@ a{
margin-top:25px;
}
.menu a:hover{
- color:Orange;
+ color:#FFA500;
}
.menu a{
Please sign in to comment.
Something went wrong with that request. Please try again.