New Message Ajax Notifiction
-
i am working on vary simple logic to implement a Ajax Notification as new message arrive.
i know there is plugin available and i have also tried some but its not working, i dont know whay and then i decide to write my own code for that.i have added following code in Header.php of my theme
function getMessages(){ $('#user-messages span').load('ajax_messages.php'); } setInterval( "getMessages()", 10000);
and in ajax_messages.php i have code
and i have added following code in Widgets using PHP code Widget.
<a id="user-messages"> <span></span> </a>
according to me it should work fine but its not. i am getting error
$ is not a function
I am new to WordPress and i don’t know where i am wrong.
Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘New Message Ajax Notifiction’ is closed to new replies.