我试图通过点击锚链接突出显示div.我的意思是如果我点击<a href="$id1" class="scroll">My link</a>
滚动到<div id="id1">here</div>这个页面我有很多锚链接和div所以很难混淆识别哪个div然后滚动得更好突出点击锚点div上的边框.我尝试下面的代码,但它不起作用.
<script type="text/javascript">
// anchor click jump scroll
jQuery(document).ready(function(jQuery) {
jQuery(".scroll").click(function(event){
event.preventDefault();
jQuery('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);
});
});
jQuery(".scroll").click(function() {
jQuery("#post-<?php echo get_the_ID(); ?>").css("border", "1px solid #ff0000").delay(1000).css("border", "none");
};
</script>
Run Code Online (Sandbox Code Playgroud)
我不确定它是否需要jquery ui或只是jquery就足够了
我已经设置了config.rb文件,如下所示
http_path = "/"
css_dir = ""
sass_dir = "sass"
images_dir = "images"
fonts_dir = 'fonts'
fonts_path = ""
javascripts_dir = "js"
Run Code Online (Sandbox Code Playgroud)
这是我的目录路径
在项目根目录中
style.css fonts/my-fonts sass/style.sass images/my-all-images
现在,当我尝试使用font-face添加字体时,它正在为字体目录添加前导斜杠,/fonts但我只想要它fonts
上海社会科学院
+font-face("Ubuntu", font-files("ubuntu/ubuntu-r-webfont.eot", "ubuntu/ubuntu-r-webfont.eot?#iefix", "ubuntu/ubuntu-r-webfont.woff", "ubuntu/ubuntu-r-webfont.ttf", "ubuntu/ubuntu-r-webfont.svg#ubunturegular"))
Run Code Online (Sandbox Code Playgroud)
生成CSS
@font-face {
font-family: "Ubuntu";
src: url('/fonts/ubuntu/ubuntu-r-webfont.eot') format('embedded-opentype'), url('/fonts/ubuntu/ubuntu-r-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/ubuntu/ubuntu-r-webfont.woff') format('woff'), url('/fonts/ubuntu/ubuntu-r-webfont.ttf') format('truetype'), url('/fonts/ubuntu/ubuntu-r-webfont.svg#ubunturegular') format('svg');
}
Run Code Online (Sandbox Code Playgroud) 我正在为多位作者创建一个Wordpress网站,并希望根据文章提交设置用户角色.意味着如果任何用户有0-10篇文章他们将转到贡献者角色,如果11-30将转到作者角色,如果31-100将转到编辑角色.
另外我想建立一个默认注册组将是Subscriber的注册系统.他们会收到验证邮件的链接
如果您想成为贡献者,请点击下面的链接.(要提交文章,您必须至少具有贡献者权限)http://链接将在此处...此链接自动将用户角色从订阅者更改为贡献者.
希望我能从专家那里得到解决方案.我发布这个问题有很多朋友的希望.
这可能是简单而愚蠢的问题,但首先我正在学习PHP,所以你的帮助将不胜感激.
我试图通过指定的条件语句获取变量.
$gender = $curauth->gender; // getting from wordpress user profile.
if($gender === 'Male') {
echo 'his';
} else {
echo 'her';
}
Run Code Online (Sandbox Code Playgroud)
所以我想要做的是它将检查用户是否是男性,而不是在某些描述中它将使用他,如果是女性,它将使用她.像下面的东西
echo 'jatin soni doesn't have set this option yet. His option will be deactivated soon.';
Run Code Online (Sandbox Code Playgroud)
所以这里他将用上面的条件代码设置.
如何插入字段集通知使用jquery现在我有这个
<form action="" method="post">
all dynamic field generated with db and array
</form>
Run Code Online (Sandbox Code Playgroud)
我想在表单标记之间添加fieldset,以便代码成为
<form action="" method="post">
<fieldset>
all dynamic field generated with db and array
</fieldset>
</form>
Run Code Online (Sandbox Code Playgroud) 如何在git bash中编写命令Program Files (x86)?它在下面给我错误
user@PC /C
$ ./git-credential-winstore -i C:\Program Files (x86)\Git\bin\
sh.exe": syntax error near unexpected token `('
Run Code Online (Sandbox Code Playgroud)
谁能告诉我如何写这条路径?
我在共享包含#idURL中的参数的链接方面遇到了很大的麻烦.
网址示例:
http://localhost/mysite/20/civitas-animum-genito-invenit-solutionem-ascendens-piratae?show=36#a36
Run Code Online (Sandbox Code Playgroud)
所以这里所有社交频道都发布过URL #36
http://localhost/q2a-16/20/civitas-animum-genito-invenit-solutionem-ascendens-piratae?show=36
Run Code Online (Sandbox Code Playgroud)
这是非常重要的,因为#36是子内容的id(锚跳)
所有共享链接(按钮)
$this->output('<a class="btn btn-tweet" target="_parent" href="javascript: void(0)" onClick="window.open(\'https://twitter.com/share?text='.$title.'&url='.$url.'&via=ME_HERE&wrap_links=true\', \'tweet\', \'toolbar=0,status=0,width=548,height=325,resizable=yes\');" ><i class="fa fa-twitter"></i></a>');
$this->output('<a class="btn btn-facebook" href="javascript: void(0)" onClick="window.open(\'http://www.facebook.com/sharer.php?u='.$url.'\', \'sharer\', \'toolbar=0,status=0,width=548,height=325,resizable=yes\');" target="_parent"><i class="fa fa-facebook"></i></a>');
$this->output('<a class="btn btn-google" href="https://plus.google.com/share?url='.$url.'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;"><i class="fa fa-google-plus"></i></a>');
$this->output('<a class="btn btn-linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url='.$url.'&title='.$title.'&summary='.$desc.'&source='.$url.'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;"><i class="fa fa-linkedin"></i></a>');
Run Code Online (Sandbox Code Playgroud)
获取完整URL的任何解决方案包括#id?
我正在尝试在更新到Codeigniter 3.0时摆脱404 Page not found错误
我正在使用Ion Auth和HMVC库.我已经修复了Ion Auth问题,我相信(不太确定)我已经修复了HMVC问题.如果不是不知道怎么调试^ _ ^呢.但是我已经用他们各自的回购更新了两个库.
我已成功登录,但是当系统尝试在登录后加载第一页时,它会给出404错误,这是日志
DEBUG - 2015-03-17 10:51:51 --> UTF-8 Support Enabled
DEBUG - 2015-03-17 10:51:51 --> Global POST, GET and COOKIE data sanitized
ERROR - 2015-03-17 10:51:51 --> 404 Page Not Found: ../modules/admin/controllers/dashboard//index
Run Code Online (Sandbox Code Playgroud)
注意:在最后一个段(索引)之前的URI中使用双斜杠.这不奇怪吗?
我想知道这里有什么问题.我已经尝试uri_protocol过设置AUTO,REQUEST_URI但是没有一个工作.
$config['uri_protocol'] = 'AUTO';
Run Code Online (Sandbox Code Playgroud)
和
$config['uri_protocol'] = 'REQUEST_URI';
Run Code Online (Sandbox Code Playgroud)
现在,我的发展完全停滞不前.任何人都可以帮我摆脱这个问题吗?非常感谢...!
路线信息
应用/配置/ routes.php文件
$route['default_controller'] = "users/login";
$route['404_override'] = '';
Run Code Online (Sandbox Code Playgroud)
application/modules/users/config/routes.php这是为了Ion Auth
$route['users/(:any)'] = "auth/$1";
Run Code Online (Sandbox Code Playgroud) 我无法优化tailwindcss与postCss使用laravel-mix和Scss。该npm run dev生成正确的CSS。但是,生产构建npm run prod不会导出我在HTML模板中使用的类。
{
"name": "school",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"keywords": [],
"author": "",
"license": …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 php 排序函数按字母顺序对数组进行排序。
Array ( [0] => Open Sans [1] => Wellfleet [2] => Rambla [3] => Dosis [4] => Noto Sans [5] => Domine [6] => Signika Negative [7] => Arvo [8] => Neuton [9] => Rufina [10] => Tinos [11] => Podkova [12] => Magra [13] => Bitter [14] => Anton [15] => Libre Baskerville [16] => Tienne [17] => Roboto [18] => Ruda [19] => Merriweather [20] => Amaranth [21] => Playfair Display SC [22] => Cinzel …Run Code Online (Sandbox Code Playgroud) php ×3
conditional ×2
jquery ×2
anchor ×1
arrays ×1
codeigniter ×1
compass-sass ×1
fieldset ×1
forms ×1
git ×1
laravel-mix ×1
npm ×1
postcss ×1
role ×1
sass ×1
sorting ×1
tailwind-css ×1
variables ×1
wordpress ×1