onclick - Using jquery to load nivo slider on click inside Div? -


i trying load nivo slider inside div using jquery:

<a onclick='$("#content").load("slider/slider.html");'>slider</a> 

but doesn't work, if use script though, works fine:

<script> $(document).ready( function() { $("#content").load("slider/slider.html"); }); </script> 

any idea why doesn't load when applied on onclick?

edit: here's jsfiddle there onclick doesn't work @ me: jsfiddle.net/znuy6

you need load data :

<a onclick='javascript:$("#content").load("slider/slider.html");'>slider</a> 

thanks hope you.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -