Jump to content

Search the Community

Showing results for tags 'slideup'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. I have the following responsive site and i'm having an issue with the mobile nav menu: http://www.endeavor.cl/ When you resize the window or load it in a mobile device, you have a menu with sub-menu items with a slide-down effect that show you the sub-menu items everytime you click on them and, if you click them again or click somewhere else, the sub-menu item will hide itself with a slide-up effect. The problem is when you resize the window again and click again the sub-menu items, they will now show and inmediately hide, like they execute the 2 steps without waiting for a second clicking. Here's the code: $(window).on('load resize', function () { if ($(window).width() >= 1000){ $("#menu-top").removeClass(); $("#menu-top").addClass("desktop"); }else{ $("#menu-top").removeClass(); $("#menu-top").addClass("touch"); $("#menu-top.touch .menu-item-has-children a").addClass("primer-boton").css('cursor','pointer'); $("#menu-top.touch .sub-menu a").removeClass(); $("#menu-top.touch .primer-boton").removeAttr("href"); $('#menu-top.touch .menu-item-has-children > .sub-menu').parent().click(function() { var submenu = $(this).children('.sub-menu'); if ( $(submenu).is(':hidden') ) { $(submenu).slideDown(200); } else { $(submenu).slideUp(900); } }); } });
  2. Okay, title says it all... im needing a little help understanding a few things, but i think i have a hold of something. My php code: $HTMLOUT .= box_start_full_size("Latest News");//$HTMLOUT .= "LATEST NEWS..."; $res = mysql_query("SELECT * FROM news WHERE added + ( 3600 *24 *45 ) >".time()." ORDER BY added DESC LIMIT 2");if (mysql_num_rows($res) > 0){$button = "";$id = ""; while($array = mysql_fetch_assoc($res)) { $id .= $array['nid']; $HTMLOUT .= "<div id='index_newsbox".$id."'>";//ID for jQuery to work... $HTMLOUT .= "<a href='#' id='toggle_all'>"; $HTMLOUT .= "Toggle All"; $HTMLOUT .= "</a>"; if (get_user_class() >= UC_ADMIN) { $button = " <div style='float:right;'> <a href='#'>Edit</a> <a href='#'>Delete</a> </div>"; } $HTMLOUT .= " <div class='news_headline'> <span class='span_news_headline'> {$array['headline']}n </span> {$button} </div>n"; $HTMLOUT .= "<div style='display:none;' class='news_body'>"; $HTMLOUT .= "<span style='float:right;'>".get_date( $array['added'], 'TINY' ) . "</span>n"; $HTMLOUT .= nl2br( $array['body'] ); $HTMLOUT .= "</div>n"; $HTMLOUT .= "</div>";//end of news ID/jQuery... }}$HTMLOUT .= box_end_full_size(); This is my jQuery/JS code: $(document).ready( function() { $('#index_newsbox').toggle( function() { $('.news_body').slideDown();//specific news-body... }, function() { $('.news_body').slideUp();//specific news-body... }); });$(document).ready( function() { $('#toggle_all').toggle( function() { $('.news_body').slideDown();//all news-body... }, function() { $('.news_body').slideUp();//all news-body... }); }); I want 2 things here. First is to make a simple <a href> link that can toggle ALL news-body div classes to slidedown and up, (does not work yet). next is simple, i wonna do this for each and one of the divs also. Meaning making some sort of ID to the jQuery/JS so it will chose the specific div-box to deal with... now, as you see, i have maked an $id inside the PHP for the div (id from table inside DB). From here im stuck a little bit, coz this is my first kind of project with jQuery, i always used normal JS. This seemed a little bit more simpler, and yet, i stuck, how dramatic -.-'... Anyhow, would be great if anyone could drop in with an idea on how to fix this one! Thanks as always!
×
×
  • Create New...