Giter VIP home page Giter VIP logo

Comments (3)

triskweline avatar triskweline commented on May 28, 2024

I'm afraid I cannot reproduce the issue.

Unpoly is not using localStorage.

Can you provide a minimal example to reproduce?

from unpoly.

mithereal avatar mithereal commented on May 28, 2024

sorry disregard i fixed the issue, however i have one that might be related or at least not documented i need to attach event handelers to a modal created with up-modal the html which is loaded as a partial via vanilla ajax looks like this
`



Bed Room

the modal works but i cannot attach event handelers
the modal thats inserted is

My House
Living Room
        <div class="room_block">
            <img src="">
            <label>Bed Room</label>
        </div>


        <div class="room_block">
            <img src="">
            <label>Bed Room</label>

        </div>

        <div class="room_block">
            <img src="">
            <label>Bed Room</label>

        </div>
Available Rooms
Kitchen
<div class="room_block">
    <img src="room.image">
    <label>Bedroom</label>
` the js i have tried is ` $(document).on("click",'.room_block', function(){ alert('clicked'); }); ` however it never fires all my scripts are on a layout page the only thing i am changing is the content block with ajax

from unpoly.

triskweline avatar triskweline commented on May 28, 2024

Although the canonical way to hook up scripts in Unpoly is using compilers, I see no reason why your event handler wouldn't fire.

Are you sure the line $(document).on(...) is executed?

from unpoly.

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.