JQuery не работает с электронной платформойJquery

Программирование на jquery
Ответить
Anonymous
 JQuery не работает с электронной платформой

Сообщение Anonymous »

Я пытаюсь использовать jquery с электронной платформой, используя электронную скрипку.
Однако jquery, похоже, не работает должным образом, и анимация не выполняется.
Пример следующий: https://www.w3schools .com/jquery/tryit.asp?filename=tryjquery_animation1
main.js

Код: Выделить всё

// Modules to control application life and create native browser window

const {app, BrowserWindow} = require('electron')

function createWindow () {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
})

// and load the index.html of the app.
mainWindow.loadFile('index.html')

// Open the DevTools.
// mainWindow.webContents.openDevTools()
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)

// Quit when all windows are closed.
app.on('window-all-closed', function () {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit()
}
})

app.on('activate', function () {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
index.html

Код: Выделить всё




Hello World!

window.$ = window.jQuery = require('https://code.jquery.com/jquery-3.3.1.slim.min.js');


$(document).ready(function(){
$("button").click(function(){
$("div").animate({left: '250px'});
});
});





Start Animation


// You can also require other files to run in this process
require('./renderer.js')




После нажатия кнопки ничего не происходит.


Подробнее здесь: https://stackoverflow.com/questions/635 ... -framework
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Jquery»