Question and answer is powered by AnsPress.io
Try this:
Better way to using data attributes.
jQuery("#adminSearch").click(function(e) { e.preventDefault(); var yoururl = $(this).data('adminurl'); window.location = yoururl; )};