ขอถามส่วน stylesheet
ถาม-ตอบ แนะนำไอเดียว โค้ดตัวอย่าง แนวทาง วิธีแก้ปัญหา ขอถามส่วน stylesheet
ขอถามส่วน stylesheet
โดย:
Panyaadd IP:
110.77.181.xxx วันที่:
19-08-2015 เวลา:
15:09:19
คือว่ากรุณาเครื่องที่ผมใช้ไม่สามารถเล่นอินเตอร์ได้
ส่วน code jquery-ui.css
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" />
ผมต้องแก้ไขยังไงแล้วหาไฟล์ได้ไหมครับ
ส่วน code jquery-ui.css
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" />
ผมต้องแก้ไขยังไงแล้วหาไฟล์ได้ไหมครับ

คำแนะนำ และการใช้งาน
สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก
- ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ
ความคิดเห็นที่
1
มีไฟล์ jquery-ui.css แล้ว
ที่อยู่ js/jquery-ui.css
แต่สวน
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" /
จะเขียนยังไงครับ
ที่อยู่ js/jquery-ui.css
แต่สวน
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" /
จะเขียนยังไงครับ

ความคิดเห็นที่
2
โค้ดเต็มที่มา น่าจะแนวในบทความนี้
สร้าง jquery plugin แสดง ปฏิทิน วัน เดือน พ.ศ. ภาษาไทย สำหรับ datepicker
http://www.ninenik.com/content.php?arti_id=469 via @ninenik
แต่ตัวอย่างจากโค้ดเป็นการกำหนดด้วยตัวแปร php เปลี่ยนแค่ค่าใน $jquery_ui_v="1.8.5";
แต่ตัวอย่างจากโค้ดเป็นการกำหนดด้วยตัวแปร php เปลี่ยนแค่ค่าใน $jquery_ui_v="1.8.5";
เป็นเวอร์ชั่นที่ต้องการ และ theme ที่ต้องการ ด้วย
$jquery_ui_theme=$theme[22];
ลงใน
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" />
ค่าก็จะเปลี่ยนตาม
แต่ถ้าเราต้องการกำหนดค่าเข้าไปเลย แบบไม่ใช้ตัวแปร ก็จะใช้เป็น
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/ui-darkness/jquery-ui.css" />
โค้ดด้านล่างคือการใช้แบบกำหนดด้วยตัวแปร เปลี่ยนค่่าตามต้องการ
<?php
$jquery_ui_v="1.8.5";
$theme=array(
"0"=>"base",
"1"=>"black-tie",
"2"=>"blitzer",
"3"=>"cupertino",
"4"=>"dark-hive",
"5"=>"dot-luv",
"6"=>"eggplant",
"7"=>"excite-bike",
"8"=>"flick",
"9"=>"hot-sneaks",
"10"=>"humanity",
"11"=>"le-frog",
"12"=>"mint-choc",
"13"=>"overcast",
"14"=>"pepper-grinder",
"15"=>"redmond",
"16"=>"smoothness",
"17"=>"south-street",
"18"=>"start",
"19"=>"sunny",
"20"=>"swanky-purse",
"21"=>"trontastic",
"22"=>"ui-darkness",
"23"=>"ui-lightness",
"24"=>"vader"
);
$jquery_ui_theme=$theme[22];
?>
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" />

ความคิดเห็นที่
3
กรณีผมเก็บไฟล์
http://127.0.0.1/cad_loan/js/jquery-ui.css
ถ้าผมแก้ไขเป็น
<link type="text/css" rel="stylesheet" href="http://127.0.0.1/cad_loan/js//jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" />
ประมาณนี้ได้ไหมครับ แต่ว่าไม่แสดงครับ
http://127.0.0.1/cad_loan/js/jquery-ui.css
ถ้าผมแก้ไขเป็น
<link type="text/css" rel="stylesheet" href="http://127.0.0.1/cad_loan/js//jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" />
ประมาณนี้ได้ไหมครับ แต่ว่าไม่แสดงครับ


ความคิดเห็นที่
4
ใช้แบบนี้ได้เลย ถ้าไฟล์ที่โหลดมาอยู่นอกสุด
<link type="text/css" rel="stylesheet" href="jquery-ui.css" />
แต่ถ้าอยู่ในโฟลเดอร์อื่น ก็กำหนด path ให้ถูกต้อง เช่นถ้าอยู่ใน โฟลเดอร์ js
ก็กำหนด path
<link type="text/css" rel="stylesheet" href="js/jquery-ui.css" />
อะไรประมาณนี้
