Search Results

Search found 922 results on 37 pages for 'h2'.

Page 9/37 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • IE8 web slice - CSS problem

    - by rjovic
    Again me with IE8 web slice :) This time i have following problem. I created web slice for IE8 and created button for users where they can choice to add it to their browsers. Code is : <input class="add" type="button" value="Dodaj Xica web slice u IE8!" onclick='window.external.AddToFavoritesBar("http://localhost:51914/Home/GetWebSlice", "xica.rjovic.com", "slice");' /> There is everything fine, and web slice is added to IE8 and web page is displayed correct. But I have problem with CSS in web slice. I defined css in it, but when web slice i rendered there are only black fonts without any css properties. My web slice is defined as : <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>GetWebSlice</title> <style type="text/css"> p {color: white; } body {background-color: blue; } .container {background-color: red;} </style> </head> <body> <div class="hslice container" id="xica"> <h2 class="entry-title container">Xica web slice</h2> <div class="entry-content"> <h2>Saldo : <b><%= ViewData["total"] %></b></h2> <p><%= ViewData["cardNumber"] %></p> <p>Status : <%= ViewData["status"] %></p> </div> </div> </body> </html> When I try to see web slice directly in my browser then everything is ok, and css is show as expected. Thank you...! EDIT : here is the picture of problem : http://www.deviantpics.com/share-2F10_4BD73E25.html

    Read the article

  • Choose variable based on users choice from picklist.

    - by Kelbizzle
    I have this form. Basically what I want is to send a auto-response with a different URL based on what the user picks in the "attn" picklist. I've been thinking I could have a different variable for each drop down value. It will then pass this variable on to the mail script that will choose which URL to insert inside the auto response that is sent. It gives me a headache thinking about it sometimes. What's the easiest way to accomplish this? Am I making more work for myself? I really don't know because I'm no programmer. Thanks in advance! Here is the form: <form name="contact_form" method="post" action="sendemail_reports.php" onsubmit="return validate_form ( );"> <div id='zohoWebToLead' align=center> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="txt_body"> <table border=0 cellspacing=0 cellpadding=5 width=480 style='border-bottom-color: #999999; border-top-color: #999999; border-bottom-style: none; border-top-style: none; border-bottom-width: 1px; border-top-width: 2px; background-color:transparent;'> <tr> <td width='75%'><table width=480 border=0 cellpadding=5 cellspacing=0 style='border-bottom-color: #999999; border-top-color: #999999; border-bottom-style: none; border-top-style: none; border-bottom-width: 1px; border-top-width: 2px; background-color:transparent;'> <input type="hidden" name="ip" value="'.$ipi.'" /> <input type="hidden" name="httpref" value="'.$httprefi.'" /> <input type="hidden" name="httpagent" value="'.$httpagenti.'" /> <tr></tr> <tr> <td colspan='2' align='left' style='border-bottom-color: #dadada; border-bottom-style: none; border-bottom-width: 2px; color:#000000; font-family:sans-serif; font-size:14px;'><strong>Send us an Email</strong></td> </tr> <tr> <td nowrap style='font-family:sans-serif;font-size:12px;font-weight:bold' align='right' width='25%'> First Name   : </td> <td width='75%'><input name='visitorf' type='text' size="48" maxlength='40' /></td> </tr> <tr> <td nowrap style='font-family:sans-serif;font-size:12px;font-weight:bold' align='right' width='25%'>Last Name   :</td> <td width='75%'><input name='visitorfl' type='text' size="48" maxlength='80' /></td> </tr> <tr> <td nowrap style= 'font-family:sans-serif;font-size:12px;font-weight:bold' align='right' width='25%'> Email Adress  : </td> <td width='75%'><input name='visitormail' type='text' size="48" maxlength='100' /></td> </tr> <tr> <td nowrap style='font-family:sans-serif;font-size:12px;font-weight:bold' align='right' width='25%'> Phone   : </td> <td width='75%'><input name='visitorphone' type='text' size="48" maxlength='30' /></td> </tr> <td nowrap style='font-family:sans-serif;font-size:12px;font-weight:bold' align='right' width='25%'> Subject   : </td> <td width='75%'><select name="attn" size="1"> <option value=" Investment Opportunities ">Investment Opportunities </option> <option value=" Vacation Rentals ">Vacation Rentals </option> <option value=" Real Estate Offerings ">Real Estate Offerings </option> <option value=" Gatherings ">Gatherings </option> <option value=" General ">General </option> </select></td> <tr> <td nowrap style= 'font-family:sans-serif;font-size:12px;font-weight:bold' align='right' width='25%'> Message   :<br /> <em>(max 5000 char)</em></td> <td width='75%'><textarea name='notes' maxlength='5000' cols="48" rows="3"></textarea></td> </tr> <tr> <td colspan=2 align=center style=''><input name='save' type='submit' class="boton" value=Send mail /> &nbsp; &nbsp; <input type='reset' name='reset' value=Reset class="boton" /></td> </tr> </table></td> </tr> </table> </div> </form> Here is the mail script: <?php //the 3 variables below were changed to use the SERVER variable $ip = $_SERVER['REMOTE_ADDR']; $httpref = $_SERVER['HTTP_REFERER']; $httpagent = $_SERVER['HTTP_USER_AGENT']; $visitorf = $_POST['visitorf']; $visitorl = $_POST['visitorl']; $visitormail = $_POST['visitormail']; $visitorphone = $_POST['visitorphone']; $notes = $_POST['notes']; $attn = $_POST['attn']; //additional headers $headers = 'From: Me <[email protected]>' . "\n" ; $headers = 'Bcc: [email protected]' . "\n"; if (eregi('http:', $notes)) { die ("Do NOT try that! ! "); } if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) { echo "<h2>Use Back - Enter valid e-mail</h2>\n"; $badinput = "<h2>Feedback was NOT submitted</h2>\n"; echo $badinput; die ("Go back! ! "); } if(empty($visitorf) || empty($visitormail) || empty($notes )) { echo "<h2>Use Back - fill in all fields</h2>\n"; die ("Use back! ! "); } $todayis = date("l, F j, Y, g:i a") ; $subject = "I want to download the report about $attn"; $notes = stripcslashes($notes); $message = "$todayis [EST] \nAttention: $attn \nMessage: $notes \nFrom: $visitorf $visitorl ($visitormail) \nTelephone Number: $visitorphone \nAdditional Info : IP = $ip \nBrowser Info: $httpagent \nReferral : $httpref\n"; //check if the function even exists if(function_exists("mail")) { //send the email mail($_SESSION['email'], $subject, $message, $headers) or die("could not send email"); } else { die("mail function not enabled"); } header( "Location: http://www.domain.com/thanks.php" ); ?>

    Read the article

  • JavaScript Templating Engine

    - by Randy Gurment
    Hi, I would like to create universal templating engine in JavaScript, how to? HTML template <h1><%title1%></h1> <h2><%title2%></h2> JSON file { "title1" : "Hello World!", "title2" : "Hi World!" } Javascript Find in HTML file <%title1% Find in JSON file variable "title1" Replace <%title1% with value of variable "title1" Same for <%title2% Thanks!

    Read the article

  • Floats will not align, stay staggered, can't find a solution?

    - by Sarah Proper
    What I am trying to do is build a multi column layout. The main two sections are divided 2/3 to 1/3 and inside the 2/3 column is divided 2/3 1/3 as well. My problem is that my floats will not align nicely with each other, choosing instead to stagger like stairs. I have tried declaring the widths smaller, floating them individually, including in the float sections display:block,inline, or inline-block and nothing seems to be working. I am getting really frustrated and would appreciate any help! Thanks! <div class="wrapper"> <div class="width50" style="float:left;"> <h1>Our Mission:</h1> <p> Bacon ipsum dolor sit amet swine spare ribs pork meatloaf pancetta filet mignon. Rump frankfurter pork belly prosciutto beef boudin andouille pig pork chop meatball ham drumstick filet mignon. Strip steak flank shank pig, tongue tri-tip jowl leberkas sirloin brisket t-bone. Ground round spare ribs salami capicola filet mignon. Capicola turkey t-bone corned beef sausage ham hock. Corned beef capicola leberkas pork chop, swine pastrami drumstick. Frankfurter fatback bacon jowl short loin, jerky pancetta bresaola corned beef shoulder drumstick ball tip tri-tip.</p> <div class="width50 float-left"> <img src="@Url.StaticContent(Links.Content.images.map_homepage_png)" alt="Map" /> </div> <div class="width33 float-right"> <img src="@Url.StaticContent(Links.Content.images.address_line_text_png)" alt="addressline" /> <br /> <h3>address</h3> <b>405 Empire Boulevard<br /> Rochester, NY 14609 </b> </div> </div> <div class="width33" style="float:right;"> <h1>Events</h1> <ul class="events"> <li> <h2>Fall Volunteer Festival</h2> <p> <b>october 6<br /> 10 am to 3pm </b> </p> <p> come to our town location for some fun activities for family and friends! </p> </li> <li> <h2>Fall Volunteer Festival</h2> <p> <b>october 6<br /> 10 am to 3pm </b> </p> <p> come to our town location for some fun activities for family and friends! </p> </li> <li> <h2>Fall Volunteer Festival</h2> <p> <b>october 6<br /> 10 am to 3pm </b> </p> <p> come to our town location for some fun activities for family and friends! </p> </li> </ul> </div> </div> </div> and the css: .clearfix:before, .clearfix:after, .grid-block:before, .grid-block:after, .deepest:before, .deepest:after { content: ""; display: table; } .clearfix:after, .grid-block:after, .deepest:after { clear: both; } .grid-box { float: left; } /* Grid Units */ .width16 { width: 16.666%; } .width20 { width: 20%; } .width25 { width: 25%; } .width33 { width: 39.333%; } .width40 { width: 40%; } .width50 { width: 50%; } .width60 { width: 60%; } .width66 { width: 66.666%; } .width75 { width: 75%; } .width80 { width: 80%; } .width100 { width: 100%; } .width16, .width20, .width25, .width33, .width40, .width50, .width60, .width66, .width75, .width80, .width100 { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 5px 10px 5px 10px; } /* Create new Block Formatting Contexts */ .bfc-o { overflow: hidden; } .bfc-f { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; float: left; } /* Align Boxes */ .float-left { float: left; } .float-right { float: right; } /* Grid Gutter */ .grid-gutter.grid-block { margin: 0 -15px; } .grid-gutter > .grid-box > * { margin: 0 15px; } .grid-gutter > .grid-box > * > :first-child { margin-top: 0; } .grid-gutter > .grid-box > * > :last-child { margin-bottom: 0; } /* Layout Defaults --------------------------------------------------------------------------------------- -------------*/ /* Center Page */ .wrapper { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; margin: auto; } /* Header */ #header { position: relative; padding-top: 10px; } #toolbar .float-left .module, #toolbar .float-left > time { margin: 0 15px 0 0; float: left; } #toolbar .float-right .module { margin: 0 0 0 15px; float: right; } #headerbar .module { max-width: 300px; margin-right: 0; float: right; } #logo, #logo > img, #menu { float: left; } #search { float: right; } #banner { position: absolute; top: 0; right: -200px; } /* Footer */ #footer { position: relative; text-align: center; } /* Absolute */ #absolute { position: absolute; z-index: 15; width: 100%; }

    Read the article

  • Using jQuery validation plugin with tabbed navigation

    - by user3438917
    I have a tabbed navigation wizard, for which the first section needs to be validated before proceeding to the next tab. The validation should trigger when the user hits the "next" button. I am unable to get the validation to trigger though: <form id="target-group" novalidate="novalidate"> <div class="box"> <div class='box-header-main'><h2><img src="assets/img/list.png" /> Target Group Information</h2></div> <br /> <div class='box'> <div class='box-header-property'><h2><span data-bind="text:Name">New Target Group</span> | <i class='fa fa-file'></i></h2></div> <br /> <div class='row'> <div id='flight-wizard'> <div id='content' class='col-lg-12'> <div class='col-lg-12'> <div id='tabs'> <ul> <li id="targetgroup-info-tab"><a href='#tabs-1'><i class="fa fa-info-circle"></i>Target Group Info</a></li> <li id="zone-tab"><a href='#tabs-2'><i class="fa fa-map-marker"></i>Zones</a></li> </ul> <div id='tabs-1'> <div class='row'> <div class='col-xs-6'> <div class='form-group'> Name<sup>*</sup> <input id="selectError0" name="name" class='form-control col-xs-12' data-bind="value: asdf" placeholder='Enter Name ...' /> </div> <form class='form-horizontal'> <div class='form-group'> Product(s)<sup>*</sup> <div class='controls' id='products'> <select id='selectError3' class='form-control' data-bind="options:test, optionsText: 'Name', optionsValue : 'test', value: test, optionsCaption: 'Choose Product...'"></select> </div> </div> </form> </div> <!--RIGHT PANE--> <div class='col-xs-6'> <div class='form-group'> Platform<sup>*</sup> <div class='controls'> <select id="selectError2" class='form-control' data-bind="options:test, optionsText: 'Name', optionsValue: 'test', value : test, optionsCaption: 'Choose Platform...'"></select> </div> </div> <form class='form-horizontal'> <div class='form-group'> AdTypes(s)<sup>*</sup> <div class='controls' id='adtypes'> <select multiple="" id='adtypesselect' class='form-control' data-rel="chosen" data-bind="options:test, optionsText: 'Name', optionsValue : 'test', selectedOptions: test, optionsCaption: 'test...'"></select> </div> </div> </form> <button id="btn_cancel_large" class='btn btn-large btn-primary btn-round'><i class='fa fa-ban' /></i> Cancel</button> <button id="btn-next-large" class='btn btn-large btn-primary btn-round'>Next <i class='fa fa-arrow-circle-right'></i></button> </div> <!--end of right pane--> </div> </div> <div id='tabs-2'> <div class='row'> <div class='col-lg-12'> <div class='row'> <div class='col-lg-12'> <div id='zones_list' class='box-content'> <div id='add-new-targetgroupzone' class='add-new'><i class='fa fa-plus-circle'></i><a href='/#/inventory/targeting/' onclick="return false;">Add Zone</a></div> <table id="results" width="100%"> <thead> <tr> <th>Publisher</th> <th>Property</th> <th>Zone</th> <th>AdTypes</th> <th width='10%'>Quick&nbsp;Actions</th> </tr> </thead> </table> </div> </div> </div> </div> </div> <br /> <div class="btn_row"> <button id="btn_cancel_large2" class='btn btn-large btn-primary btn-round'><i class='fa fa-ban' /></i> Cancel</button> <button id="btn-submit-large" class='btn btn-large btn-primary btn-round'>Submit <i class='fa fa-arrow-circle-down'></i></button> </div> </div> </div> </div> </div> </div> </div> </div> </div> </form> <form id="zones-form" style="display: none;" novalidate="novalidate" class="slideup-form"> <div class="box"> <div class="box-header-panel"> <h2>Add Target Group Zone</h2> <div class="box-icon" id="zones-form-close"> <i class="fa fa-arrow-circle-down"></i> </div> </div> <div class="box-content clearfix"> <div class="box-content"> <table id="zones-list" width="100%"> <thead> <tr> <th>Publisher</th> <th>Property</th> <th>Zone</th> <th>AdTypes</th> <th width='10%'>Quick&nbsp;Actions</th> </tr> </thead> </table> </div> </div> </div> </div> </form> jQuery: $("#target-group").validate({ rules: { name: { required: true } }, messages: { name: "Name required", } }); $('#btn-next-large').click(function () { if ($('#target-group').valid()) $tabs.tabs('select', $(this).attr("rel")); });

    Read the article

  • MVC 3 Client Validation works intermittently

    - by Gutek
    I have MVC 3 version, System.Web.Mvc product version is: 3.0.20105.0 modified on 5th of Jan 2011 - i think that's the latest. I’ve notice that client validation is not working as it suppose in the application that we are creating, so I’ve made a quick test. I’ve created basic MVC 3 Application using Internet Application template. I’ve added Test Controller: using System.Web.Mvc; using MvcApplication3.Models; namespace MvcApplication3.Controllers { public class TestController : Controller { public ActionResult Index() { return View(); } public ActionResult Create() { Sample model = new Sample(); return View(model); } [HttpPost] public ActionResult Create(Sample model) { if(!ModelState.IsValid) { return View(); } return RedirectToAction("Display"); } public ActionResult Display() { Sample model = new Sample(); model.Age = 10; model.CardNumber = "1324234"; model.Email = "[email protected]"; model.Title = "hahah"; return View(model); } } } Model: using System.ComponentModel.DataAnnotations; namespace MvcApplication3.Models { public class Sample { [Required] public string Title { get; set; } [Required] public string Email { get; set; } [Required] [Range(4, 120, ErrorMessage = "Oi! Common!")] public short Age { get; set; } [Required] public string CardNumber { get; set; } } } And 3 views: Create: @model MvcApplication3.Models.Sample @{ ViewBag.Title = "Create"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2>Create</h2> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> @*@{ Html.EnableClientValidation(); }*@ @using (Html.BeginForm()) { @Html.ValidationSummary(false) <fieldset> <legend>Sample</legend> <div class="editor-label"> @Html.LabelFor(model => model.Title) </div> <div class="editor-field"> @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title) </div> <div class="editor-label"> @Html.LabelFor(model => model.Email) </div> <div class="editor-field"> @Html.EditorFor(model => model.Email) @Html.ValidationMessageFor(model => model.Email) </div> <div class="editor-label"> @Html.LabelFor(model => model.Age) </div> <div class="editor-field"> @Html.EditorFor(model => model.Age) @Html.ValidationMessageFor(model => model.Age) </div> <div class="editor-label"> @Html.LabelFor(model => model.CardNumber) </div> <div class="editor-field"> @Html.EditorFor(model => model.CardNumber) @Html.ValidationMessageFor(model => model.CardNumber) </div> <p> <input type="submit" value="Create" /> </p> </fieldset> @*<fieldset> @Html.EditorForModel() <p> <input type="submit" value="Create" /> </p> </fieldset> *@ } <div> @Html.ActionLink("Back to List", "Index") </div> Display: @model MvcApplication3.Models.Sample @{ ViewBag.Title = "Display"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2>Display</h2> <fieldset> <legend>Sample</legend> <div class="display-label">Title</div> <div class="display-field">@Model.Title</div> <div class="display-label">Email</div> <div class="display-field">@Model.Email</div> <div class="display-label">Age</div> <div class="display-field">@Model.Age</div> <div class="display-label">CardNumber</div> <div class="display-field">@Model.CardNumber</div> </fieldset> <p> @Html.ActionLink("Back to List", "Index") </p> Index: @{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2>Index</h2> <p> @Html.ActionLink("Create", "Create") </p> <p> @Html.ActionLink("Display", "Display") </p> Everything is default here – Create Controller, AddView from controller action with model specified with proper scaffold template and using provided layout in sample application. When I will go to /Test/Create client validation in most cases works only for Title and Age fields, after clicking Create it works for all fields (create does not goes to server). However in some cases (after a build) Title validation is not working and Email is, or CardNumber or Title and CardNumber but Email is not. But never all validation is working before clicking Create. I’ve tried creating form with Html.EditorForModel as well as enforce client validation just before BeginForm: @{ Html.EnableClientValidation(); } I’m providing a source code for this sample on dropbox – as maybe our dev env is broken :/ I’ve done tests on IE 8 and Chrome 10 beta. Just in case, in web config validation scripts are enabled: <appSettings> <add key="ClientValidationEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/> </appSettings> So my questions are Is there a way to ensure that Client validation will work as it supposed to work and not intermittently? Is this a desired behavior and I'm missing something in configuration/implementation?

    Read the article

  • Rails has-and-belongs-to-many form question

    - by swilliams
    Sorry for the semi-generic title, but I'm still pretty new at rails and couldn't think of a succinct way to put the question. I have a basic habtm model setup: a Project has many Resources and a Resource can have many Projects. I have the database and models setup properly, and can do everything I need to via the console, but I'm having trouble translating it all into the view. On the show view for the Project, I want to be able to create a Resource and automatically assign it to the current Project. Here's my basic html: <p> <b>Name:</b> <%=h @project.name %> </p> <h2>Equipment</h2> <ul> <% @project.resources.each do |r| %> <li><%=h r.name %></li> <% end %> </ul> <h2>Add A Resource</h2> <% form_for(@project) do |f| %> <%= f.error_messages %> <p> Resource Name:<br /> <%= f.text_field :resources %> </p> <p> <%= f.submit 'Create' %> </p> <% end %> Obviously, that form won't work, but I'm at a loss for what to do next. I've searched around for various examples, but haven't found one for what I'm trying to do here. One thing I've thought of was to change the form to be form_for(Resource.new) and include a hidden input of the @project.id. And then when the resource_controller handles the form, check for that id and go from there. That seems like an ugly kludge though.

    Read the article

  • How to retrieve parent container ID after sorting using Jquery sortable??

    - by user187580
    Hello I have following markup and javascript to sort some items. Items can be sorted within a block or across other blocks. It works but I have a problem in retrieving correct block ID after an item is moved from one block to another. For example, if I move item 1 within "Block 1", I get "I am in Block= block_1" but if I move Item 1 to Block 2 I still get I am in Block 1. But I want to make the block 2 as its parent container. I need to retrieve this id so that I can do some ajax and update the db accordingly. Can you please help me correct this?? <div id="blocks_sortable"> <div id="block_1"> <h2>Block 1</h2> <div class="items_sortable connectedSortable"> <div id="item_1"> <span>Item 1</span></div> <div id="item_2"> <span>Item 2</span></div> <div id="item_3"> <span>Item 3</span></div> </div> </div> <div id="block_2"> <h2>Block 2</h2> <div class="items_sortable connectedSortable"> <div id="item_4"> <span>Item 4</span></div> <div id="item_5"> <span>Item 5</span></div> <div id="item_6"> <span>Item 6</span></div> </div> </div> </div> <script> $("#blocks_sortable").sortable({ }); $(".items_sortable").sortable({ connectWith: '.connectedSortable' , forcePlaceholderSize: true , stop : function(event, ui){ alert("I am in block = "+$(this).parent().attr("id")); } }).disableSelection(); </script> Thank you.

    Read the article

  • jQuery AJAX POST gives undefined index

    - by Sebastian
    My eventinfo.php is giving the following output: <br /> <b>Notice</b>: Undefined index: club in <b>/homepages/19/d361310357/htdocs/guestvibe/wp-content/themes/yasmin/guestvibe/eventinfo.php</b> on line <b>11</b><br /> [] HTML (index.php): <select name="club" class="dropdown" id="club"> <?php getClubs(); ?> </select> jQuery (index.php): <script type="text/javascript"> $(document).ready(function() { $.ajax({ type: "POST", url: "http://www.guestvibe.com/wp-content/themes/yasmin/guestvibe/eventinfo.php", data: $('#club').serialize(), success: function(data) { $('#rightbox_inside').html('<h2>' + $('#club').val() + '<span style="font-size: 14px"> (' + data[0].day + ')</h2><hr><p><b>Entry:</b> ' + data[0].entry + '</p><p><b>Queue jump:</b> ' + data[0].queuejump + '</p><br><p><i>Guestlist closes at ' + data[0].closing + '</i></p>'); }, dataType: "json" }); }); $('#club').change(function(event) { $.ajax({ type: "POST", url: "http://www.guestvibe.com/wp-content/themes/yasmin/guestvibe/eventinfo.php", data: $(this).serialize(), success: function(data) { $('#rightbox_inside').hide().html('<h2>' + $('#club').val() + '<span style="font-size: 14px"> (' + data[0].day + ')</h2><hr><p><b>Entry:</b> ' + data[0].entry + '</p><p><b>Queue jump:</b> ' + data[0].queuejump + '</p><br><p><i>Guestlist closes at ' + data[0].closing + '</i></p>').fadeIn('500'); }, dataType: "json" }); }); </script> I can run alerts from the jQuery, so it is active. I've copied this as is from an old version of the website, but I've changed the file structure (through to move to WordPress) so I suspect the variables might not even be reaching eventinfo.php in the first place... index.php is in wp-content/themes/cambridge and eventinfo.php is in wp-content/themes/yasmin/guestvibe but I've tried to avoid structuring issues by referencing the URL in full. Any ideas?

    Read the article

  • removing contents of div using Jquery "empty" doesn't work

    - by Andrew
    I'm trying to remove contents of particular div which are basically list items and a heading by using jquery empty so that I could replace with new contents. What happens when I run the code is, the whole div element blinked and flash the replaced content and then the old one reappear. Can anyone tell me what am I doing wrong? Here's an excerpt of my code - <pre> $("#msg_tab").bind("click",function(){ $("#sidebar1").remove(); var html="<ul><li><h2>test</h2><ul><li><a href='#'>Compose New Message</a></li><li><a href='#'>Inbox</a></li><li><a href='#'>Outbox</a></li><li><a href='#'>Unread</a></li><li><a href='#'>Archive</a></li></ul></li></ul>"; $("#sidebar1").append(html); }); <div id="sidebar1" class="sidebar"> <ul> <li> <h2>Messages</h2> <ul> <li><a href="#">Compose New Message</a></li> <li><a href="#">Inbox</a></li> <li><a href="#">Outbox</a></li> <li><a href="#">Unread</a></li> <li><a href="#">Archive</a></li> </ul> </li> </ul> </div> Another question is, how do I write multiple line html code string in javascript so that java would recognize as a string value? Placing forward slash at the end is ok when the string is not a html code but, in html code, I can't figure out how to escape forward slash from ending tags.I've tried escaping it with backward slash but doesn't work. I would be appreciated if anyone could shed a light on this matter as well.

    Read the article

  • jQuery toggle caching / cookies

    - by user1706680
    I’m using the jQuery toggle function for my navigation. By default the Authors toggle is visible, the Archives toggle is closed. http://jsfiddle.net/TeDFs/4/ My problem is that when the users switches to another page the toggles reset themselves. For example, when the user closes the Authors toggle and opens the Archive toggle and then navigates to another page the default settings are loaded. I read that it’s possible to store the settings via cookies but I’m absolutely new to jQuery and it would be great if somebody could help me out! HTML <div id="authors" class="widget"> <h2 class="widget-title-visible">Authors</h2> <div class="toggle"> <div class="submenu"> <ul> <li>Name 1</li> <li>Name 2</li> <li>Name 3</li> <li>Name 3</li> </ul> </div> </div> <div id="archives" class="widget"> <h2 class="widget-title">Archiv</h2> <div class="toggle hidden"> <div class="submenu"> <ul> <li>November 2012</li> <li>Oktober 2012</li> </ul> </div> </div> </div>? jQuery function toggleWidgets() { jQuery('.widget-title').addClass('plus'); jQuery('.widget-title-visible').addClass('minus'); jQuery('.widget-title').click(function() { $(this).toggleClass('plus').toggleClass('minus').next().toggle(180); }); jQuery('.widget-title-visible').click(function() { $(this).toggleClass('minus').toggleClass('plus').next().toggle(180); }); } jQuery(document).ready(function() { toggleWidgets(); } )? CSS .hidden{ display:none; } .plus { background: url(http://moargh.de/daten/sidebar_arrows.png) 0 5px no-repeat; padding: 0 0 0 12px; } .minus { background: url(http://moargh.de/daten/sidebar_arrows.png) 0 -10px no-repeat; padding: 0 0 0 12px; }

    Read the article

  • RESTfully request sub-parts of a representation be of a certain content-type

    - by Grayside
    I am requesting (via Accept: application/json) that an API I'm designing respond as JSON. However, I want the values within that JSON to be specified to conform to text/plain or text/html depending on the capabilities of the client. What is the RESTful best practice for a "sub-type"? How would this work if I formally switched to HAL as the top-level container? Accept: application/json+text/plain { "value": "Hello World" } Accept: application/json+text/html { "value": "<h2>Hello World</h2>" }

    Read the article

  • Hide JQueryUI Accordion Items with View All Option

    - by Dominic Webb
    I have a JqueryUi Accordion that is dynamically generated. However I need it to show only the first 8 items with the rest viewable by clicking a "View All" link. The code is simply a series of: <h2>Title</h2> <div>....</div> The jquery is all of: $(function() { $("#sidebar").accordion({autoHeight: false}); }); Thanks

    Read the article

  • bracket style border around elements

    - by user1255049
    I'm looking for a way to implement a bracket style border around my <h2> headings; I've attached an image showing exactly what I'm trying to accomplish. The only way I can think of to achieve this effect is by using images, but I'm unsure of exactly how to do so(all of my <h2>s are of varying length/height, or if maybe there is a better way. Any tips & insight are greatly appreciated.

    Read the article

  • sifr menu list problems, height of object calculated wrong

    - by armyofda12mnkeys
    I am using Drupal and have sifr set on list items, and also a, a:hover are set via Drupal so that the links hover. I looked at the sifr3-rules.js file drupal's render module creates and it looks good. and in fact my other sifr items look fine... But the list item ones are goofing for some reason... There is extra space below the list, so if i have a list item, and inside of that, I have a unordered list with more list items, the Flash Object made in the 1st li (which will cover the rest of the sublist items too), is too bid so you see space under the children until the next parent li comes up. (so looks like extra bottom padding on that portion of the list in IE8... in FF almost similar but each subitem has space at bottom... with javascript turned off, you see the list items look fine by themselves).... Also if the parent list item is shorter than the sub list items text, the width for the flash object is set only as long as the first list item, and therefore cuts off the rest the sublist item's text. Any idea how to resolve any of these? Only unusual thing i see i am doing is setting forceSingleLine and preventWrap (which dont make a difference if taken off). ****Edit, I may just try to figure out how to get Drupal's menu-block module to output a around my hyperlinks in the list items... then i can target the div's with my rule (and the a,a:hover rules will apply), so each menu item gets its own sifr object instead of sifr3 trying to figure out how to do the lists and sublists. Very useful to me is anyone knows a way to target a hyperlink (<a> tag) and also allow a:hover rules. I know how to do it with pretend another tag that includes hyperlinks, like if i had <h2><a>sometitle</a></h2>, i could have a rule for h2, but then use the a, a:hover rules in the sifr3-rules.js file to target that. so i would need a way to target the hyperlink in the list, but also apply a :hover to it (not sure if this can be done since its not underneith for example the h2 tag).

    Read the article

  • show tweets inside div from an asynchronous loop

    - by ak_47
    Am trying to laod tweets into a div after looping them from yahoo placemaker. They are loading on the div but the information shown by them is placemaker's last result. This is the code.. function getLocation(user, date, profile_img, text,url) { var templates = []; templates[0] = '<div><div></div><h2 class="firstHeading">'+user+'</h2><div>'+text+'</div><div><p><a href="' + url + '"target="_blank">'+url+'</a></p></div><p>Date Posted- '+date+'</p></div>'; templates[1] = '<table width="320" border="0"><tr><td class="user" colspan="2" rowspan="1">'+user+'</td></tr><tr><td width="45"><a href="'+profile_img+'"><img src="'+profile_img+'" width="55" height="50"/></a></td><td width="186">'+text+'<p><a href="' + url + '"target="_blank">'+url+'</a></p></td></tr></table><hr>'; templates[2] = '<div><div></div><h2 class="firstHeading">'+user+'</h2><div>'+text+'</div><div><p><a href="' + url + '"target="_blank">'+url+'</a></p></div><p>Date Posted- '+date+'</p></div>'; templates[3] = '<table width="320" border="0"><tr><td class="user" colspan="2" rowspan="1">'+user+'</td></tr><tr><td width="45"><a href="'+profile_img+'"><img src="'+profile_img+'" width="55" height="50"/></a></td><td width="186">'+text+'<p><a href="' + url + '"target="_blank">'+url+'</a></p></td></tr></table><hr>'; var geocoder = new google.maps.Geocoder(); Placemaker.getPlaces(text, function (o) { console.log(o); if (!$.isArray(o.match)) { var latitude = o.match.place.centroid.latitude; var longitude = o.match.place.centroid.longitude; var myLatLng = new google.maps.LatLng(latitude, longitude); var marker = new google.maps.Marker({ icon: profile_img, title: user, map: map, position: myLatLng }); var infowindow = new google.maps.InfoWindow({ content: templates[0].replace('user',user).replace('text',text).replace('url',url).replace('date',date) }); var $tweet = $(templates[1].replace('%user',user).replace(/%profile_img/g,profile_img).replace('%text',text).replace('%url',url)); $('#user-banner').css("visibility","visible");$('#news-banner').css("visibility","visible"); $('#news-tweets').css("overflow","scroll").append($tweet); function openInfoWindow() { infowindow.open(map, marker); } google.maps.event.addListener(marker, 'click', openInfoWindow); $tweet.find(".user").on('click', openInfoWindow); bounds.extend(myLatLng); } }); }

    Read the article

  • How SQLite on Android handles long stings?

    - by Levara
    Hi! I'm wondering how Android's implementation of SQLite handles long Strings. Reading from online documentation on sqlite, it said that strings in sqlite are limited to 1 million characters. My strings are definitely smaller. I'm creating a simple RSS application, and after parsing a html document, and extracting text, I'm having problem saving it to a database. I have 2 tables in database, feeds and articles. RSS feeds are correctly saved and retrieved from feeds table, but when saving to the articles table, logcat is saying that it cannot save extracted text to it's column. I don't know if other columns are making problems too, no mention of them in logcat. I'm wondering, since text is from an article on web, are signs like (",',;) creating problems? Is Android automaticaly escaping them, or I have to do that. I'm using a technique for inserting similar to one in notepad tutorial: public long insertArticle(long feedid, String title, String link, String description, String h1, String h2, String h3, String p, String image, long date) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_FEEDID, feedid); initialValues.put(KEY_TITLE, title); initialValues.put(KEY_LINK, link); initialValues.put(KEY_DESCRIPTION, description ); initialValues.put(KEY_H1, h1 ); initialValues.put(KEY_H2, h2); initialValues.put(KEY_H3, h3); initialValues.put(KEY_P, p); initialValues.put(KEY_IMAGE, image); initialValues.put(KEY_DATE, date); return mDb.insert(DATABASE_TABLE_ARTICLES,null, initialValues); } Column P is for extracted text, h1, h2 and h3 are for headers from a page. Logcat reports only column p to be the problem. The table is created with following statement: private static final String DATABASE_CREATE_ARTICLES = "create table articles( _id integer primary key autoincrement, feedid integer, title text, link text not null, description text," + "h1 text, h2 text, h3 text, p text, image text, date integer);"; Thanks!

    Read the article

  • Re-order form fields on submit url

    - by user2521764
    I have a get form with several visible and hidden input fields. When the form is submitted, selected fileds with their values are appended to the url in the order they are placed in the form. Is there a way to re-order the parameters in the url using jQuery? Note that for the reasons of usability, I can not re-order the elements on the form itself. I know it beggs the question "why would I want to do it?", but the reason is that I will be hitting a static page, so the order of the parameters have to be exactly how they are in the static page url. For example, my form returns a url: http://someurl??names=comm&search=all&type=list while the static page has a url: http://someurl??search=all&type=list&names=comm A simplified form example is here: <form id="search_form" method="get" action="http://www.cbif.gc.ca/pls/pp/ppack.jump" > <h2>Choose which names you want to be displayed</h2> <select name="names"> <option value="comm">Common names</option> <option value="sci">Scientific names</option> </select> <h2>Choose how you want to view the results</h2> <input type="radio" name="search" value="all" id="complete" checked = "checked" /> <label for="complete" id="completeLabel">Complete list</label> <br/> <input type="radio" name="p_null" value="house" id="house" /> <label for="house" id="houseLabel">House plants only</label> <br/> <input type="radio" name="p_null" value="illust" id="illustrat" /> <label for="illustrat" id="illustratLabel">Plants with Illustrations</label> <br/> <input type="hidden" name="type" value="list" /> <input type="submit" value="Submit" /> </form> I can get form fields with values using $(#search_form).serializeArray() and massage the array like I want to, but I don't know how to set it back, i.e. modify the serialized values so that the submitted url has my order of parameters. I'm not even sure if this is the right way to go about it, so any pointers would be greatly appreciated.

    Read the article

  • Resizing text in an HTML 5 page using JQuery

    - by nikolaosk
    This is going to be the ninth post in a series of posts regarding HTML 5. You can find the other posts here, here , here , here, here , here , here and here.In this post I will demonstrate how to implement a very common feature found in websites today, enabling the visitor to increase or decrease the font size of a page. You can use the JQuery code I will write in this post for HTML pages which do not follow the HTML 5 standard. As I said earlier we need to write JavaScript to implement this functionality.I will use the very popular JQuery Library. Please download the library (minified version) from http://jquery.com/downloadIn this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here. The HTML markup for the page follows. <!DOCTYPE html><html lang="en">  <head>    <title>HTML 5, CSS3 and JQuery</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >    <link rel="stylesheet" type="text/css" href="style.css">     <script type="text/javascript" src="jquery-1.8.2.min.js">        </script><script type="text/javascript">$(function() {    $('a').click(function() {        var getfont = $('p').css('font-size');        var mynum = parseFloat(getfont, 10);        var newmwasure = getfont.slice(-2);                $('p').css('font-size', mynum / 1.2 + newmwasure);                if(this.id == 'increase') {            $('p').css('font-size', mynum * 1.4 + newmwasure);        }     })    })</script>       </head>  <body>      <div id="header">      <h1>Learn cutting edge technologies</h1>      <h2>HTML 5, JQuery, CSS3</h2>    </div>    <div id="resize">    <a href="" id="increase">Increase Font</a>       |        <a href="" id="decrease">Decrease Font</a>        </div>        <div id="main">          <h2>HTML 5</h2>                        <article>          <p>            HTML5 is the latest version of HTML and XHTML. The HTML standard defines a single language that can be written in HTML and XML. It attempts to solve issues found in previous iterations of HTML and addresses the needs of Web Applications, an area previously not adequately covered by HTML.          </p>          </article>      </div>             </body>  </html>  There is nothing difficult or fancy in the HTML markup above. I have a link to the external JQuery library and the JQuery code is included inside the .html page.I have two links on this page that will increase/decrease the font size of the contents enclosed inside the <p></p> tags.Let me explain what the JQuery code does.When the user clicks on the link, I store in a variable the current font size of the <p> element that I get back from the CSS function. var getfont = $('p').css('font-size'); So now we have the original value. That will return a value like "16px" "1.2em".Then I need to get the unit of measurement (px,em).I use the slice() function. var newmwasure = getfont.slice(-2); Then I want to get only the numeric part of the returning value.I do that using the parseFloat() function.Have a look at the parseFloat() function.Finally with this bit of code I choose a ratio (I am devising a very simple algorithm for increasing and decreasing) and apply it to the <p> element. I still use the CSS function. You can get but also set the font size for a particular element with the CSS function.So I check for the id=increase and if this matches I will increase the font size of the <p> element.If it does not match we will decrease the font size.   $('p').css('font-size', mynum / 1.2 + newmwasure);                if(this.id == 'increase') {            $('p').css('font-size', mynum * 1.4 + newmwasure);  The code for the css file (style.css) followsbody{background-color:#eaeaea;}p{font-size:0.8em;font-family:Tahoma;}#resize{width:200px;background-color:#dadada;}#resize a {text-decoration:none;}The above CSS rules are very easy to understand. Now I save all my work.I view my page on the browser for the first time.Have a look at the picture below Now I increase the font size by clicking the respective linkHave a look at the picture below  Finally I decrease the font size by clicking on the respective linkHave a look at the picture below   Once more we see that the power and simplicity of JQuery library enables us to write less code but accomplish a lot at the same time. Hope it helps!!  

    Read the article

  • Right div pushing center div further down

    - by Chase
    I cannot get this last div to go up properly in my layout and have tried countless things. I'm not sure what's going on with my css? Here is a screenshot: http://img291.imageshack.us/img291/5377/screenshot20100528at123.png #events { float: left; width: 420px; margin:0 0 5px 0; font-family:Helvetica, Arial, sans-serif; font-size: 16px; background-image: url(images/lastfmhead.jpg); background-repeat: no-repeat; height:360px; overflow:hidden; display: inline; } #events table { width:419px; } #events th, td { padding: 3px 3px; } #whatsup ul, #citywhatsup ul { margin:0 5px 0 5px; text-align:left; font-family:Helvetica, Arial, sans-serif; } #whatsup ul li, #citywhatsup ul li{ list-style-type:none; list-style: none; } #whatsup hr, #citywhatsup hr{ border: none 0; border-top: 1px dashed #990000;/*the border*/ width: 100%; height: 1px; margin: 1px auto 5px auto;/*whatever the total width of the border-top and border-bottom equal*/ } #events ul { margin:5px 5px 0 5px; } #events ul li{ list-style-type:none; list-style: none; } #attending ul { display: inline-block; margin: 0; width:200px; } #attending ul li { display: inline-block; list-style-image:none; margin:0; padding:2px 5px 2px 5px; } #attending { width: 230px; margin:0 13px 5px 12px; float: left; display: inline; background-image: url(images/otherhead.jpg); background-repeat: no-repeat; text-align:center; height:360px; overflow:hidden; } #whatsup { width: 230px; margin:0 0 5px 0; float: left; display:inline; background-image: url(images/otherhead.jpg); background-repeat: no-repeat; text-align:center; } #eventtitle{ margin: 3px 0 -3px 0; } #eventtitle { color: #900; margin-left: 5px; font-size:16px; } #tweetit { color: #487B96 !important; font-size:16px; margin: 3px 0 -4px 0; } #photos { background-image: url(images/flickrheader.jpg); background-repeat: no-repeat; width: 665px; clear:both; } <div id="cityevents"> <h2> Events </h2> <table> <th>Date </th><th> Who's Playing </th><th> Venue </th><th> City </th><th> Tickets </th> <tr><td>May 28</td><td><a href='http://www.songkick.com/concerts/5384486?utm_source=1121&utm_medium=partner' target='_blank'>Jill King</a></td><td>Open Eye Cafe</td><td>Carrboro</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>May 28</td><td><a href='http://www.songkick.com/concerts/5281141?utm_source=1121&utm_medium=partner' target='_blank'>Ahleuchatistas</a></td><td>Nightlight</td><td>Chapel Hill</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>May 28</td><td><a href='http://www.songkick.com/concerts/4970896?utm_source=1121&utm_medium=partner' target='_blank'>Sam Quinn</a></td><td>Local 506</td><td>Chapel Hill</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>May 29</td><td><a href='http://www.songkick.com/concerts/5303661?utm_source=1121&utm_medium=partner' target='_blank'>Cagematch Mayhem, Champion Vs Au Jus, Heartbreaker Vs Au Jus</a></td><td>DSI Comedy Theater</td><td>Carrboro</td><td style='text-align:center;'><a href='http://www.songkick.com/concerts/5303661/tickets?utm_source=1121&utm_medium=partner' target='_blank'> Find </a></td></tr><tr><td>May 29</td><td><a href='http://www.songkick.com/concerts/4722066?utm_source=1121&utm_medium=partner' target='_blank'>Lewd Acts, Converge, Gaza, Black Breath</a></td><td>Cat's Cradle</td><td>Carrboro</td><td style='text-align:center;'><a href='http://www.songkick.com/concerts/4722066/tickets?utm_source=1121&utm_medium=partner' target='_blank'> Find </a></td></tr><tr><td>May 29</td><td><a href='http://www.songkick.com/concerts/4647076?utm_source=1121&utm_medium=partner' target='_blank'>Nate Currin</a></td><td>Broad Street Cafe</td><td>Durham</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>May 29</td><td><a href='http://www.songkick.com/concerts/5580211?utm_source=1121&utm_medium=partner' target='_blank'>International Night</a></td><td>Serena Rtp</td><td>Durham</td><td style='text-align:center;'><a href='http://www.songkick.com/concerts/5580211/tickets?utm_source=1121&utm_medium=partner' target='_blank'> Find </a></td></tr><tr><td>May 29</td><td><a href='http://www.songkick.com/concerts/4770241?utm_source=1121&utm_medium=partner' target='_blank'>Jill King</a></td><td>Caffe Driade</td><td>Chapel Hill</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>May 29</td><td><a href='http://www.songkick.com/concerts/5406411?utm_source=1121&utm_medium=partner' target='_blank'>Sunbears!</a></td><td>Local 506</td><td>Chapel Hill</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>May 29</td><td><a href='http://www.songkick.com/concerts/4924136?utm_source=1121&utm_medium=partner' target='_blank'>Studio Gangsters</a></td><td>The Reservoir</td><td>Carrboro</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>May 30</td><td><a href='http://www.songkick.com/concerts/5252161?utm_source=1121&utm_medium=partner' target='_blank'>She Wants Revenge</a></td><td>Cat's Cradle</td><td>Carrboro</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>May 30</td><td><a href='http://www.songkick.com/concerts/4436326?utm_source=1121&utm_medium=partner' target='_blank'>Unheard Radio Battle of the Bands</a></td><td>Mansion 462</td><td>Chapel Hill</td><td style='text-align:center;'><a href='http://www.songkick.com/concerts/4436326/tickets?utm_source=1121&utm_medium=partner' target='_blank'> Find </a></td></tr><tr><td>May 30</td><td><a href='http://www.songkick.com/concerts/4924141?utm_source=1121&utm_medium=partner' target='_blank'>Studio Gangsters</a></td><td>The Cave</td><td>Chapel Hill</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>Jun 2</td><td><a href='http://www.songkick.com/concerts/5252881?utm_source=1121&utm_medium=partner' target='_blank'>Jeanne Jolly</a></td><td>Caffe Driade</td><td>Chapel Hill</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>Jun 2</td><td><a href='http://www.songkick.com/concerts/4628026?utm_source=1121&utm_medium=partner' target='_blank'>James Husband, Of Montreal</a></td><td>Cat's Cradle</td><td>Carrboro</td><td style='text-align:center;'><a href='http://www.songkick.com/concerts/4628026/tickets?utm_source=1121&utm_medium=partner' target='_blank'> Find </a></td></tr><tr><td>Jun 2</td><td><a href='http://www.songkick.com/concerts/5019466?utm_source=1121&utm_medium=partner' target='_blank'>Camera Obscura</a></td><td>Duke Gardens</td><td>Durham</td><td style='text-align:center;'><a href='http://www.songkick.com/concerts/5019466/tickets?utm_source=1121&utm_medium=partner' target='_blank'> Find </a></td></tr><tr><td>Jun 3</td><td><a href='http://www.songkick.com/concerts/4226511?utm_source=1121&utm_medium=partner' target='_blank'>Reverend Horton Heat, Cracker, Legendary Shack Shakers</a></td><td>Cat's Cradle</td><td>Carrboro</td><td style='text-align:center;'><a href='http://www.songkick.com/concerts/4226511/tickets?utm_source=1121&utm_medium=partner' target='_blank'> Find </a></td></tr><tr><td>Jun 3</td><td><a href='http://www.songkick.com/concerts/5253371?utm_source=1121&utm_medium=partner' target='_blank'>American Aquarium</a></td><td>Local 506</td><td>Chapel Hill</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>Jun 4</td><td><a href='http://www.songkick.com/concerts/4285251?utm_source=1121&utm_medium=partner' target='_blank'>Laurence Juber</a></td><td>The ArtsCenter</td><td>Carrboro</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr><tr><td>Jun 4</td><td><a href='http://www.songkick.com/concerts/5642566?utm_source=1121&utm_medium=partner' target='_blank'>Community Jam, Pt Scarborough Is a Movie, Armageddon'it</a></td><td>DSI Comedy Theater</td><td>Carrboro</td><td style='text-align:center;'><a href='http://www.songkick.com/concerts/5642566/tickets?utm_source=1121&utm_medium=partner' target='_blank'> Find </a></td></tr><tr><td>Jun 4</td><td><a href='http://www.songkick.com/concerts/4676216?utm_source=1121&utm_medium=partner' target='_blank'>Big Bill Morganfield</a></td><td>Papa Mojos Roadhouse</td><td>Durham</td><td style='text-align:center;'><span style='color: #999'> Find </span></td></tr> </table> </div> <!-- Events --> <div id="citywhatsup"> <h2> What's Up? <div id="tweetit"><a class="btn-slide">Tell em'</a> </div></h2> <div id="twitpanel"></div> <script type="text/javascript"> twttr.anywhere(function (T) { T("#twitpanel").tweetBox({ height: 100, width: 215, label: '', defaultContent: "" }); }); </script> <script type="text/javascript"> twttr.anywhere(function (T) { T("#whatsup").linkifyUsers(); }); </script> <ul> <li><img src='http://a1.twimg.com/profile_images/898693876/4604414396_0464180430_b_normal.jpg' alt='kaiten_keiku' height=40px; width=40px; style='border:0px; float: left; padding-right:4px;'/> @kaiten_keiku: <span style='text-align:justify;'>@Charlotte_Nao ????????~?????????!</span> - <span class='twittertime'>May 28 12:37AM</span></li><hr/><li><img src='http://a3.twimg.com/profile_images/612153581/bowdown_normal.jpg' alt='bugn' height=40px; width=40px; style='border:0px; float: left; padding-right:4px;'/> @bugn: <span style='text-align:justify;'>@Bravotv (sitc2 as rhony) Bethenny-Carrie, Sonja-Samantha, Alex-Miranda, Ramona-Charlotte</span> - <span class='twittertime'>May 28 12:36AM</span></li><hr/><li><img src='http://a1.twimg.com/profile_images/844630278/mj_normal.jpg' alt='Myra_Jones' height=40px; width=40px; style='border:0px; float: left; padding-right:4px;'/> @Myra_Jones: <span style='text-align:justify;'>@t_weet123 If you're still in Charlotte then you need to head to Whiskey River...they say Luke B. just walked in and started drinking.</span> - <span class='twittertime'>May 28 12:36AM</span></li><hr/><li><img src='http://a1.twimg.com/profile_images/936667468/110971230_normal.jpg' alt='THEORACLE2' height=40px; width=40px; style='border:0px; float: left; padding-right:4px;'/> @THEORACLE2: <span style='text-align:justify;'>@MsKamilah08 are yall in charlotte?</span> - <span class='twittertime'>May 28 12:36AM</span></li><hr/><li><img src='http://a1.twimg.com/profile_images/767244842/7AM_normal.jpg' alt='mtollefsrud' height=40px; width=40px; style='border:0px; float: left; padding-right:4px;'/> @mtollefsrud: <span style='text-align:justify;'>@vosler09 thinks I'm Charlotte.</span> - <span class='twittertime'>May 28 12:36AM</span></li><hr/><li><img src='http://a3.twimg.com/profile_images/936496517/DSCF0317_-_Copy_normal.JPG' alt='Thasian' height=40px; width=40px; style='border:0px; float: left; padding-right:4px;'/> @Thasian: <span style='text-align:justify;'>I like #CharMeck #Charlotte | Atlanta = #No #FAIL #EPICFAIL</span> - <span class='twittertime'>May 28 12:36AM</span></li><hr/><li><img src='http://a3.twimg.com/profile_images/695551715/NASCAR_logo_flag_normal.jpg' alt='NascarNewsNow' height=40px; width=40px; style='border:0px; float: left; padding-right:4px;'/> @NascarNewsNow: <span style='text-align:justify;'>#NASCAR #RACING News from the track: Charlotte Motor Speedway | Nascar Leath: Ahh, the waiting is... http://bit.ly/b2DToq #NHRA #DAYTONA500</span> - <span class='twittertime'>May 28 12:35AM</span></li> </ul> </div> <div id="photos"> <h2> Recent Photos </h2> <ul> <li><a href='http://farm5.static.flickr.com/4029/4646832962_980f936db9.jpg' target='_blank' rel='lightbox-photos' title='05 23 10 Jamie's Baby Shower 097'><img src='http://farm5.static.flickr.com/4029/4646832962_980f936db9_t.jpg' alt='05 23 10 Jamie's Baby Shower 097' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm4.static.flickr.com/3176/4646218481_d06829a778.jpg' target='_blank' rel='lightbox-photos' title='summer'><img src='http://farm4.static.flickr.com/3176/4646218481_d06829a778_t.jpg' alt='summer' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4032/4646833312_7b1de5390a.jpg' target='_blank' rel='lightbox-photos' title='100_0064'><img src='http://farm5.static.flickr.com/4032/4646833312_7b1de5390a_t.jpg' alt='100_0064' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4008/4646832834_784a0a9ed1.jpg' target='_blank' rel='lightbox-photos' title=''><img src='http://farm5.static.flickr.com/4008/4646832834_784a0a9ed1_t.jpg' alt='' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4066/4646218735_b37d8fd9e5.jpg' target='_blank' rel='lightbox-photos' title='DSC05524'><img src='http://farm5.static.flickr.com/4066/4646218735_b37d8fd9e5_t.jpg' alt='DSC05524' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4054/4646830604_97afd54623.jpg' target='_blank' rel='lightbox-photos' title='DTLA graff'><img src='http://farm5.static.flickr.com/4054/4646830604_97afd54623_t.jpg' alt='DTLA graff' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4066/4646833048_7a9ab28733.jpg' target='_blank' rel='lightbox-photos' title='100_0243.jpg'><img src='http://farm5.static.flickr.com/4066/4646833048_7a9ab28733_t.jpg' alt='100_0243.jpg' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm4.static.flickr.com/3399/4646832626_de89d0fb0e.jpg' target='_blank' rel='lightbox-photos' title='6W????'><img src='http://farm4.static.flickr.com/3399/4646832626_de89d0fb0e_t.jpg' alt='6W????' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4005/4646832826_0d9e8afe19.jpg' target='_blank' rel='lightbox-photos' title='IMG_9381'><img src='http://farm5.static.flickr.com/4005/4646832826_0d9e8afe19_t.jpg' alt='IMG_9381' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4046/4646830752_dfc32b1740.jpg' target='_blank' rel='lightbox-photos' title='11'><img src='http://farm5.static.flickr.com/4046/4646830752_dfc32b1740_t.jpg' alt='11' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4010/4646215929_80b78f0007.jpg' target='_blank' rel='lightbox-photos' title='GEDC8592'><img src='http://farm5.static.flickr.com/4010/4646215929_80b78f0007_t.jpg' alt='GEDC8592' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4064/4646832384_7fc8d31e11.jpg' target='_blank' rel='lightbox-photos' title='2010 Advanced Grappling'><img src='http://farm5.static.flickr.com/4064/4646832384_7fc8d31e11_t.jpg' alt='2010 Advanced Grappling' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4049/4646218143_c108276325.jpg' target='_blank' rel='lightbox-photos' title='P1270352'><img src='http://farm5.static.flickr.com/4049/4646218143_c108276325_t.jpg' alt='P1270352' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4009/4646217767_3900f39475.jpg' target='_blank' rel='lightbox-photos' title='P1270351'><img src='http://farm5.static.flickr.com/4009/4646217767_3900f39475_t.jpg' alt='P1270351' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4027/4646831284_30b6e6da36.jpg' target='_blank' rel='lightbox-photos' title='Image245'><img src='http://farm5.static.flickr.com/4027/4646831284_30b6e6da36_t.jpg' alt='Image245' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm4.static.flickr.com/3399/4646218295_63a899d322.jpg' target='_blank' rel='lightbox-photos' title='IMG_0037'><img src='http://farm4.static.flickr.com/3399/4646218295_63a899d322_t.jpg' alt='IMG_0037' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4059/4646218159_01d5b02c3f.jpg' target='_blank' rel='lightbox-photos' title='DooDah2010-6665'><img src='http://farm5.static.flickr.com/4059/4646218159_01d5b02c3f_t.jpg' alt='DooDah2010-6665' height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://farm5.static.flickr.com/4053/4646834404_615e09b715.jpg' target='_blank' rel='lightbox-photos' title='IMG_2668'><img src='http://farm5.static.flickr.com/4053/4646834404_615e09b715_t.jpg' alt='IMG_2668' height=100px; width=100px; style='border:0px;'/></a></li> </ul> </div> <div id="videos"> <h2> Recent Videos </h2> <ul> <li><a href='http://www.youtube.com/watch?v=_oc5-0yFoYg&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/_oc5-0yFoYg/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=1pRXKeYVYHc&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/1pRXKeYVYHc/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=yzRQUu-ZBdw&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/yzRQUu-ZBdw/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=mud-A76nLro&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/mud-A76nLro/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=TLOboW19_OA&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/TLOboW19_OA/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=PcYja2jjvi0&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/PcYja2jjvi0/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=KKjklCEMrPk&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/KKjklCEMrPk/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=AyUwY6PRX0Y&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/AyUwY6PRX0Y/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=8Sf2-7RjVYs&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/8Sf2-7RjVYs/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=xGMayoJmhE8&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/xGMayoJmhE8/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=paseBeB6Cb8&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/paseBeB6Cb8/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li><li><a href='http://www.youtube.com/watch?v=l_FSRUtMMik&feature=youtube_gdata' target='_blank'><img src='http://i.ytimg.com/vi/l_FSRUtMMik/default.jpg'height=100px; width=100px; style='border:0px;'/></a></li> </ul> </div> </div><!-- #content -->

    Read the article

  • Resolving bounding box collision detection

    - by ndg
    I'm working on a simple collision detection and resolution method for a 2d tile-based bounding box system. Collision appears to work correctly, but I'm having issues with resolving a collision after it has happened. Essentially what I'm attempting to do is very similar to this approach. The problem I'm experiencing is that because objects can be traveling with both horizontal and vertical velocity, my resolution code causes the object to jump incorrectly. I've drawn the following annotation to explain my issue. In this example, because my object has both horizontal and vertical velocity, my object (which is heading upwards and collides with the bottom of a tile) has it's position altered twice: To correctly adjust it's vertical position to be beneath the tile. To incorrectly adjust it's horizontal position to be to the left of the tile. Below is my collision/resolution code in full: function intersects(x1, y1, w1, h1, x2, y2, w2, h2) { w2 += x2; w1 += x1; if (x2 > w1 || x1 > w2) return false; h2 += y2; h1 += y1; if (y2 > h1 || y1 > h2) return false; return true; } for(var y = 0; y < this.game.level.tiles.length; y++) { for(var x = 0; x < this.game.level.tiles[y].length; x++) { var tile = this.game.level.getTile(x, y); if(tile) { if( this.velocity.x > 0 && intersects(this.position.x+dx+this.size.w, this.position.y+dy, 1, this.size.h, x*tileSize, y*tileSize, tileSize, tileSize) ) { this.position.x = ((x*tileSize)-this.size.w); hitSomething = true; break; } else if( this.velocity.x < 0 && intersects(this.position.x+dx, this.position.y+dy, 1, this.size.h, x*tileSize, y*tileSize, tileSize, tileSize) ) { this.position.x = ((x*tileSize)+tileSize); hitSomething = true; break; } if( this.velocity.y > 0 && intersects(this.position.x+dx, this.position.y+dy+this.size.h, this.size.w, 1, x*tileSize, y*tileSize, tileSize, tileSize) ) { this.position.y = ((y*tileSize)-this.size.h); hitSomething = true; break; } else if( this.velocity.y < 0 && intersects(this.position.x+dx, this.position.y+dy, this.size.w, 1, x*tileSize, y*tileSize, tileSize, tileSize) ) { this.position.y = ((y*tileSize)+tileSize); hitSomething = true; break; } } } } if(hitSomething) { this.velocity.x = this.velocity.y = 0; dx = dy = 0; this.setJumping(false); }

    Read the article

  • Title Background Wrapping

    - by laxj11
    Ok, I am pretty experienced at CSS but at this point I am at a loss. I layed out how I want the title to look like in photoshop: however, the closest I can approach it with css is: I need the black background to extend to the edges of the image and padding on the right side of the title. I hope you understand my question! thanks. here is the html: <div class="glossary_image"> <img src="<?php echo $custom_fields['image'][0]; ?>" /> <div class="title"> <h2><?php the_title(); ?></h2> </div> </div> and the css: .glossary_image { position: relative; height: 300px; width: 300px; margin-top:10px; margin-bottom: 10px; } .glossary_image .title { position: absolute; bottom: 0; left: 0; padding: 10px; } .glossary_image .title h2 { display: inline; font-family:Arial, Helvetica, sans-serif; font-size: 30px; font-weight:bold; line-height: 35px; color: #fff; text-transform:uppercase; background: #000; }

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >