GithubHelp home page GithubHelp logo

Comments (7)

rista404 avatar rista404 commented on August 22, 2024 1

$.browser was removed from jQuery starting with version 1.9.

You can add this code before jFeed plugin.

jQuery.browser = {};
(function () {

    jQuery.browser.msie = false;
    jQuery.browser.version = 0;

    if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
        jQuery.browser.msie = true;
        jQuery.browser.version = RegExp.$1;
    }
})();

Hope this helps, cheers!
Cheers!

from jfeed.

vanduc1102 avatar vanduc1102 commented on August 22, 2024

Thanks,I will try.

from jfeed.

Calosha avatar Calosha commented on August 22, 2024

solution doesn't work in
`JFeed.prototype = {

type: '',
version: '',
title: '',
link: '',
description: '',
parse: function(xml) {

    if (jQuery.browser.msie) {
        var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
        xmlDoc.loadXML(xml);
        xml = xmlDoc;
    }

    if (jQuery('channel', xml).length == 1) {

        this.type = 'rss';
        var feedClass = new JRss(xml);

    } else if (jQuery('feed', xml).length == 1) {

        this.type = 'atom';
        var feedClass = new JAtom(xml);
    }

    if (feedClass) jQuery.extend(this, feedClass);
}

};jQuery.browser.msie is undefined?! any ideas why? I declared jQuery.browser = {};
(function () {

jQuery.browser.msie = false;
jQuery.browser.version = 0;

if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
    jQuery.browser.msie = true;
    jQuery.browser.version = RegExp.$1;
}

})();` before the plug-in

from jfeed.

kintaro1981 avatar kintaro1981 commented on August 22, 2024

@Calosha in my case it worked

I simply added that code after:

 <script type="text/javascript">

from jfeed.

iamrutvik avatar iamrutvik commented on August 22, 2024

Add this function on the top of the file

`function detectIE() {
var ua = window.navigator.userAgent;

// Test values; Uncomment to check result …

// IE 10
// ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';

// IE 11
// ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';

// Edge 12 (Spartan)
// ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';

// Edge 13
// ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';

var msie = ua.indexOf('MSIE ');
if (msie > 0) {
    // IE 10 or older => return version number
    return true;
}

var trident = ua.indexOf('Trident/');
if (trident > 0) {
    // IE 11 => return version number
    var rv = ua.indexOf('rv:');
    return true;
}

var edge = ua.indexOf('Edge/');
if (edge > 0) {
    // Edge (IE 12+) => return version number
    return false;
}

// other browser
return false;

}`

Replace jQuery.browser.msie to detectIE() in whole file.

from jfeed.

iamrutvik avatar iamrutvik commented on August 22, 2024

copy it from "function detectIE() " this line. I dont know why they printed outside code block

from jfeed.

Kriel avatar Kriel commented on August 22, 2024

You can also simply use the jQuery Migrate plugin which is for this intended use case. See https://github.com/jquery/jquery-migrate/tree/1.x-stable#readme.

from jfeed.

Related Issues (12)

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.