[jQuery] Ajax Problem
hi all, I have 2 file rating.js $(document).ready(function() { var behav = function(){ $(.rating_class).hover(function(){ $(#tooltip_star).css({visibility:visible, top:($ (this).offset().top - 60), left:($(this).offset().left+$(this).width ()+ 2)}); $.ajax({ type: POST, url: $(this).attr(href), success: function(msg){ $(#tooltip_star).html(msg); } }); }, function(){ $(#tooltip_star).css(visibility,hidden); }).ajaxStart(function(){ $(#tooltip_star).html(table class=\table_animation \trtdimg style=\text-align:center\ src=\/resource/images/ loading.gif\/td/tr/table); }); $(.rating_class).click(function(){ location = $(this).attr(href).replace(ajax_, ); return false; }); } behav(); }); there is just call function behav(); to run all sintax in this file, and i have some ajax sintax in other file file this $(document).ready(function() { var mainApp = function(page){ $.ajax({ type: POST, url: ?= base_url();?product/related/?= $idProduct ? /+page, success: function(msg){ $(#displayRelated).html(msg); behav(); } }); } mainApp(1); }); But i get some error in my firebug like this behav is not defined success()()6 (line 652) success()jquery-1.2.6.js (line 2818) onreadystatechange()()jquery-1.2.6.js (line 2773) [Break on this error] behav(); my question is, why my function behav() in rating.js can't called from success: function(msg){...}, there is need something like global function? thang's ~ saiful haqqi ~
[jQuery] double $().read()
hi all, can we put double $().read() declare? cos i am using tab-ui not in all page, just in one page only? is has trick's for this happen ~ saiful haqqi ~
[jQuery] Get TD Position [X, Y]
hi all, I want make simple sub menu, id mouse over the column of table will show the div with some text finally. can i get the XY position foreach column in table?! JQuery Code $(.left_menu_td).mouseover(function(){ $(#sub_menu).css({top:this.position().top, left:this.position.left, display:block}); }); HTML code div id=left_menu table class=left_menu_table trtd class=left_menu_tdOne/td/tr trtd class=left_menu_tdTwo/td/tr trtd class=left_menu_tdThree/td/tr /table /div div id=sub_menu style=position:absolute;display:none Sub Menu from Column /div I am always get undefine this.position().top, can i get jquery object for each column? ~ saiful haqqi ~
[jQuery] mouseout problem
hi all, i has a litle problem when using $(IdElement).shie(slow); this my code my JQuery $(document).ready(function() { $(#text_span).mouseover(function(){ $(isPopUp).show(slow);}); $(#isPopUp).mouseover(function(){$(#isPopUp).css(display, block);}); $(#isPopUp).mouseout(function(){$(#isPopUp).hide(slow);}); } My HTML div id=isPopUp style=display:none divimg src=some source/div div a href=aone/abr a href=atwo/abr a href=atree/abr a href=afour/abr /div /div span id=text_spanshow the div/div when my cursor over in text_span, the div showed and that is true. But, the problem when my cursor over the image the div just gone, hide with slow. Where is my incorrect sintax? When i change the hide(slow) to hide() only, all be fine :( thang's for help
[jQuery] Newbie question
hi all, is jquery have function like findXY(element) or scroll position? sorry not finish read all document about jquery ~ saiful haqqi ~