Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <div id="item-list">
- <ul>
- <?php
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) { ?>
- <li>
- <a class="expand">
- <div class="right-arrow">+</div>
- <div style=" height: 217px;
- width: 400px;
- float: left;
- margin: 0 15px 0 0; background: url(http://balkan-elite.info/ucp/assets/vozila/<?php echo $row['ID'];?>.jpg) top left no-repeat;"></div>
- <h2><?php echo $row['Name'];?></h2>
- <span>Model ID: <?php echo $row['ID'];?></span>
- </a>
- <div class="detail">
- <div><span>Kategorija: <?php echo $row['Category'];?></span></div>
- <div><span>Maksimalna brzina: <?php echo $row['Speed'];?></span></div>
- <div><span>Ukupno vozila na serveru: <?php echo $row['count(Model)'];?></span></div>
- <div><span>Prosjecna cijena: <?php echo number_format($row['AVG(Cijena)']);?>$</span></div>
- <!--<span class="button">Vise informacija</span> -->
- </div>
- </li>
- <?php
- }
- } else {
- echo "Dogodila se pogreska";
- }
- ?>
- </ul>
- </div>
- <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
- <script>
- $(function() {
- $(".expand").on( "click", function() {
- $(this).next().slideToggle(100);
- $expand = $(this).find(">:first-child");
- if($expand.text() == "+") {
- $expand.text("-");
- } else {
- $expand.text("+");
- }
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement