Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS][JavaScript]Wysuwana tabela po kliknięciu w obrazek.
Forum PHP.pl > Forum > Przedszkole
ja099
Dzień dobry.
Tworzę stronę na wordpressie i chcę, zrobić tak, żeby po kliknięciu w jedną grafikę wysuwało się tak jakby niewielkie pole z informacjami.
Mają być cztery grafiki, które jak się naciśnie, to wysunie się pole z informacjami. Informacji będzie tam nie wiele, bo będzie tam tylko kilka rozmiarów podanych.
To moja pierwsza styczność z javascript, dlatego bardzo proszę o pomoc.

pozdrawiam.



___
Wstawiam jeszcze kod strony, gdzie ma być zastosowany skrypt.
  1. <?php
  2. // File Security Check
  3. if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
  4. die ( 'You do not have sufficient permissions to access this page!' );
  5. }
  6. ?>
  7. <?php
  8. /**
  9.  * Template Name: Timeline
  10.  *
  11.  * The timeline page template displays a user-friendly timeline of the
  12.  * posts on your website.
  13.  *
  14.  * @package WooFramework
  15.  * @subpackage Template
  16.  */
  17.  
  18. global $woo_options;
  19. get_header();
  20. ?>
  21.  
  22.  
  23.  
  24.  
  25. <div id="content" class="page col-full">
  26.  
  27. <?php woo_main_before(); ?>
  28.  
  29. <section id="main" class="col-left">
  30.  
  31.  
  32.  
  33. <div id="plexi"
  34. style="position:relative;left:140px;top:85px;width:242px;height:250px;">
  35. <img src="http://serwer1398286.home.pl/autoinstalator/wordpress/wp-content/themes/mystile/images/plexi.png"></a>
  36. </div>
  37.  
  38.  
  39. <div id="pcv"
  40. style="position:relative;left:650px;top:85px;width:250px;height:250px;"
  41. a href="http://serwer1398286.home.pl/autoinstalator/wordpress/index.php/sklep/">
  42. <img src="http://serwer1398286.home.pl/autoinstalator/wordpress/wp-content/themes/mystile/images/pcv.png"></a>
  43. </div>
  44.  
  45. <div id="folie"
  46. style="position:relative;left:350px;top:-165px;width:250px;height:250px;"
  47. a href="http://serwer1398286.home.pl/autoinstalator/wordpress/index.php/sklep/">
  48. <img src="http://serwer1398286.home.pl/autoinstalator/wordpress/wp-content/themes/mystile/images/folie.png"></a>
  49. </div>
  50.  
  51. <div id="kompozyty"
  52. style="position:relative;left:40px;top:-170px;width:250px;height:250px;"
  53. a href="http://serwer1398286.home.pl/autoinstalator/wordpress/index.php/sklep/">
  54. <img src="http://serwer1398286.home.pl/autoinstalator/wordpress/wp-content/themes/mystile/images/kompozyty.png"></a>
  55. </div>
  56.  
  57.  
  58.  
  59. <?php wp_reset_query(); ?>
  60.  
  61. <?php woo_main_after(); ?>
  62.  
  63. <?php get_sidebar(); ?>
  64.  
  65. </div><!-- /#content -->
  66.  
  67. <?php get_footer(); ?>




Na razie są tam tylko te 4 grafiki i brakuje tego nieszczęsnego wysuwanego pola.





Wstawiam też plik index.php jeśli będzie do czegoś przydatny:
  1. <?php
  2. // File Security Check
  3. if ( ! function_exists( 'wp' ) && ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
  4. die ( 'You do not have sufficient permissions to access this page!' );
  5. }
  6. ?><?php
  7. /**
  8.  * Index Template
  9.  *
  10.  * Here we setup all logic and XHTML that is required for the index template, used as both the homepage
  11.  * and as a fallback template, if a more appropriate template file doesn't exist for a specific context.
  12.  *
  13.  * @package WooFramework
  14.  * @subpackage Template
  15.  */
  16. get_header();
  17. global $woo_options;
  18.  
  19. ?>
  20.  
  21. <?php if ( $woo_options[ 'woo_homepage_banner' ] == "true" ) { ?>
  22.  
  23. <div class="homepage-banner">
  24. <?php
  25. if ( $woo_options[ 'woo_homepage_banner' ] == "true" ) { $banner = $woo_options['woo_homepage_banner_path']; }
  26. if ( $woo_options[ 'woo_homepage_banner' ] == "true" && is_ssl() ) { $banner = preg_replace("/^http:/", "https:", $woo_options['woo_homepage_banner_path']); }
  27. ?>
  28. <img src="<?php echo $banner; ?>" alt="" />
  29. <h1><span><?php echo $woo_options['woo_homepage_banner_headline']; ?></span></h1>
  30. <div class="description"><?php echo wpautop($woo_options['woo_homepage_banner_standfirst']); ?></div>
  31. </div>
  32.  
  33. <?php } ?>
  34.  
  35. <div id="content" class="col-full <?php if ( $woo_options[ 'woo_homepage_banner' ] == "true" ) echo 'with-banner'; ?> <?php if ( $woo_options[ 'woo_homepage_sidebar' ] == "false" ) echo 'no-sidebar'; ?>">
  36.  
  37. <?php woo_main_before(); ?>
  38.  
  39. <section id="main" class="col-left">
  40.  
  41. <?php mystile_homepage_content(); ?>
  42.  
  43. <?php woo_loop_before(); ?>
  44.  
  45. <?php if ( $woo_options[ 'woo_homepage_blog' ] == "true" ) {
  46. $postsperpage = $woo_options['woo_homepage_blog_perpage'];
  47. ?>
  48.  
  49. <?php
  50.  
  51. $the_query = new WP_Query( array( 'posts_per_page' => $postsperpage ) );
  52.  
  53. if ( have_posts() ) : $count = 0;
  54. ?>
  55.  
  56. <?php /* Start the Loop */ ?>
  57. <?php while ( $the_query->have_posts() ) : $the_query->the_post(); $count++; ?>
  58.  
  59. <?php
  60. /* Include the Post-Format-specific template for the content.
  61. * If you want to overload this in a child theme then include a file
  62. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  63. */
  64. get_template_part( 'content', get_post_format() );
  65. ?>
  66.  
  67. <?php
  68. endwhile;
  69. // Reset Post Data
  70. wp_reset_postdata();
  71. ?>
  72.  
  73.  
  74.  
  75. <?php else : ?>
  76.  
  77. <article <?php post_class(); ?>>
  78. <p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
  79. </article><!-- /.post -->
  80.  
  81. <?php endif; ?>
  82.  
  83. <?php } // End query to see if the blog should be displayed ?>
  84.  
  85. <?php woo_loop_after(); ?>
  86.  
  87. </section><!-- /#main -->
  88.  
  89. <?php woo_main_after(); ?>
  90.  
  91. <?php if ( $woo_options[ 'woo_homepage_sidebar' ] == "true" ) get_sidebar(); ?>
  92.  
  93. </div><!-- /#content -->
  94.  
  95. <?php get_footer(); ?>
rad11
http://jsfiddle.net/ajdt8hex/
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.