开发者

use action in loaded page jquery

I have to pages

one Index.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dt开发者_运维问答d">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>index.html</title>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>

 <script src="js/jquery.tools.min.js"></script>

   <script type="text/javascript">

   $(document).ready(function() {

                       $("#content").load("pages/nieuws.php");
     $("a[rel]").overlay({

      expose: 'darkred',
      effect: 'apple',

      onBeforeLoad: function() {

       // grab wrapper element inside content
       var wrap = this.getContent().find(".contentWrap");

       // load the page specified in the trigger
       wrap.load(this.getTrigger().attr("href"));
      }

     });
     });


// --></script>
</head>
<body>
<div id="content"></div>
</body>
</html>

And i have a otherone that is the load pages nieuws.php

   <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Nieuws.php</title>

</head>
<body>
 <a href="pages/images/horeca1.jpg" rel="#overlay">
<img src="pages/images/horeca1.jpg" height="100" alt=""  border ="0"/>
</a>
</body>
</html>

The problem I face I can use the overlay action from nieuws.php


It is syntactically wrong to end up with basically the following structure:

<!doctype html>
<html>
    <head></head>
    <body>
        <div>
            <!doctype html>
            <html>
                <head></head>
                <body>
                    <a><img></a>
                </body>
            </html>
        </div>
    </body>
</html>

With other words, change nieuws.php to

<a href="pages/images/horeca1.jpg" rel="#overlay">
    <img src="pages/images/horeca1.jpg" height="100" alt=""  border ="0"/>
</a>

so that you end up with a correct HTML syntax:

<!doctype html>
<html>
    <head></head>
    <body>
        <div>
            <a><img></a>
        </div>
    </body>
</html>

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜