How would I show a second dropdown on-hover using jquery for a PHP array? -



How would I show a second dropdown on-hover using jquery for a PHP array? -

i have php array , showing drop downwards of content , want show sec level drop downwards on 1 of array groups. how single out 1 array have sec level drop down? here example: http://mmcgroup.burnseo.com/ array , drop downwards speaking of under "new cars" in main navigation. here code:

html:

<div id="newcarmenu"> <div class="ncmcontainer" group="<?= $m['tab']?>"> <div class="ncmabsolute" onmouseover="activateinfo(this);"> <span class="ncmmodel"><?= $m['name']?></span> <img src="/wp-content/uploads/direct/models/<?= $m['img'] ?>" class="ncmimage" /> <div class="ncminfo"> <div class="ncmbutton"> <a href="<?= $m['modelpagelink'] ?>"> <div>model info</div> </a> <a href="<?= $m['inventorylink'] ?>"> <div>view inventory</div> </a> <a href="/contact"> <div>contact us</div> </a> </div> <div class="floatright"> <span class="ncmmsrp">starting msrp:<br/><span><?= $m['msrp'] ?></span></span> <div class="ncmmpg"> <!--<span><?= $m['cmpg'] ?><br/><span style="font-size:7pt;">city</span></span><img src="/wp-content/uploads/direct/mpg.png" /><span><?= $m['hmpg'] ?><br/><span style="font-size:7pt;">highway</span></span>--> </div> </div> <div class="ncmexcerpt"> <p> <?=$ m[ 'excerpt'] ?>... <a href="<?= $m['modelpagelink'] ?>">read more</a> </p> </div> </div> </div> </div>

jquery:

<script> function changegroup2(group) { jquery('#newcarmenu div[class^="new"]').removeclass('activecars'); jquery('#newcarmenu div[class^="new"]').get(group - 1).classname += ' activecars'; jquery('#newcarmenu .tabgroup').removeclass('activetab'); jquery('#newcarmenu .tabgroup').get(group - 1).classname += ' activetab'; } var = 1; (j = 0; j < jquery('#newcarmenu .ncmcontainer').length; j++) { if (jquery('#newcarmenu #tempcontent').html().indexof('div') != -1) { if (jquery('#newcarmenu .new' + + '').length == 0) { if (i == 1) { jquery('#newcarmenu .cartabs').append('<div class="new' + + ' activecars"></div>'); } else { jquery('#newcarmenu .cartabs').append('<div class="new' + + '"></div>'); } if (i == 1) { jquery('#newcarmenu .cartab').append('<div class="tabgroup activetab" onmouseover="changegroup2(' + + ')">porsche</div>') } else if (i == 2) { jquery('#newcarmenu .cartab').append('<div class="tabgroup" onmouseover="changegroup2(' + + ')">rolls-royce</div>') } else if (i == 3) { jquery('#newcarmenu .cartab').append('<div class="tabgroup" onmouseover="changegroup2(' + + ')">bentley</div>') } else if (i == 4) { jquery('#newcarmenu .cartab').append('<div class="tabgroup" onmouseover="changegroup2(' + + ')">lamborghini</div>') } else if (i == 5) { jquery('#newcarmenu .cartab').append('<div class="tabgroup" onmouseover="changegroup2(' + + ')">lotus</div>') } else if (i == 6) { jquery('#newcarmenu .cartab').append('<div class="tabgroup" onmouseover="changegroup2(' + + ')">bugatti</div>') } else if (i == 7) { jquery('#newcarmenu .cartab').append('<div class="tabgroup" onmouseover="changegroup2(' + + ')">koenigsegg</div>') } else if (i == 8) { jquery('#newcarmenu .cartab').append('<div class="tabgroup" onmouseover="changegroup2(' + + ')">audi</div>') } } jquery('#newcarmenu .new' + + '').append( jquery('#newcarmenu .ncmcontainer[group="' + + '"]')); jquery('#newcarmenu .new' + + ' .ncmcontainer:first-child .ncminfo').addclass('activeinfo'); } i++; } jquery('#newcarmenu #tempcontent').remove(); </script>

php:

<?php function getmodelcount($model, array $models) { foreach($models $m) { if ($m['model'] == $model) { homecoming $m['quan']; } } homecoming '0'; } global $wpdb; $newmodels = array( '911' => array( 'name' => '911', 'inventorylink' => '/new-cars/?make=porsche', 'modelpagelink' => '/models/2014-porsche-911', 'img' => '911.png', 'tab' => 1, 'msrp' => '$84,300', 'cmpg' => '19', 'hmpg' => '27', 'excerpt' => "there handful of iconic cars on market , manhattan motor cars in nyc proud nowadays new porsche 911 long island manhattan , rest of new york. new porsche 911 in 7th generation available in wheel drive. 911 carrera coupe , 911 cabriolet convertible start new ny porsche line up. carrera has" ) , 'boxster' => array( 'name' => 'boxster', 'inventorylink' => '/new-cars/?make=porsche', 'modelpagelink' => '/models/2014-porsche-boxster/', 'img' => 'boxster.png', 'tab' => 1, 'msrp' => '$50,400', 'cmpg' => '20', 'hmpg' => '30', 'excerpt' => "since production started in 1996 select number of drivers have joined known porsche club. @ manhattan motor cars, find porsche boxster 1 of recognizable cars on streets of manhattan new york. part of prestigious network honor here @ manhattan motor cars in new york city. 2 seat convertible offered" ) , 'cayenne' => array( 'name' => 'cayenne', 'inventorylink' => '/new-cars/?make=porsche', 'modelpagelink' => '/models/2014-porsche-cayenne', 'img' => 'cayenne.png', 'tab' => 1, 'msrp' => '$49,600', 'cmpg' => '15', 'hmpg' => '22', 'excerpt' => "our long island porsche of manhattan motor cars has porsche cayenne specific needs, track fast turbo fuel efficiency performance suv. porsche cayenne base of operations comes enormous list of standard features safety, performance , luxury suffice minimalist. eight-way powerfulness passenger seats, powerfulness adjustable" ) ); // end models array $i = 0; $j = 1; // while($i < count($newmodels)-1): echo '<div class="cartabs"><div class="cartab"></div><div id="tempcontent">'; foreach($newmodels $k => $m): // if($m['tab'] == $j): ?>

i know can done little jquery , perchance implementing php array within array. help appreciated. thanks.

php jquery html css

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -