0

Possible Duplicate:
jquery UI dialog: how to initialize without a title bar?

    $("<div id='divLoading1' >Loading...<div>").dialog({
        modal: true,
        resizable: false,
        width: 200,
        height: 100
    });


$("#divLoading1").prev().remove();//won't remove title
$("#divLoading1").prev().hide();

I want to the title from the dialog, but this wont work, why please?

Community
  • 1
  • 1
Peter PitLock
  • 1,823
  • 7
  • 34
  • 71

1 Answers1

1

You can use this...

$("#divLoading1 .ui-dialog-titlebar").hide();

but you're better off doing it in css.

#divLoading1 .ui-dialog-titlebar
{
    display:none;
}
Reinstate Monica Cellio
  • 25,975
  • 6
  • 51
  • 67
  • Hi, I dont want to remove all title bars please, only relative to the specific div please – Peter PitLock Oct 18 '12 at 09:30
  • Sorry - I spotted my faux pas and updated it just before you posted :) – Reinstate Monica Cellio Oct 18 '12 at 09:31
  • hi, could I ask if it works on your side please, I am unable to successfully set up a JSFiddle for this http://jsfiddle.net/rhjch/ .Neither of the above options work in the application unfortunately. The "1" is in incrementing number, e.g. #divLoading1 #divLoading2 etc – Peter PitLock Oct 18 '12 at 09:40
  • 1
    You should use a class rather than an incrementing number in an id. – Rory McCrossan Oct 18 '12 at 09:43
  • As per @RoryMcCrossan, add a class to the divs, rather than using an incremented ID as that's a completely different set of issues. – Reinstate Monica Cellio Oct 18 '12 at 09:57
  • Yes, its the completely different set of issues that I can't get help on unfortunately. Every instance of the loading window is unique and must be unloaded when it is finished - spec unfortunately. So this is not possible then? – Peter PitLock Oct 18 '12 at 11:48
  • We need more information. The above code does what the question asks so you need to explain if that's not suitable. I'd recommend changing the question so it clearly explains the real issue. – Reinstate Monica Cellio Oct 18 '12 at 11:54
  • ok, can I ask it this way please, please copy and paste original code twice, once calling it --div id='divLoading1' --, next : --div id='divLoading2'--. and individually please hide the bar with the "X" so the only visible HTML says "Loading" please. – Peter PitLock Oct 18 '12 at 12:22
  • You need to ask a new question, and this time post exact code, explain what you can and can't change in it (and why you can't), and exactly what you are trying to achieve. This question has been closed by other members. – Reinstate Monica Cellio Oct 18 '12 at 13:27