本文整理汇总了PHP中JS::require_script方法的典型用法代码示例。如果您正苦于以下问题:PHP JS::require_script方法的具体用法?PHP JS::require_script怎么用?PHP JS::require_script使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JS
的用法示例。
在下文中一共展示了JS::require_script方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetch
public static function fetch()
{
if (!self::is_fetched()) {
JS::require_jquery();
JS::require_script("/" . FRAMEWORK_CORE_PATH . "js/jquery/screen_resolution.js");
}
}
示例2: testJsOrder
function testJsOrder()
{
JS::clean();
JS::require_jquery();
JS::require_script("/js/jquery/pippo.js");
JS::require_script("/js/jquery/another_js.js");
$required_javascripts = PageData::instance()->get("/page/headers/required_javascripts/list");
$this->assertTrue(strstr("/framework/core/js/jquery/jquery.min.js", $required_javascripts[0]["script_path"]) == 0, "Il primo file non corrisponde!!");
$this->assertTrue(strstr("/js/jquery/pippo.js", $required_javascripts[1]["script_path"]) == 0, "Il secondo file non corrisponde!!");
$this->assertTrue(strstr("/js/jquery/another_js.js", $required_javascripts[2]["script_path"]) == 0, "Il terzo file non corrisponde!!");
}
示例3: isset
<?php
JS::require_jquery();
JS::require_script("/js/jquery/jquery.lightbox-0.5.min.js");
CSS::require_css_file("/css/jquery-lightbox/jquery.lightbox-0.5.css");
$html_gallery_name = str_replace("/", "_", $gallery_name);
$thumb_image_height = isset($thumb_image_height) ? $thumb_image_height : 50;
?>
<div id="gallery_<?php
echo $html_gallery_name;
?>
">
<ul>
<?php
foreach ($image_list as $k => $v) {
if (isset(Config::instance()->GALLERY_RESIZE_BY_WIDTH)) {
$final_image_path = image_w($v["path"], Config::instance()->GALLERY_RESIZE_BY_WIDTH);
} else {
if (isset(Config::instance()->GALLERY_RESIZE_BY_HEIGHT)) {
$final_image_path = image_h($v["path"], Config::instance()->GALLERY_RESIZE_BY_HEIGHT);
} else {
$final_image_path = $v["path"];
}
}
?>
<li>
<a href="<?php
echo $final_image_path;
?>
"><img height="<?php
echo $thumb_image_height;
示例4:
<?php
JS::require_jquery();
JS::require_script("/js/tiny_mce/jquery.tinymce.js");
if (!isset($htmleditor_field_id)) {
$htmleditor_field_id = "textarea_testo";
}
?>
<script type="text/javascript">
$(function() {
$('#<?php
echo $htmleditor_field_id;
?>
').tinymce({
// Location of TinyMCE script
script_url : '/js/tiny_mce/tiny_mce.js',
// General options
theme : "advanced",
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,<?php
if (!$hide_file_selection) {
?>
fgfileselect,<?php
}
?>
cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
示例5: isset
<?php
CSS::require_css("/css/jquery/jquery.jscrollpane.css");
JS::require_jquery();
JS::require_script("/js/jquery/jquery.mousewheel.js");
JS::require_script("/js/jquery/mwheelIntent.js");
JS::require_script("/js/jquery/jquery.jscrollpane.min.js");
?>
<script type="text/javascript">
$(function()
{
$('<?php
echo isset($id) ? $id : "." . $class;
?>
').jScrollPane(
{
autoReinitialise: true
}
);
});
</script>
示例6: json_encode
?>
<script type="text/javascript">
$("#<?php
echo $input_id;
?>
").datepicker(<?php
echo json_encode($options);
?>
);
<?php
if (isset($image_id)) {
?>
$("#<?php
echo $image_id;
?>
").on("click",function ()
{
$("#<?php
echo $input_id;
?>
").datepicker("show");
});
<?php
}
?>
</script>
<?php
} else {
JS::require_script("/js/jquery/datepicker/default_datepicker.js");
}
示例7:
<?php
JS::require_jquery();
JS::require_script("/framework/core/js/jquery/jquery.mousewheel.js");
JS::require_script("/framework/core/js/jquery/mwheelIntent.js");
JS::require_script("/framework/core/js/jquery/jquery.jscrollpane.min.js");
JS::require_script("/framework/core/js/jquery/content_scroller.js");
CSS::require_css_file("/framework/core/js/jquery/css/jquery.jscrollpane.css");
示例8:
<?php
JS::require_script("http://connect.facebook.net/it_IT/all.js");
?>
<div id="fb-root"></div>
<script>
FB.init({
appId : '<?php
echo Config::instance()->FACEBOOK_APP_ID;
?>
',
status : true,
cookie : true,
xfbml : true
});
</script>
示例9:
<?php
JS::require_jquery();
JS::require_script("/js/jquery/show_popup.js");
$js_size = "{ width:" . $width . " ,height:" . $height . "}";
?>
show_popup('<?php
echo $url;
?>
',<?php
echo $js_size;
?>
);
示例10:
<?php
JS::raw("var switchTo5x=true;");
JS::require_script("http://w.sharethis.com/button/buttons.js");
JS::raw("stLight.options({publisher: \"32c5799c-98c2-477f-8411-33138c29989c\"});");
?>
<span class='st_sharethis_large' displayText='ShareThis'></span>
<span class='st_facebook_large' displayText='Facebook'></span>
<span class='st_twitter_large' displayText='Tweet'></span>
<span class='st_linkedin_large' displayText='LinkedIn'></span>
<span class='st_email_large' displayText='Email'></span>
示例11:
<?php
JS::require_jquery();
JS::require_script("/js/jquery.jcarousel.js");
$final_gallery_name = str_replace("/", "_", $gallery_name);
?>
<script type="text/javascript">
$(document).ready(function(){
$("#gallery_<?php
echo $final_gallery_name;
?>
").jcarousel({
auto: <?php
echo $wait_seconds;
?>
,
scroll : <?php
echo $items_scrolled;
?>
,
wrap: 'circular'
});
});
</script>
示例12:
<?php
JS::require_script_file("/framework/core/js/google/translator.js");
JS::require_script("//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=it");
示例13:
<?php
JS::require_jquery();
JS::require_script("/js/jquery/jquery.cycle.all.js");
示例14: isset
<?php
JS::require_jquery();
JS::require_script("/js/jquery/jcarousel_lite_1_0_1.min.js");
?>
<script type="text/javascript">
$(function()
{
$(".<?php
echo $container_div_class;
?>
").jCarouselLite(
{
vertical: true,
visible: <?php
echo isset($num_entries) ? $num_entries : "3";
?>
,
auto: <?php
echo isset($delay) ? $delay : "2000";
?>
,
speed: <?php
echo isset($speed) ? $speed : "2000";
?>
});
});
</script>