View Full Version : weird javascript problem: no errors thrown & no feedback

07-03-2011, 08:14 AM
For some reason i cant get this bit of code to work. You can ignore the php and html if its getting in your way. Thanks:

<div id="pl">
if($edit == true){
<script type="text/javascript">
if($("#add_playlist").html() == "Add a Playlist >>"){
$("#add_playlist").html("Hide <<");
$("#add_playlist").html("Add a Playlist >>");
<a href="#" id="add_playlist">Add a Playlist >></a>
<form id="add_playlist_form" method="POST" action=" ">
<input type="text" name="pl_name" class="add_playlist"/>
<textarea name="pl_dsec" maxlength="200"></textarea>
<input type="submit" name="submit_playlist" value="Add Playlist" class="submit_playlist"/>
<ul class="vList">

07-03-2011, 08:51 AM
This is a simple $(document).ready() problem ... has been mentioned many times here (nearly every day!)

$(document).ready(function() {
// your code goes here

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum