html - jQuery ajax call not working on my site -


i want content of page appear in main content window on site via ajax... @ least way can add cool effects jquery such toggle/hide/slide etc... issue having @ moment getting ajax call work properly. can review code below , tell me went wrong? appreciated.

$( "#serviceoffered" ).click(function(){          $.ajax({              url : "ajax/getpage.php",             type : post,              async : true,                success : function(result){                 $( "#contentmain" ).html(result);             }         })       }) 

html code

<ul id="menu" style="font-size:14px; width:170px; margin-top:40px; margin-bottom: 40px;">     <li><a href="#" id="serviceoffered">services offered</a></li> </ul> <div id="contentmain"></div> 

getpage.php

<?php echo "test page"; ?> 

in code have type : post, missed out quotes type : "post",. means trying pass variable instead of string. i'm guessing post undefined in instance.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -