Jade and jQuery together

Folks; How to implement jQuery styles in the form that I create with Jade? What I'm trying to do is form prettifyand make them interactive. I am terrible in the user interface. period.

How would I implement this selection method in a form? http://jqueryui.com/selectable/

pendingArrayis an array of JSON objects coming from Express. You just need to draw it and make it interactive. After clicking, I would like to open a popup so that I can POST for my api with ... As a software programmer, this user interface material is completely turned over, since I never spend time in this void.

page.jade:

include mainNavMenu

body
    h1= title
    p#container Welcome to #{title}
    p#message (to be filled in)
    script
        alert('hello world');
        $("#message").html("message set through jquery")

block Content

if (pendingArray)
    - each val, key in pendingArray
        <h1>#{val}</h1>
+4
1

Jade jQuery, Jade JavaScript;)

JavaScript Jade. JavaScript . block in a tag, script:

script.
    alert('hello world');
    $("#message").html("message set through jquery")

:


. each - Jade, JavaScript, JavaScript, . /HTML, , . .

if pendingArray
    each item in pendingArray
        h1=val

:

+9

Source: https://habr.com/ru/post/1529709/


All Articles