WordPress.org

Ready to get started?Download WordPress

Forums

Adding the Jquery to Theme File. (2 posts)

  1. sirojan
    Member
    Posted 1 year ago #

    I am using locality Real Estate wordpress theme. I want to add jquery for Property Search Options.When I added the code here search options is working but site got some issues. Please take my site. Follwing Code I have used.

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js">
    </script>
    <script type="text/javascript">
    $(window).load(function(){
    var maxprice = $('#select-maxprice').html();
    $('#select-minprice').change(function() {
    $('#select-maxprice').html(maxprice);
    $('#select-maxprice option').each(function() {
      if (parseInt($(this).val()) <= parseInt($('#select-minprice').val())) $(this).remove();
    });
    });
    })
    
    </script>

    Can You please any One help me to Fix this Issue.??

  2. Give this a read about how to correctly enqueue up javascript.

    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags