738 posts
  • Has been a member for 5-6 years
  • United States
  • Bought between 10 and 49 items
  • Exclusive Author
Jar says

Alright, well I’ve obviously noticed that jQuery/Javascript plays a pretty sizable role here at themeforest, and so I’ve found some plugins and tried to get them working, but to no avail.

In all honesty, it really wouldn’t help you guys if I showed you my current code… I can tell you one thing though, and that is my code is most definitely 100% wrong and it would be better to simply start from scratch. One problem with that though! I can’t start from scratch if I don’t know what’s going on! XD

What I’m asking for is somebody to tell me about and how jQuery/Javascript links with HTML and CSS files, and how I can download a plugin, and get that working in my own HTML files without having to post more threads displaying my obvious insolence! =P

Thanks, Madman

1733 posts
  • Exclusive Author
  • Won a Competition
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Bought between 1 and 9 items
VisualSharing says

Hi, Madman340!

I think it wold be a nice idea to start from scratch with jQuery or even first learn some raw JavaScript. :)

738 posts
  • Has been a member for 5-6 years
  • United States
  • Bought between 10 and 49 items
  • Exclusive Author
Jar says

I’ve already gone over the Start from Scratch tutorial, and sadly left it with knowledge I didn’t need, and never got what I was looking for! Believe me, I have searched for something the focuses on the linking system but have come up with nil, in fact, that tutorial was the closest I could find and it still didn’t help me…

That’s the main reason why I posted this thread… I’m looking for a jQuery guru from Themeforest that knows exactly what I’m looking for/was in my shoes at some point. =)

Thanks though!

738 posts
  • Has been a member for 5-6 years
  • United States
  • Bought between 10 and 49 items
  • Exclusive Author
Jar says

If what I’m asking for is too much, maybe somebody could post an example of an already linked together (Preferably simple) jQuery plugin and HTML /CSS pages?

242 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
  • United States
ATLChris says

I learned jQuery through jQuery.com. You might want to look here to start: http://docs.jquery.com/Tutorials

738 posts
  • Has been a member for 5-6 years
  • United States
  • Bought between 10 and 49 items
  • Exclusive Author
Jar says
I learned jQuery through jQuery.com. You might want to look here to start: http://docs.jquery.com/Tutorials

I know but I’m just trying to find somebody who can help me with the linking together aspect as a short-term solution until I have ample time to dedicate to learning Javascript/jQuery as a language.

Thanks though.

1733 posts
  • Exclusive Author
  • Won a Competition
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Bought between 1 and 9 items
VisualSharing says

On almost any jQuery API reference page there’s a “View source” tab where you can see exactly how it’s made, including the html – it’s the same way for plugins, isn’t that enough? You might want to be more specific if you need help about a specific plugin.

Besides the 15 tutorials I gave you link to, there are plenty of tutorials on NetTuts about anything related to jQuery with the respected linkage between html/css/jquery/plugins.

So let me try with the basics of “installing” a jQuery plugin, because it can be a little confusing at the beginning:

  • Download the jQuery library
  • Download the plugin
  • Link them in the “head” of your html like this:
    <script src="js/jquery.js" type="text/javascript"></script> 
    <script src="js/jquery.lightbox-0.5.js" type="text/javascript"></script>
    
  • Every plugin has its own way of calling its methods – usually they have a nice documentation. In example, you first select which class/id to apply the plugin function to, then you tell it to “listen” for changes (just an example) and if that change occurs, you run the function. Like this:
    $('div#id').click(function(){
        $(this).pluginize(
            {plugin options}
        );
    });
    What the above does is when a user clicks on the div with id of “id”, it executes a callback function – in this case the function pluginize() which has a list of options (listed in its documentation).
  • Hope that helps, sorry if I’m misunderstanding you. :)

738 posts
  • Has been a member for 5-6 years
  • United States
  • Bought between 10 and 49 items
  • Exclusive Author
Jar says

Thank you thank you thank you!!! I’m almost positive that entire second half is exactly what I was looking for!

629 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • United States
VagrantRadio says
Alright, well I’ve obviously noticed that jQuery/Javascript plays a pretty sizable role here at themeforest, and so I’ve found some plugins and tried to get them working, but to no avail.

In all honesty, it really wouldn’t help you guys if I showed you my current code… I can tell you one thing though, and that is my code is most definitely 100% wrong and it would be better to simply start from scratch. One problem with that though! I can’t start from scratch if I don’t know what’s going on! XD

What I’m asking for is somebody to tell me about and how jQuery/Javascript links with HTML and CSS files, and how I can download a plugin, and get that working in my own HTML files without having to post more threads displaying my obvious insolence! =P

Thanks, Madman

Here’s a quick and dirty on jQuery that hopefully helps.

jQuery doesn’t necessarily link with html and css, you use it to manipulate items on the page by referencing the ids and classes in the html.

Say I have a div and I want the background color to change when it’s clicked:

<div id="mydiv">
stuff in the div
</div>

Now, I would call the jQuery script in the header or as best practice, at the bottom of the page above the closing body tag so it doesn’t load until the page has finished loading. This is using the Google hosted version.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.js" type="text/javascript"></script>

Now that we’re calling jQuery from the page, it’s time to add the ready function that initiates any functions inside of it once the document is ready.

$(document).ready(function() {
  //do stuff on ready
});

So now we want to reference that div and manipulate it on a click function.

$(document).ready(function() {
  $("#mydiv").click(function() {
    $(this).css("background", "#900");
  });
});

Now when the div is clicked, it turns red because we added style=”background:#900” to it. So if you want to use a plugin, you would link jQuery and the plugin file then call it in a ready function on a div or class.

$(document).ready(function(){
  $("#mydiv").pluginthatdoestuff();
});

Does that help?

738 posts
  • Has been a member for 5-6 years
  • United States
  • Bought between 10 and 49 items
  • Exclusive Author
Jar says

Yes that helps a lot too, although I have one question about it:

$(this).css("background", "#900");

Is “this” a variable being declared?

by
by
by
by
by
by