?
Solved

Why my jQuery plugin isn't working?

Posted on 2011-03-14
9
Medium Priority
?
276 Views
Last Modified: 2012-05-11
Hi, I'm ref this url, http://fstoke.me/jquery/window/.  Please see my code in the attached file.
Nothing happens when I click on the image.  Thank you.
htmlJquery.txt
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 82

Expert Comment

by:hielo
ID: 35135339
>> <link type="text/javascript" href="/jQuery/jquery-window-5.01b" />
?? you probably meant to link a CSS file

on Lines 21 and 31 you need to escape the double quotes - ex:
 content: "<div style="padding: 10px; font-weight: bold;">I only can be dragged within body element."+

should be:
 content: "<div style=\"padding: 10px; font-weight: bold;\">I only can be dragged within body element."+
0
 

Author Comment

by:lapucca
ID: 35135412
Hi, yeah, I noticed those problem already and modified it.  You should see that in the attached file.  I'm also attaching the jquery.window.css file.  I think I'm supposed to use the "window" class to use this plugin but there is no class named as window in there.  If you look at the web site, I wonder where is that .window coming from?  Thank you.
Also, Ho can I get a hand-icon when mouse over the image.  Thanks.
0
 

Author Comment

by:lapucca
ID: 35135421
Actually, it would be most helpful if someone can point me to some sample code how this is done.  On the site I ref, it doesn't provide the source code for the whole thing.  
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Assisted Solution

by:Roman Gherman
Roman Gherman earned 800 total points
ID: 35135447
Hi,

To get a hand-icon when mouse over the image add style attribute to it:
<img src="r3_c1_s1.png" alt="Dash Control 3!" style='cursor: pointer;' onclick="CreateControl3Window" />

Open in new window


The $.window is function which is declared in your jquery.window.min.js file.
$.window=function(options) ......

By the way, why you don't have .js at the end of each javascript file? maybe this is your problem?

Try instead of this:
    <script type="text/javascript" src="/jQuery/jquery-1.5.1.min"></script>
    <script type="text/javascript" src="/jQuery/jquery-window-5.01b/jquery.window.min"></script>

Open in new window


To put this:

    <script type="text/javascript" src="/jQuery/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="/jQuery/jquery-window-5.01b/jquery.window.min.js"></script>

Open in new window


-------------------------------------------------------
You can find me on: http://extremedev.blogspot.com
0
 
LVL 82

Accepted Solution

by:
hielo earned 1200 total points
ID: 35135477
>>On the site I ref, it doesn't provide the source code for the whole thing.  
Click on "See Attributes" or "See Methods", then scroll down. It shows you all the files you need to include.

On another note:
<img src="r3_c1_s1.png" alt="Dash Control 3!" onclick="CreateControl3Window()" />

should have parentheses at the end of the function name:
<img src="r3_c1_s1.png" alt="Dash Control 3!" onclick="CreateControl3Window()" />
0
 
LVL 82

Expert Comment

by:hielo
ID: 35135480
>>On another note:
>><img src="r3_c1_s1.png" alt="Dash Control 3!" onclick="CreateControl3Window()" />
I meant that your txt file  currently has:
<img src="r3_c1_s1.png" alt="Dash Control 3!" onclick="CreateControl3Window" />

but you need those parentheses.
0
 

Author Comment

by:lapucca
ID: 35135542
Great, I've corrected all that are mentioned here.  Just one more thing, I cannot find this file to download, <link type="text/css" href="js/jquery/themes/trontastic/jquery-ui.css" rel="stylesheet" />
This is indicated as one of the file needed on the web site I ref.  I was able to find the other include files.  thank you.
0
 
LVL 9

Expert Comment

by:Roman Gherman
ID: 35135582
Use this to create yourself a theme for jQuery:

http://jqueryui.com/themeroller/

-------------------------------------------------------
You can find me on: http://extremedev.blogspot.com
0
 

Author Closing Comment

by:lapucca
ID: 35135602
Thank you
0

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question