javascript - Expandable Thumbnail grid Twitter Bootstrap -
ok using plugin of sorts located here pull off. have been working on page few hours wen checked client. stated not want me use plugin. referenced jquery animate such noob writing own code not sure start that. included image of need , need finding solution. thank , time!)
i need add description expand directly under leaders thumbnail. seemless mobile users well. if possible?

<div class="container leadershipwrapper gallery-items"> <ul id="items" class="row list-unstyled"> <div class="col-sm-12 col-sm-offset-1 leadershipgrid"> <li class="col-sm-2 col-xs-4 leader" data-name="joe" data-title="developer" data-profile="profile"><a href="#"><img class="image-responsive" src="images/leader.jpg" alt="" /></a></li> <li class="col-sm-2 col-xs-4 leader" data-name="ray" data-title="dunce" data-profile="dunce profile"><a href="#"><img class="image-responsive" src="images/leader.jpg" alt="" /></a></li> <li class="col-sm-2 col-xs-4 leader" data-name="joe" data-title="developer" data-profile="profile"><a href="#"><img class="image-responsive" src="images/leader.jpg" alt="" /></a></li> <li class="col-sm-2 col-xs-4 leader" data-name="joe" data-title="developer" data-profile="profile"><a href="#"><img class="image-responsive" src="images/leader.jpg" alt="" /></a></li> <li class="col-sm-2 col-xs-4 leader" data-name="joe" data-title="developer" data-profile="profile"><a href="#"><img class="image-responsive" src="images/leader.jpg" alt="" /></a></li> </div> <div class="col-sm-10 col-sm-offset-1"> <li id="1" class="leaderdescription"><div class="leadername">name</div><div class="leadertitle">title</div><div class="leaderprofile">description row 1 cell 1</div></li> </div> </ul> </div> $(document).ready(function() { $('.navbar .dropdown').hover(function() { $(this).find('.hover-dropdown').first().stop(true, true).slidedown(150); }, function() { $(this).find('.hover-dropdown').first().stop(true, true).slideup(105) }); $('.leader').click(function(){ $(this).parent().siblings().find('.leaderdescription').find('.leadername').text($(this).attr('data-name')); $(this).parent().siblings().find('.leaderdescription').find('.leadertitle').text($(this).attr('data-title')); $(this).parent().siblings().find('.leaderdescription').find('.leaderprofile').text($(this).attr('data-profile')); $(this).parent().siblings().find('.leaderdescription').slidedown(); }); }); ok, have @ point ask question now. need know need closer image above. have first row , getting data load correctly cant slide if 1 open slide down new 1 clicked. need open info below leaders photo in photo added. please let me know how far this?
basicly want div id tag toggled using jquery on sort of event, maybe when clicks 1 of images. first part need code:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>slidetoggle demo</title> <style> p { width: 400px; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <button>toggle</button> <p> paragraph end paragraphs. should feel <em>lucky</em> have seen such paragraph in life. congratulations! </p> <script> $( "button" ).click(function() { $( "p" ).slidetoggle( "slow" ); }); </script> </body> </html> this http://api.jquery.com/slidetoggle/ ,
you want load dynamically information server perhaps. can use jquery this function: http://api.jquery.com/load/ example page:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>load demo</title> <style> body { font-size: 12px; font-family: arial; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <b>projects:</b> <ol id="new-projects"></ol> <script> $( "#new-projects" ).load( "/resources/load.html #projects li" ); </script> </body> </html> but information users stored? server suppose write? ajax part of code allow click 1 of users , load code dynamically them.
you need tell each picture react on click. can done .each() function of jquery, iterate each li element (the pictures).
Comments
Post a Comment