Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $.address.state('/');
- $.address.change(function(event) {
- if($.isEmptyObject(event.parameters))
- return;
- $('#search').val(event.parameters.q);
- $('#loading').slideToggle('fast', function() {
- $.ajax({
- url: event.path,
- data: event.parameters,
- success: function(html) {
- $('#loading').slideToggle('fast');
- $('#content').html(html);
- }
- })
- });
- });
- $('form').live('submit', function() {
- var action = $(this).attr('action'),
- params = $(this).serialize();
- $.address.value(action + '?' + params);
- return false;
- })
- $('.pagination a').live('click', function() {
- var href = $(this).attr('href');
- $.address.value(href);
- return false;
- })
- </script>
Add Comment
Please, Sign In to add comment