Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Question about how to resize a Background

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #29132
    hotrun
    Member

    I read this:

    https://css-tricks.com/how-to-resizeable … und-image/

    Amazing, but how can I find the codes linked in this example:

    Second Attempt (better)

    ***This two links… Are them libraries ? Or what? How can I find them??****

    <script type="text/javascript"src="/js/jquery.js"></script>
    <script type="text/javascript"src="/js/jquery.dimensions.js"></script>

    **************************************************************************************
    <script type="text/javascript">
    $(document).ready(function() {
    var $winwidth = $(window).width();
    $("img.source-image").attr({
    width: $winwidth
    });
    $(window).bind("resize", function(){
    var $winwidth = $(window).width();
    $("img.source-image").attr({
    width: $winwidth
    });
    });
    });
    </script>

    Many thx!!!!!!

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.