Jump to content

Matej

Members
  • Posts

    185
  • Joined

  • Last visited

Everything posted by Matej

  1. Matej

    lightbox

    Yes thanks I'm aware of all of those things , the biggest reason for me to want to find lightbox tutorial is to understand logic of animations behind it (well you can do pretty"one image lightbox" - without slides with just :target in css)
  2. Matej

    lightbox

    I would like to "master"/"learn" javascript without using libraries so i can master/learn it properly. Of course i'm planning to learn jquery and some others libaries/frameworks eventually , but in my opinion pure(plain) JS skill>libraries , (and i dont like "$" it just irritates me ) // and also i feel like i dont learn anything and im just copying someone's work when i just search JQ plug in/script and just copy paste it (modife it a little)
  3. Matej

    lightbox

    Hello gentlemen , i would like to ask you if know any lightbox(http://fancybox.net/ like this one = the 3rd one) tutorial in plain javascript . I have been searching for a while now but so far i've found only JQ tutorials. Thanks for answers
  4. got it , thank you very much
  5. Hello , im trying to create a range inside an element. Here = http://jsfiddle.net/9kpm9upk/2/ i tried it with setStart and setEnd but i realized it takes element i cant use it on content of element(in this case innerHTML), is thre any way to create range on innerHTML of certain element?(im not talking about selecting it manualy ) Thanks for asnwers
  6. Hi , how can i create for example element (using plain javascripit) which stays on page after refresh (basicly "forever") , i know its possible using AngularJs , but angular is just javascript library so it should be possible with plain javascript too. I cant find any answer/tutorial , thanks for answers
  7. Matej

    canvas

    Hello , i recently started digging in canvas and i'd like to ask some questions about it. Here is nice mozilla example http://jsfiddle.net/mpxestqw/2/; So my question is , how does save() works? Does it work like i set translate(0,0,50,50) and save it , than i set again translate(0,0,50,50) = which means translate is now(0,0,100,100) , and when i set restore() , translate is again translate(0,0,50,50)?; Also does clearRect() remove also translate() or only "picture"? Thanks for answers , have a nice day.
  8. Hello , im trying to make some simple editor here http://jsfiddle.net/frcvL1g8/ , but whenever i try to add link ther (click on link button) it displays selected text as link , but nothing happens when i click on it . Can somebody explain why?
  9. Thanks , i thought i was vice verse
  10. localStorage works as long as visitor is on the site - you exit the site = localStorage is destroyed=you enter the site again=new local storage is made. If you want to check if someone has already been on your site , use sessionStorage (it doesnt get destroyed when visitor exit site ) https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage
  11. got it , thanks =http://jsfiddle.net/mLjo49rk/5/ , also , the event thing function(e) is only for IE right?(IE needs to pass it or smt) so why didnt it work in chrome ? i have never had problem with it before.
  12. I added varriable which refer to this , but it has broken the code http://jsfiddle.net/mLjo49rk/3/ // i could call self. from inside the Matej() but not inside loops and prototype
  13. Hi , im building table spoiler here http://jsfiddle.net/mLjo49rk/2/ (basicly , every text get shortened to length 1 and on click it should display full text) but i have problem with function longIt(); it basicly writes Cannot read property 'length' of undefined while i was working with array this.after in function shortIt, any1 knows how to fix it?
  14. Hello , i have this little thing here http://jsfiddle.net/10o4qgbg/2/ i set #lol to position absolute , so it shouldnt be affected by anmiation , so why doesnt it stand on the same place but it moves? Also why isnt #ok to be seen? Thanks for answers
  15. Hi , i have question , why does function like this Array.sort(function(a,{return a-b}) and function showPosition(position) { lat = position.coords.latitude; lon = position.coords.longitude; latlon = new google.maps.LatLng(lat, lon) mapholder = document.getElementById('mapholder') mapholder.style.height='250px'; mapholder.style.width='500px'; var myOptions={ center:latlon,zoom:14, mapTypeId:google.maps.MapTypeId.ROADMAP, mapTypeControl:false, navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL} } var map = new google.maps.Map(document.getElementById("mapholder"),myOptions); var marker = new google.maps.Marker({position:latlon,map:map,title:"You are here!"});} work , even tho we set arguments , but we dont define them , when you do that in normal function . it breaks the code (it writes"function isnt deffined") so how are function like this special?
  16. I'm aware of this problem, i mentioned it and yea ingolme your way is better Thanks for answers
  17. i don't understand what do you mean. var input=document.getElementById("input"); // text input and i set window[input.value]="hello world" => if input values is "one" than its window["one"] which is the same thing as var one="hello world"
  18. i think it was somewhere on codeacademy ,not sure if in their tutorials or on forum as response, what is so bad on it? (well yea in this case it have input.value as name but whats bad on it overall?)
  19. got it , thought i had to parse it not both stringify and parse:/ , thanks
  20. Hi , how can i storage object in sessionStorage? function setIt(){var kek=document.getElementById("kek"); //text inputwindow[kek.value]={};window[kek.value].name = "name";sessionStorage.setItem(kek.value ,window[kek.value])}function getIt(){alert(sessionStorage.getItem(kek.value.name))} /this allerts null i also tried to parse it var one=sessionStorage.getItem(kek.value);var two=JSON.parse(one);alert(two.name) it also didnt work
×
×
  • Create New...