You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 26-06-2013 10:45:29

thaufee
Member
Registered: 26-06-2013
Posts: 3

if i add js files in pages, the content hides automatically.

Hello bro,

If i have add any JavaScript file using

<script></script>

in my pages section. the content of the page will be hidden automatically. If i removes JS files, it works fine.

I need to know how to add js files in my pages. Help me bro.

Offline

#2 26-06-2013 11:38:15

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: if i add js files in pages, the content hides automatically.

Probably the content doesn't hide, but the page "crashes". Check the chrome console (press F12 -> click on the tab "console") to see if their are any javascript errors and report them here. Probably the script you're trying to use doesn't play well with the scripts used in the template.

Offline

#3 26-06-2013 11:52:42

thaufee
Member
Registered: 26-06-2013
Posts: 3

Re: if i add js files in pages, the content hides automatically.

If the script i was trying to use doesn't play well with the scripts used in the template, what it should i do now bro ? <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
this is what i have added in my page. help me bro!

Offline

#4 26-06-2013 12:57:55

thaufee
Member
Registered: 26-06-2013
Posts: 3

Re: if i add js files in pages, the content hides automatically.

is this the error i got.

Uncaught TypeError: Object [object Object] has no method 'datepicker'

Offline

#5 26-06-2013 13:08:43

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: if i add js files in pages, the content hides automatically.

Check the jquery ui I made for this template;


This is a theme I created for jQuery UI. It's by far not perfect, but should be usable.

Check it at http//metro-webdesign.info/#!/jQueryUI

Requires template v3.0.3

Download: https://www.dropbox.com/s/q9ylcufluxktuya/jqueryui.zip

How to use: put the 'jqueryui' folder in your root directory. Put the 'jqueryui-page.php' in the pages folder. Now create a tile that links to that page (add the page in your pageLink array in the config.js). You can also try to test the page by going to yoursite.com/#!/jqueryui-page , it can work.
Check the source of the jqueryui-page.php how to use some of these widgets on your pages.

Tip: go to the jqueryui webpage and grab your own custom version of jqueryui . You can select the elements that should be included. In the version you download here, everything is included, leading into a very very heavy JS file. If you don't need the sliders or drag & drop things or whatever, you can leave that out. When you've downloaded your custom jqueryui file, open the zip and go to the js folder and get the "jquery-ui-1.8.24.custom.min.js" file (if the version number is different, just change the name to 1.8.24 so it stays working). Put that file in your jqueryui/js folder in your site's root folder.

Offline

Board footer

Powered by FluxBB