[jQuery] Re: tabs: replacing the content without switching the selected tab

2008-02-16 Thread [EMAIL PROTECTED]

Thanks, Klaus.  Another 5 star post. -

On Feb 15, 6:20 pm, Klaus Hartl [EMAIL PROTECTED] wrote:
 Try:

 $('#replaceContent').click(function() {
     $('#tabcontent div.ui-tabs-panel:visible').html('hello');

 });

 --Klaus

 On Feb 15, 11:24 pm, [EMAIL PROTECTED]



 [EMAIL PROTECTED] wrote:
  Hi,

  Let's say I have these tabs and code that makes them so ...

  script type=text/javascript
          $(function() {
                  var tabSelected = $('#tabcontent  ul').tabs()
          });
  /script
  div id=tabcontent
              ul
                  lia href=doc_properties.php
  title=DocumentspanDocument/span/a/li
                  lia href=tabs.php title=TabsspanAdd Tabs/
  span/a/li
                  lia href=slip_sheets.php title=Slip
  SheetsspanAdd Slip Sheets/span/a/li
              /ul
  /div
  input type=button name=replaceContent id=replaceContent
  value=Replace /

  Now I want to click the button Replace and put the HTML hello into
  the same place where the currently selected tab content is.  However,
  I do not want to have a different tab selected.

  How can I code this button?

  Thanks, - Dave- Hide quoted text -

 - Show quoted text -


[jQuery] Re: tabs: replacing the content without switching the selected tab

2008-02-15 Thread Klaus Hartl

Try:

$('#replaceContent').click(function() {
$('#tabcontent div.ui-tabs-panel:visible').html('hello');
});


--Klaus


On Feb 15, 11:24 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 Let's say I have these tabs and code that makes them so ...

 script type=text/javascript
         $(function() {
                 var tabSelected = $('#tabcontent  ul').tabs()
         });
 /script
 div id=tabcontent
             ul
                 lia href=doc_properties.php
 title=DocumentspanDocument/span/a/li
                 lia href=tabs.php title=TabsspanAdd Tabs/
 span/a/li
                 lia href=slip_sheets.php title=Slip
 SheetsspanAdd Slip Sheets/span/a/li
             /ul
 /div
 input type=button name=replaceContent id=replaceContent
 value=Replace /

 Now I want to click the button Replace and put the HTML hello into
 the same place where the currently selected tab content is.  However,
 I do not want to have a different tab selected.

 How can I code this button?

 Thanks, - Dave