Jump to content

Embeded jQuerey functions are being reoved


jonwgeorge

Recommended Posts

I'm trying to get a custom slider implemented into my WHMCS install, and for some reason, the jQuery that is embedded on the page keeps getting by what I assume to be WHMCS. The code works flawlessly in a regular .html file. Here's my code:

 

<script type="text/javascript">
$(function(){
	$function("#faded").faded({
		speed: 500,
		crossfade: true,
		autoplay: 10000,
		autopagination:false
	});

	$('#domain-form').jqTransform({imgPath:'jqtransformplugin/img/'});
});
</script>

 

But when I load the page in a browser, this is what is rendered:

 

<script type="text/javascript">
$(function());

	$('#domain-form').jqTransform();
});
</script>

 

Any ideas why?

Link to comment
Share on other sites

Add literal tags around it

{literal}
<script type="text/javascript">
    $(function(){
        $function("#faded").faded({
            speed: 500,
            crossfade: true,
            autoplay: 10000,
            autopagination:false
        });

        $('#domain-form').jqTransform({imgPath:'jqtransformplugin/img/'});
    });
</script>
{/literal}

Link to comment
Share on other sites

You have this java error

Timestamp: 3/10/2012 12:24:16 PM

Error: TypeError: $("html").on is not a function

Source File: http://socializedsmc.com/templates/socialized/js/whmcs.js

Line: 183

This means that you are using an early jquery version

http://socializedsmc.com/templates/socialized/js/jquery-1.4.2.min.js

 

change this line in your header.tpl

<script type="text/javascript" src="templates/socialized/js/jquery-1.4.2.min.js"></script>

to this

<script type="text/javascript" src="includes/jscript/jquery.js"></script>

Link to comment
Share on other sites

Should this


   <script type="text/javascript">
    $(function(){
        $function("#faded").faded({
            speed: 500,
            crossfade: true,
            autoplay: 10000,
            autopagination:false
        });

        $('#domain-form').jqTransform({imgPath:'jqtransformplugin/img/'});
    });
    </script>

be


   <script type="text/javascript">
    $(function(){
        $("#faded").faded({
            speed: 500,
            crossfade: true,
            autoplay: 10000,
            autopagination:false
        });

        $('#domain-form').jqTransform({imgPath:'jqtransformplugin/img/'});
    });
    </script>

Edited by sparky
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated