summaryrefslogtreecommitdiffstats
path: root/examples/webkit/fancybrowser/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webkit/fancybrowser/mainwindow.cpp')
-rw-r--r--examples/webkit/fancybrowser/mainwindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp
index a3293b8..11fac91 100644
--- a/examples/webkit/fancybrowser/mainwindow.cpp
+++ b/examples/webkit/fancybrowser/mainwindow.cpp
@@ -150,12 +150,11 @@ void MainWindow::highlightAllLinks()
//! [8]
void MainWindow::rotateImages(bool toggle)
{
- QString code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s') } )";
- view->page()->mainFrame()->evaluateJavaScript(code);
+ QString code;
if (toggle)
- code = "$('img').each( function () { $(this).css('-webkit-transform', 'rotate(180deg)') } )";
+ code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(180deg)') } )";
else
- code = "$('img').each( function () { $(this).css('-webkit-transform', 'rotate(0deg)') } )";
+ code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(0deg)') } )";
view->page()->mainFrame()->evaluateJavaScript(code);
}
//! [8]