drayarms's Profile User Rating: -----

Reputation: 3 Apprentice
Group:
Active Members
Active Posts:
176 (0.17 per day)
Joined:
18-May 11
Profile Views:
1,526
Last Active:
User is offline Nov 26 2013 09:34 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   drayarms has not set their status

Posts I've Made

  1. In Topic: How do you create a global constructor object in javascript?

    Posted 10 Aug 2013

    View PostDormilich, on 09 August 2013 - 11:28 PM, said:

    happens often, as soon as you submit the question, the answer pops up in your mind.


    You are so right. If only I could get a penny for every minute I spend splitting my hairs over some code that won't work simply because I didn't follow my syntax closely enough...
  2. In Topic: How do you create a global constructor object in javascript?

    Posted 9 Aug 2013

    @Dormilich, I had figured out the problem before reading your post. Works now. Thanks for your input though.
  3. In Topic: Iscroll won't fire until device is flipped

    Posted 9 Jun 2013

    View Postandrewsw, on 09 June 2013 - 05:03 PM, said:

    I would ask if there are errors in your console, but I don't know if a mobile phone has a console :)/>

    Try increasing the delay from 100 to something big, 500 or 1000 (1 second):

            myScroll = new iScroll("wrapper");
    }, 100); // increase this number.
    

    This will confirm whether it is just a problem with loading.

    Alternatively, you might switch to the DOMContentLoaded event (to see if it behaves better) as detailed in the documentation - assuming this is the same plug-in, and version.




    @andrewsw thanks for the insights but didn't help. The delay isn't the issue. The thing just won't scroll at all(just bounces) until I flip to landscape orientation and back to portrait. I tried increasing the delay time as you suggested...no luck. And both the content loaded and inline initialization methods won't work at all. There are no errors in my console(I also test my work in a desktop computer browser). Do you have any working example?
  4. In Topic: jQuery UI draggable problemI can't seem to understand where I went

    Posted 29 Mar 2013

    View Postandrewsw, on 29 March 2013 - 01:12 PM, said:

    Well both those links are correct and I just copied and ran the standard draggable sample-code:

    <!doctype html>
     
    <html lang="en">
    <head>
      <meta charset="utf-8" />
      <title>jQuery UI Draggable - Default functionality</title>
      <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
      <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
      <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
      <link rel="stylesheet" href="/resources/demos/style.css" />
      <style>
      #draggable { width: 150px; height: 150px; padding: 0.5em; }
      </style>
      <script>
      $(function() {
        $( "#draggable" ).draggable();
      });
      </script>
    </head>
    <body>
     
    <div id="draggable" class="ui-widget-content">
      <p>Drag me around</p>
    </div>
     
     
    </body>
    </html>
    

    and it works fine. So, other than that I assume you are loading the jQuery firstly, before the UI library?, I would run this sample code yourself (to prove that it works) and compare it to your code.

    You could re-post your current code..

    I wouldn't use find():

        $('#box2').find('.card').
        // just use..
        $('#box2 .card').
    

    [find() is unnecessary a lot of the time.]




    Point taken about the use of find(); Thanks for that bit. As far as trying the standard draggable code goes, I already tied that and got the same "object has no method draggable" error. I copied it word for word straight from the test draggable site just like you have it on here, well with the exception of the <link rel="stylesheet" href="/resources/demos/style.css" /> line since it is not an absolute url. Here's a repost of my current code

    
    
    
    
    
    
    
    
    <!DOCTYPE html> 
    
    
    <html> 
    
    
    
    
    	<head> 
    
    
    		<script type = "text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"> </script>
    
    		<script type="text/javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
    
    
    
    		<script type="text/javascript">
    
    
    			$(document).ready(function(){
    
    
    				function play(){
    
    
    					$('#box2').find('.card').draggable({
    
    						helper: 'clone',
    
        						cursor: 'pointer',
    
          						revert: true
    
    
    					});
    
    
    
    
    					$('#box1').droppable({
    
         						accept: '#box2 .card' 
    
    
    					});
    
    
    				}//End player go board function
    
    
    				play();//Parse the function
    
    
    			});//End document ready
    
    
    
    
    		</script>
    
    
    
    		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
    
    
    		<title>Test Draggable</title> 
    
    
    	</head>
    
    
    
    
            <body>
    
    
    		<div id = "box1" style = "height:200px;width:600px;background:green"> 
    
    		</div>
    
    
    		<div id = "box2" style = "height:200px;width:600px;background:orange">  
    
    			<div> <img class = "card" src = "images/new_deck/11h.png"/> </div> 
    
    		</div>
    
    
    	</body>
    
    
    
    </html>
    
    
  5. In Topic: jQuery UI draggable problemI can't seem to understand where I went

    Posted 29 Mar 2013

    View Postandrewsw, on 25 March 2013 - 03:37 PM, said:

    <script type = "text/javascript" src="http://code.jquery.com/jquery-latest.js"> </script>
    <!-- and -->
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
    

    are requests for two copies of the jQuery library.



    I took care of the obvious problems(the redundant commas and the document ready method). Then I linked the following libraries

    <script type = "text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"> </script>

    <script type="text/javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>

    This time around, I get an error message

    Uncaught TypeError: Object [object Object] has no method 'draggable'

    I'm now at a total loss. What's the right way to include the relevant jQui libraries? Anyone?

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

drayarms hasn't added any friends yet.

Comments

drayarms has no profile comments yet. Why not say hello?