Announcement

#1 2010-01-08 10:29:12

11alex11
Member
2009-11-07
55

[resolved] prevent jump to top on click to expand?

How can I prevent from the page to go to top when I click the specials block in order to expand it?
(theme: floOS)

Offline

 

#2 2010-01-09 15:25:37

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] prevent jump to top on click to expand?

hello
in each themeconf.inc.php ( template/floOS/theme/#for each theme#/ )
replace :

  'local_head' => '  <script type="text/javascript" src="template-common/lib/jquery.js"></script>
  <script type="text/javascript">
jQuery(document).ready(function(){
    $(".titre_acordeon").click(function() {
        $(this).next().toggle("medium");
    }).next().hide();
});
jQuery(document).ready(function(){
    $(".titre_acordeon_0").click(function() {
        $(this).next().toggle("medium");
    }).next().show();
});
 
  </script>
    <!--[if lt IE 7]> [...]


by

  'local_head' => '    <!--[if lt IE 7]>  [...]


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2010-01-15 07:58:13

11alex11
Member
2009-11-07
55

Re: [resolved] prevent jump to top on click to expand?

It didn't do the right thing.It did that all the menus on the left became always open

Offline

 

#4 2010-01-15 10:48:28

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] prevent jump to top on click to expand?

11alex11 wrote:

It didn't do the right thing.It did that all the menus on the left became always open

ho sorry I didn't really understand your question !
well : undo this modification and now the right answer : in the template folder, open these files :
menubar_categories.tpl
menubar_identification.tpl
menubar_links.tpl
menubar_menu.tpl
menubar_specials.tpl
menubar_tags.tpl
then, in each file you will see that :
<dt class="titre_acordeon"><a href="#"><img src="{$ROOT_URL}{$themeconf.icon_dir}/menu/small_resizable.png" class="button_res" alt="[_]">{$block->get_title()|@translate}</a></dt>
In order to prevent jump replace <a href="#" by <a href="javascript:void(0);"
tell me if you succeed or not


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2010-01-15 10:56:41

11alex11
Member
2009-11-07
55

Re: [resolved] prevent jump to top on click to expand?

It worked perfectly! Thanks

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact