microkarl Posted January 9, 2008 Posted January 9, 2008 Hi, I have this web application and it has a 3rd party Gallery Control on the page . This gallery control would basically shows a list of images with a <A> tag wrapped it. And when i click on the image, it will be redirect to somewhere else... Now, my question is, is there a way for Ajax1.0 to override or disable the <A> tag and injects a onClick event into these images? I know I can do this in jQuery, but since I am pretty new to Ajax1.0, so I really don't know what kind of limitation it has... for those who knows Ajax1.0 well, please help me!! Thanks, Carl Quote Donald DUCK : YOU ARE FIRED!!!
microkarl Posted January 10, 2008 Author Posted January 10, 2008 Okay, to demostrate how jQuery did this. the following is the javascript code that will do the trick. Basically I "hook up the alert box as well as disable the link when user click on any hyperlink tag". can someone tell me if there's a way to achieve the same thing in Ajax extension 1.0's client scripting library? <script type="text/javascript"> $(document).ready(function() { $("a").click(function(){ alert("Thanks for visiting!"); return false; }); }); </script> Quote Donald DUCK : YOU ARE FIRED!!!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.