|
Hello, soory for my bad english i’m french,
Concrete example of what I would like to do: http://www.ruedeshommes.com/tee-shirt.php
When I put the mouse over “ajouter au panier” >>> displaying a ‘window’ floating.
I would like to implement a floating window that you can add to cart the product when i over the image of the product in the catalog.
The window would display via the event OnMouseOver image.
I started to code a popover with bootstrap and jquery library but had some difficulties to load php content in my popover
My script:
<script src="bootstrap/js/jquery-min.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script> <script> $(function (){ $("#pop").popover({ html: true, placement:'bottom', trigger:'hover', content: $('#content').html() }); }); </script>
And HTML part:
<body> <div class="container"> <br> <div class="well"> <a href="#" id="pop" class="btn btn-info" rel="popover" > <img src="image.jpg"/></a> </div> // event onmouseover on this image </div>
<div id="content" style="display: none"> <?php echo 'Choose size: ...'; ?> <?php echo 'Quantity: ....'; ?> // php content of the popover: i need to collect size and stock left of the product // but php content don't show in the popover </div>
Any advice ? Thanks for help
|