BullGuard Antivirus Sale - 60% Off with openElement !
Forum openElement Homepage
Forum Home Forum Home >

openElement

> Element Editor
  New Posts New Posts RSS Feed - How to embed other .js for offline using?
  FAQ FAQ  Forum Search   Register Register  Login Login

How to embed other .js for offline using?

 Post Reply Post Reply
Author
Message
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 Août 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Topic: How to embed other .js for offline using?
    Posted: 12 Oct 2016 at 14:43
Dear OE team,

I want to use some other .js for offline using such as:
    jquery-ui 1.12.1
    jquery.mobile-1.4.5

How to embed these libraries into OE?

Thank you,

DJ
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group
Avatar

Joined: 31 Mai 2012
Status: Offline
Points: 5276
Post Options Post Options   Thanks (1) Thanks(1)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: 12 Oct 2016 at 16:52
Hi,

You can include JS files using a Code Block (Source) type HTML or OtherCode, position Header or EndBody or other. I suggest to put the JS files into Files/Other for them to be automatically uploaded, then add the code in to the Block:

<script src="Files/Other/jquery-ui-1.12.1.js"></script>

Back to Top
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 Août 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 2016 at 21:10
Hi,

In order to use the slider form, I put jquery.mobile.css and jquery.mobile.js into Other folder and add onto Header:
// example
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

It works but I have two problem.

1) After putting jquery.mobile, the javascript code of coping value from Range form to Text box form does not work anymore,

// example of the javascript code of coping value from Range form to Text box form
$('.Rrange  input').change(function(){
    $('.Rrange-mirror  input').val($(this).val()); // copy value from here to "mirror" field
}); // immediately run the code "on change"

2) After putting jquery.mobile.css, text box elements became bigger than before using.
Therefore, layout was broken.

How can I resolve these issuess?

Thank you in advance!!

DJ

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.11
Copyright ©2001-2012 Web Wiz Ltd.

This page was generated in 0,035 seconds.