Jquery

From Wikanual

Jump to: navigation, search

Contents

jquery and INTERDUBS

You can use jquery libraries and code in your INTERDUBS client pages. This page is meant to be start point. Please get in touch if you can assist you further with this.

How to implement custom jquery code on your INTERDUBS client pages

You have full control over the HTML and CSS of your client pages via the configuration parameters 'html header' and 'html body'. Those reference other configuration parameters depending on the page they they will create.

In order to you use jquery libraries on your pages you have to change two configurations:


loading custom Libraries

The configuration called addtional jQuery Libraries is where the calls to load your libraries go. You write them just like you would write them in the html code. You can also place references to custom css files that go with the script in here. This is an example:

<link href="webcontent/flexcrollstyles.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src="webcontent/js/flexcroll.js"></script>  

Here the file flexcrollstyles.css and js/flexcroll.js will get loaded. You can not write these calls in the 'HTML header' configuration, since it comes before INTERDUBS loads the jquery library.

Upload location

If you like to host your scripts on our servers like in the above example then please get in touch. We can give you access to a subdirectory on our machines via ftp. In the example above this would be the webcontent folder


running initial code

Jquery libraries sometimes require you to run initialization code when the page has been loaded. You can run this code via the configuration addtional jQuery page ready code. This is an example (not related to the flexscroll.js above)

$j('.logo a').imagefit();

Please note that you only need to write a valid jQuery statement. The onLoad eventhandler etc will be added by INTERDUBS. Since we run jQuery in compatibility mode you have to replace the $() function call with $j().


Support

Jquery is really powerful. But things can get tricky quickly. We are happy to assist you with your needs. Also because we learn every time something new. And we are quiet happy about that.

So please get in touch and let us know how we can help.

Personal tools