Commit 7b57ba3c authored by dimitri's avatar dimitri


parent 465c47b8
Please read the installation section of the manual
( for instructions.
Dimitri van Heesch (02 April 2013)
Dimitri van Heesch (12 May 2013)
......@@ -82,7 +82,7 @@ pdf: docs
DISTFILES = Doxyfile libmd5 addon tmake doc examples bin lib objects \
qtools src configure configure.bin \ INSTALL LANGUAGE.HOWTO LICENSE PLATFORMS \
VERSION packages winbuild
VERSION packages winbuild jquery
archive: clean
tar zcvf dx`date +%y%m%d`.tgz $(DISTFILES)
Please read INSTALL for compilation instructions.
......@@ -26,4 +26,4 @@ forum.
Dimitri van Heesch ( (02 April 2013)
Dimitri van Heesch ( (12 May 2013)
......@@ -270,11 +270,18 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
child = elem.firstChildElement();
while (!child.isNull())
QString setting = child.attribute(SA("setting"));
QString dependsOn = child.attribute(SA("depends"));
QString id = child.attribute(SA("id"));
if (!dependsOn.isEmpty())
if (!dependsOn.isEmpty() &&
(setting.isEmpty() || IS_SUPPORTED(setting.toAscii())))
Input *parentOption = m_options[dependsOn];
if (parentOption==0)
printf("%s has depends=%s that is not valid\n",
Input *thisOption = m_options[id];
......@@ -43,6 +43,8 @@ void InputBool::setEnabled(bool b)
m_enabled = b;
......@@ -69,7 +71,7 @@ void InputBool::setValue( bool s )
void InputBool::updateDefault()
if (m_state==m_default)
if (m_state==m_default || !m_lab->isEnabled())
......@@ -17,6 +17,15 @@
#include <QtGui>
class NoWheelSpinBox : public QSpinBox
void wheelEvent(QWheelEvent *e)
InputInt::InputInt( QGridLayout *layout,int &row,
const QString & id,
int defVal, int minVal,int maxVal,
......@@ -24,7 +33,7 @@ InputInt::InputInt( QGridLayout *layout,int &row,
: m_default(defVal), m_minVal(minVal), m_maxVal(maxVal), m_docs(docs), m_id(id)
m_lab = new HelpLabel(id);
m_sp = new QSpinBox;
m_sp = new NoWheelSpinBox;
......@@ -56,7 +65,14 @@ void InputInt::setValue(int val)
m_val = val;
m_value = m_val;
if (m_val==m_default)
void InputInt::updateDefault()
if (m_val==m_default || !m_lab->isEnabled())
......@@ -72,6 +88,7 @@ void InputInt::setEnabled(bool state)
QVariant &InputInt::value()
......@@ -56,6 +56,7 @@ class InputInt : public QObject, public Input
void showHelp(Input *);
void updateDefault();
QLabel *m_lab;
QSpinBox *m_sp;
int m_val;
......@@ -19,6 +19,16 @@
#include <QtGui>
class NoWheelComboBox : public QComboBox
void wheelEvent(QWheelEvent *e)
InputString::InputString( QGridLayout *layout,int &row,
const QString & id, const QString &s,
StringMode m, const QString &docs,
......@@ -30,7 +40,7 @@ InputString::InputString( QGridLayout *layout,int &row,
if (m==StringFixed)
layout->addWidget( m_lab, row, 0 );
m_com = new QComboBox;
m_com = new NoWheelComboBox;
layout->addWidget( m_com, row, 1, 1, 3, Qt::AlignLeft );
......@@ -95,7 +105,13 @@ void InputString::setValue(const QString &s)
m_str = s;
m_value = m_str;
if (m_str==m_default)
void InputString::updateDefault()
if (m_str==m_default || !m_lab->isEnabled())
......@@ -114,6 +130,7 @@ void InputString::setEnabled(bool state)
if (m_le) m_le->setEnabled(state);
if (m_br) m_br->setEnabled(state);
if (m_com) m_com->setEnabled(state);
void InputString::browse()
......@@ -72,6 +72,7 @@ class InputString : public QObject, public Input
void help();
void updateDefault();
QLabel *m_lab;
QLineEdit *m_le;
QToolBar *m_br;
......@@ -141,6 +141,7 @@ void InputStrList::setEnabled(bool state)
if (m_brFile) m_brFile->setEnabled(state);
if (m_brDir) m_brDir->setEnabled(state);
void InputStrList::browseFiles()
......@@ -222,7 +223,7 @@ void InputStrList::update()
void InputStrList::updateDefault()
if (m_strList==m_default)
if (m_strList==m_default || !m_lab->isEnabled())
......@@ -20,7 +20,7 @@ doxygen_version_minor=8
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......@@ -42,6 +42,7 @@ f_search=NO
while test -n "$1"; do
case $1 in
......@@ -105,6 +106,10 @@ while test -n "$1"; do
--with-libclang | -with-libclang)
--with-libclang-static | -with-libclang-static)
-h | -help | --help)
......@@ -122,7 +127,8 @@ if test "$f_help" = y; then
Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--flex name] [--bison name] [--make name]
[--dot name] [--platform target] [--prefix dir] [--docdir dir]
[--install name] [--english-only] [--enable-langs list] [--with-sqlite3]
[--install name] [--english-only] [--enable-langs list]
[--with-sqlite3] [--with-libclang]
[--with-doxywizard] [--with-doxysearch] [--with-doxyapp]
......@@ -156,7 +162,7 @@ Options:
--enable-langs list Include support for output languages listed in list.
[default: $f_langs]
--with-sqlite3 Add support for sqlite3 output [experimental]
--with-libclang Add support for libclang parsing [experimental]
--with-libclang Add support for libclang parsing
--with-doxywizard Build the GUI frontend for doxygen. This
requires Qt version 4.
--with-doxysearch Build external search tools (doxysearch and doxyindexer)
......@@ -450,7 +456,11 @@ if test "$f_libclang" = YES; then
printf " Checking for libclang ... "
libclang_hdr_dir="/usr/include /usr/local/include /opt/local/include"
libclang_lib_dir="/usr/lib /usr/local/lib /opt/local/lib"
libclang_lib_name=" libclang.dylib libclang.a"
if test "$f_libclangstatic" = NO; then
libclang_lib_name=" libclang.dylib libclang.a"
......@@ -465,7 +475,11 @@ if test "$f_libclang" = YES; then
for j in $libclang_lib_name; do
if test -f "$i/$j"; then
libclang_link="-L $i -lclang"
if test "$f_libclangstatic" = NO; then
libclang_link="-L $i -lclang"
libclang_link="$i/libLLVMBitReader.a $i/libLLVMMC.a $i/libLLVMMCParser.a $i/libLLVMSupport.a $i/libclang.a $i/libclangAST.a $i/libclangAnalysis.a $i/libclangBasic.a $i/libclangDriver.a $i/libclangEdit.a $i/libclangFrontend.a $i/libclangLex.a $i/libclangParse.a $i/libclangRewriteCore.a $i/libclangSema.a $i/libclangSerialization.a $i/libclangStaticAnalyzerCore.a"
......@@ -39,7 +39,7 @@ INPUT = index.doc install.doc starting.doc docblocks.doc
external.doc faq.doc trouble.doc features.doc \
doxygen_usage.doc doxywizard_usage.doc \
config.doc commands.doc htmlcmds.doc xmlcmds.doc language.doc \
perlmod.doc perlmod_tree.doc arch.doc
perlmod.doc perlmod_tree.doc arch.doc changelog.doc
FILE_PATTERNS = *.cpp *.h *.doc
EXAMPLE_PATH = ../examples
This diff is collapsed.
......@@ -2577,8 +2577,10 @@ class Receiver
HTML-only block.
\sa section \ref cmdmanonly "\\manonly", section
\ref cmdlatexonly "\\latexonly", and section
\ref cmdrtfonly "\\rtfonly".
\ref cmdlatexonly "\\latexonly", section
\ref cmdrtfonly "\\rtfonly", section
\ref cmdxmlonly "\\xmlonly", and
\ref cmddocbookonly "\\docbookonly".
\section cmdimage \\image <format> <file> ["caption"] [<sizeindication>=<size>]
......@@ -128,6 +128,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_extract_anon_nspaces EXTRACT_ANON_NSPACES
\refitem cfg_extract_local_classes EXTRACT_LOCAL_CLASSES
\refitem cfg_extract_local_methods EXTRACT_LOCAL_METHODS
\refitem cfg_extract_package EXTRACT_PACKAGE
\refitem cfg_extract_private EXTRACT_PRIVATE
\refitem cfg_extract_static EXTRACT_STATIC
\refitem cfg_file_patterns FILE_PATTERNS
......@@ -142,7 +143,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_generate_autogen_def GENERATE_AUTOGEN_DEF
\refitem cfg_generate_buglist GENERATE_BUGLIST
\refitem cfg_generate_chi GENERATE_CHI
\refitem cfg_generate_deprecatedlist GENERATE_DEPRECIATEDLIST
\refitem cfg_generate_deprecatedlist GENERATE_DEPRECATEDLIST
\refitem cfg_generate_docbook GENERATE_DOCBOOK
\refitem cfg_generate_docset GENERATE_DOCSET
\refitem cfg_generate_eclipsehelp GENERATE_ECLIPSEHELP
......@@ -282,13 +283,14 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_sort_member_docs SORT_MEMBER_DOCS
\refitem cfg_sort_members_constructors_first SORT_MEMBERS_CTORS_1ST
\refitem cfg_source_browser SOURCE_BROWSER
\refitem cfg_strict_proto_matching STRICT_PROTO_MATCHING
\refitem cfg_strip_code_comments STRIP_CODE_COMMENTS
\refitem cfg_strip_from_inc_path STRIP_FROM_INC_PATH
\refitem cfg_strip_from_path STRIP_FROM_PATH
\refitem cfg_subgrouping SUBGROUPING
\refitem cfg_symbol_cache_size SYMBOL_CACHE_SIZE
\refitem cfg_tab_size TAB_SIZE
\refitem cfg_tagfiles TAGFILES
\refitem cfg_tcl_subst TCL_SUBST
\refitem cfg_template_relations TEMPLATE_RELATIONS
\refitem cfg_toc_expand TOC_EXPAND
\refitem cfg_treeview_width TREEVIEW_WIDTH
......@@ -599,6 +601,14 @@ followed by the descriptions of the tags grouped by category.
will result in a user-defined paragraph with heading "Side Effects:".
You can put \\n's in the value part of an alias to insert newlines.
\anchor cfg_tcl_subst
<dt>\c TCL_SUBST <dd>
\addindex TCL_SUBST
This tag can be used to specify a number of word-keyword mappings (TCL only).
A mapping has the form "name=value". For example adding
"class=itcl::class" will allow you to use the command class in the
itcl::class meaning.
\anchor cfg_optimize_output_for_c
......@@ -682,34 +692,19 @@ page (for HTML and Man pages) or section (for LaTeX and RTF).
be useful for C code in case the coding convention dictates that all compound
types are typedef'ed and only the typedef is referenced, never the tag name.
\anchor cfg_symbol_cache_size
The \c SYMBOL_CACHE_SIZE determines the size of the internal cache use to
determine which symbols to keep in memory and which to flush to disk.
When the cache is full, less often used symbols will be written to disk.
For small to medium size projects (<1000 input files) the default value is
probably good enough. For larger projects a too small cache size can cause
doxygen to be busy swapping symbols to and from disk most of the time
causing a significant performance penalty.
If the system has enough physical memory increasing the cache will improve the
performance by keeping more symbols in memory. Note that the value works on
a logarithmic scale so increasing the size by one will roughly double the
memory usage. The cache size is given by this formula:
\f$2^{(16+\mbox{SYMBOL\_CACHE\_SIZE})}\f$. The valid range is 0..9, the default is 0,
corresponding to a cache size of \f$2^{16} = 65536\f$ symbols.
\anchor cfg_lookup_cache_size
Similar to the \c SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
The size of the symbol lookup cache can be
set using \c LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
their name and scope. Since this can be an expensive process and often the
same symbol appear multiple times in the code, doxygen keeps a cache of
same symbol appears multiple times in the code, doxygen keeps a cache of
pre-resolved symbols. If the cache is too small doxygen will become slower.
If the cache is too large, memory is wasted. The cache size is given by this
formula: \f$2^{(16+\mbox{LOOKUP\_CACHE\_SIZE})}\f$. The valid range is 0..9, the default is 0,
corresponding to a cache size of \f$2^{16} = 65536\f$ symbols.
At the end of a run doxygen will report the cache usage and suggest the
optimal cache size from a speed point of view.
......@@ -734,6 +729,12 @@ page (for HTML and Man pages) or section (for LaTeX and RTF).
If the \c EXTRACT_PRIVATE tag is set to \c YES all private members of a
class will be included in the documentation.
\anchor cfg_extract_package
If the \c EXTRACT_PACKAGE tag is set to \c YES all members with package
or internal scope will be included in the documentation.
\anchor cfg_extract_static
<dt>\c EXTRACT_STATIC <dd>
......@@ -878,6 +879,16 @@ function's detailed documentation block.
@note This option applies only to the class list, not to the
alphabetical list.
\anchor cfg_strict_proto_matching
If the \c STRICT_PROTO_MATCHING option is enabled and doxygen fails to
do proper type resolution of all parameters of a function it will reject a
match between the prototype and the implementation of a member function even
if there is only one candidate or it is obvious which candidate to choose
by doing a simple string match. By disabling \c STRICT_PROTO_MATCHING doxygen
will still accept a match between prototype and implementation in such cases.
\anchor cfg_sort_members_constructors_first
......@@ -23,7 +23,11 @@ doxygen [configName]
If - is used for configName doxygen will read from standard input.
4) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
4) Use doxygen to generate a template file controlling the layout of the generated documentation:
doxygen -l layoutFileName.xml
5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
doxygen \fB\-w\fR rtf styleSheetFile
......@@ -33,7 +37,7 @@ doxygen \fB\-w\fR html headerFile footerFile styleSheetFile [configFile]
LaTeX: doxygen \fB\-w\fR latex headerFile footerFile styleSheetFile [configFile]
5) Use doxygen to generate an rtf extensions file
6) Use doxygen to generate an rtf extensions file
doxygen \fB\-e\fR rtf extensionsFile
......@@ -83,6 +83,7 @@ Written by Dimitri van Heesch\\[2ex]
\chapter{Getting Started}\label{starting}\hypertarget{starting}{}\input{starting}
\chapter{Documenting the code}\label{docblocks}\hypertarget{docblocks}{}\input{docblocks}
\chapter{Including Formulas}\label{formulas}\hypertarget{formulas}{}\input{formulas}
\chapter{Graphs and diagrams}\label{diagrams}\hypertarget{diagrams}{}\input{diagrams}
......@@ -90,7 +91,6 @@ Written by Dimitri van Heesch\\[2ex]
\chapter{Automatic link generation}\label{autolink}\hypertarget{autolink}{}\input{autolink}
\chapter{Output Formats}\label{output}\hypertarget{output}{}\input{output}
\chapter{External Indexing and Searching}\label{extsearch}\hypertarget{extsearch}{}\input{extsearch}
\chapter{Customizing the Output}\label{customize}\hypertarget{customize}{}\input{customize}
\chapter{Custom Commands}\label{custcmd}\hypertarget{custcmd}{}\input{custcmd}
\chapter{Link to external documentation}\label{external}\hypertarget{external}{}\input{external}
......@@ -303,11 +303,4 @@ The fields for such an item have the following meaning:
- "fragments": an array with 0 or more fragments of text containing words that have been search for.
These words should be wrapped in `<span class="hl">` and `</span>` tags to highlight them
in the output.
Go to the <a href="customize.html">next</a> section or return to the
<a href="index.html">index</a>.
......@@ -188,7 +188,7 @@ when the translator was updated.
<td>Kim Taedong<br/>SooYoung Jung<br/>Richard Kim</td>
<td>fly1004 at gmail dot com<br/>jung5000 at gmail dot com<br/><span style="color: brown">[unreachable]</span></td>
<tr bgcolor="#ffffff">
......@@ -377,7 +377,7 @@ when the translator was updated.
JapaneseEn & see the Japanese language & {\tt\tiny ~} & English based \\
Korean & Kim Taedong & {\tt\tiny fly1004 at gmail dot com} & 1.8.02 \\
Korean & Kim Taedong & {\tt\tiny fly1004 at gmail dot com} & up-to-date \\
~ & SooYoung Jung & {\tt\tiny jung5000 at gmail dot com} & ~ \\
~ & Richard Kim & {\tt\tiny [unreachable] ryk at dspwiz dot com} & ~ \\
......@@ -185,9 +185,8 @@ has its own advantages and disadvantages:
Qt compressed help or CHM output, but it does require that Eclipse is
installed and running.
Go to the <a href="extsearch.html">next</a> section or return to the
Go to the <a href="customize.html">next</a> section or return to the
<a href="index.html">index</a>.
......@@ -10,7 +10,7 @@ Macedonian, Norwegian, Persian, Polish, Portuguese, Romanian, Russian,
Serbian, SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish,
Ukrainian, and Vietnamese.
Of them, 2 translators are up-to-date, 38 translators are based on
Of them, 3 translators are up-to-date, 37 translators are based on
some adapter class, and 2 are English based.
......@@ -20,6 +20,7 @@ and they implement all 250 of the required methods. Anyway, there
still may be some details listed even for them:
TranslatorKorean -- Change the base class to Translator.
TranslatorLatvian -- Reimplementation using UTF-8 suggested.
......@@ -53,9 +54,6 @@ must be implemented to become up-to-date:
Note: Change the base class to TranslatorAdapter_1_8_4.
TranslatorPolish 1.8.2 14 methods to implement (5 %)
TranslatorKorean 1.8.02 15 methods to implement (6 %)
Note: Change the base class to TranslatorAdapter_1_8_2.
TranslatorItalian 1.8.2 15 methods to implement (6 %)
TranslatorCroatian 1.8.2 15 methods to implement (6 %)
TranslatorChinese 1.8.2 15 methods to implement (6 %)
......@@ -112,8 +110,6 @@ must be implemented to become up-to-date:
Note: Reimplementation using UTF-8 suggested.
TranslatorArabic 1.4.6 56 methods to implement (22 %)
Note: Reimplementation using UTF-8 suggested.
The following translator classes derive directly from the
......@@ -816,28 +812,10 @@ TranslatorJapaneseEn (TranslatorEnglish) 245 methods to implement (98 %)
virtual QCString latexLanguageSupportCommand()
TranslatorKorean (TranslatorAdapter_1_7_5) 15 methods to implement (6 %)
TranslatorKorean (TranslatorAdapter_1_7_5)
Implements 235 of the required methods (94 %).
Missing methods (should be implemented):
virtual QCString trServices()
virtual QCString trClassMethods()
virtual QCString trProvidedByCategory()
virtual QCString trSingletonGeneratedFromFiles(bool single)
virtual QCString trServiceReference(const char * sName)
virtual QCString trDesignOverview()
virtual QCString trConstantGroups()
virtual QCString trMethodDocumentation()
virtual QCString trInterfaces()
virtual QCString trServiceGeneratedFromFiles(bool single)
virtual QCString trConstantGroupReference(const char * namespaceName)
virtual QCString trPanelSynchronisationTooltip(bool enable)
virtual QCString trExtendsClass()
virtual QCString trSingletonReference(const char * sName)
virtual QCString trInstanceMethods()
Implements 250 of the required methods (100 %).
TranslatorKoreanEn (TranslatorEnglish) 245 methods to implement (98 %)
MINIFIER = /usr/local/bin/yuicompressor-2.4.7
jquery.ui-$(JQUERY_UI_VERSION).core.js \
jquery.ui-$(JQUERY_UI_VERSION).widget.js \
jquery.ui-$(JQUERY_UI_VERSION).mouse.js \
jquery.ui-$(JQUERY_UI_VERSION).resizable.js \$(HASHCHANGE_VERSION)-hashchange.js \
RESULTS = jquery_p1.js jquery_p2.js jquery_p3.js jquery_ui.js jquery_fx.js
SCRIPTS_MIN = $(SCRIPTS:%.js=%-min.js)
all: $(RESULTS)
install: $(RESULTS)
cp $(RESULTS) ../src/
jquery_ui.js: scripts
cat jquery.ui-$(JQUERY_UI_VERSION).core-min.js \
jquery.ui-$(JQUERY_UI_VERSION).widget-min.js \
jquery.ui-$(JQUERY_UI_VERSION).mouse-min.js \
jquery.ui-$(JQUERY_UI_VERSION).resizable-min.js \$(HASHCHANGE_VERSION)-hashchange-min.js > jquery_ui.js
jquery_fx.js: scripts
cat jquery.scrollTo-$(SCROLL_VERSION)-min.js > jquery_fx.js
jquery_p1.js jquery_p2.js jquery_p3.js: scripts
perl jquery-$(JQUERY_VERSION)-min.js $@
scripts: $(SCRIPTS_MIN)
%-min.js: %.js
java -jar $(MINIFIER).jar --line-break 13000 $^ > $@
Doxygen's jquery.js script is composed of minified versions of the following
- jquery 1.7.1:
- jquery.ui 1.8.18:
modules required:
- jquery.ui.core
- jquery.ui.widget
- jquery.ui.mouse
- jquery.ui.resizable
- jquery.hashchange: 1.3:
- jquery.scrollTo: 1.4.2:
The Makefile will built the jquery_*.js files used by doxygen.
Some files are split into smaller parts to make sure Visual Studio can compile them
as strings.
This diff is collapsed.
This diff is collapsed.
* jQuery.ScrollTo
* Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com |
* Dual licensed under MIT and GPL.
* Date: 5/25/2009
* @projectDescription Easy element scrolling using jQuery.
* Works with jQuery +1.2.6. Tested on FF 2/3, IE 6/7/8, Opera 9.5/6, Safari 3, Chrome 1 on WinXP.
* @author Ariel Flesler
* @version 1.4.2
* @id jQuery.scrollTo
* @id jQuery.fn.scrollTo
* @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
* The different options for target are:
* - A number position (will be applied to all axes).
* - A string position ('44', '100px', '+=90', etc ) will be applied to all axes
* - A jQuery/DOM element ( logically, child of the element to scroll )
* - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
* - A hash { top:x, left:y }, x and y can be any kind of number/string like above.
* - A percentage of the container's dimension/s, for example: 50% to go to the middle.
* - The string 'max' for go-to-end.
* @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead.
* @param {Object,Function} settings Optional set of settings or the onAfter callback.
* @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
* @option {Number} duration The OVERALL length of the animation.
* @option {String} easing The easing method for the animation.
* @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
* @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }.
* @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes.
* @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
* @option {Function} onAfter Function to be called after the scrolling ends.
* @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
* @return {jQuery} Returns the same jQuery object, for chaining.
* @desc Scroll to a fixed position
* @example $('div').scrollTo( 340 );
* @desc Scroll relatively to the actual position
* @example $('div').scrollTo( '+=340px', { axis:'y' } );
* @dec Scroll using a selector (relative to the scrolled element)
* @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
* @ Scroll to a DOM element (same for jQuery object)
* @example var second_child = document.getElementById('container').firstChild.nextSibling;
* $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
* alert('scrolled!!');
* }});
* @desc Scroll on both axes, to different values
* @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } );
;(function( $ ){
var $scrollTo = $.scrollTo = function( target, duration, settings ){
$(window).scrollTo( target, duration, settings );
$scrollTo.defaults = {
duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1
// Returns the element that needs to be animated to scroll the window.
// Kept for backwards compatibility (specially for localScroll & serialScroll)
$scrollTo.window = function( scope ){
return $(window)._scrollable();
// Hack, hack, hack :)
// Returns the real elements to scroll (supports window/iframes, documents and regular nodes)
$.fn._scrollable = function(){
var elem = this,
isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1;
if( !isWin )
return elem;
var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem;