Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ChangeSomeStyles(){
- //hide the last two links of TopNav
- var container = document.getElementsByTagName("ul")[0];
- var lastchild = container.lastChild;
- var secondlastchild = container.childNodes[container.childNodes.length-2];
- lastchild.style.display = 'none';
- secondlastchild.style.display = 'none';
- //Show TopNav as it is hidden by default in CSS
- document.getElementById('WrapperTopNav').style.display = 'block';
- //if homepage, set Footer width to 960
- if ((document.URL === "http://testsiteqa/Pages/Default.aspx") || (document.URL === "http://testsitetf/Pages/Default.aspx") || (document.URL === "http://testsite/Pages/Default.aspx")){
- document.getElementById('Footer').style.width = '960px';
- }
- }
- $(document).ready(){
- $('ul li:last-child').hide();
- //how do I get the second last li?
- $('#WrapperTopNav').css('display','block');
- if ((document.URL === "http://testsiteqa/Pages/Default.aspx") || (document.URL === "http://testsitetf/Pages/Default.aspx") || (document.URL === "http://testsite/Pages/Default.aspx")){
- $('#Footer').css('width','960px');
- }
- });
- var cache = $('ul li');
- cache.eq(cache.length-1).hide(); //last one
- cache.eq(cache.length-2).hide(); //second one from the last
- var cache = $('ul li:last-child').hide(); //last one
- cache.prev().hide(); //second one from the last
- var cache = $('ul li');
- cache.eq(-1).hide(); //last one
- cache.eq(-2).hide(); //second one from the last
- $('ul > li:gt(-3)').hide();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement