Sephy Posted September 24, 2011 Report Share Posted September 24, 2011 Sveiki, tatad javascipt strada ja href=''#'' , bet ja ir kaut kads links tad backgrounds nomainas atpakal. Ka lai uztaisa lai uz linka ari butu nomainijies tas background. <a class="leftstyle" onclick="changeStyleBig(this)" href="?action=Galerijas&bildetagad=1">Kompozīcijas traukā</a> un javascipt function changecolorza(el,off){ document.getElementById('wrapper').style.background= "url(bildes/bk/zalais_bkg.png) no-repeat"; } Quote Link to comment Share on other sites More sharing options...
0 nikidijs Posted September 25, 2011 Report Share Posted September 25, 2011 Vakar pilnā biju - nekā nesapratu, tagad itkā dzērumu izgulēju, bet tāpat nevaru "iebraukt"... Diezgan nesakarīgi noformulēts pieprasijums. Ar onClick izsauc vienu funkciju, a ar JS uzrādi pavisam kautko citu :/ Ko tad Tu īsti gribi panākt ? Quote Link to comment Share on other sites More sharing options...
0 Sephy Posted September 27, 2011 Author Report Share Posted September 27, 2011 (edited) Es gribētu panākt, lai uzspiežot uz kāda linka(vienalga kura) background-image nomainās, tuklāt paliek arī tad, ja es pēc tam spiežu uz citiem linkiem tajā pašā lapā. Vai tas vispār ir iespējams? edit: bildes maina paredzeta nevis pasham linkam, bet gan BODY Edited September 28, 2011 by Sephy Quote Link to comment Share on other sites More sharing options...
0 daGrevis Posted September 28, 2011 Report Share Posted September 28, 2011 $('a').click(function() { $(this).css('background', 'red'); return false; }); Quote Link to comment Share on other sites More sharing options...
Question
Sephy
Sveiki, tatad javascipt strada ja
, bet ja ir kaut kads links tad backgrounds nomainas atpakal. Ka lai uztaisa lai uz linka ari butu nomainijies tas background.
un javascipt
Link to comment
Share on other sites
3 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.