Hur gör jag om jag vill få in php
script där det nu är html (vid div, h4, img och texten vill jag alltså kunna använda php script.
Ett stycke javascript-kod:
<script type="text/javascript">
$(function() {
$('a').hover(function(e) {
var html = '<div id="info">';
html += '<h4>Text</h4>';
html += '<img src="image.jpg" alt="image" />';
html += '<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>';
html += '</div>';
$('body').append(html).children('#info').hide().fadeIn(400);
$('#info').css('top', e.pageY + -20).css('left', e.pageX + 40);
}, function() {
$('#info').remove();
});
$('a').mousemove(function(e) {
$('#info').css('top', e.pageY + -20).css('left', e.pageX + 40);
});
});
</script>
Ingen status