| 4 |
lars |
1 |
<script>
|
|
|
2 |
$(document).ready(function(){
|
|
|
3 |
|
|
|
4 |
var suchbegriff = "";
|
|
|
5 |
$("#suchbegriff").autocomplete({
|
|
|
6 |
|
|
|
7 |
source: "/source/includes/content/search.php?autocomplete=true",
|
|
|
8 |
minLength: 1,
|
|
|
9 |
open: function(event, ui) {
|
|
|
10 |
|
|
|
11 |
$(".ui-autocomplete").css("z-index", 999999999999999999);
|
|
|
12 |
$(".ui-autocomplete").css("text-align", "left");
|
|
|
13 |
},
|
|
|
14 |
select: function( event, ui ) {
|
|
|
15 |
var link = ui.item.link;
|
|
|
16 |
window.location = ui.item.link;
|
|
|
17 |
},
|
|
|
18 |
focus: function(event, ui) {
|
|
|
19 |
event.preventDefault();
|
|
|
20 |
$("#suchbegriff").val(ui.item.label);
|
|
|
21 |
}
|
|
|
22 |
}).autocomplete( "instance" )._renderItem = function( ul, item ) {
|
|
|
23 |
return $( '<li></li>' ).data( "item.autocomplete", item )
|
|
|
24 |
.append( "<a href="+ item.link +"><div class='searchBild'><img src='" + item.icon + "' style='max-width:60px;'/></div><span class='searchLabel'>" + item.label+ "</span><div class='searchPreis'>"+ item.preis +"</div></a>" )
|
|
|
25 |
.appendTo( ul );
|
|
|
26 |
};
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
$('#suchbegriff').focus(function() {
|
|
|
30 |
$('#topinfo .search').css("width","450px");
|
|
|
31 |
});
|
|
|
32 |
$('#suchbegriff').blur(function() {
|
|
|
33 |
$('#topinfo .search').css("width","205px");
|
|
|
34 |
});
|
|
|
35 |
|
|
|
36 |
});
|
|
|
37 |
</script>
|
|
|
38 |
<div class="search">
|
|
|
39 |
<div id="suggest">
|
|
|
40 |
<form name="search" id="search" action="/index.php" method="get" enctype="application/x-www-form-urlencoded">
|
|
|
41 |
<input autocomplete="off" id="suchbegriff" type="text" name="search" value="{$smarty.get.search}" placeholder="Was suchst du?" />
|
|
|
42 |
<input type="submit" name="searchSubmit" id="searchSubmit" value=""/>
|
|
|
43 |
|
|
|
44 |
</form>
|
|
|
45 |
</div>
|
|
|
46 |
{*
|
|
|
47 |
<div class="social">
|
|
|
48 |
<div>Besuche uns auch hier: </div>
|
|
|
49 |
<div><a href="https://www.instagram.com/pieper_zeltdepot/" target="_blank"><img src="/images/logos/instagram.png"></a></div>
|
|
|
50 |
<div><a href="https://www.youtube.com/channel/UCVXgjwywU_gqW40GokNY55w" target="_blank"><img src="/images/logos/youtube.png"></a></div>
|
|
|
51 |
<div><a href="https://de-de.facebook.com/pieper.freizeit/" target="_blank"><img src="/images/logos/fb.png"></a></div>
|
|
|
52 |
|
|
|
53 |
</div>
|
|
|
54 |
*}
|
|
|
55 |
</div>
|