Jquery Code Not working - Missing something?

I found this code but can’t get it to work. Can someone point out where I’m going wrong.
In head of document

<script src="jquery/jquery.js" type="text/javascript"><!--mce:0--></script>
<script src="jquery/ui.core.js" type="text/javascript"><!--mce:1--></script>
<script src="jquery/ui.dialog.js" type="text/javascript"><!--mce:2--></script>
<script language="javascript" type="text/javascript">
  $(document).ready(function() {
      $(".sectionHelp").click(function(){
      $("#dialog_"+$(this).attr('id')).dialog({autoOpen: false});
      $("#dialog_"+$(this).attr('id')).dialog("open");
	});
});
</script>

In body of document.

<div class="dialog" id="dialog_help1" title="Dialog Title 1">
 <p>Dialog 1</p>
</div>
<div class="dialog" id="dialog_help2" title="Dialog Title 2">
 <p>Dialog 2 </p>
</div>
    <a href="#" id="help1" class="sectionHelp">Help1</a>
    <a href="#" id="help2" class="sectionHelp">Help2</a>

Thanks in advance.

Thanks for the suggestion about looking at the console. It did show some errors and I thought maybe I was missing something, so I added this line to the head and it works fine.

<script src="jquery/jquery-ui-1.8.5.custom.min.js" type="text/javascript"><!--mce:1--></script>

Thanks for your time.

Forgive me for what may be a silly question, but if you are using CSS to render the div as display: none, you are changing that when it opens, correct?

OK, that’s helpful. How you get to the JS console depends on which browser you’re using. In Firefox and Chrome, it’s Ctrl+Shift+J. If you’re in another browser, Google can tell you how to do it.

See if there are any errors listed there. Perhaps the versions of jQuery and jQuery UI you’re including are out of sync with one another? That’s happened to me before. If it’s not that, then it’s probably some other part of your JS or CSS that’s interfering somehow. If you want to post the whole thing or a link to it, someone may be able to tell you more.

I’m very sorry about not being more specific. I was dealing with interruptions and with this code. The code is not doing anything when I click on either link. I’m not that familiar with javascript so I do not know what the JavaScript Console is or what I can do for me. Javascript is turned on and working. I’ve tried with the script in the head and in the body. I’ve tested that jquery.js is being used by the page with an test alert. Can you point the way to how the console may work for me?
Thanks

Oops. Sorry guido. It’s supposed to allow me to open up dialog help boxes when the anchor is clicked. Also I failed to show the css hiding the div as follows.

div.dialog{
         display:none;
         }

What should it do? And what does it do? Or doesn’t it do anything?

You didn’t answer the question “what does it do now?” The code you’ve posted works for me. Check your JavaScript console.