not sure if this is javascript or php, so i am putting it here

This is a discussion on "not sure if this is javascript or php, so i am putting it here" within the PHP Forum section. This forum, and the thread "not sure if this is javascript or php, so i am putting it here are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #21  
Old Jul 4th, 2008, 13:14
saltedm8's Avatar
SuperMember

SuperMember
Join Date: Nov 2005
Location: here
Age: 27
Posts: 1,523
Blog Entries: 2
Thanks: 1
Thanked 11 Times in 11 Posts
Re: not sure if this is javascript or php, so i am putting it here

it works pretty cool, thanks, but will it validate if all i am doing is calling the script ?

and no, i have another scroll script that will pull the content up when a button is clicked
Attached Files
File Type: zip smoothscroll.js.zip (1.8 KB, 0 views)
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)

Last edited by saltedm8; Jul 4th, 2008 at 13:54.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #22  
Old Jul 4th, 2008, 13:30
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,344
Blog Entries: 2
Thanks: 11
Thanked 50 Times in 47 Posts
Re: not sure if this is javascript or php, so i am putting it here

Quote:
Originally Posted by saltedm8 View Post
it works pretty cool, thanks, but will it validate if all i am doing is calling the script ?
Everything should validate find - the only reason my example doesn't is that the script should really be in an external file.
Quote:
Originally Posted by saltedm8 View Post
and no, i have another scroll script that will pull the content up when a button is clicked
Still, if the total is under 16k, and the JS is pretty basic, it'll still be lighter than a library like jQuery.
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #23  
Old Jul 4th, 2008, 13:50
saltedm8's Avatar
SuperMember

SuperMember
Join Date: Nov 2005
Location: here
Age: 27
Posts: 1,523
Blog Entries: 2
Thanks: 1
Thanked 11 Times in 11 Posts
Re: not sure if this is javascript or php, so i am putting it here

looks fine for size, i just need to work out how to integrate it with that scipt and only have it work once ( when the main menu is clicked )

unless you think i should make another menu on the same page, so it pulls down to the new menu and use your script on that ?

thinking about it, if it is already scrolled down, i just would not work anyway would it ?
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)

Last edited by saltedm8; Jul 4th, 2008 at 13:53.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #24  
Old Jul 4th, 2008, 14:45
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,344
Blog Entries: 2
Thanks: 11
Thanked 50 Times in 47 Posts
Re: not sure if this is javascript or php, so i am putting it here

Have you got a demo of the other script your using?
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #25  
Old Jul 4th, 2008, 15:17
saltedm8's Avatar
SuperMember

SuperMember
Join Date: Nov 2005
Location: here
Age: 27
Posts: 1,523
Blog Entries: 2
Thanks: 1
Thanked 11 Times in 11 Posts
Re: not sure if this is javascript or php, so i am putting it here

there is one online, nothing to do with me

http://www.kryogenix.org/code/browser/smoothscroll/#p3
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #26  
Old Jul 5th, 2008, 14:55
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: not sure if this is javascript or php, so i am putting it here

Coudln't this be done easily with jQuery's Min lib? the jQuery-min is onl ly 14kb.. And oh so cool. Or am I missing the point?
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #27  
Old Jul 5th, 2008, 15:27
saltedm8's Avatar
SuperMember

SuperMember
Join Date: Nov 2005
Location: here
Age: 27
Posts: 1,523
Blog Entries: 2
Thanks: 1
Thanked 11 Times in 11 Posts
Re: not sure if this is javascript or php, so i am putting it here

i dont know, lol, what is it and what does it do ?
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #28  
Old Jul 5th, 2008, 15:42
CloudedVision's Avatar
Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,275
Blog Entries: 9
Thanks: 2
Thanked 40 Times in 40 Posts
Re: not sure if this is javascript or php, so i am putting it here

It's the compressed version of JQuery. I think its gzipped also. Hmmmm.... How are you supposed to use that?
__________________
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed | Learning PHP? Lessons
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #29  
Old Jul 5th, 2008, 18:19
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: not sure if this is javascript or php, so i am putting it here

This is a tad bloated but works.

Code: Select all
$(document).ready(function() {
        // hides the slickbox as soon as the DOM is ready
        // (a little sooner than page load)
          $('#slickbox').hide();
          $('a#slick-hide').hide();
          $('a#slick-show').append('Show Lisas Photo');
        // shows the slickbox on clicking the noted link
        $('a#slick-show').click(function() {
            $('#slickbox').fadeIn(2000);
            $('a#slick-show').hide();
            $("a#slick-hide").show();
            $('a#slick-hide').text('Hide Lisas Photo');
            return false;
        });
 // hides the slickbox on clicking the noted link
  $('a#slick-hide').click(function() {
    $('#slickbox').fadeOut(2000);
    $('a#slick-show').show();
    $("a#slick-hide").hide();
    $('a#slick-show').text('Show Lisas Photo');
    return false;
  });
 // toggles the slickbox on clicking the noted link
  $('a#slick-toggle').click(function() {
    $('#slickbox').toggle(400);
    return false;
  });
});
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
putting a widget in CSS kobesunset Starting Out 5 Jun 8th, 2008 19:22
putting myself on the choppping block saltedm8 Free Web Site Critique 17 Apr 18th, 2008 08:29
Putting C# into an ASP.NET Page. alexgeek ASP.NET Forum 2 Feb 5th, 2008 17:16
putting a movie on the web rmlittleone Web Page Design 5 Aug 4th, 2005 16:24
Putting PHP in your web page Jodi PHP Forum 13 Jan 10th, 2005 20:50


All times are GMT. The time now is 05:02.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved