Jump to content

Morsusy2k

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by Morsusy2k

  1. The function runIt() is just an image slider that will go in loops all the time. That is why i call it inside the function itself. It seemed to me like the simplest way to make something loop forever..
  2. Okay so in my code i have a function that calls itself all the time witch creates a loop: $(document).ready(function(){ function runIt() { //some code here; runIt(); }; runIt(); }); And i want to add another function,but the thing is that code is still in that loop and wont ever load the one i add under it: $(document).ready(function(){ function runIt() { //some code here; runIt(); }; runIt(); //new code $('#test').click(function(){ $('#slide').slideDown('fast');}); I tried even to put them in separate script tags. Or another .ready function..i cant make them work togetter. Can you give me a hint?Thanks.
  3. Okay,so it can't be done the way i need it..Thanks for answering anyways
  4. Ouch,so its not possible to do what I wanna achieve? Is it possible to do a file load via php without reloading?
  5. I'm loading them via jQuery actually, like this: $('#menu1').click(function(){ $('#content').load('page.php'); });
  6. Okay so i have this main (index.php) file that loads a bunch of other php files.As you can already guess I want to make a page (for example) die when accessed directly...I don't want to use .htaccess. I guess I should do it like this:In my index.php inside body tags add: <?php define('ping', true); echo ping; //just testing?> And inside any other page that loads: <?php if (!defined('ping')) { die('Hacking attempt...'); } ?> So that should work,right? But it does not..I guess its some kind of stupid mistake :S And just to mention I am not loading php files via php,i load them via JavaScript,is that making this problem?Thanks.
  7. Okay so i'm getting this error on my web: Uncaught RangeError: Maximum call stack size exceededjquery.min.js:38 This is inside jQuery core so I guess i cant do anything about it but why does this happen? And also,can anyone give me a hint about why is my site loading so slow?What did i do wrong?URL
  8. Okay so i have done a little searching and i found that i can use "$_GET["page"]" command to get what is typed in address bar. So i guess i can use it like this: $('#content').load('<?php $_GET['page'] ?>'); (or i can make it into variable first) But how to add "?page=test.php" in the address bar when clicked on a button (without reloading) in php or javascript?
  9. Solved! Thanks for helping
  10. I though it could be easier, like:if there is something after "site.com/" strip it and load it and if not continue with default,when clicked on a menu div (cause my menu buttons are actually divs) add page name to "site.com/" eg. "site.com/index.php?page=pagename" and load it (via jQuery without reloading).. If its complicated, and by your post i guess it is,its not the question between life and death
  11. I'm confused..So it should be like: Inside body tags: <?php$thisQSvalue="";if(isset($_GET['page']) && !empty($_GET['page'])){$thisQSvalue = $_GET['page']; }?> And in jQuery script: $('#menubutton1').click(function(){<?phpif($thisQSvalue != ""){?>$('#content').load('<?php echo $thisQSvalue; ?>');<?php}else{?>$('#content').load('test.php'); // can be default page<?php}?>}); For every menu button..?
  12. Can you explain a little bit more,cause i'm stuck :SThanks for helping
  13. I think this does not matter at all,you can put all the files in root without any dirs-if you can remember all the names of files. It's all up to you. I like to keep it like: Root images backgrounds icons smileys etc.. source scripts css plugins etc.. content pages etc..index.phpfavicon.icoerror.phpetc..
  14. Well the loading php page works like a charm with the code i added but that same #content div loads more pages. I would like to make it change address (url) when loaded. So it can be linkable. Eg. http://w3schools.invisionzone.com when loads this topic it turns into http://w3schools.invisionzone.com/index.php?showtopic=46574
  15. Yeah that did the trick,now all that is left to do is to put footer below the container with text..
  16. Is it possible to do this: $(document).ready(function(){$('#content').load('test.php');}); With option to change the url of the page to eg. http://site.com/index.php?page=test.phpand when you copy that url to your address bar you get the same page with /test.php loaded into it?
  17. It fixes the problem but it makes a new one :SAll my ul and li css is not shown:Before:http://img69.imageshack.us/img69/2699/69633783.jpg After:http://img571.imageshack.us/img571/2464/88473539.jpg And other thing is that its overlapping with the div on top of it as you can see,i need it under it.Thanks for helping.
  18. Thanks! That worked! Next thing is i cant stretch my footer (black line on the bottom) from side to side,there is always like 10px left on both sides,i managed to make it work on the one on very top of the page but i cant make this one work..
  19. Okay so i'm having some problems with my site. First of all when looking with chrome its all perfect,but when I used new FireFox to browse my site I noticed that "float:left" does not work in FF. Take a look.I'm sure that this can be fixed I'm just not still sure how :SPlease help,Thanks
  20. Morsusy2k

    Delay

    Just what i needed,thank you very much
  21. Morsusy2k

    Delay

    Okay so i have some trouble with delaying,take a look at my code: $(document).ready(function(){var container = $('div.slider').css('overflow', 'hidden').children('ul'), slider = new Slider( container, $('#slider-nav') );$(".button1").click(function(){container.animate({ 'margin-left': -1800});});}); And this works fine.But what i want it to do is something like this: $(".button1").click(function(){container.animate({ 'margin-left': -1800 .delay(600); 'margin-left': -1200 .delay(600); 'margin-left': -600}); But i cant manage to make it right..can anyone help?Thanks
  22. I managed to do it :DThanks anyways .navholder{float:right;display: table;}#item1,#item2,#item3,#item4,#item5{width: 80px;font-family:"Trebuchet MS", Helvetica, sans-serif;text-shadow: 0px 1px 1px #4d4d4d;font-size: 14px;color:black;text-align: center;height: 100px;border:0px;vertical-align: middle;}
  23. Okay so Ive got simple multiline navbar that looks like this atm:I would like to center it vertically but i just fail :S This is the CSS: .navholder{float:right;}#item1,#item2,#item3,#item4,#item5{float: left;display:inline-block;width: 80px;font-family:"Trebuchet MS", Helvetica, sans-serif;text-shadow: 0px 1px 1px #4d4d4d;font-size: 14px;color:black;text-align: center;height: 104.5px;border:0px;}
×
×
  • Create New...