Giter Site home page Giter Site logo

$.afui.loadContent issue about appframework HOT 4 OPEN

mrwrighty avatar mrwrighty commented on July 27, 2024
$.afui.loadContent issue

from appframework.

Comments (4)

icrisu avatar icrisu commented on July 27, 2024 1

I found the solution / workaround for this one, it seems that if you don't pass an anchor param to the loadContent method on line 667 it tries to create an anchor

anchor = anchor || document.createElement("a"); //Hack to allow passing in no anchor

however it fails, so what you need to do is pass the ID of an existing anchor from the dom, or create one than.

Basically you need to do something like:

AppetitMobileApp.prototype.openItem = function(itemID) { $.afui.loadContent("#item", false, false, 'up-reveal', '#test'); };

The last param "#test" is the ID of the anchor.

Cheers!

from appframework.

icrisu avatar icrisu commented on July 27, 2024

I have a similar problem, loadContent does not seem to work properly:
$.afui.loadContent('#item'); af.ui.js:983 Uncaught TypeError: from.end(...).run is not a function(…)

the seems to come from line 983-> }).run(transition+"-out");

from appframework.

GitCod-Man avatar GitCod-Man commented on July 27, 2024

@icrisu I have the same problem! but when I pass the ID of an existing anchor and test it , loadContent does not seem to work properly: TypeError: anchor.getAttribute is not a function
var forceRefresh=anchor.getAttribute("data-refresh");
do you have this problem ?

from appframework.

icrisu avatar icrisu commented on July 27, 2024

@GitCod-Man the above has worked for me, sorry I did not have your problem. As I recall I have dynamically created a div with an generated ID, and it worked.

from appframework.

Related Issues (20)

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.