小编Ziv*_*man的帖子

使用jQuery动态添加幻灯片到Bootstrap 3轮播

我正在尝试使用jQuery向Bootstrap轮播添加幻灯片,但它并不是浏览器中的滑块.相反,它在列表视图中显示图像.

<!DOCTYPE html>
<html>
<head>
<link href="Assets/css/bootstrap.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">        </script>
<script src="Assets/js/bootstrap.min.js"></script>
<title></title>
<script>
    onload=function(){

        for(var m=3;m>=0;m--)
        {
            var path="file_uploads/"+m+".jpg";
            $(".carousel-indicators").after("<li data-target='#carousel-example-generic' data-slide-to=\""+m+"\"></li>");
            $(".carousel-inner").after("<div class='item'><img src='"+path+"' alt='"+m+"'></div>");             
        }

        $(".carousel-indicators li:first").addClass("active");
        $(".carousel-inner .item:first").addClass("active");
        $('.carousel').carousel();
    }
</script>
</head>
<body>
  <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
    <ol class="carousel-indicators">

    </ol>
    <!-- Wrapper for slides -->
    <div class="carousel-inner">       

    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left"></span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right"></span>
    </a>
  </div>
</body> …
Run Code Online (Sandbox Code Playgroud)

jquery slider carousel twitter-bootstrap-3

25
推荐指数
1
解决办法
4万
查看次数

Bootstrap按钮 - 无手形光标

我正在Visual Studio 2015中开发一个MVC6项目.我刚刚使用Bower添加了Bootstrap 3.3.6.在一个非常简单的html页面上,我引用了标题中的CSS和正文底部的Bootstrap,如下所示:

<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<script type="text/javascript" src="~/lib/bootstrap/dist/js/bootstrap.min.js"></script>
Run Code Online (Sandbox Code Playgroud)

我定义了一个按钮如下:

<button class="btn btn-primary">Hello</button>
Run Code Online (Sandbox Code Playgroud)

当我调试项目(IIS,IE11)时,按钮出现并且由Bootstrap显式设置,但没有手形光标.

如果我使用浏览器导航到Bootstrap样式按钮的示例,例如:http://www.w3schools.com/bootstrap/bootstrap_buttons.asp,手形光标将按照我的预期显示.所以这不是我的浏览器的错.

任何人都可以建议为什么我没有从一个简单的Bootstrap风格的按钮获得手形光标吗?

html visual-studio twitter-bootstrap twitter-bootstrap-3

8
推荐指数
2
解决办法
1万
查看次数

使用typescript使用模板创建HTML

尝试打字稿,我想实现以下目标:

从服务器获取问题文本和数字,并使用typescript在某个地方的DOM中显示它.

目前我有以下.ts文件:

class QuestionResponse {
    constructor(public questionText, public questionNumber) {
    }
}
function questioner(question: QuestionResponse) {

    return '<div data-val-id="${QuestionNumber}"> ${QuestionText} </div>';
}

var testQuestion = new QuestionResponse("Question text number 5", 5);

//this will be replaced by .innerHTML of some element:
alert(questioner(testQuestion));
Run Code Online (Sandbox Code Playgroud)

这不会将$ {QuestionNumber}替换为question.QuestionNumber ...也不会替换Text.我不想使用字符串附加,我想使用干净的html,最好是在单独的.html文件中.

基本上我在问:是否有可能使用打字稿,如果是的话,怎么样?如果没有,使用angularjs实现这一目标的最佳实践方法是什么?(但仍使用打字稿)

javascript dynamic-html angularjs typescript

5
推荐指数
1
解决办法
1万
查看次数

禁用错误声音Visual Studio 2012

寻找一种解决方案,但我只找到1个答案,这是一个不错的选择-它正在禁用系统声音...

我想要的是在生成错误时禁用Visual Studio发出的烦人的错误声音。我用耳机,真的很烦。我想禁用它,而无需在控制面板中禁用/修改Windows的系统声音...可以吗?

类似的问题

c# audio visual-studio visual-studio-2012

3
推荐指数
1
解决办法
2751
查看次数

用户控件中的控件是否可以由用户控件外部的验证器进行验证?

我有一个用户控件,它根据其他配置选择显示 TextBox 或 DropdownList。

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="CustomRelationshipDropDown.ascx.vb" Inherits="CustomRelationshipDropDown" %>

<asp:TextBox ID="TextBox1" runat="server" MaxLength="20"></asp:TextBox>
<asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList>
Run Code Online (Sandbox Code Playgroud)

隐藏代码:

<ValidationProperty("Value")>
<SupportsEventValidation()>
Partial Class CustomRelationshipDropDown
    Inherits UserControl

    Public Property Value() As String
        Get
            If GetList("RelationshipList") Is Nothing Then
                Return TextBox1.Text
            Else
                Return DropDownList1.SelectedValue
            End If
        End Get
        Set(ByVal Value As String)
            If GetList("RelationshipList") Is Nothing Then
                TextBox1.Text = Value
            Else
                DropDownList1.SelectedValue = Value
            End If
        End Set
    End Property

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim list …
Run Code Online (Sandbox Code Playgroud)

vb.net asp.net

2
推荐指数
1
解决办法
1551
查看次数

Epi服务器 - 使内容区域特定于块

我想实现以下目标 -

构建一个包含3个不同ContentArea的页面类型,并且用户只能在每个区域中放置特定的块类型.

例如 - ContentArea1只能接受块类型"BlockType1",ContentArea2只能接受"BlockType2"等等.(它不需要是通用的,我可以指定硬编码哪种类型应该适合每个内容区域.

有可能实现吗?也许有另一种方式?(我知道你可以用块类型创建一个属性,但我想在不同的地方使用相同的块)

ps:使用EPI-SERVER 8

model-view-controller episerver episerver-8

1
推荐指数
1
解决办法
114
查看次数

在页面脚本加载后在块中呈现脚本(EPI 8/ MVC)

我正在构建一个动态页面类型,我想根据加载到特定 ContentArea 中的块加载不同的脚本。

这是区域:

[AllowedTypes(new[] { typeof(Types.SomeBlockType)})]
public virtual ContentArea SomeArea { get; set; }
Run Code Online (Sandbox Code Playgroud)

在我的页面视图中,我正在渲染内容和脚本:(脚本渲染是通过布局)

@Html.PropertyFor(...)
.
.
@section Scripts {

    ...//some scripts loaded
}
Run Code Online (Sandbox Code Playgroud)

我遇到的问题是 SomeArea 内容块内的脚本在脚本部分之前运行。我希望在我的布局脚本和页面脚本加载后执行块脚本...

感谢任何帮助。

asp.net-mvc episerver episerver-8

0
推荐指数
1
解决办法
1390
查看次数

从外部文件在打字稿中声明var获取ReferenceError:...未定义

我有以下打字稿文件->

module someModule {
declare var servicePort: string;

export class someClass{
constructor(){
  servicePort = servicePort || ""; //ERROR= 'ReferenceError: servicePort is not defined'
}
Run Code Online (Sandbox Code Playgroud)

也尝试在“ someClass”内部的功能之一上执行此操作->

someFunction = () => {
    if (servicePort && servicePort != '') { //ERROR - also servicePort is not defined
            //do something with servicePort 
        }
}
Run Code Online (Sandbox Code Playgroud)

如果我在js / html文件的某处定义var servicePort,它将可以使用,但是并非我的所有页面都包含servicePort var,因此我想毫无例外地从该变量中安全地获取值。我究竟做错了什么?

javascript variables typescript

0
推荐指数
1
解决办法
811
查看次数