galaydas Posted May 20, 2013 Report Share Posted May 20, 2013 Всем привет, такая проблема, в javascript новичоквот код <div class="last_news"> <h1>Заголовок1</h1> <p>Текст1</p></div><div class="last_news"> <h1>Заголовок2</h1> <p>Текст2</p></div><div class="last_news"> <h1>Заголовок3</h1> <p>Текст3</p></div>Нужно сделать так, что бы блоки отображались на странице в обратном порядкекак это решить на Jquery? Quote Link to comment Share on other sites More sharing options...
0 Great Rash Posted May 20, 2013 Report Share Posted May 20, 2013 1) получить массив блоков («jquery get node array» в Google.)2) развернуть массив («jquery array reverse» в Google.)3) циклом вывести через innerHTML («javascript loops» в Google., «javascript innerHTML» в Google.) 1 Quote Link to comment Share on other sites More sharing options...
0 galaydas Posted May 20, 2013 Author Report Share Posted May 20, 2013 )) А поподробнее Quote Link to comment Share on other sites More sharing options...
0 Catherine Posted May 20, 2013 Report Share Posted May 20, 2013 Как-то так? Quote Link to comment Share on other sites More sharing options...
0 lexxcode Posted May 20, 2013 Report Share Posted May 20, 2013 Как-то так? А так не проще? http://jsfiddle.net/alexriz/Kaavg/5/ [offtop]Откуда:Украина, Николаев-КиевНу воооот еще один талант уехал в Киев[/offtop] 2 Quote Link to comment Share on other sites More sharing options...
0 Catherine Posted May 20, 2013 Report Share Posted May 20, 2013 А так не проще? http://jsfiddle.net/alexriz/Kaavg/5/ [offtop]Откуда:Украина, Николаев-КиевНу воооот еще один талант уехал в Киев[/offtop]О, да! Так гораздо проще Спасибо![offtop]Ой, прямо в краску вогнали )[/offtop] 1 Quote Link to comment Share on other sites More sharing options...
0 galaydas Posted May 20, 2013 Author Report Share Posted May 20, 2013 О... Дай вам бог здоровья люди добрые ))) Спасибо громадное )) Quote Link to comment Share on other sites More sharing options...
Question
galaydas
Всем привет, такая проблема, в javascript новичок
вот код
Нужно сделать так, что бы блоки отображались на странице в обратном порядке
как это решить на Jquery?
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.