Loading...
 
Useful ?
(1)
(0)
Useful ?
1 : Yes
0 : No

Custom Code HowTo - jQuery 

This HowTo shows briefly how to add custom jQuery stuff, which is not included in Tiki ( sorry guys, we cannot include all ;) ).

LavaLamp jQuery Plugin Example 

To ensure the main jQuery JavaScript is loaded before any custom jQuery scripts that you want to add to your site and to ensure that they will always load (dependencies) and work properly, you should use the Tiki's Smarty jq block and get the scripts nested using the jQuery $.getScript() function. Then just put your desired jQuery code inside. For example you can put this in the Admin > Look & Feel > General Layout > "Custom End of <body> Code" textarea:

{jq}
$.getScript('files/custom/jquery.easing.min.js', function() {
  $.getScript('files/custom/jquery.lavalamp.min.js', function() {
    $(".cssmenu_horiz").lavaLamp({
                                    fx: "backout",
                                    speed: 800
    });
  });
});
{/jq}


Note: for Tiki versions prior to Tiki 6 use $jq prefix instead of just $.

Assuming that you have saved the files in files/custom/jquery.easing.min.js and files/custom/jquery.easing.min.js, you have enabled jQuery and that you want to apply the LavaLamp "backout" effect on your top horizontal CSS menu the code above is all you should need, along with the CSS rules from lavalamp_test.css as required for the hover background image, etc. For more information about the The LavaLamp jQuery Plugin go to http://nixbox.com/projects/jquery-lavalamp/demos.php .

For comparison, this is from the original LavaLamp demo page:

<script type="text/javascript" src="jquery-1.2.3.min.js"></script>
    <script type="text/javascript" src="jquery.easing.min.js"></script>
    <script type="text/javascript" src="jquery.lavalamp.min.js"></script>
    <script type="text/javascript">
        $(function() {
            $("#1, #2, #3").lavaLamp({
                fx: "backout",
                speed: 700,
                click: function(event, menuItem) {
                    return false;
                }
            });
        });
    </script>


Related 

You can create styles/custom.js or styles/yourtheme/custom.js and that should get included automatically. You may need to empty your Tiki cache.


Page last modified on Friday 24 August, 2012 01:24:10 GMT-0000

doc.tiki.org

Bootstrap AdminGuide UserGuide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Trackers
Transitions
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki
Show PHP error messages