PDA

Zobacz pełną wersję : Pasek przewijania na środku strony



tbres
23-10-2012, 21:24
Witam

Chciałbym prosić o pomoc w zmianie istotnego elementu strony. Jeżeli wejdziecie na http://trawertyn.biz.pl strona załaduję się na samej górze tak jak tutaj (http://imageshack.us/photo/my-images/16/scrollup.jpg) . Niestety dla niektórych klientów stanowi to problem ponieważ nie widzą treści strony poniżej ( w tym odnośnika do oferty) i z niewiadomych przyczyn obsługa paska przewijania przekracza ich kompetencje. Czy jest możliwość aby strona po załadowaniu ustawiała się po środku paska przewijania tak jak tutaj (http://imageshack.us/photo/my-images/546/scrolldown.jpg/)?

Pozdrawiam Tomasz

deviapps
23-10-2012, 21:45
scrollTo(null,1000);
wpisane w konsoli firebug działa - trzeba by było w head w script wpisać to w coś w stylu

document.addEvent('load',function(){scrollTo(null, 1000);});
albo dodaj gdzieś w środku <a name="xxx"> i podawaj link http://trawertyn.biz.pl/#xxx

tbres
23-10-2012, 22:04
Niestety u mnie nie działa ale prawdopodbnie robię coś źle. Jakaś podpowiedź gdzie w kodzie umieścić skrypt


<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted index access' );
// load and inititialize gantry class
require_once('lib/gantry/gantry.php');
$gantry->init();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $gantry->language; ?>" lang="<?php echo $gantry->language;?>" >
<head>
**********
function scrollWindow()
{
window.scrollTo(000,500)
}
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://connect.facebook.net/pl_PL/all.js"></script>
<script type="text/javascript" src="fb-likeit.js"></script>


<?php
$gantry->displayHead();
$gantry->addStyles(array('template.css','joomla.css','style .css','typography.css'));
?>

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35381614-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>
</head>
<body <?php echo $gantry->displayBodyTag(); ?>>

<?php /** Begin Header Spacer **/ if ($gantry->countModules('navigation') and ($gantry->countModules('top')==0)) : ?>
<div class="rt-head-spacer"></div>
<?php /** End Header Spacer **/ endif; ?>
<?php /** Begin Top **/ if ($gantry->countModules('top')) : ?>
<div id="rt-top">
<div class="rt-container">
<?php echo $gantry->displayModules('top','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Top **/ endif; ?>

<?php /** Begin Menu **/ if ($gantry->countModules('navigation')) : ?>
<div id="rt-menu">
<div class="rt-container">
<?php echo $gantry->displayModules('navigation','basic','basic'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Menu **/ endif; ?>

<?php /** Begin Header **/ if ($gantry->countModules('header')) : ?>
<div id="rt-header">
<div class="rt-container">
<?php echo $gantry->displayModules('header','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Header **/ endif; ?>
<?php /** Begin Showcase **/ if ($gantry->countModules('showcase')) : ?>
<div id="rt-showcase">
<div class="rt-container">
<?php echo $gantry->displayModules('showcase','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Showcase **/ endif; ?>
<?php /** Begin Feature **/ if ($gantry->countModules('feature')) : ?>
<div id="rt-feature">
<div class="rt-container">
<?php echo $gantry->displayModules('feature','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Feature **/ endif; ?>
<?php /** Begin Main Body **/ ?>
<div id="rt-main-surround">
<?php /** Begin Main Top **/ if ($gantry->countModules('maintop')) : ?>
<div id="rt-maintop">
<div class="rt-container">
<?php echo $gantry->displayModules('maintop','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Main Top **/ endif; ?>
<?php /** Begin Breadcrumbs **/ if ($gantry->countModules('breadcrumb')) : ?>
<div id="rt-breadcrumbs">
<div class="rt-container">
<?php echo $gantry->displayModules('breadcrumb','basic','breadcrumbs') ; ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Breadcrumbs **/ endif; ?>
<?php /** Begin Main Body Columns **/ ?>
<?php echo $gantry->displayMainbody('mainbody','sidebar','standard','s tandard','standard','standard','standard'); ?>
<?php /** End Main Body Columns **/ ?>
<?php /** Begin Main Bottom **/ if ($gantry->countModules('mainbottom')) : ?>
<div id="rt-mainbottom">
<div class="rt-container">
<?php echo $gantry->displayModules('mainbottom','standard','standard') ; ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Main Bottom **/ endif; ?>
</div>
<?php /** End Main Body **/ ?>
<?php /** Begin Bottom **/ if ($gantry->countModules('bottom')) : ?>
<div id="rt-bottom">
<div id="rt-bottom2">
<div class="rt-container">
<?php echo $gantry->displayModules('bottom','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
</div>
<?php /** End Bottom **/ endif; ?>
<?php /** Begin Footer **/ if ($gantry->countModules('footer')) : ?>
<div id="rt-footer">
<div class="rt-container">
<?php echo $gantry->displayModules('footer','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Footer **/ endif; ?>
<?php /** Begin Copyright **/ if ($gantry->countModules('copyright')) : ?>
<div id="rt-copyright">
<div class="rt-container">
<?php echo $gantry->displayModules('copyright','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Copyright **/ endif; ?>
<?php /** Begin Debug **/ if ($gantry->countModules('debug')) : ?>
<div id="rt-debug">
<div class="rt-container">
<?php echo $gantry->displayModules('debug','standard','standard'); ?>
<div class="clear"></div>
</div>
</div>
<?php /** End Debug **/ endif; ?>
<?php /** Begin Analytics **/ if ($gantry->countModules('analytics')) : ?>
<?php echo $gantry->displayModules('analytics','basic','basic'); ?>
<?php /** End Analytics **/ endif; ?>
<?php /** Begin Popup **/
echo $gantry->displayModules('popup','popup','popup');
/** End Popup **/ ?>
</body>
</html>
<?php
$gantry->finalize();
?>