Fikset så lightbox vises når man trykker på posten, ikke bare lenka

This commit is contained in:
Øyvind Bakkeli committed 2011-07-31 19:04:09 +02:00
1 parent fbcfbd8c47
commit ea916587ec
2 files changed
+15 -5

No files matched your search

+12 -5
View File
@@ -109,20 +109,27 @@ $j(function()
var modal_not_match = Array(/wp-admin/);
$j(".content .post [href],#header [href]").live('click',function(e)
$j(".content .post,#header [href]").live('click',function(e)
{
preModal = window.location.href;
e.preventDefault();
if($j(this).attr('href'))
href = this.href;
else
href = $j(this).find("[href]").attr('href');
for(var i = 0; i < modal_match.length; i++)
if(this.href.match(modal_match[i]))
if(href.match(modal_match[i]))
break;
if(i == modal_match.length) return;
for(var i = 0; i < modal_not_match.length; i++)
if(this.href.match(modal_not_match[i]))
if(href.match(modal_not_match[i]))
return;
showUrlModal(this.href);
e.preventDefault();
showUrlModal(href);
var href = this.href.substr(<?php echo strlen(home_url()) ?>);
window.location = window.location.href.split("#")[0] + "#" + href;
});