goma smile Posted October 9, 2014 Report Share Posted October 9, 2014 Sveiki, kā izdrīt ka ar javascriptu (jquery) es atveru kādu lapu un ielādju viņu ar un pārklāju ar append... z-index lielāks... un norādu mazliet caurspīdīguma... un kā lai vairs apakšējā "layouta", saturs kas body neskrulētus... ? $('body').append('<div class="kkads"></div>'); $('.kkads').fadeIn(); $('.kkads').load('ielādes links...'); Quote Link to comment Share on other sites More sharing options...
Kemito Posted October 9, 2014 Report Share Posted October 9, 2014 Neko saprast nevar. Quote Link to comment Share on other sites More sharing options...
vbz Posted October 9, 2014 Report Share Posted October 9, 2014 manipulē ar css properties: position un z-index, uzraksti no sākuma statisku lapu, sapratīsi kā tas strādā, tad tikai sāc to pārrakstīt jquery ... Quote Link to comment Share on other sites More sharing options...
codez Posted October 9, 2014 Report Share Posted October 9, 2014 uztaisi jsfidli, tad jau varbūt kādam arī atradīsies laiks iedziļināties un kaut ko pamainīt. Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 9, 2014 Report Share Posted October 9, 2014 (edited) Body apakšā ieliec elementu (#popup kaut vai), un tam elementam norādi z-index, opacity, position: fixed un nopozicionē, kā vajag. Ielādē ar AJAX saturu, $('#popup').html(response); $('body').css('overflow', 'hidden') - šis noslēps scrollbarus. Kad popups tiek aizvērts: $('body').css('overflow', '') - empty value noņem to CSS rūli. Edited October 9, 2014 by jurchiks Quote Link to comment Share on other sites More sharing options...
vbz Posted October 9, 2014 Report Share Posted October 9, 2014 Tu viņui iznēģināji, viņš nestrādā ... Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 9, 2014 Report Share Posted October 9, 2014 (edited) Kas nestrādā? body { overflow:hidden; } strādā. Ja nu vienīgi Firefoxam bija kaut kāda sapista loģika un overflow vajadzēja likt uz html, nevis body. Which is retarded, because every other browser works correctly with body { overflow: hidden; }. Edited October 9, 2014 by jurchiks Quote Link to comment Share on other sites More sharing options...
foxsk8 Posted October 9, 2014 Report Share Posted October 9, 2014 Kamēr netiks lietots fiddle, vai kāds cits demo preview, code tūlis, tikmēr šeit varam tikai spriedelēt vai apskatīt to, kā viens dzied līdzi citiem, nezinot dziesmu vārdus. :) Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 9, 2014 Report Share Posted October 9, 2014 Es zinu, ka tas strādā, jo es to pats izmantoju. Quote Link to comment Share on other sites More sharing options...
Kasspars Posted October 9, 2014 Report Share Posted October 9, 2014 http://jsfiddle.net/uu4sw8ds/2/ Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 10, 2014 Report Share Posted October 10, 2014 Ekonomējam uz pēdējā semikola CSS rūļos (ietaupīju 10 baitus, jēē!), bet ID pogai izmantot gan nespējam... Prioritātes... Quote Link to comment Share on other sites More sharing options...
Kasspars Posted October 10, 2014 Report Share Posted October 10, 2014 (edited) ^ ID ir pārāk stipra (un konkrēta) rule, kuru grūti pēc tam overraidot. Būtu frontend developeris zinātu Edited October 10, 2014 by Kasspars Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 10, 2014 Report Share Posted October 10, 2014 Priekš kam tev viņu overraidot? Quote Link to comment Share on other sites More sharing options...
goma smile Posted October 13, 2014 Author Report Share Posted October 13, 2014 Uz datora sie varianti strada uz mobila gan ne (jquery mobile...) Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 14, 2014 Report Share Posted October 14, 2014 (edited) Ieliec Kaspara fiddlē ķeksi pie jQuery mobile. Bet nu tas, ka noņem scrollbar, nenozīmē, ka nevar paskrullēt lapu. Edited October 14, 2014 by jurchiks Quote Link to comment Share on other sites More sharing options...
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.