nav js modified
This commit is contained in:
		
					parent
					
						
							
								6724729ae4
							
						
					
				
			
			
				commit
				
					
						391d123f31
					
				
			
		
					 2 changed files with 3 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -91,16 +91,12 @@
 | 
			
		|||
            var href = $(this).attr('data-url');
 | 
			
		||||
            $('.navbar-collapse').removeClass('in');
 | 
			
		||||
            $('.navbar-collapse').addClass('collapsing');
 | 
			
		||||
            var url = window.location.pathname;
 | 
			
		||||
            var urlSplit = url.split('/');
 | 
			
		||||
            if (urlSplit.length === 3 && urlSplit[2] === 'datacenterlight') {
 | 
			
		||||
            if ($(href).length) {
 | 
			
		||||
                $('html, body').animate({
 | 
			
		||||
                    scrollTop: $(href).offset().top
 | 
			
		||||
                }, 1000);
 | 
			
		||||
            } else {
 | 
			
		||||
                var allUrl = window.location.href;
 | 
			
		||||
                var redirect = allUrl.split('whydatacenterlight')
 | 
			
		||||
                window.location.href = '/en-us/datacenterlight' + href;
 | 
			
		||||
                window.location.href = '/datacenterlight' + href;
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,7 +33,7 @@
 | 
			
		|||
			</ul>
 | 
			
		||||
           </li>
 | 
			
		||||
			<li>
 | 
			
		||||
				<a href="{% url 'datacenterlight:index' %}/whydatacenterlight" >{% trans "Why Data Center Light?" %}</a>
 | 
			
		||||
				<a href="{% url 'datacenterlight:whydatacenterlight' %}" >{% trans "Why Data Center Light?" %}</a>
 | 
			
		||||
			</li>
 | 
			
		||||
			<li>
 | 
			
		||||
				<a class="url" href="{% url 'datacenterlight:index' %}#contact" data-url="#contact"  >{% trans "Contact" %}</a>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue