A
A
AXDim2015-11-02 18:12:09
JavaScript
AXDim, 2015-11-02 18:12:09

The javascript call is not working. I don't understand where the error is. Point out the error -?

In general, the essence of the problem is this, semantically, there seem to be no errors in the code, but the javascript function is not called.
\The header contains the jquery library
\The header contains the javascript function
\At the end of the body of the site there is a block with an onload call to this function.
However, the function is not called. I don’t understand what the... the situation is like this...
Here is the code
"

<!DOCTYPE html>
<html>
    <head>
        <title>Testa</title>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
        <style>
            /* --HERE insert html+/+css reset code!!!! -- */
            /* ----- */
            html {

            }
            body {

            }

            /* ----- */
            .div1ind {

            }
            .div1ind > * {

            }
            .div2ind {

            }
            .div2ind > * {

            }
            .div3ind {

            }
            .div3ind > * {

            }
            .div4ind{

            }
            .div4ind > * {

            }
            /* ----- */
            .adaptimgdivind {

            }
            .imgofdivind {

            }
            .h3ofdivind {

            }
            .pofdivind {

            }
            /* ----- */






        </style>

        <script type="text/javascript">
            function imgaltadder() {
                alert('func work;');
                $('img').each(function () {
                    $(this).attr('alt', 'Now is loading!').attr('title', 'Whis script work!!!!');
                });

            }
            ;




        </script>
    </head>
    <body>
        <div class="div1ind"> 
            <div class="adaptimgdivind" >
                <img src="http://www.wallpaperfly.com/thumbnails/detail/20130709/vocaloid%20blue%20eyes%20long%20hair%20heterochromia%20open%20mouth%20braids%20white%20hair%20purple%20eyes%20choker%20simple%20ba_www.wallmay.net_25.jpg" class="imgofdivind" />
            </div>
            <h3 class="h3ofdivind"> </h3>
            <p class="pofdivind"> </p>
        </div>
        <div class="div2ind">
            <div class="adaptimgdivind" >
                <img src="http://www.wallpaperfly.com/thumbnails/detail/20130709/vocaloid%20blue%20eyes%20long%20hair%20heterochromia%20open%20mouth%20braids%20white%20hair%20purple%20eyes%20choker%20simple%20ba_www.wallmay.net_25.jpg" class="imgofdivind" />
            </div>
            <h3 class="h3ofdivind"> </h3>
            <p class="pofdivind"> </p>

        </div>
        <div class="div3ind">
            <div class="adaptimgdivind" >
                <img src="http://www.wallpaperfly.com/thumbnails/detail/20130709/vocaloid%20blue%20eyes%20long%20hair%20heterochromia%20open%20mouth%20braids%20white%20hair%20purple%20eyes%20choker%20simple%20ba_www.wallmay.net_25.jpg" class="imgofdivind" />
            </div>
            <h3 class="h3ofdivind"> </h3>
            <p class="pofdivind"> </p>

        </div>
        <div class="div4ind">
            <div class="adaptimgdivind" >
                <img src="http://www.wallpaperfly.com/thumbnails/detail/20130709/vocaloid%20blue%20eyes%20long%20hair%20heterochromia%20open%20mouth%20braids%20white%20hair%20purple%20eyes%20choker%20simple%20ba_www.wallmay.net_25.jpg" class="imgofdivind" />
            </div>
            <h3 class="h3ofdivind"> </h3>
            <p class="pofdivind"> </p>

        </div>


        <div style="opacity:0;display:none;width:0px;height:0px;hidden;" id="scriptactivatorind" onload="imgaltadder()"></div>
    </body>
</html>

"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Bukreev, 2015-11-02
@AXDim

where is the function called?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question