Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Why my jQuery plugin isn't working?

Posted on 2011-03-14
9
Medium Priority
?
277 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
Technology Partners: 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

Independent Software Vendors: 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!

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. …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

636 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