No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
7 Posted Topics
Re: The first call to $("div").click(function() {SOMETHING HERE}), will 'recognize' the first 10 div(because it DOES exist). When this call is done,another 10 divs are fetched by AJAX call,they are not attached event listener!So if you want let them respond to click(or other events),you should call something like $("div").click(function() {SOMETHING HERE}), … | |
Re: Your Javascript code is OK. Change your button type from 'submit' to 'button' for the Hit Me button: [CODE]<input type="button" value="Hit Me" onClick="hit(this.form)"/>[/CODE]. Pressing a 'submit' button will cause the page being reloaded. | |
Re: This works on both Firefox and IE. [code=javascript] function test(){ var iframe=document.getElementById('test'); iframe.contentWindow.document.body.style.backgroundColor="green"; } [/code] [code=html] <iframe src="b.htm" id="test" onload="test()"></iframe> [/code] Make sure you call the function that changes the background of the iframe when the content of the iframe is fully loaded. In this case,it is called when the … | |
Re: Airshow is right. Don't use Global variable,unless there is a real need. Global variable is evil. | |
Re: It's totally a mistake to use global variable instance of XMLHttpRequest,when there will be multiple requests at one time. A simple call to setInterval will not satisfy you need. Because your XMLHttpRequest is asynchronous,when the previous request is pending(say,waiting response from your server),another request is being issued,and because you use … | |
Re: This script works both under IE and Firefox: [CODE="javascript"] function doRequest(){ $('#sec').load('time.php?id='+ .random()); } $(document).ready( function(){ var polling=new Polling(); polling.exec({handler:doRequest,onComplete:doRequest},1000,1); } ); [/CODE] The Polling class is a simple class from: [url]http://blog.viscent.info/?cat=3[/url] | |
Re: vShow is an easy-to-use configurable dynamic slideshow(gallery),you can use it with simple code as below [code=html] <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>vShow Examples---Default Config,Minimunm Code Required</title> <link href="../dist/css/default.css" rel="stylesheet" type="text/css" /> <script src="../dist/bin/vh-base.min.js"></script> <script src="../dist/lib/jquery-1.3.1.min.js"></script> <script src="../dist/bin/vShow.jQuery.min.js"></script> <script src="../dist/bin/vShow.min.js"></script> <script> vShow.URL_BASE="../dist/"; vShow.showOnPageLoaded("sample"); </script> </head> <body> <div id="sample"></div> … |
The End.