Not Solved Jquery help.
#1
Not Solved
Iam trying to make my panel be able to slide up when a button is clicked.

However the whole page slides up .

Here is the code for headerinclude

<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1600"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1600"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
 <script src="http://code.jquery.com/jquery-latest.min.js"></script>
{$stylesheets}
<script type="text/javascript">
<!--
	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var imagepath = "{$theme['imgdir']}";
// -->
</script>
{$newpmmsg}


The code for the header -

<a name="top" id="top"></a>
<div id="header">  
			<div class="logo" style="float:left"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>

	<div id="panel" style="float: right">
<script>
  $(document.body).click(function () {
    if ($("div:first").is(":hidden")) {
      $("div").show("slow");
    } else {
      $("div").slideUp();
    }
  });

  </script>

				{$welcomeblock}</div>

<br class="clear" />
			<div class="menu">
				<ul>
					<li><a href="{$mybb->settings['bburl']}/portal.php"><img src="http://i37.tinypic.com/14njn2a.gif" alt="" title="" />Home</a></li>

					<li><a href="{$mybb->settings['bburl']}/index.php"><img src="http://i38.tinypic.com/11m3rld.png" alt="" title="" />Forum</a></li>

					<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
					<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
					<li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
					<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>
				</ul>
			</div>
</div>
<br />
			<navigation>
<br />
<div id="container">
			<hr class="hidden" />
		<hr class="hidden" />
		<br class="clear" />
		<div id="content">
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			{$pending_joinrequests}
			<br />
My Site - Support For My Themes
If you would like a Custom MyBB Theme PM me Smile.
Reply
#2
Not Solved
Try adding jQuery.noConflict(); to the top of the script and replacing every '$' with 'jQuery'.
Reply
#3
Not Solved
The problem still persists even after doing that.
My Site - Support For My Themes
If you would like a Custom MyBB Theme PM me Smile.
Reply
#4
Not Solved
<script>
  jQuery.noConflict();
  jQuery(document.body).click(function ($) {
    if ($("div:first").is(":hidden")) {
      $("div").show("slow");
    } else {
      $("div").slideUp();
    }
  });

  </script>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)