Geeks With Blogs

News
kazim mehdi jquery
execute javascript function after even after ajax call

Add add_endRequest handler to the Page request manager as followed

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(<javascript name function>);

Posted On Thursday, April 28, 2011 6:02 PM

Passing additional parameters to JQuery bind event function
To pass the additional parameter to the event function pass an array of key value, as the second parameter to the bind event bind('click', { message: time }, onClick); e.g { message: time } and access it in the function using event<function parameter>.data.message&... <div id="div1" style="border: 1px solid black; width: 100px; height: 100px">click me</div> <script type="text/javascript"> function onClick(event) { alert(event.data.message); } var time = "loaded at:" ......

Posted On Monday, January 31, 2011 11:23 AM

Keyword Highlight on a web page using jquery
It uses an array of keywords to search and when found mark them like google highlight search keywords e.g jquery this code searches in complete body tag if you like to do search at a specific place then replace "body" with any of the jquery selector that suits your situations. <script type="text/javascript"> function HighlightKeywords(keywords) { var el = $("body"); $(keywords).each(function() { var pattern = new RegExp("("+this+")", ["gi"]); var rs = "<span style='background-color:#FF... ......

Posted On Wednesday, April 29, 2009 1:03 AM

Copyright © kazim sardar mehdi | Powered by: GeeksWithBlogs.net