JQuery UI effects in Kidetx sidetab

I have successfully implemented the jQuery UI effect on the page using the iQuery Kynetx UI Integration.

However, I am having problems getting the effect of working in sidetab. Here are the rules for my application. I hope someone can point out what I'm missing:

global {
  css  <<
         #tester 
         { 
             margin-left: 10px; 
             margin-top: 10px; 
             width: 80px; 
             height: 80px; 
             background: green; 
             position: relative; 
         }
       >>;
 }

rule tab is active {
select when pageview ".*" setting ()

 pre { 
        results = <<  
           <div id='tester'></div>
            >>;        
}
{
     sidetab() with pathToTabImage = "http://dl.dropbox.com/u/10762217/search-tab-images/tab2.png" 
               and tabColor = "transparent"
               and topPos = "50px"
               and message = results
               and divCSS = {
                             "z-index": 10000,
                             "backgroundColor": "#ffffff",
                             "width": "200px",
                             "padding": "0px",
                             "imageHeight": "162px",
                             "imageWidth": "53px",
                             "-moz-border-radius": "5px"
                            };
              watch("#tester", "click");
           }



 }



 rule jeffect_on_click is active {
     select when web click "#tester"
        jquery_ui:effect("#tester","bounce","normal");


 }
}

I turned on

use javascript resource jquery_ui_js

in the meta tag.

+3
source share
1 answer

. , watch() , .live() . sidetab() , .live(). sidetab() , .live() , document, , . document, , (), , , . sidetab() , event.stopPropagation(), , document, .

, jQuery, .bind(). .bind() , , sidetab , .bind(), .

- :

$K("#tester").bind("click", function() {
  $K(this).effect("bounce", { "times" : 3 }, 300);
});

, ?

, emit javascript, div . :

ruleset a369x111 {
    meta {
        name "Sidetab->Events"
            description <<
                Sidetab jQuery
            >>
            author "AKO"
            logging on

            use javascript resource jquery_ui_js

    }
    global {
        css  <<
            #tester { 
                margin-left: 10px; 
                margin-top: 10px; 
                width: 80px; 
                height: 80px; 
                background: green; 
                position: relative; 
            }
        >>;
    }

    rule tab {
        select when pageview ".*"

            pre { 
                results = << 
                    <div id="tester"></div>
                >>;        
            }
        {
            sidetab() with pathToTabImage = "http://dl.dropbox.com/u/10762217/search-tab-images/tab2.png" 
                and tabColor = "transparent"
                and topPos = "50px"
                and message = results
                and divCSS = {
                    "z-index": 10000,
                    "backgroundColor": "#ffffff",
                    "width": "200px",
                    "padding": "0px",
                    "imageHeight": "162px",
                    "imageWidth": "53px",
                    "-moz-border-radius": "5px"
                };
                emit <|
                    $K("#tester").bind("click", function() {
                        $K(this).effect("bounce", { "times" : 3 }, 300);
                    });
               |>;
        }



    }
} 
+4

Source: https://habr.com/ru/post/1776764/


All Articles