Jump to content

sugafree

Members
  • Content count

    50
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sugafree

  • Rank
    Newbie
  1. I want to create a main header where texts will bounce in, in 0.5s intervals and then at the same time it will all fade out, 1s interval again then new text will bounce in same intervals again and fade out. When it finished I want it to start from the beginning. I use animate.css, twitter-bootstrap and jquery. I have tried a few different ways, but so far I couldnt even get it to fade out after a short delay or if it fades out, it wont bounce in. http://erotikus-munka.co.uk/test/index2.html $( document ).ready(function() { $( '.main2' ).addClass( 'bt_visible animated fadeInDownBig'), $('.main2').addClass(3000, 'animated fadeOutDownBig')});$( document ).ready(function() { $( '.main2' ).addClass( 'bt_visible animated fadeInDownBig'); $( ".main2" ).toggle( "puff" ).delay(3000);});$( document ).ready(function() { $( '.main2' ).addClass( 'bt_visible animated fadeInDownBig'); $( ".main2" ).removeClass( 'bt_visible animated fadeInDownBig').delay(3000); $( '.main2' ).addClass( 'bt_visible animated fadeOutDownBig').delay(3000);});
  2. Trying to find the best angular directive for a form

    ....just in case others run into the same problem. Use UI-router(unfortunetaly its not my handywork, but I think I got the picture now)... http://plnkr.co/edit/jnKQOvkE4nJinEQ5zhr6?p=preview
  3. Im trying to create a form, first element should be a <select> tag with a few options and each of them will dynamically bring up a different set of forms depending on what the user chooses. The idea is within the select tag there will be different categories like cars, properties etc.. first user only sees that and when chose, it will bring up a set of input fields that required for that category. Anyone got an idea what would be the best way to do it in angular?
  4. Thank you Foxy, best solution so far. However I still have 2 more major problems. Element and target is in the same wrapper div so when target is resized, it will force the element to a different position which really not looks good and how could I change the delay so the animation looks a bit slower?
  5. I want to create a div and set the opacity to 0 with css(background, color, border) so completely invisible and the whole thing will only work if js enabled. There is another div next to it, and want to use jquery to change the opacity to 1 and change it size. If possible with fadeIN fadeOut. So far i didnt get far, still couldnt even change the opacity, although a researched it. Also I tried mouseenter and mouseover, but no luck yet or to use .hover to create a new div and everyting, but than I need the rest of the page to stay where it is and a new div would change it.. $(document).ready(function(){$("#showCaseWD").hover(function(){$("#wdShow").css({color:rgba(0,0,0,1.0)});});});
  6. Image Slider

    Im trying to use jssor slider from github, but when i copy the code it wont work. For some reason the arrows on the left and right side in the main picture dont show up, even tho when you hover over it with your mouse it does work. Also the unselected thumbnail borders are not the right size. Can anyone help me? Also little loading gif wont show up on main big picture just as on thumbnails. I uploaded it to http://sugafreetest.hostoi.com The example what i want to do is http://www.jssor.com/demos/image-gallery.html Thanks
  7. Basically what I am trying to do is, first you enter a number, which will be the number of time the loop should run. When all details entered, it should print out like a payslip for all entries, name, wage, marital status etc..Now the problem is, when I enter example 2 for the loop(numWorkers) at the last round, it will come up with some error in the line of nameWorker[i] = input.next(); Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 20. Also got some problem with the wage obviously im trying to send a double to the wageCalc method, but just cant get it running. Tried plenty of different versions. Anyone could help me on this please? import java.util.Scanner; public class morePay2 { public static double wageCalc(double ratE, double hourS){return (ratE * hourS);} public static void main(String[] args) { Scanner input = new Scanner(System.in); int numWorkers = 0, i = 1; double intWorkedHours = 0, intHourlyRate = 0; System.out.print("Please type in the number of workers: "); numWorkers = input.nextInt();String[] nameWorker = new String[numWorkers];String[] hourlyRate = new String[numWorkers];String[] workedHours = new String[numWorkers];String[] maritalStat = new String[numWorkers];String[] wage = new String[numWorkers]; for (i = 1; i <= numWorkers; i++){System.out.print("Please type in the name: ");nameWorker[i] = input.next();System.out.print("Please type in hourly rate: ");hourlyRate[i] = input.next();System.out.print("Please type in worked hours: ");workedHours[i] = input.next();System.out.print("Please type in marital status(married/single): ");maritalStat[i] = input.next();intHourlyRate = Double.parseDouble(hourlyRate[i]);intWorkedHours = Double.parseDouble(workedHours[i]);wage[i] = wageCalc(intHourlyRate, intWorkedHours);} for (i = 1; i <= numWorkers; i++){System.out.println(nameWorker[i] + " has earned " + wage[i] );} } }
  8. Working with Angular JS

    But what is angular JS than? I think it pulls out the actual content, example ad listings is made up of a pic, description and price, all this is stored in an external file if im right. So will prerendering sort out this issue, meaning google searchbots will see the full html with content? Also is there a way to automatically generate a simply html/css version of the website? Eg creating the same website using html and css only and some program-script or anything will pull the data from the angular site to insert it into the html version each time someone posts a new ad
  9. Working with Angular JS

    Hi, I hope this subject should be under javascript.. If you design a great website using angularJs, might sound great but what about search engines and visitors without js or whatever other stuff it needs. Could you guys give me some ideas on this subject? Example design a website like gumtree.com, the content is the main thing which is the main thing to be handled by angular, but how you deal with the search engines? Heard about prerender but is google going to look at each possible variation as a new page(which would be good) also if not all your content needs to be dynamic, example you have many static stuff and writings plus products. Is it better to only use angular JS on the product area and keep as much as possible in html? Could I use angular to boost search engine results, like each variation for your product is being seen by google like an new page, more pages = better results.. What if someone does not have JS at all? Is almost anyone have JS installed on the device to have angular be so popular? Also is there a way to use the prerender version of the website for non JS visitors? Like example gumtree. You need to allow the users to post adverts, which has to be stored in a database. Nice and everything, but in this case you can not just write a html version and load that one for each non-JS visitors because that case you would have to modify it each time someone posts a new ad. Is there any automatic way of doing this or any way of having a simple html page automatically created for non js visitors, but having accurate data there! hope you guys can understand what I was on about.
  10. return false not working

    still the same... could you tell me what is (el)? also why do i need (actLinks); at the very end
  11. return false not working

    which supposed to be whichpic right? Now just tried showPic() and showPic(whicpic). No luckyet
  12. return false not working

    Hi, Im trying to run the showPic function without putting any JS into HTML(when i used onclick = showPic() return false, it worked fine). I added prepareGallery function for this reason and I cant get it working. I think I can see it changes the pics but link will be executed also. Anyone got an idea where I made the mistake? <body><h1>Snapshots</h1><ol id="links"><li><a href="benfica.jpg" title="benfica">Benfica</a></li><li><a href="yamaha.jpg" title="yamaha">Yamaha</a></li><li><a href="island.jpg" title="island">Island</a></li><li><a href="opossum.JPG" title="opossum">Opossum</a></li></ol><img id="placeholder" src="1.jpg" alt="my image gallery" /><p id="desc">Choose an image</p></body>function showPic(whichpic) {if (!document.getElementById("placeholder")) return false; var source = whichpic.getAttribute("href");var placeholder = document.getElementById("placeholder");placeholder.setAttribute("src",source);if (!document.getElementsById("desc")) return false;var titletext = whichpic.getAttribute("title");var desc = document.getElementById("desc"); desc.firstChild.nodeValue = titletext;return false;}function prepareGallery(){if (!document.getElementById || !document.getElementsByTagName) return false;var links = document.getElementById("links");var actLinks = links.getElementsByTagName("a");for (var i = 0; i < actLinks.length; i++){actLinks[i].onclick = function(){showPic(this);return false;}}}window.onload = prepareGallery;
  13. is there any other stuff or website where you could recommend free sliders?
  14. second on is Use of getPreventDefault() is deprecated. Use defaultPrevented instead. in jquery-1.10.2.js Ive changed this and the error disappeared but nothing changed. The whole div doesnt show up and some CSS wont work and some other jquery // Events bubbling up the document may have been marked as prevented// by a handler lower down the tree; reflect the correct value.this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
×