Git Product home page Git Product logo

Comments (9)

adeelejaz avatar adeelejaz commented on June 2, 2024

Yep, still alive and kicking :)

The error seems to point towards the plugin file not being included. Have you included the jquery.ae.image.resize.min.js file? Please make sure it is appears in the HTML below the jQuery file. Is it possible for me to have a look?

from jquery-image-resize.

Kaby avatar Kaby commented on June 2, 2024

Hey ! thanks for the quick reply ! Actually yes I included the jquery.ae.image.resize.min.js file: I see it in the head and have an error when I delete a ";" or so...

I have nothing online to show yet, and I think I'll use css property min-height for now as I have no issue yet with that full css solution wich seems to be enough for my need (and because this uncaught error made me crazy)

Anyway thanks for your reply and sorry about using your time when I went for an other solution.

Thanks aswell for offering public plugins I really admire it as a junior developper.

Best regards

from jquery-image-resize.

adeelejaz avatar adeelejaz commented on June 2, 2024

If you don't care about IE6 support then I highly recommend the CSS version here:
http://adeelejaz.com/blog/resize-image-without-using-javascript-or-jquery/

from jquery-image-resize.

lesagefarid avatar lesagefarid commented on June 2, 2024

I try jquery.ae.image.resize, i was satisfied about until i do refresh page. When i refresh the page the jquery code don't recognize the plugin.
msg error: ae.image.resize unknown

All is fine when i run the code but wen I make refresh from the four browser(ie, chrome, firefox & opera).
capture

code:

 var wWidth, hHeight;
            var path = window.location.href;
            var file = path.substring(path.lastIndexOf("/") + 1, path.legth);
            path = path.replace(file, 'ImgstxtTab/imgs');
            var extImgLow = ".jpg";
            var wImg, hImg, ref, ratio = 0;
            $.ajax({
                url: path,
                async: false,
                success: function (data) {
                    $("#tThumbnail").empty();
                    $(data).find('a:contains(' + extImgLow + ')').each(function (index, value) {
                        var imgPath = path + "/tab" + parseInt(index + 1) + ".jpg";
                        var id = '"img' + parseInt(index + 1) + '"';
                        var img = $("<img />").attr('src', imgPath)
                            .load(function () {
                                if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
                                    setPageError("Tableaux getImages", "index.html", "Image incorrect!");
                                    return false;
                                } else {
                                    wWidth = this.naturalWidth;
                                    hHeight = this.naturalHeight;
                                    ratio = wWidth / hHeight;
                                    if (wWidth > hHeight) { wImg = '150px;'; hImg='130px;'; }
                                    else if (wWidth < hHeight) {wImg = '110px;';hImg = '150px;';}
                                    else if (wWidth == hHeight) {wImg = '150px;';hImg = '150px;';}
                                }
                                var row = '<tr><td><img id=' + id + ' src="' + imgPath +
                                    '" style="width:' +wImg + 'height:'+hImg + 'marging-top:2px;cursor:pointer;"' +
                                    ' data-width=' + this.naturalWidth + ' data-height=' + this.naturalHeight +
                                    '/></td></tr>';
  console.log(row);
                                $("#tThumbnail").append(row);
                                $("#divdDetails").load("ImgstxtTab/txt/tab1.html", function (responseTxt, statusTxt, xhr) {
                                    if (statusTxt == "success") {
                                        $("#divdDetails").show();
                                    }
                                    else {
                                        setPageError("Tableaux Load tab1.html", "index.html", xhr.status + ": " + xhr.statusText + "\n" + path)
                                    }
                                });

                                var selector = $("#tThumbnail").find('img');
                                selector.aeImageResize({width:150, height:150});
                                $("#imgZoom").attr('src', selector.attr('src'));
                                $("#divPlayer").attr('width', this.naturalWidth);
                                $("#divPlayer").attr('height', this.naturalHeight);
                                $("#divPlayer").show();
                                $("#imgZoom").attr('width', this.naturalWidth);
                                $("#imgZoom").attr('height', this.naturalHeight);
                                $("#imgZoom").show({ effect: 'drop', duration: 1000 });
                            });//load(function ()
                    });//each(function (index, value)
                }, //success

                error: function (err) {
                    setPageError("Tableaux getImages", "index.html", xhr.status + ": " + xhr.statusText )
                }
            });

from jquery-image-resize.

adeelejaz avatar adeelejaz commented on June 2, 2024

This isn't an issue with the script but the actual way you are including the jQuery and my plugin on the page. Can you please post the <script src="..."></script> tags? Specifically in the order they are included on the website.

Can you also confirm you are getting this error on Chrome and Firefox when you refresh? Or is this for IE only?

from jquery-image-resize.

lesagefarid avatar lesagefarid commented on June 2, 2024

ok I tested under (ie, safari , chrome, firefox & opera)
the plugin don't work only in IE11.
NB: script loaded:

    <script type="text/javascript" src="scripts/master.js"></script>  //mine js
    <script type="text/javascript" src="scripts/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="scripts/jquery-ui-1.11.2.js"></script>
    <script type="text/javascript" src="scripts/jquery.ae.image.resize.js"></script>

I am inserting console. in my code to evaluate why that happend in IE.
hope to find this I will feddback.
Thank for your quick response.

from jquery-image-resize.

lesagefarid avatar lesagefarid commented on June 2, 2024

script order:
src="scripts/master.js" //this my js
src="scripts/jquery-2.0.3.min.js
src="scripts/jquery-ui-1.11.2.js"
src="scripts/jquery.ae.image.resize.js"
It seams that the last comment din't accept the tag script.

from jquery-image-resize.

adeelejaz avatar adeelejaz commented on June 2, 2024

Can you move try by moving your script, master.js below the library? The reason behind is that when you when you reload the page, the scripts are fetched from the cache and the master.js can fire before the others scripts are loaded.

The code you posted, is it in the master.js file?

from jquery-image-resize.

lesagefarid avatar lesagefarid commented on June 2, 2024

Yes that's fine. I tested again from all browsers and specially three times with ie.
I appreciate your plugin, its save a lot of work.
Many thanks for your help.

from jquery-image-resize.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.